Commit 324fdf4c by BellCodeEditor

auto save

parent 84a42032
Showing with 33 additions and 13 deletions
# 英雄角色类 # 英雄角色类
class Hero(object): Haros = {'垭瑟':'330 200 20','后裔':'300 130 27','李百':'250 140 26','太乙真仁':'340 160 26'}
def __init__(self, name): VIPSHaros = {'垭瑟':'660 400 50','后裔':'600 260 27','李百':'500 280 52','太乙真仁':'680 260 52'}
self.level = 1 VIP = 23413
self.hp = 250 class Haro:
self.attack = 40 def __init__(self,name,hp,attack,fy):
self.name = name self.name = name
self.hp = hp
def combat(): # 攻击 self.attack = attack
self.fy = fy
def zj(names):
yase = Hero("垭瑟") self.names.hp += 50
houyi= Hero("后羿") self.names.attack += 2
yase.combat(houyi) self.names.fy += 10
\ No newline at end of file def pk():
input('按1治疗,按2攻击')
print('-'*30)
def start(a):
print(a)
playerharo = input('输入玩家的英雄')
if playerharo in a:
playerharo
print('游戏开始!')
print('-'*30)
while True:
mm = input('你是 A.VIP玩家 B.普通玩家')
if mm == 'A':
mm = input('请输入密码')
if mm == VIP:
start(VIPSHaros)
elif mm == 'B':
start(Haros)
else:
print('输入错误!')
\ 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