Skip to content
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

Don't float items onto monsters. Recordings will be incompatible. #525

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brturn
Copy link
Contributor

@brturn brturn commented Feb 5, 2023

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..

@tmewett
Copy link
Owner

tmewett commented Feb 25, 2023

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?

@DavidFidge
Copy link

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).

@zenzombie
Copy link
Collaborator

I'd prefer that this not be considered a bug because:

  1. While challenging, there are two ways to get the item; descent potion or negation charm/scroll.
  2. The situation can be avoided entirely by searching for traps.
  3. 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.

@nstoddard
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants