Commit a71e8b1f by BellCodeEditor

save project

parent bb36ff27
Showing with 11 additions and 6 deletions
......@@ -5,10 +5,16 @@ class Hero:
self.hp = hp
self.attack = attack
yase = Hero("亚瑟",300,20)
houyi = Hero("后羿",250,25)
print(yase.hp)
print(houyi.hp)
aqi = Hero("阿七",300,20)
killer7 = Hero("柒",250,25)
print(aqi.hp)
print(killer7.hp)
#print("亚瑟的血量:",yase.hp)
#print("亚瑟的等级:",yase.level)
#print("亚瑟的攻击力:",yase.attack)
\ No newline at end of file
#print("亚瑟的攻击力:",yase.attack)
def killer():
aqi.level=yase.level+1
aqi.hp=yase.hp+10
aqi.attack=yase.attack+5
killer()
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