Commit 0d80131d by BellCodeEditor

save project

parent 05d97af3
Showing with 13 additions and 2 deletions
...@@ -6,5 +6,17 @@ class Hero: ...@@ -6,5 +6,17 @@ class Hero:
self.attack=attack self.attack=attack
yase=Hero("阿尔法",4000,9500) yase=Hero("阿尔法",4000,9500)
den=Hero('盾山',10000,2000) den=Hero('盾山',10000,2000)
def un():
yase.level=yase.level+10
yase.hp=yase.hp+150
yase.attack=yase.attack+100
def nu():
den.level=den.level+10
den.hp=den.hp+250
den.attack=den.attack+150
un()
un()
nu()
nu()
print("阿尔法的攻击:",yase.attack) print("阿尔法的攻击:",yase.attack)
print("盾山的攻击:",den.hp) print("盾山的攻击:",den.hp)
\ 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