Commit 0e129619 by BellCodeEditor

save project

parent c662d8c6
Showing with 4 additions and 4 deletions
......@@ -5,10 +5,10 @@ class hero:
self.hp = hp
self.attack = attack
def upgrade():
chenshi.level = chenshi.level+1
chenshi.hp = chenshi.hp +50
chenshi.attack + 4
def upgrade(self):
self.level = chenshi.level + 1
self.hp = chenshi.hp +50
self.attack + 4
chenshi = hero("陈石"300,20)
print(chenshi.name+"一级攻击力是"+str(chenshi.attack))
......
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