Commit aa89a72e by BellCodeEditor

auto save

parent c72dd1c5
Showing with 7 additions and 6 deletions
...@@ -4,13 +4,14 @@ class yingxiong: ...@@ -4,13 +4,14 @@ class yingxiong:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.kun=kun self.kun=kun
yase=yingxiong('亚瑟',1,200,30) def s1(self):
self.exp=self.exp+1
self.hp=self.hp+30
self.kun=self.kun+5
yase=yingxiong('亚瑟',1,200,30 )
houyi=yingxiong('后羿',1,160,35) houyi=yingxiong('后羿',1,160,35)
def s1(): yase.s1()
yase.exp=yase.exp+1 houyi.s1()
yase.hp=yase.hp+30
yase.kun=yase.kun+5
s1()
print('亚瑟血量=',yase.hp) print('亚瑟血量=',yase.hp)
print('后羿血量=',houyi.hp) print('后羿血量=',houyi.hp)
print('亚瑟攻击=',yase.kun) print('亚瑟攻击=',yase.kun)
......
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