コード例 #1
0
ファイル: main.py プロジェクト: czastack/wxFEFactory
    def render_drop_rates(self):
        self._drop_rates_scan_data = (b'\x00\x00\x00????????????????????\x00\x00\x00\x00\x01\x00\x00\x00????'
            b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x3F\x00\x00\x80\x3F')

        self._drop_rates_table = (
            (b'\x2D', 'very_common', '药'),
            (b'\x2F', 'common', '白'),
            (b'\x32', 'uncommon', '绿'),
            (b'\x33', 'very_uncommon', '月'),
            (b'\x34', 'rare', '蓝'),
            (b'\x35', 'very_rare', '紫'),
            (b'\x36', 'legendary', '橙/珠光')
        )

        self._drop_rates_preset = (
            ('原始', (200, 100, 10, 5, 1, 0.1, 0.01)),
            ('仅橙', (0.001, 0.001, 0.001, 0.001, 0.001, 100, 10000)),
            ('仅紫', (0.001, 0.001, 0.001, 0.001, 0.001, 1000, 0.001)),
            ('仅蓝', (0.001, 0.001, 0.001, 0.001, 1000, 0.001, 0.001)),
            ('10x橙', (200, 100, 10, 5, 1, 0.1, 0.1)),
            ('100x橙', (200, 100, 10, 5, 1, 0.1, 1)),
            ('1000x橙', (200, 100, 10, 5, 1, 0.1, 10)),
        )

        self._drop_rates = types.SimpleNamespace()

        ui.Hr()
        with ui.Horizontal(className='expand'):
            ui.Button('读取地址', onclick=self.read_drop_rates)
            for i, item in enumerate(self._drop_rates_preset):
                ui.Button(item[0], className='btn_md', onclick=partial(self.set_drop_rates_preset, index=i))
        self._drop_rates_views = [Input(key, label, addr=partial(__class__.get_drop_rates_item, self.weak, key=key),
            type=float) for _id, key, label in self._drop_rates_table]
コード例 #2
0
 def render_global(self):
     ui.Hr()
     ui.Text('游戏版本: v1.1')
     ProxyInput(
         "CurrentHealthValue", "生命",
         *Descriptor(lambda: self.activePlayer.health,
                     "CurrentHealthValue"))
     ProxyInput(
         "CurrentHealthValue", "生命上限",
         *Descriptor(lambda: self.activePlayer.health.healthStat,
                     "ModifiedValue"))
     ProxyInput(
         "CurrentShieldValue", "护盾",
         *Descriptor(lambda: self.activePlayer.health,
                     "CurrentShieldValue"))
     ProxyInput(
         "CurrentShieldValue", "护盾上限",
         *Descriptor(lambda: self.activePlayer.health.shieldStat,
                     "ModifiedValue"))
     ProxyInput(
         "CurrentGuardCountValue", "防御次数",
         *Descriptor(lambda: self.activePlayer.health,
                     "CurrentGuardCountValue"))
     ProxyInput(
         "CurrentGuardCountValue", "防御次数上限",
         *Descriptor(lambda: self.activePlayer.health.guardCountStat,
                     "ModifiedValue"))
     ProxyInput(
         "balance", "宝石",
         *Descriptor(lambda: self.activePlayer.platWallet, "balance"))
     ProxyInput(
         "balance", "金币",
         *Descriptor(lambda: self.activePlayer.goldWallet, "balance"))
コード例 #3
0
 def render_config(self):
     with ConfigGroup(self.config):
         FloatConfig('auto_driving_speed', '自动驾驶速度', 10)
         SelectConfig('explotion_type', '爆炸类型', datasets.EXPLOTION_TYPE)
         IntConfig('explotion_radius', '爆炸半径', 3)
     ui.Hr()
     ui.Button("放弃本次配置修改", onclick=self.discard_config)
コード例 #4
0
ファイル: main.py プロジェクト: czastack/wxFEFactory
 def render_pilot(self):
     Choice("角色", datasets.ROBOT_CHARACTERS, self.on_pilot_change)
     ModelSelect("pilot", choices=datasets.PILOT_CHARACTERS)
     ModelInput("exp")
     ModelInput("sp")
     ModelInput("killed")
     ui.Hr()
     ui.Hr()
     ModelFlagWidget("skill_1", labels=datasets.SKILLS_1, cols=2)
     ModelFlagWidget("skill_2", labels=datasets.SKILLS_2, cols=2)
     ModelCheckBox("skill_1_status")
     ModelCheckBox("skill_2_status")
     ModelInput("help_atk")
     ModelInput("help_def")
     ModelInput("energy")
     ModelInput("points")
     ModelArrayInput("develop")
     ModelArraySelect("skill_chip", choices=datasets.SHILL_CHIPS)
コード例 #5
0
    def render_drop_rates(self):
        self._drop_rates_scan_data = (
            b'\xFF\xFF\xFF\xFF', b'\x00\x00\x00????????????????????'
            b'\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
        )

        self._drop_rates_table = (
            (b'\x4C', 'chest_awesome_ini', 'ChestAwesomeIni'),
            (b'\x53', 'verycommon', '遍地'),
            (b'\x54', 'verycommon_lower', '遍地 lower'),
            (b'\x55', 'common', '普通'),
            (b'\x57', 'uncommon', '罕见'),
            (b'\x58', 'uncommoner', '更罕见'),
            (b'\x59', 'rare', '稀有'),
            (b'\x5A', 'veryrare', '非常稀有'),
            (b'\x5B', 'awesome_verycommon', '特殊遍地'),
            (b'\x5C', 'awesome_common', '特殊普通'),
            (b'\x5D', 'awesome_uncommon', '特殊罕见'),
            (b'\x5E', 'awesome_uncommoner', '特殊更罕见'),
            (b'\x5F', 'awesome_rare', '特殊稀有'),
            (b'\x60', 'awesome_veryrare', '特殊非常稀有'),
            (b'\x61', 'awesome_legendary', '特殊传说'),
        )

        self._drop_rates_preset = (
            ('原始', (1, 200, 100, 10, 5, 1, 0.1, 0.05, 1, 1, 1, 1, 1, 0.1,
                    0.01)),
            ('更好', (10, 40, 20, 5, 2.5, 1, 1, 0.5, 1, 1, 1, 1, 1, 1, 0.5)),
            ('最好', (1, 0.01, 0.01, 0.01, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 1,
                    25, 50, 100)),
            ('5x橙', (1, 200, 100, 10, 5, 1, 0.1, 0.05, 1, 1, 1, 1, 1, 0.1,
                     0.05)),
            ('10x橙', (1, 200, 100, 10, 5, 1, 0.2, 0.1, 1, 1, 1, 1, 1, 0.2,
                      0.1)),
            ('50x橙', (1, 200, 100, 10, 5, 1, 1, 0.5, 1, 1, 1, 1, 1, 1, 0.5)),
        )

        self._drop_rates = types.SimpleNamespace()

        ui.Hr()
        with ui.Horizontal(className='expand'):
            ui.Button('读取地址', onclick=self.read_drop_rates)
            for i, item in enumerate(self._drop_rates_preset):
                ui.Button(item[0],
                          className='btn_md',
                          onclick=partial(self.set_drop_rates_preset, index=i))
        self._drop_rates_views = [
            Input(key,
                  label,
                  addr=partial(__class__.get_drop_rates_item,
                               self.weak,
                               key=key),
                  type=float) for _id, key, label in self._drop_rates_table
        ]
コード例 #6
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)
コード例 #7
0
    def render_player(self):
        ModelInput("hp", "生命")
        self.maxhp_view = ModelInput("maxhp", "最大生命")
        ModelInput("ap", "防弹衣")
        ModelInput("rotation", "旋转")
        self.coord_view = ModelCoordWidget("coord",
                                           "坐标",
                                           savable=True,
                                           preset=coords)
        ModelCoordWidget("speed", "速度")
        ModelInput("weight", "重量")
        ProxyInput("wanted_level", "通缉等级", self.get_wanted_level,
                   self.set_wanted_level)
        ui.Hr()
        with ui.Vertical(className="fill"):
            with ui.GridLayout(cols=5, vgap=10, className="expand"):
                ui.Button(label="车坐标->人坐标", onclick=self.from_vehicle_coord)
                ui.Button(label="从地图读取坐标", onclick=self.playerCoordFromMap)
                ui.ToggleButton(label="切换无伤状态",
                                onchange=self.set_ped_invincible)

            ui.Text("防止主角受到来自以下的伤害")
            with ui.Horizontal(className="fill"):
                self.player_proof_views = [
                    ui.CheckBox("爆炸",
                                className="vcenter",
                                onchange=partial(self.set_player_proof,
                                                 bitindex=Player.SPECIAL_EP)),
                    ui.CheckBox("碰撞",
                                className="vcenter",
                                onchange=partial(self.set_player_proof,
                                                 bitindex=Player.SPECIAL_DP)),
                    ui.CheckBox("子弹",
                                className="vcenter",
                                onchange=partial(self.set_player_proof,
                                                 bitindex=Player.SPECIAL_BP)),
                    ui.CheckBox("火焰",
                                className="vcenter",
                                onchange=partial(self.set_player_proof,
                                                 bitindex=Player.SPECIAL_FP)),
                ]
                ui.Button("全部",
                          style=btn_md_style,
                          onclick=self.player_proof_all)
                ui.Button("再次应用",
                          style=btn_md_style,
                          onclick=self.player_proof_apply).setToolTip(
                              "死亡或者重新读档后需要再次应用")
