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

Do not move into monsters that we cannot displace #47717

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Feb 24, 2021

Summary

Bugfixes "Do not move into monsters that we cannot displace"

Purpose of change

When you are on a fence and moves into a friendly monster that cannot move onto the fence, the player moves into the monster anyway and occupies the same space as the monster.

Describe the solution

Return the original player position from game::place_player if the monster cannot be moved, so both the monster and the player are not moved.
To get past the string freeze, an existing string is used for the message when the monster fails to move.

Testing

Climb onto a fence and tried to move into a nearby monster. The player did not move and a message was shown.

@ZhilkinSerg ZhilkinSerg added 0.F String Freeze <Bugfix> This is a fix for a bug (or closes open issue) Mechanics: Character / Player Character / Player mechanics Monsters Monsters both friendly and unfriendly. and removed 0.F String Freeze labels Feb 24, 2021
@ZhilkinSerg ZhilkinSerg merged commit 9a82417 into CleverRaven:master Feb 24, 2021
@Qrox Qrox deleted the swap branch February 25, 2021 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Mechanics: Character / Player Character / Player mechanics Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants