Commit 1282e4e3 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class Pokemon:
def __init__(self,name,hp,JN1,JN2):
self.level= 1
self.name=name
self.hp=hp
self.JN1=JN1
self.JN2=JN2
def upgrade():
MWZZ.level =MWZZ.level+1
MWZZ.hp=MWZZ.hp+10
MWZZ= Pokemon("妙蛙种子",15,"寄生种子 30","藤鞭 40")
print("妙蛙种子的初始血量为:",MWZZ.hp)
print("妙蛙种子的技能是:",MWZZ.JN1)
print("妙蛙种子的技能是:",MWZZ.JN2)
upgrade()
print("妙蛙种子的升级一次后血量为:",MWZZ.hp)
\ 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