Commit 73bc8144 by BellCodeEditor

save project

parent af6a8e04
Showing with 13 additions and 2 deletions
...@@ -9,4 +9,15 @@ hy=Hero('hy',250,23) ...@@ -9,4 +9,15 @@ hy=Hero('hy',250,23)
k=Hero('K',5600,199) k=Hero('K',5600,199)
print("yase的血量",yase.hp) print("yase的血量",yase.hp)
print("hy的血量",hy.hp) print("hy的血量",hy.hp)
print("K的血量",k.hp) print("K的血量",k.hp)
\ No newline at end of file def upgrade:
yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase.level=yase.level+1
yase=Hero("yase",300,20)
print(yase.hp)
upgrade()
upgrade()
print("调用两次的血量为",yase.hp)
print("调用两次的等级为",yase.level)
print("调用两次的攻击力为",yase.attack)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment