Commit d540b5e6 by BellCodeEditor

save project

parent 030e24ee
Showing with 11 additions and 9 deletions
......@@ -4,15 +4,17 @@ class sans():
self.HitPoint=HP
self.Attack=AT
self.Defense=DF
def self_check(a):
print(str(a.Level)+','+str(a.HitPoint)+','+str(a.Attack)+','+str(a.Defense))
def Level_Up(a):
a.Level+=1
a.HitPoint+=1
a.HitPoint+=3
a.Attack+=1
a.Defense+=1
# def Check(a,):
# print('等级为'+str(a.Level)
# print('生命值为'+str(a.HitPoint))
# print('攻击力为'+str(a.Attack))
# print('防御力为'+str(a.Defense))
a.Defense+=0.5
Sans=sans(1,1,1)
Sans.Level_Up()
\ No newline at end of file
for i in range(14):
Sans.Level_Up()
Sans.self_check()
\ 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