Commit f504b77f by BellCodeEditor

save project

parent 184054c9
Showing with 12 additions and 11 deletions
......@@ -5,14 +5,15 @@ class Hero:
self.hp = hp
self.attack= attack
def upgrade():
yase.self.level = level+1
yase.self.hp = hp+50
yase.self.attack = attack+4
print('亚瑟的血量为:',yase.hp)
yase = Hero('亚瑟',300,20)
def upgrda():
yase.level = yase.level+1
yase.hp = yase.hp+50
yase.attack = yase.attack+4
# print('亚瑟的血量:',yase.self.hp)
def upgrade():
yase.self.level = level+1
yase.self.hp = hp+50
yase.self.attack = attack+4
print('亚瑟的血量为:',yase.hp)
\ No newline at end of file
def upgrda():
yase.level = yase.level+1
yase.hp = yase.hp+50
yase.attack = yase.attack+4
print(yase.level,yase.hp,yase.attack)
\ 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