Commit 0c74b5ae by BellCodeEditor

save project

parent ec0d95bc
Showing with 11 additions and 3 deletions
......@@ -6,7 +6,15 @@ class hero:
self.mp = mp
self.attack = attack
self.move = move
def shengji(self):
self.leven = self.leven + 1
self.hp = self.hp + 50
self.mp = self.mp
self.attack = self.attack + 50
self.move = self.move + 10
yase = hero('亚瑟',300,0,200,80)
houyi = hero('后裔',240,80,240,90)
print("后裔的血量为:",houyi.hp)
print("亚瑟的攻击力为:",yase.attack)
\ No newline at end of file
yase.shengji()
houyi.shengji()
print(yase.hp)
print(houyi.attack)
\ 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