第 14 步:当巫师施放 Rock Smash 法术时, rock_smash()也需要返回damage 。
- 将另一个Return Statement rock_smash()内部和底部。
- 将变量名从my_var更改为damage 。这会将damage返回到我们调用rock_smash()的位置。
我们现在已经对其进行了设置,以便每个法术都存储计算的damage并返回它。我们在哪里调用拼写函数?那是我们需要存储返回的damage值的地方。
To navigate the page using the TAB key, first press ESC to exit the code editor.