amethyst / amethyst/rustrogueliketutorial

[Chapter 66] Missing `return` in `spell_trigger`

未关闭
#228 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
970
派生
166
PR 合并指标
30 天内没有已合并 PR

描述

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.)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。