Commit 50910f91 by BellCodeEditor

save project

parent f8e9f441
Showing with 6 additions and 4 deletions
...@@ -4,14 +4,16 @@ class Hero: ...@@ -4,14 +4,16 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero("亚瑟",300,200)
def updent(): def updent():
yase.level=yase.level+1 yase.level=yase.level+1
yase.hp=yase.hp+100 yase.hp=yase.hp+100
yase.attack=yase.attack+10 yase.attack=yase.attack+10
updent() yase=s("亚瑟",300,200)
updent() yase.updent()
print(yase.hp) print("等级:"+yase.level)
print("血量:"+yase.hp)
print("攻击:"+yase.attack)
......
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