Esempio n. 1
0
    def render_main(self):
        person = (self._person, models.Character)

        with Group("player", "全局", self._global):
            ModelInput("money.money", "金钱")

        with Group("player", "角色", person):
            Choice("角色", tuple("play%d" % i for i in range(1, 5)),
                   self.weak.on_person_change)
            ModelInput("health")
            ModelInput("health_max")
            ModelCoordWidget("coord",
                             labels=('X坐标', 'Z坐标', 'Y坐标'),
                             savable=True)
            ModelCheckBox("invincible")

        self.lazy_group(
            Group("person_items", "角色物品", person, serializable=False, cols=4),
            self.render_person_items)
        self.lazy_group(
            Group("saved_items",
                  "整理界面物品",
                  self._saved_items,
                  serializable=False,
                  cols=6), self.render_saved_items)
        # self.lazy_group(StaticGroup("物品箱/宝物箱"), self.render_inventory_treasure_items)
        self.lazy_group(StaticGroup("代码插入"), self.render_assembly_functions)
Esempio n. 2
0
 def render_player(self):
     ModelInput("hp", "生命")
     ModelInput("ap", "防弹衣")
     self.coord_view = ModelCoordWidget("coord",
                                        "坐标",
                                        savable=True,
                                        preset=coords)
     # ModelInput("gravity", "重量")
     ModelCoordWidget("speed", "速度")
     ModelInput("rotation", "旋转")
     ModelInput("wanted_level", "通缉等级")
     self.money = ModelInput("money", "金钱")
     ui.Text("")
     with ui.GridLayout(cols=4, vgap=10, className="expand"):
         ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord)
         ui.Button(label="从标记点读取坐标",
                   onclick=self.player_coord_from_waypoint)
         ui.ToggleButton(label="切换无伤状态", onchange=self.set_ped_invincible)
         ui.ToggleButton(label="可以切换武器",
                         onchange=self.set_ped_block_switch_weapons)
         ui.ToggleButton(
             label="不会被拽出车",
             onchange=self.set_ped_can_be_dragged_out_of_vehicle)
         ui.ToggleButton(label="摩托车老司机", onchange=self.set_ped_keep_bike)
         ui.ToggleButton(label="不被通缉", onchange=self.set_never_wanted)
Esempio n. 3
0
    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")
Esempio n. 4
0
    def render_main(self):
        datasets = self.datasets
        weak = self.weak

        with Group("global", "全局", self._global, cols=4):
            ModelInput("money")
            ModelInput("stamp")
            self.render_global_ext()

        self.lazy_group(Group("person", "角色", self.person, cols=4),
                        self.render_person)
        self.lazy_group(Group("person_ext", "角色额外", self.person, cols=4),
                        self.render_person_ext)
        self.lazy_group(Group("chariot", "战车", self.chariot, cols=4),
                        self.render_chariot)
        self.lazy_group(
            Group("chariot_items",
                  "战车物品/装备",
                  self.chariot,
                  cols=2 if self.has_holes else 4), self.render_chariot_items)
        self.lazy_group(Group("chariot_special_bullets", "特殊炮弹", self.chariot),
                        self.render_chariot_special_bullets)
        self.lazy_group(Group("battle_status", "战斗状态", self._global, cols=4),
                        self.render_battle_status)
        self.lazy_group(Group("enemy", "敌人", self.enemy, cols=4),
                        self.render_enemy)
        self.lazy_group(Groups("包裹", self.weak.onNotePageChange),
                        self.render_package_group)
        self.render_ext()

        with StaticGroup("功能"):
            self.render_functions(('enemy_weak', ))
Esempio n. 5
0
 def render_global(self):
     ModelInput("game_hour", "当前小时")
     ModelInput("game_minute", "当前分钟")
     exui.Label("日期")
     with ui.Horizontal(className="expand"):
         ui.Button("回退一天", onclick=self.day_back)
         ui.Button("前进一天", onclick=self.day_forward)
Esempio n. 6
0
    def render_main(self):
        with Group("global", "全局", self._global):
            ModelInput("time", "时间")
            ModelInput("money", "金钱")
            ModelInput("get_money", "战后金钱")
            ModelInput("get_exp", "战后经验")
            ModelInput("battlein", "遇敌率")
            ModelCoordWidget("town_pos",
                             "城镇坐标",
                             length=2,
                             type=int,
                             savable=True,
                             preset=self.coords)
            ModelCoordWidget("map_pos",
                             "地图坐标",
                             length=2,
                             type=int,
                             savable=True,
                             preset=self.coords)

        self.lazy_group(Group("player", "角色", self.person, cols=4),
                        self.render_person)
        self.skills_group = Group("skills", "角色精神力", self.person)
        self.lazy_group(self.skills_group, self.render_skills)
        self.lazy_group(Group("skills", "角色物品", self.person, cols=4),
                        self.render_items)
        self.lazy_group(Group("djinnis", "角色精灵", self.person),
                        self.render_djinnis)
        self.lazy_group(StaticGroup("快捷键"), self.render_hotkeys)
