Commit 7807148b by BellCodeEditor

save project

parent ba8f43d5
Showing with 5 additions and 2 deletions
...@@ -6,8 +6,11 @@ class Hero(object): ...@@ -6,8 +6,11 @@ class Hero(object):
self.attack = attack self.attack = attack
self.name = name self.name = name
def combat(self,enamy) def combat(self,enamy):
info1=self.name+"对"+enamy.name+"发起进攻"
enamy.attack-=self.attack
info2=self.name+"对"+enamy.name+"造成"+str(self.attack)+"点伤害,"+enamy.name+"剩"+str(enamy.attack)
if enamy.attack==0:
yase = Hero(5,1000,500",垭瑟") yase = Hero(5,1000,500",垭瑟")
......
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