Commit 5159b0c2 by BellCodeEditor

save project

parent c1a21a7e
Showing with 17 additions and 7 deletions
...@@ -6,14 +6,24 @@ class Hero: ...@@ -6,14 +6,24 @@ class Hero:
self.name=name self.name=name
def combat(self,enemy): def combat(self,enemy):
level=self.name+"du"+enemy.name+"" info1=self.name+"du"+enemy.name+"dcwff"
self.hp=self.hp+75 info2=hhuirghuiheuh
self.attack=self.attack+5 enemy.hp=self
if enemy.hp > 0:
info3=enemy.name+"grag"+str(enemy.hp)+"fhdh"
info=info1+info2+info3
print(info)
else:
info3=enemy.name+"hguhruberh"
info=info1+info2+info3
print(info)
exit()
yase=Hero('yase',300,20) yase=Hero("feegirg")
hy=Hero('hy',250,23) hy=Hero("hy")
k=Hero('K',10000,150) yase.combat(houyi)
upgrade() yase.combat(houyi)
yase.combat(houyi)
print(yase.attack) print(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