BrogueCE
BrogueCE copied to clipboard
Don't float items onto monsters. Recordings will be incompatible.
Simplest fix I could think of, but will definitely break recording compatibility (issue #412).
I'm not aware of any puzzles that require items to float ONTO a monster, but if there is one then this fix will not work.
Anything tighter than this requires loading the monster in the location and checking some flags such as (MONST_IMMOBILE | MONST_INANIMATE) which is shared by all the totems. This would only break recordings where this particular bug gets triggered.
Complete fix would require defining a new flag for "monsters that obstruct items" and assign that to all the totems, turrets, and whatnot. Still breaks recordings though..
Thank you! Only problem I can think of is the player waiting by deep water for their item to wash back to shore - might not be clear that they block it? Does the player even count as HAS_MONSTER?
That looks pretty good to me. The only thing I can think of besides what tmewett mentioned is that it could make certain situations easier e.g. the trap where the key lies under the statue - the key wouldn't be able to move back underneath the statue (personally I would prefer the new behavior since it is a pain trying to catch the key and have it move back under the statue).
I'd prefer that this not be considered a bug because:
- While challenging, there are two ways to get the item; descent potion or negation charm/scroll.
- The situation can be avoided entirely by searching for traps.
- The dungeon is a dangerous place and triggering a trap can have negative consequences. A water trap can result in an item floating into lava, destroying it, so it doesn't seem unreasonable that an item could get lodged under a mirror totem, making it either impossible, or difficult to retrieve.
Only problem I can think of is the player waiting by deep water for their item to wash back to shore - might not be clear that they block it? Does the player even count as HAS_MONSTER?
This situation isn't handled well right now anyway: if an item floats onto the player's tile, they don't pick it up; you have to move to an adjacent tile and back to pick it up. This PR seems like a reasonable way to improve that behavior, in my opinion.