-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/misc improvements #460
Conversation
tonihele
commented
Jul 8, 2024
- Imps drop the excess gold when digging at their feet if there is no place to store it currently. Prevents imps from coming millionaires
- Creature fleeing is a bit nicer now, always annoyed me the they could not decide what to do, now at least they are a bit more decisive and stay fleeing a minimum time
I don't actually have now the original game at hand (Linux...) so I can't check whether the gold clumped up to bigger piles (the max pile size) on the same tiles or just like this. A lot of small clumps. This has an actual effect on the game as the imp tasks are not grouped. The smaller the piles, the less effective your imps are collecting it... |
|
||
// Drop excess gold, we can only carry so much | ||
boolean hasMaxGold = gold.maxGold > 0; | ||
int maxGoldCanAdd = hasMaxGold ? gold.maxGold - gold.gold : Integer.MAX_VALUE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't MAX_VALUE used to designate no limit in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a question I ask myself every night I go to sleep... :D Yeah, I'll change it. The logic is still a bit iffy here anyway, I didn't even check that do normal creatures have a max value they can carry? Essentially dropping all bribes and pay they are given if they didn't have a chance to blow it all in the rigged casino...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I checked. Creatures always have some max gold set, everybody. 0 is not used to indicate max gold. That was my half assed assumption. So removed all assumptions from here.
Also normal creatures do have max gold. I guess it makes sense in the real world. But I don't know how the normal creatures deal with their possessions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense that they can't have more money than they can carry. But I guess it'd reduce their happiness if they basically have to throw it away.