Esempio n. 7
0
    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
Esempio n. 8
0
    def render_team(self):
        ModelInput('team_ammo_regen')
        ModelInput('badass_tokens')
        ModelInput('ability_cooldown.value', '能力冷却时间')
        ModelInput('ability_cooldown.mult', '能力冷却倍数')

        for i, label in enumerate(datasets.BADASS_BONUSES):
            ModelInput('badass_bonuses.%d' % i, label).set_help('100% = 464, 200% = 1169, Max = 8388607')
Esempio n. 9
0
    def render_main(self):
        self._global = Global(0, self.handler)

        with Group("global", "全局", self._global):
            ModelInput("invincible", "无敌时间(max:85)")
            ModelInput("hp", "血量(max:6)")
            ModelInput("lives", "生命(max:9)")
            ModelInput("money", "金钱")
Esempio n. 10
0
    def render_character_ext(self):
        player_config = (self._player_config, models.PlayerConfig)

        ModelCoordWidget('coord', instance=player_config, savable=True)
        ModelInput('player_visibility', instance=player_config).set_help('216: 对敌人不可见')
        ModelInput('move_speed_mult', instance=player_config)
        ModelInput('ffyl_time_mult', '原地复活生命倍数', instance=player_config)
        ModelInput('ffyl_Health_mult', '原地复活时间倍数', instance=player_config)
Esempio n. 11
0
 def render_main(self):
     with Group("global", "全局", self._global):
         ModelInput("lives")
         ModelInput("continues")
         ModelInput("score")
         ModelSelect("weapon", choices=WEAPONS)
         ModelCheckBox("invincible")
         ModelCheckBox("hit_anywhere")
Esempio n. 12
0
 def render_ammo(self):
     for i, label in enumerate(
         ('狙击枪', '手枪', '手雷', '左轮手枪', '冲锋枪', '霰弹枪', '战斗步枪', '火箭筒')):
         with ModelInput('weapon_ammos.%d.value' % i, label).container:
             ui.Button(label="最大",
                       className='btn_sm',
                       onclick=partial(self.weapon_ammo_max, i=i))
         ModelInput('weapon_ammos.%d.regen_rate' % i, '恢复速度')
Esempio n. 13
0
    def render_main(self):
        self._global = self.Global(0, self.handler)

        with Group("global", "全局", self._global):
            for item in self.fields:
                input = ModelInput(item.name)
                if item.max:
                    input.set_help('max:%d' % item.max)
Esempio n. 14
0
    def render_team(self):
        ModelInput('team_ammo_regen')
        ModelInput('badass_tokens')

        for i, label in enumerate(datasets.BADASS_BONUSES):
            ModelInput(
                'badass_bonuses.%d' % i,
                label).set_help('100% = 464, 200% = 1169, Max = 8388607')
Esempio n. 15
0
 def render_favors(self):
     i = 0
     for item in datasets.GIRLS:
         ModelInput("favors.%d" % i, "%s累计好感度" % item)
         i += 1
     for item in datasets.GIRLS:
         ModelInput("favors.%d" % i, "%s本章好感度" % item)
         i += 1
Esempio n. 16
0
 def render_global(self):
     ModelInput("tp")
     ModelInput("kill_slot").set_help(
         "Lv1: 128, Lv2: 256, Lv3: 384, break: 389+")
     ModelInput("rage")
     ModelInput("member_num")
     ModelArraySelect("members", choices=datasets.PERSONS)
     ModelInput("item_num")
Esempio n. 17
0
 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")
Esempio n. 18
0
 def render_person_ext(self):
     datasets = self.datasets
     for i, label in enumerate(datasets.SUBPROFS[1:]):
         ModelInput("subprof_levels.%d" % i, "%s等级" % label)
         ModelInput("subprof_exps.%d" % i, "%s经验" % label)
     for i in range(self.person.skill_counts.length):
         ModelInput("skill_counts.%d" % i, "技能%d次数" % (i + 1))
     for i in range(self.person.subskill_counts.length):
         ModelInput("subskill_counts.%d" % i, "副职业技能%d次数" % (i + 1))
Esempio n. 19
0
    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生命")
Esempio n. 20
0
    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)
