第16 步:我们需要存储并返回最后一个函数的伤害值!
- 和以前一样,让我们返回damage !将Return Statement cast_spell()内部和底部。
- 将变量名从my_var改为damage最后一次返回这个变量!
- 在程序底部查找cast_spell()函数调用。将此代码放在它前面: damage =
最后, damage值超出了所有功能!我们现在可以用它来计算向导的新HP。
To navigate the page using the TAB key, first press ESC to exit the code editor.