Commit 3edff188 by BellCodeEditor

save project

parent 29294bf2
Showing with 8 additions and 2 deletions
...@@ -3,11 +3,16 @@ class Hero: ...@@ -3,11 +3,16 @@ class Hero:
self.leve=1 self.leve=1
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attar=attar self.attar=attar
yase=Hero("亚瑟",300,100) yase=Hero("亚瑟",300,100)
houyi=Hero("后羿",200,150) houyi=Hero("后羿",200,150)
print(yase.name) print(yase.name)
daef qwe(): def qwe(self):
self.leve=self.leve+1 self.leve=self.leve+1
self.hp=self.hp+50 self.hp=self.hp+50
self.attar=self.attar+4 self.attar=self.attar+4
yase=("亚瑟,300,20)
yase.updent()
print("等级是"+yase.leve)
print("血量是"+yase.hp)
print("攻击是"+yase.attar)
\ 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