def render_enemy(self): datasets = self.datasets Choice("敌人", tuple("敌人%d" % i for i in range(1, 11)), self.on_enemy_change) ModelSelect("race", choices=datasets.MONSTERS) ModelInput("level") ModelInput("hp") ModelInput("atk") ModelInput("defense") ModelInput("hit") ModelInput("avoid") ModelInput("speed") for i, label in enumerate("物火光电音气冷"): ModelInput("resistance.%d" % i, "%s抗性" % label, spin=True, min=-100, max=100).set_help( "○<=-50, -50<●<=-20, 20<空<30, 30<=△<80, 80<=×") with ModelSelect.choices_cache: for i in range(4): ModelSelect("enemy_case.%d.race" % i, "种类%d" % (i + 1), instance=self._global, choices=datasets.MONSTERS) ModelInput("enemy_case.%d.count" % i, "数量", instance=self._global)
def render_char(self): datasets = self.datasets ModelInput("addr_hex", "R键地址", readonly=True).set_help("R键人物详情中人物属性") ModelInput("no", "序号") ModelSelect("prof", "职业", choices=datasets.PROFESSIONS, values=datasets.PROFESSION_VALUES) ModelInput("level", "等级") ModelInput("exp", "经验") ModelCheckBox("moved", "已行动", enable=1, disable=0) ModelInput("posx", "X坐标") ModelInput("posy", "Y坐标") ModelInput("hpmax", "HP最大值") ModelInput("hp", "HP") ModelInput("power", "力量") ModelInput("skill", "技术") ModelInput("speed", "速度") ModelInput("defense", "守备") ModelInput("magicdef", "魔防") ModelInput("lucky", "幸运") ModelInput("physical_add", "体格+") ModelInput("move_add", "移动+") ModelSelect("status", "状态种类", choices=datasets.STATUS) ModelInput("status_turn", "状态持续") for i, label in enumerate(("剑", "枪", "斧", "弓", "杖", "理", "光", "暗")): ModelInput("proficiency.%d" % i, "%s熟练度" % label).set_help("E级:1 D级:31 C级:71 B级:121 A级:181 S级:251")
def render_main(self): with Group("global", "全局", self._global): ModelInput("money", "金钱") ModelInput("exp", "驾驶员经验") with Group("player", "我方角色", self.person, cols=4): Choice("角色", datasets.PARTNERS, self.on_person_change) ModelInput("ability", "机体类型(海陆空)及变身能力") ModelInput("spiritual_type", "精神类型") ModelSelect("robot", "机体图", choices=datasets.ROBOTS) ModelInput("map_y", "地图X坐标") ModelInput("map_x", "地图Y坐标") ModelInput("map_avatar", "地图头像") ModelSelect("weapon_1", "上武器", choices=datasets.WEAPONS) ModelSelect("weapon_2", "下武器", choices=datasets.WEAPONS) ModelInput("mobile", "机动") ModelInput("strength", "强度") ModelInput("defense", "防卫") ModelInput("speed", "速度") ModelInput("hp", "HP") ModelInput("hpmax", "HP上限") ModelInput("move", "行动次数") ModelInput("spiritual", "精神") ModelInput("spiritual_max", "精神上限") self.lazy_group(Group("items", "道具", None), self.render_items) # self.lazy_group(Group("weapons", "武器", self.weapon), self.render_weapons) # with Group("enemy", "敌人", None, cols=4): # for addr, name in models.ENEMY_ATTRS: # Input(name, None, addr, size=1) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h")
def render_main(self): with Group("global", "全局", self._global): ModelInput("turn").set_help('0~1,下面会一直累加(慎用)') ModelInput("minutes") ModelInput("seconds_1") ModelInput("seconds_0") ModelInput("our_points") ModelInput("enemy_points") ModelInput("basketry_left_top") ModelInput("basketry_left_middle") ModelInput("basketry_left_bottom") ModelInput("basketry_right_top") ModelInput("basketry_right_middle") ModelInput("basketry_right_bottom") ModelInput("ball_owner").set_help('球在人手里(0~3),地上或空中(6)') with Group("player", "我方角色", self.person) as group: Choice("角色", ("1P", "2P", "3P", "4P"), self.on_person_change) # ModelInput("jump") # ModelInput("power") ModelInput("character").set_help('0~3') with ModelSelect.choices_cache: ModelSelect("equip_1", instance=self.equip_holder, choices=datasets.ITEMS) ModelSelect("equip_2", instance=self.equip_holder, choices=datasets.ITEMS) ModelSelect("equip_3", instance=self.equip_holder, choices=datasets.ITEMS) with StaticGroup("快捷键"): ui.Text("B: 获得球") ui.Text("N: 左边耐久置0") ui.Text("M: 球筐耐久恢复")
def render_human_items(self): with ModelSelect.choices_cache: for i in range(self.person.equips.length): ModelSelect("equips.%d" % i, "装备%d" % (i + 1), choices=datasets.HUMAN_EQUIPS, values=datasets.HUMAN_EQUIP_VALUES) for i in range(self.person.items.length): ModelSelect("items.%d" % i, "物品%d" % (i + 1), choices=datasets.HUMAN_ITEMS, values=datasets.HUMAN_ITEM_VALUES)
def render_chariot_items(self): with ModelSelect.choices_cache: for i in range(self.chariot.equips.length): ModelSelect("equips.%d.type" % i, "装备%d" % (i + 1), choices=datasets.CHARIOT_EQUIPS, values=datasets.CHARIOT_EQUIP_VALUES) for i in range(self.chariot.items.length): ModelSelect("items.%d" % i, "物品%d" % (i + 1), choices=datasets.CHARIOT_ITEMS, values=datasets.CHARIOT_ITEM_VALUES)
def render_robot(self): Choice("机体", datasets.ROBOT_CHOICES, self.on_robot_change) ModelInput("hp") ModelInput("en") ModelSelect("body", choices=datasets.ROBOTS) ModelSelect("pilot", choices=datasets.ROBOT_CHARACTERS) ModelArrayInput("body_remould") ModelArrayInput("ammo") ModelInput("weapon_remould")
def render_battle_cards(self): with ModelSelect.choices_cache: for i in range(self.BATTLE_CARDS_PAGE_LENGTH): ModelSelect("battle_cards.%d+battle_cards_offset.card_type" % i, "", choices=BATTLE_CARDS) ModelSelect("battle_cards.%d+battle_cards_offset.card_value" % i, "", choices=map(str, range(10))) with Group.active_group().footer: Pagination(self.on_battle_cards_page, self.BATTLE_CARDS_PAGE_TOTAL)
def render_main(self): self._global = Global(0, self.handler) with Group("global", "全局", self._global): ModelCheckBox("invincible_1", "1P无敌", enable=0xff, disable=0) ModelCheckBox("invincible_2", "2P无敌", enable=0xff, disable=0) ModelSelect("weapon_1", "1P武器", choices=BULLETS, values=BULLET_VALUES) ModelSelect("weapon_2", "2P武器", choices=BULLETS, values=BULLET_VALUES) ModelInput("lives_1", "1P生命") ModelInput("lives_2", "2P生命")
def render_chariot_items(self): with ModelSelect.choices_cache: for i in range(self.chariot.equips.length): ModelSelect("equips.%d" % i, "装备%d" % (i + 1), choices=datasets.CHARIOT_EQUIPS, dragable=True) for i in range(self.chariot.items.length): ModelSelect("items.%d" % i, "物品%d" % (i + 1), choices=datasets.CHARIOT_ITEMS, dragable=True)
def render_chariot(self): datasets = self.datasets Choice("战车", datasets.CHARIOTS, self.on_chariot_change) ModelInput("sp") ModelSelect("chassis.equip", "底盘", choices=datasets.CHARIOT_CHASSIS.choices, values=datasets.CHARIOT_CHASSIS.values) ModelInput("chassis.defense", "底盘防御") ModelInput("chassis.attr1", "荷台").set_help('道具容量,最大18个') ModelInput("chassis.attr2", "弹舱") ModelSelect("chassis.change", "双持类型", choices=datasets.DOUBLE_TYPE) ModelInput("chassis.weight", "底盘重量")
def render_main(self): self._global = Global(0, self.handler) with Group("global", "全局", self._global): ModelInput("lives") ModelInput("money") ModelInput("bomb_count") ModelSelect("bomb_type", choices=('F', 'B', 'T', 'W')) ModelInput("power") ModelSelect("bullet_type", choices=('1', '2', '3', '4', '5')) ModelInput("bomb_power") ModelInput("invincible") ModelInput("bomb_time") ModelInput("level") ModelCheckBox("armor")
def render_global_ext(self): datasets = self.datasets ModelInput("game_turn") ModelInput("game_time") ModelInput("after_money") ModelInput("after_exp") ModelInput("posx") ModelInput("posy") ModelSelect("difficulty", choices=datasets.DIFFICULTY) ModelSelect("after_money_rate", choices=datasets.RATE, values=datasets.RATE_VALUES) ModelSelect("after_exp_rate", choices=datasets.RATE, values=datasets.RATE_VALUES) for name in ("quick_switch", "quick_move", "through_wall", "no_battle", "must_winning", "tool_count_keep", "ammo_keep", "level_up_max", "weight_zero", "equip_limit_remove", "without_material", "twin_engines", "drop_item_three_star", "must_drop_item", "must_first", "allfax", "allmap", "enemy_flash", "can_use_other_skill", "must_critical_hit"): ModelCheckBox(name)
def render_shop(self): datasets = self.datasets with ModelSelect.choices_cache: for i in range(8): ModelSelect("store.%d.item" % i, "商品%d" % (i + 1), choices=datasets.ITEMS)
def render_items(self): with ModelSelect.choices_cache: for i in range(15): ModelSelect("items.%d.item" % i, "物品%d" % (i + 1), choices=self.datasets.ITEMS) ModelInput("items.%d.count" % i, "数量")
def render_wanted(self): datasets = self.datasets with ModelSelect.choices_cache: for i, name in enumerate(datasets.WANTED_LIST): ModelSelect("wanted_status.%d" % i, name, choices=datasets.WANTED_STATUS)
def render_main(self): with Group("global", "全局", self._global): ModelInput("growth_points", "成长点数") ModelInput("money_1p", "1p金钱") ModelInput("money_2p", "2p金钱") with Group("player", "我方角色", self.person, cols=4) as group: Choice("角色", ("1P", "2P"), self.on_person_change) for addr, name in models.PERSON_ATTRS: ModelInput(name) with group.footer: dialog_style = {'width': 1200, 'height': 900} with DialogGroup("items", "道具", self.itemholder, cols=4, dialog_style=dialog_style) as dialog_group: indexs = (0, 8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15) with ModelSelect.choices_cache: for i in indexs: ModelSelect("items.%d" % i, "道具%02d" % (i + 1), choices=datasets.ITEMS) with DialogGroup("skills", "技能", self.skillholder, dialog_style=dialog_style): values = [1 << i for i in range(7, -1, -1)] for i, labels in enumerate(datasets.SKILL_ITEMS): ModelFlagWidget("have_%s" % (i + 1), "拥有", labels=labels, values=values, checkbtn=True, cols=4) ModelFlagWidget("active_%s" % (i + 1), "激活", labels=labels, values=values, checkbtn=True, cols=4) with Group("enemy", "敌人", None, cols=4) as group: for addr, name in models.ENEMY_ATTRS: Input(name, None, addr, size=1) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h")
def render_main(self): with Group("global", "全局", self._global): ModelInput("hp") # ModelInput("tankhp") ModelCheckBox("invincible", enable=0x20, disable=0) ModelInput("ammo") ModelInput("bomb") ModelInput("shell") ModelSelect("weapon", choices=WEAPONS, values=WEAPON_VALUES) ModelSelect("bombtype", choices=BOMB_TYPES, values=BOMB_VALUES) with StaticGroup("功能"): self.render_functions(('max_ammo', 'fast_shoot')) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h")
def render_character(self): health = (self._character_health, models.ShieldHealth) shield = (self._character_shield, models.ShieldHealth) oxygen = (self._character_oxygen, models.ShieldHealth) experience = (self._experience, models.Experience) player_mgr = (self._player_mgr, models.PlayerManager) for label, instance in (('生命', health), ('护甲', shield), ('氧气', oxygen)): Title(label) ModelInput('value', instance=instance) ModelInput('scaled_maximum', instance=instance) ModelInput('base_maximum', instance=instance) ModelInput('regen_rate', instance=instance) ModelSelect('status', instance=instance, choices=datasets.STATUS_CHOICES, values=datasets.STATUS_VALUES) Title('经验值') ModelInput('value', instance=experience) ModelInput('scaled_maximum', instance=experience) ModelInput('base_maximum', instance=experience) ModelInput('multiplier', instance=experience) ModelInput('exp_next_level') ModelInput('level') ModelInput('money') ModelInput('moon_shards') ModelInput('shift_coins') ModelInput('skill_points') ModelInput('bank_size', instance=player_mgr) ModelInput('weapon_deck_size', instance=player_mgr) ModelInput('backpack_size', instance=player_mgr) ModelInput('backpack_used_space', instance=player_mgr)
def render_person(self): datasets = self.datasets ModelInput("addr_hex", "地址", readonly=True) ModelInput("no", "序号") ModelSelect("prof", "职业", choices=datasets.PROFESSIONS, values=datasets.PROFESSION_VALUES) ModelInput("level", "等级") ModelInput("exp", "经验") ModelCheckBox("moved", "已行动", enable=1, disable=0) ModelInput("posx", "X坐标") ModelInput("posy", "Y坐标") ModelInput("hpmax", "HP上限+") ModelInput("hp", "HP") ModelInput("power", "力量+") ModelInput("magic", "魔力+") ModelInput("skill", "技术+") ModelInput("speed", "速度+") ModelInput("defense", "守备+") ModelInput("magicdef", "魔防+") ModelInput("lucky", "幸运+") ModelInput("move_add", "移动+") # ModelSelect("status", "状态种类", choices=datasets.STATUS) # ModelInput("status_turn", "状态持续") for i, label in enumerate(("剑", "枪", "斧", "弓", "书", "杖")): ModelInput("proficiency.%d" % i, "%s熟练度+" % label).set_help(datasets.PROFICIENCY_HINT)
def get_saved_item_dialog(self): """整理界面物品信息对话框""" name = 'saved_item_dialog' dialog = getattr(self, name, None) if dialog is None: with DialogGroup(name, "物品详情", self.saved_item, cols=1, dialog_style={ 'width': 600, 'height': 1400 }, closable=False, horizontal=False, button=False) as dialog: ModelSelect("type", choices=datasets.INVENTORY_ITEMS.choices, values=datasets.INVENTORY_ITEMS.values, instance=self.saved_item).set_help('移动后生效') ModelInput("quantity") ModelInput("max_quantity") ModelInput("fire_power") ModelInput("reload_speed") ModelInput("capacity") ModelInput("piercing") ModelInput("scope") ModelInput("critical") ModelInput("attack_range") ModelInput("model", hex=True) setattr(self, name, dialog) return dialog
def get_chariot_item_info_dialog(self): datasets = self.datasets name = 'chariot_item_info_dialog' dialog = getattr(self, name, None) if dialog is None: with DialogGroup(None, "战车物品详情", self.chariot_item_info, cols=1, dialog_style={ 'width': 600, 'height': 1200 }, closable=False, horizontal=False, button=False) as dialog: ModelSelect("equip", choices=datasets.CHARIOT_ALL_ITEM.choices, values=datasets.CHARIOT_ALL_ITEM.values) ModelInput("change") ModelInput("ammo") ModelInput("star") ModelInput("defense") ModelInput("attr1") ModelInput("attr2") ModelInput("weight") ModelInput("status") setattr(self, name, dialog) return dialog
def render_global(self): datasets = self.datasets ModelInput("money", "金钱", spin=True) ModelInput("coin", "游戏币", spin=True) ModelInput("dust", "宝石版火山灰", spin=True) ModelInput("spray_time", "喷雾剂剩余步数", spin=True) ModelInput("safari_time", "狩猎区剩余步数", spin=True) ModelInput("battle_points_current", "战斗点数(仅绿宝石)", spin=True) ModelInput("battle_points_trainer_card", "训练员卡上的战斗点数(仅绿宝石)", spin=True) ModelSelect("area", "地点瞬移", choices=datasets.AREA_LABELS, values=datasets.AREA_VALUES) ModelSelect("furniture_purchase", "家具购买", choices=datasets.FURNITURES) ModelSelect("appearance", "性别外形", choices=datasets.APPEARANCE)
def render_main(self): with Group("global", "全局", self._global): ModelSelect("enemy", "角色", choices=datasets.PLAYERS) ModelSelect("enemy", "敌人模型", choices=datasets.ENEMY_LABELS, values=datasets.ENEMY_VALUES) ModelInput("level", "等级") ModelInput("lives", "命数") ModelInput("hp", "HP") ModelInput("exp", "总经验") ModelInput("tool_count", "手持物数量") ModelInput("play_level", "关卡") ModelCheckBox("invincible", "无伤", enable=0xffff, disable=0) with StaticGroup("快捷键"): ui.Text("恢复HP: alt+h\n" "敌人一击必杀: alt+空格")
def render_special_bullets(self): with ModelSelect.choices_cache: for i in range(self.chariot.special_bullets.length): ModelSelect("special_bullets.%d" % i, "炮弹%d" % (i + 1), choices=datasets.SPECIAL_BULLETS, dragable=True) ModelInput("special_bullets_count.%d" % i, "数量")
def render_main(self): with Group("global", "全局", self._global, cols=4): ModelInput("hp") ModelInput("hpmax") ModelInput("rupees") ModelInput("rupeesmax") ModelInput("bomb") ModelInput("array") ModelInput("conch") ModelSelect("weapon_a", choices=WEAPONS) ModelSelect("weapon_b", choices=WEAPONS) ModelSelect("bodysize", choices=("大", "小"), values=(0, 0x80)) ModelCheckBox("all_scrolls") ModelCheckBox("all_skills") ModelCheckBox("all_map") self.lazy_group(Group("items", "物品", self._global), self.render_items)
def render_skills(self): with ModelSelect.choices_cache: for i in range(5): ModelSelect("skills.%d+skills_offset.value" % i, "精神力", choices=self.datasets.SKILLS) with self.skills_group.footer: Pagination(self.on_skills_page, self.SKILLS_PAGE_TOTAL)
def render_main(self): with Group("global", "全局", self._global): ModelInput("lives") ModelInput("continues") ModelInput("score") ModelSelect("weapon", choices=WEAPONS) ModelCheckBox("invincible") ModelCheckBox("hit_anywhere")
def render_skills(self): skill_values = (0, ) + tuple(0x807F09E0 + i * 0x2C for i in range(len(datasets.SKILLS) - 1)) with ModelSelect.choices_cache: for i in range(18): ModelSelect("skills.%d.skill" % i, "技能%d" % (i + 1), choices=datasets.SKILLS, values=skill_values)
def render_main(self): datasets = self.datasets weak = self.weak with Group("global", "全局", self._global, cols=4): ModelInput("money", "金钱", instance=weak._config) ModelInput("turns", "回合") ModelCheckBox("ourturn", "总是我方回合") ModelCheckBox("control_enemy", "可控制敌人") ModelCheckBox("upgrade_max", "升级能力值最大") ModelCheckBox("upgrade_all", "升级全能力提升") ModelCheckBox("lv1_can_transfer", "Lv1即可转职") ModelCheckBox("can_train", "都可用运输队") ModelCheckBox("can_visit", "都可访问村庄") ModelCheckBox("can_holddown", "都可压制") ModelCheckBox("use_enemy_prof", "使用敌专用兵种不死机") ModelCheckBox("infinite_refine", "武器屋炼成无限次") ModelCheckBox("item_consume", "道具耐久不减") ModelCheckBox("enemy_item_drop", "敌人全道具掉落") ModelSelect("exp_rate", "经验值倍数", choices=datasets.RATE, values=datasets.EXP_RATE_VALUES) ModelSelect("pro_rate", "熟练度倍数", choices=datasets.RATE, values=datasets.PRO_RATE_VALUES) # ModelInput("random", "乱数").set_help("设成0: 招招命中、必杀、贯通等,升级7点成长") # ModelSelect("chapter", "章节", choices=datasets.CHAPTERS) self.lazy_group(Group("config", "配置", weak._config, cols=4), self.render_config) self.lazy_group(Group("player", "角色", weak._person, cols=4), self.render_person) self.lazy_group(Group("items", "角色物品", weak._person, cols=4), self.render_items) self.lazy_group(Group("iteminfos", "武器属性", weak._iteminfo), self.render_iteminfos) self.train_items_group = Group("train_items", "运输队", self._global, cols=4) self.lazy_group(self.train_items_group, self.render_train_items)