Commit 113c9ec2 by BellCodeEditor

save project

parent aa8e4f20
Showing with 10 additions and 3 deletions
...@@ -6,5 +6,12 @@ class hero: ...@@ -6,5 +6,12 @@ class hero:
self.attack=attack self.attack=attack
yase=hero("亚瑟",200,300) yase=hero("亚瑟",200,300)
houyi=hero("后羿",300,200) houyi=hero("后羿",300,200)
print(yase.hp) print(self.level=1
print(houyi.hp) self.name=name
\ No newline at end of file self.hp=hp
self.attack=attack.hp)
print(houyi.hp)
def upgrade():
yase.level=level+1
yase.hp=hp+50
yase.attack=attack+4
\ 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