Commit a7fb205a by BellCodeEditor

save project

parent 22354288
Showing with 25 additions and 0 deletions
class Ultraman():
def __init__(self,name,hp,atk,rhp,crit,era,defp,dodge):
self.level=70
self.name=name
self.hp=hp
self.atk=atk
self.rhp=rhp
self.crit=crit
self.era=era
self.defp=defp
self.dodge=dodge
def upgrand(self):
self.level=self.level+1
self.hp=self.hp+3897
self.atk=self.atk+9837
legend=Ultraman("雷杰多",239568,297658,1308,68%,67%,16897,6958)
zett=Ultraman("泽塔",379586,305876,1604,57%,85%,53957,14976)
#print("雷杰多的攻击力为"legend.atk)
#print("泽塔的生命值为"zett.hp)
legend=Ultraman("雷杰多",239568,297658)
legend.upgrand()
print("雷杰多等级",legend.level)
print("雷杰多血",legend.hp)
print("雷杰多攻"legend.atk)
\ 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