Commit acf54337 by BellCodeEditor

save project

parent 4fd1c45e
Showing with 12 additions and 5 deletions
......@@ -4,7 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase = Hero("亚瑟",20,100)
wangzhaojun = Hero("王昭君",200,100)
print(yase.attack)
print(wangzhaojun.hp)
\ No newline at end of file
def upgrade():
yase.level=leyel+1
yase.hp=hp+20
yase.attack=attack+4
yase = Hero("亚瑟",300,20)
#wangzhaojun = Hero("王昭君",200,100)
#xiaoqiao = Hero("小乔",100,20)
#print(yase.attack)
#print(wangzhaojun.hp)
#print(xiaoqiao.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