Commit a5b5f201 by BellCodeEditor

save project

parent cb584d50
Showing with 7 additions and 0 deletions
......@@ -6,6 +6,13 @@ class Hero:
self.attack =attack
yase = Hero('亚瑟',300,20)
houyei = Hero('后羿',250,25)
def upgrad():
yase.leve = yase.leve + 1
yase.HP = yase.HP + 40
yase.attack = yase.leve + 10
print('等级:%s'%yase.name)
print('血量:%d'%yase.HP)
print('伤害:%d'%yase.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