Commit da8e5c54 by BellCodeEditor

save project

parent e533383a
Showing with 6 additions and 0 deletions
...@@ -4,6 +4,12 @@ class Hero: ...@@ -4,6 +4,12 @@ class Hero:
self.name = name self.name = name
self.hp = hp self.hp = hp
self.attack = attack self.attack = attack
def combat(self,enemy):
info1 = self.name+"对"+enemy.name+"发起进攻,"
info2 = "造成"+str(self.attack)+"点伤害,"
enemy.hp -= self.attack
if enemy.hp > 0:
info3 = enemy.name+
def upgerde(): def upgerde():
self.level=self.level+1 self.level=self.level+1
self.hp=self.hp+50 self.hp=self.hp+50
......
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