amethyst / amethyst/rustrogueliketutorial
[Chapter 66] Missing `return` in `spell_trigger`
- Lingua principale
- Rust
- Stelle
- 970
- Fork
- 166
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
https://github.com/amethyst/rustrogueliketutorial/blob/33872fe582f226178436847e1f74eafcbf9c0d1a/book/src/chapter_66.md?plain=1#L453-L465
There is a missing `return` statement after the check on the mana pool.
Currently, if the caster lacks the mana for a spell, the pool won't be updated but the spell will still be cast.
For the player, this won't happen because the spell will be cast from the targeting menu, which has the proper check against this, but a direct call to `spell_trigger` could lead to an error.
(If the check is always supposed to always have been done prior to the call, then let's simply remove it here.)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.