Esempio n. 21
0
    def render_main(self):

        with Group("player", "角色", self._global):
            ModelCheckBox("x_invincible", "X无敌", enable=0xFF, disable=0)
            ModelCheckBox("zero_invincible", "ZEOR无敌", enable=0xFF, disable=0)
            ModelCheckBox("axl_invincible", "AXL无敌", enable=0xFF, disable=0)
            ModelInput("hp_axl", "AXL HP")
            ModelInput("hpmax_axl", "AXL最大HP")
            ModelInput("hp_x", "X HP")
            ModelInput("hpmax_x", "X最大HP")
            ModelInput("hp_zero", "ZERO HP")
            ModelInput("hpmax_zero", "ZERO最大HP")

        with Group("global", "全局", self._global):
            ModelInput("metal", "金属")
            ModelInput("resurgence", "复活晶片")
            ModelInput("joint_attack", "双人合击气槽")
            ModelCheckBox("zero_jump", "ZERO无限跳", enable=0x02, disable=0)
            ModelCheckBox("all_weapon", "解锁全部武器", enable=0xFF, disable=0)
            ModelCheckBox("super_x", "超级装甲X", enable=0xFF, disable=0)
            ModelCheckBox("back_zero_white_axl",
                          "暗黑ZERO和坠天使AXL",
                          enable=0xFF,
                          disable=0)
            ModelCheckBox("ultimate_x", "终极装甲X", enable=0xFF, disable=0)
Esempio n. 22
0
    def render_main(self):
        self._global = Global(0, self.handler)

        with Group("global", "全局", self._global):
            ModelInput("bomb_count")
            ModelInput("bomb_power")
            ModelInput("level")
            ModelInput("invincible")
            ModelCheckBox("through_bomb")
            ModelCheckBox("timebomb")
            ModelCheckBox("through_wall")
Esempio n. 23
0
    def render_main(self):
        self._global = Global(0, self.handler)

        with Group("global", "全局", self._global):
            ModelInput("lives_1", "1P生命")
            ModelInput("lives_2", "2P生命")
            ModelCheckBox("invincible_1", "1P无敌", enable=0xFF, disable=0)
            ModelCheckBox("invincible_2", "2P无敌", enable=0xFF, disable=0)
            # ModelInput("level", "关卡(0-4)")
            ModelFlagWidget("medicine_1", "1P药水效果", labels=MEDICINE)
            ModelFlagWidget("medicine_2", "2P药水效果", labels=MEDICINE)
Esempio n. 24
0
    def render_main(self):
        self._global = Global(0, self.handler)

        with Group("global", "全局", self._global):
            ModelInput("hp", "HP")
            ModelInput("hpmax", "最大HP")
            ModelCheckBox("invincible", "无敌", enable=0xFF, disable=0)
            ModelSelect("dragon", "当前龙", choices=DRAGONS)

        with StaticGroup("功能"):
            self.render_functions(('hp_max', 'all_dragons', 'all_tools'))
Esempio n. 25
0
 def render_ammo(self):
     for i, label in enumerate(
         ('突击步枪子弹', '霰弹枪子弹', '手雷', '冲锋枪子弹', '手枪子弹', '火箭炮弹药', '狙击步枪子弹')):
         with ModelInput('mgr.weapon_ammos.%d.value' % i, label).container:
             ui.Button(label="最大",
                       className='btn_sm',
                       onclick=partial(self.weapon_ammo_max, i=i))
         with ModelInput('mgr.weapon_ammos.%d.regen_rate' % i,
                         '恢复速度').container:
             ModelCheckBox('mgr.weapon_ammos.%d.infinite' % i,
                           '不减',
                           alone=True)
Esempio n. 26
0
    def render_main(self):
        self._global = Global(0, self.handler)

        with Group("global", "全局", self._global):
            ModelInput("hp", "HP(max:47)")
            ModelInput("star", "星星")
            ModelInput("lives", "生命")
            # ModelInput("credits", "分数")
            ModelCheckBox("invincible", "闪光无敌")
            ModelCheckBox("invincible2", "状态无敌")
            ModelInput("form", "形态")
            ModelSelect("ability", "能力", choices=ABILITY)
Esempio n. 27
0
 def render_global(self):
     ModelInput("money", "金钱")
     ModelInput("turns", "回合")
     ModelInput("random", "乱数").set_help("设成0: 招招命中、必杀、贯通等,升级7点成长")
     ModelSelect("chapter", "章节", choices=self.datasets.CHAPTERS)
     ModelCheckBox("inf_move", "无限行动")
     ModelCheckBox("item_count_keep", "武器耐久度不减")
     ModelCheckBox("proficiency_max", "武器熟练度最大")
     ModelCheckBox("ability_up_1", "全能力成长1点")
     ModelCheckBox("ability_up_2", "全能力成长2点")
     ModelCheckBox("got_100exp", "战后升级")
     ModelCheckBox("support_quickly", "好感度快速提升")
Esempio n. 28
0
    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", "底盘重量")
Esempio n. 29
0
    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
Esempio n. 30
0
 def render_player(self):
     ModelInput("hp", "生命")
     ModelInput("ap", "防弹衣")
     ModelInput("rotation", "旋转")
     self.coord_view = ModelCoordWidget("coord",
                                        "坐标",
                                        savable=True,
                                        preset=coords)
     ModelCoordWidget("speed", "速度")
     ModelInput("weight", "重量")
     ModelInput("wanted_level", "通缉等级")
     ui.Hr()
     with ui.GridLayout(cols=5, vgap=10, className="expand"):
         ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord)
         ui.ToggleButton(label="切换无伤状态", onchange=self.set_ped_invincible)