Commit 25839984 by BellCodeEditor

save project

parent a7925bb3
Showing with 14 additions and 1 deletions
...@@ -4,8 +4,21 @@ class Hero: ...@@ -4,8 +4,21 @@ class Hero:
self.hp = 300 self.hp = 300
self.attack self.attack
yuyi = Hero("禹亦"250,250) yuyi = Hero("禹亦",250,250)
pp = Hero("屁屁"300300) pp = Hero("屁屁"300300)
print("禹亦的攻击力是:"yuyi.attack) print("禹亦的攻击力是:"yuyi.attack)
print("屁屁的攻击力是:"pp.attack) print("屁屁的攻击力是:"pp.attack)
def upgrade():
yuyi.level = yuyi.level + 1
yuyi.hp = yuyi.hp + 50
yuyi.attack = yuyi.attack + 4
update()
print("禹亦的战斗力是:",yuyi.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