コード例 #8
0
 def render_vehicle(self):
     ModelInput("hp", "HP")
     ModelCoordWidget("roll", "滚动")
     ModelCoordWidget("dir", "方向")
     self.vehicle_coord_view = ModelCoordWidget("coord",
                                                "坐标",
                                                savable=True,
                                                preset=coords)
     ModelCoordWidget("speed", "速度")
     ModelInput("weight", "重量")
     ui.Hr()
     with ui.GridLayout(cols=5, vgap=10, className="expand"):
         ui.Button(label="人坐标->车坐标", onclick=self.from_player_coord)
         ui.ToggleButton(label="切换无伤状态",
                         onchange=self.set_vehicle_invincible)
         ui.Button(label="锁车", onclick=self.vehicle_lock_door)
         ui.Button(label="开锁",
                   onclick=partial(self.vehicle_lock_door, lock=False))
コード例 #9
0
 def render(self):
     ui.Hr()
     self.view = ui.CheckBox(self.label, onchange=self.weak.write)
コード例 #10
0
 def render_vehicle(self):
     vehicle = self.weak._vehicle
     ModelInput("hp", "HP")
     ModelCoordWidget("dir", "方向")
     self.vehicle_grad_view = ModelCoordWidget("grad", "旋转")
     self.vehicle_coord_view = ModelCoordWidget("coord",
                                                "坐标",
                                                savable=True,
                                                preset=coords)
     ModelCoordWidget("speed", "速度")
     ModelInput("weight", "重量")
     ui.Text("")
     with ui.Vertical(className="fill"):
         with ui.GridLayout(cols=5, vgap=10, className="expand"):
             ui.Button(label="人坐标->车坐标", onclick=self.from_player_coord)
             ui.Button(label="从地图读取坐标", onclick=self.vehicleCoordFromMap)
             ui.ToggleButton(label="切换无伤状态",
                             onchange=self.set_vehicle_invincible)
             ui.Button(label="锁车", onclick=self.vehicle_lock_door)
             ui.Button(label="开锁",
                       onclick=partial(self.vehicle_lock_door, lock=False))
         ui.Hr()
         ui.Text("防止当前载具受到来自以下的伤害")
         with ui.Horizontal(className="fill"):
             self.vehicle_proof_views = [
                 ui.CheckBox("爆炸",
                             className="vcenter",
                             onchange=partial(self.set_vehicle_proof,
                                              bitindex=Vehicle.SPECIAL_EP)),
                 ui.CheckBox("碰撞",
                             className="vcenter",
                             onchange=partial(self.set_vehicle_proof,
                                              bitindex=Vehicle.SPECIAL_DP)),
                 ui.CheckBox("子弹",
                             className="vcenter",
                             onchange=partial(self.set_vehicle_proof,
                                              bitindex=Vehicle.SPECIAL_BP)),
                 ui.CheckBox("火焰",
                             className="vcenter",
                             onchange=partial(self.set_vehicle_proof,
                                              bitindex=Vehicle.SPECIAL_FP)),
             ]
             ui.Button("全部",
                       style=btn_md_style,
                       onclick=self.vehicle_proof_all)
             ui.Button(
                 "再次应用",
                 style=btn_md_style,
                 onclick=self.vehicle_proof_apply).setToolTip("切换载具后需要再次应用")
     ui.Text("颜色")
     with ui.Horizontal(className="fill"):
         self.vehicle_body_color_view = ColorWidget("body_color", "车身1",
                                                    vehicle, "body_color",
                                                    datasets.COLOR_LIST)
         self.vehicle_body2_color_view = ColorWidget(
             "body2_color", "车身2", vehicle, "body2_color",
             datasets.COLOR_LIST)
         self.vehicle_stripe_color_view = ColorWidget(
             "stripe_color", "条纹1", vehicle, "stripe_color",
             datasets.COLOR_LIST)
         self.vehicle_stripe2_color_view = ColorWidget(
             "stripe2_color", "条纹2", vehicle, "stripe2_color",
             datasets.COLOR_LIST)