Commit f26ad26b by BellCodeEditor

save project

parent 9be0a9b7
Showing with 4 additions and 8 deletions
...@@ -8,10 +8,6 @@ class Hero: ...@@ -8,10 +8,6 @@ class Hero:
self.attack=self.attack+4 self.attack=self.attack+4
self.hp=self.hp+50 self.hp=self.hp+50
self.level=self.level+1 self.level=self.level+1
yase=Hero('雅瑟',300,20) xiaobei=Hero("小贝",500,50)
#hy=Hero('后裔',240,23) xiaobei.upgrade()
#zjm=Hero('粥加明',500,10) print("小贝的等级为",xiaobei.level,"小贝的攻击力为",xiaobei.attack,"小贝的生命为",xiaobei.hp)
yase.upgrade() \ No newline at end of file
print(yase.hp)
print(yase.attack)
print(yase.level)
\ 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