def __init__(self, template="1"): path = 'reliquary_mode' reliquary.ID = reliquary.ID + 1 self.ID = reliquary.ID self.Type = "reliquary" self.template = template self.level = 1 self.name = a.dat()[path][template]['name'] self.skill = a.dat()[path][template]['skill'] self.value = a.dat()[path][template]['value'] self.growth = a.dat()[path][template]['growth'] self.description = a.dat()[path][template]['description'] self.enable = True
def select_location(): #选择出生地 def change_location(selection): # description = a.dat()['location'][location['value']]['description'] # a.t(description) a.tmp()['location_mode'] = selection['index'] a.repeat() pass a.page() a.mode('grid', 1) a.t('何处?') a.divider() a.mode() a.t() a.t() a.radio(['平原'], change_location, a.tmp()['location_mode']) a.t() description = a.dat()['location'][a.tmp()['location_mode']]['description'] a.t(description) a.t() a.divider() a.b('下一步', a.goto, select_inherit) a.t() a.b('何人?', a.back)
def __init__(self, type=0): cards = a.dat()['fatecard'][type] self.name = cards['name'] self.picture = cards['picture'] self.is_able = False self.type = type self.page = blank_page self.get_page() self.style = cards['style']
def __init__(self, template=0): path = 'succubus_mode.{}'.format(template) self.Type = "succubus" self.template = template self.name = a.dat()[path]['name'] self.level = 1 self.gender = a.dat()[path]['gender'] self.skill = a.dat()[path]['skill'] self.superpower = a.dat()[path]['superpower'] self.max_health = a.dat()[path]['max_health'] self.health = self.max_health self.atk = a.dat()[path]['atk'] self.dEf = a.dat()[path]['def'] self.growth = a.dat()[path]['growth'] self.description = a.dat()[path]['description']
def cover(): a.title('EraDemo') a.dat()['123'] = 1 print(a.dat()) a.page() a.mode('grid', 1) a.h('EraDemo') a.t() a.t() a.b('新的游戏', a.goto, new_game) a.t() a.t() a.b('继续游戏') a.t() a.t() a.b('游戏设置') a.t() a.t() a.b('退出游戏')
def __init__(self, template="1"): path = 'braver_mode' braver.ID = braver.ID + 1 self.ID = braver.ID self.Type = "braver" self.template = template self.level = 1 self.name = a.dat()[path][template]['name'] self.gender = a.dat()[path][template]['gender'] self.skill = a.dat()[path][template]['skill'] self.max_health = a.dat()[path][template]['max_health'] self.health = self.max_health self.atk = a.dat()[path][template]['atk'] self.dEf = a.dat()[path][template]['def'] self.growth = a.dat()[path][template]['growth'] self.description = a.dat()[path][template]['description'] self.alive = True
def __init__(self, kind, id): path = "skill.{}".format(kind) self.id = id self.name = a.dat()[path][id]["name"] self.type = a.dat()[path][id]["type"] self.grade = a.dat()[path][id]["grade"] self.priority = a.dat()[path][id]["priority"] self.cool_down = a.dat()[path][id]["cool_down"] self.description = a.dat()[path][id]["description"] self.ready = True
def __init__(self, template="1"): path = 'facility_mode' facility.ID = facility.ID + 1 self.ID = facility.ID self.Type = "facility" self.template = template self.level = 1 self.name = a.dat()[path][template]['name'] self.skill = a.dat()[path][template]['skill'] self.capacity = a.dat()[path][template]['capacity'] self.value = a.dat()[path][template]['value'] self.growth = a.dat()[path][template]['growth'] self.description = a.dat()[path][template]['description']
def __init__(self, template="1"): path = 'equipment_mode' equipment.ID = equipment.ID + 1 self.ID = equipment.ID self.Type = "equipment" self.template = template self.level = 1 self.name = a.dat()[path][template]['name'] self.owner = None #此处考虑填写拥有者ID? self.skill = a.dat()[path][template]['skill'] #考虑从已有技能中选取,此处为可携带技能词条数 self.value = a.dat()[path][template][ 'value'] #['攻百分比','防百分比','血百分比','速百分比','次'] self.growth = a.dat()[path][template]['growth'] self.grade = a.dat()[path][template]['grade'] self.description = a.dat()[path][template]['description'] self.enable = True
def trigger(self, subject, action=None, obejct=None): #本技能触发条件,subject为技能拥有者,object为对象,action为伴随动作 if action == "be hitten": subject.addbuff(a.dat()["buff_list"]["再生"][id], 1)
import erajs.api as a class ItemManager: def __init__(self): super().__init__() print(a.version) if __name__ == "__main__": pass else: if 'im' in a.dat(): pass else: a.dat()['im'] = ItemManager()
def change_number(dir): #修改 选择序号并刷新页面 number_of_succubus = a.dat()['overall']['number_of_succubus'] number = (number + dir + number_of_succubus) % number_of_succubus a.repeat()
def trigger(self, subject=None, action=None, obejct=None): #本技能触发条件,subject为设施内布置人员, # object为入侵设施人员,action为伴随动作 if action == "begin_battle": for i in subject: i.addbuff(a.dat()["buff_list"]["最大生命值"][id], self.value[0])