Commit 73bc8144 by BellCodeEditor

save project

parent af6a8e04
Showing with 12 additions and 0 deletions
......@@ -10,3 +10,14 @@ k=Hero('K',5600,199)
print("yase的血量",yase.hp)
print("hy的血量",hy.hp)
print("K的血量",k.hp)
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