Commit ac4bb142 by BellCodeEditor

save project

parent ecf6c95d
Showing with 7 additions and 0 deletions
...@@ -5,4 +5,10 @@ class Hero: ...@@ -5,4 +5,10 @@ class Hero:
self.attack=attack self.attack=attack
self.name=name self.name=name
Yase=Hero(1,200,40,"Hero") Yase=Hero(1,200,40,"Hero")
print(Yase.hp)
def ad():
Yase.level=Yase.level+1
Yase.hp=Yase.hp+50
Yase.attack=Yase.attack+5
ad()
print(Yase.hp) print(Yase.hp)
\ 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