Waiting as a Strategy
We will make the player withdraw, heal, and then re-enter the fray in this lesson.
We'll cover the following
We can make the game a little more strategic by allowing the player to deliberately wait and receive some healing as a benefit. The player heals their wounds and hit points are restored. Waiting while adjacent to a monster is a poor choice, as the adventurer is likely to be attacked. If the player wants to give it a try that is their prerogative—dying is often the best way to learn to play a game.
The mechanic of deliberately waiting and healing when inactive is handled entirely within the systems/player_input.rs
system. Open the file so we can tweak it a little.
Start by adding Enemy
and Health
to the system:
Get hands-on with 1400+ tech skills courses.