擅长:python、mysql、java
<p>我会把你的战斗循环起来。例如:</p>
<pre><code>while (ph > 0 or monsterh > 0)
# combat rules
# Check who died and move on from there
if (ph > 0)
# next thing the player does
else
# print "You died"
</code></pre>
<p>关于舍入,有多种选择,具体取决于您想要做什么:<a href="https://stackoverflow.com/questions/3400965/python-getting-only-1-decimal-place">python: getting only 1 decimal place</a></p>