June 2021
Beginner
344 pages
8h 9m
English
The current combat system is simple. An entity attacks another entity—and always inflicts one point of damage. This type of combat system doesn’t provide much of a difficulty curve as the adventurer progresses through the dungeon.
Let’s fix this problem by allowing different entities to inflict varying amounts of damage. Specifically, you’ll adjust the game so that the player can inflict more damage as they find better weapons, and some monsters cause more damage to the player thanks to bigger claws.
Open spawner/template.rs, and add a base_damage field to the Template structure:
| | #[derive(Clone, Deserialize, Debug)] |
| | pub struct Template ... |
Read now
Unlock full access