Commit 173827b5 by BellCodeEditor

save project

parent 39269700
Showing with 45 additions and 0 deletions
class Hero:
def __init__(self,af,bf,cf,df):
self.level=1
self.af=af
self.bf=bf
self.cf=cf
self.df=df
def ss(self):
self.level=level+1
self.af=af+1
self.bf=bf+10
self.cf=cf+100
a=Hero('SB1',1,100,150)
b=Hero('SB2',2,200,250)
c=Hero('SB3',3,300,350)
d=Hero('SB4',4,400,450)
e=Hero('SB5',5,500,550)
#1
def s(self):
self.dd.level=dd.level+1
self.dd.af=dd.af+1
self.dd.bf=dd.bf+10
self.dd.cf=dd.cf+100
s(a)
s(b)
s(c)
s(d)
s(e)
print(e.level)
print(e.af)
print(e.bf)
print(e.cf)
# print('SB1的攻击',a.bf)
# print('SB1的攻击',a.cf)
# print('SB1的攻击',a.df)
# print('SB2的攻击',b.bf)
# print('SB2的攻击',b.cf)
# print('SB3的攻击',c.bf)
# print('SB3的攻击',c.cf)
# print('SB4的攻击',d.bf)
# print('SB4的攻击',d.cf)
# print('SB6的攻击',e.bf)
# print('SB6的攻击',e.cf)
\ 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