Commit ac43a558 by BellCodeEditor

save project

parent 8f0171a7
Showing with 5 additions and 3 deletions
class Hore: class Hero:
def __init__(self,name,level,HP,att): def __init__(self,name,level,HP,att):
self.name=name self.name=name
self.level=level self.level=level
...@@ -9,8 +9,10 @@ class Hore: ...@@ -9,8 +9,10 @@ class Hore:
self.level=self.level+1 self.level=self.level+1
self.HP=self.HP+350 self.HP=self.HP+350
self.att=self.att+250 self.att=self.att+250
y=Hore("澜",1,1000,500) def combat(self,enemy):
o=Hore("白起",1,5000,100)
y=Hero("澜",1,1000,500)
o=Hero("白起",1,5000,100)
y.upgrade() y.upgrade()
o.upgrade() o.upgrade()
print(y.att) print(y.att)
......
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