tmewett / BrogueCE

Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game
https://sites.google.com/site/broguegame/
GNU Affero General Public License v3.0
1.03k stars 109 forks source link

If you place alot of items in front of stairs and your inventory is full you "jump" over all of them. #214

Closed weosk closed 9 months ago

weosk commented 3 years ago

Place a lot of items infront of some stairs, if you can' t pick any of them up you will be moved to the nearest empty tile, this can be exploited to "teleport" around a bit.

zenzombie commented 10 months ago

On the surface this seems like a potentially easy change, where we remove HAS_ITEM from the player placement logic below (and one other place). https://github.com/tmewett/BrogueCE/blob/888f86f181f6cb1de0de592106fe770e9709b299/src/brogue/RogueMain.c#L805-L806

After making the change and doing some rudimentary testing in wizard mode, I didn't notice any major issues.

However, it does result in another instance of the unusual situation where an item is essentially hidden because it's in the same square as the player. I think this also happens when deep water pushes an item into the player's square. Inspecting the player square doesn't reveal that there is an item there. The informational text at the bottom of the screen just says whatever it normally would about the square.

Additionally, the item doesn't show in the info panel on the left (until the player moves).

I think it would be best for the change to handle both of these issues. Hopefully that is not too difficult. I also wonder if there is anything else that needs to be considered. The current logic may exist for reasons that are not immediately clear.