Commit 2e9087d4 by BellCodeEditor

save project

parent fb6e1ea2
Showing with 7 additions and 3 deletions
......@@ -6,6 +6,9 @@ class Hero:
self.attack=attack
a=Hero("伞兵",240,100)
print(a.name)
def upgrage(name):
name.level=name.level+1
name.hp=name.hp+100
name.attack=name.attack+100
upgrage(a)
print(a.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