Commit d540b5e6 by BellCodeEditor

save project

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