Commit 7e6aa7d2 by BellCodeEditor

save project

parent 22354288
Showing with 44 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack,wk,fj,fk):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
self.wk = wk
self.fj = fj
self.fk = fk
kai = Hero('铠',1076,918,325,0,23)
def bule():
kai.level = kai.level + 1
kai.hp = kai.hp + 53
kai.attack = kai.attack + 128
kai.wk = kai.wk + 38
kai.fj = kai.fj + 0
kai.fk = kai.fk + 11
print('铠:','生命',kai.hp,'物伤',kai.attack,'物抗',kai.wk,'法强',kai.fj,'法抗',kai.fk)
bule()
yase = Hero('亚瑟',1313,423,425,15,45)
def upgred():
yase.level = yase.level + 1
yase.hp = yase.hp + 71
yase.attack = yase.attack + 67
yase.wk = yase.wk + 42
yase.fj = yase.fj + 11
yase.fk = yase.fk + 27
print('亚瑟:','生命',yase.hp,'物伤',yase.attack,'物抗',yase.wk,'法强',yase.fj,'法抗',yase.fk)
upgred()
houyi = Hero('后羿',812,511,234,112,12)
def gred():
houyi.level = houyi.level + 1
houyi.hp = houyi.hp + 23
houyi.attack = houyi.attack + 87
houyi.wk = houyi.wk + 23
houyi.fj = houyi.fj + 34
houyi.fk = houyi.fk + 11
print('后羿:','生命',houyi.hp,'物伤',houyi.attack,'物抗',houyi.wk,'法强',houyi.fj,'法抗',houyi.fk)
gred()
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