Commit adf4e75d by BellCodeEditor

save project

parent 3258f44d
Showing with 6 additions and 2 deletions
...@@ -7,8 +7,11 @@ class Hero(object): ...@@ -7,8 +7,11 @@ class Hero(object):
self.name = name self.name = name
def combat(): # 攻击 def combat(): # 攻击
??? self.hp=self.attack
info=self.name+"对"+enemy.name+"发起了攻击"
info2="造成了"+str (self.at+act)+"点伤害"
info3="还剩下"+str(enemy.hp)+"血量"
info=(1+2+3)
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
\ No newline at end of file
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