``
import random
import time
class Role:
def __init__(self, name='【角色】'):
self.name=name
self.life= random.randint(100,150)
self.attack=random.randint(30,50)
class Knight(Role):
def __init__(self,name='【圣光骑士】'):
Role.__init__(self,name)
self.life=self.life*5
self.attack=self.attack*3
def fight_buff(self,opponent,str1,str2):
if opponent.name=='【暗影刺客】':
self.attack=int(self.attack*1.5)
print('『%s』【圣光骑士】对 『%s』【暗影刺客】说:“让无尽光芒制裁你的堕落!”'%(str1, str2))
class Assassin(Role):
def __init__(self,name='【暗影刺客】'):
Role.__init__(self,name)
self.life=self.life*3
self.attack=self.attack*5
def fight_buff(self,opponent,str1,str2):
if opponent.name== '【精灵弩手】':
self.attack=int(self.attack*1.5)
print('『%s』【暗影刺客】对 『%s』【精灵弩手】说:“主动找死,就别怪我心狠手辣。”'%(str1, str2))
class Bowman(Role):
def __init__