|
@@ -77,6 +77,31 @@ battle_theme_model = {
|
|
|
'I_EXIT': 'I_EXIT_1',
|
|
'I_EXIT': 'I_EXIT_1',
|
|
|
'I_FRIENDS': 'I_FRIENDS_1',
|
|
'I_FRIENDS': 'I_FRIENDS_1',
|
|
|
},
|
|
},
|
|
|
|
|
+ BattleType.COSTUME_BATTLE_2: {
|
|
|
|
|
+ 'I_LOCAL': 'I_LOCAL_2',
|
|
|
|
|
+ 'I_EXIT': 'I_EXIT_2',
|
|
|
|
|
+ 'I_FRIENDS': 'I_FRIENDS_2',
|
|
|
|
|
+ },
|
|
|
|
|
+ BattleType.COSTUME_BATTLE_3: {
|
|
|
|
|
+ 'I_LOCAL': 'I_LOCAL_1',
|
|
|
|
|
+ 'I_EXIT': 'I_EXIT_1',
|
|
|
|
|
+ 'I_FRIENDS': 'I_FRIENDS_1',
|
|
|
|
|
+ },
|
|
|
|
|
+ BattleType.COSTUME_BATTLE_4: {
|
|
|
|
|
+ 'I_LOCAL': 'I_LOCAL_1',
|
|
|
|
|
+ 'I_EXIT': 'I_EXIT_1',
|
|
|
|
|
+ 'I_FRIENDS': 'I_FRIENDS_1',
|
|
|
|
|
+ },
|
|
|
|
|
+ BattleType.COSTUME_BATTLE_5: {
|
|
|
|
|
+ 'I_LOCAL': 'I_LOCAL_1',
|
|
|
|
|
+ 'I_EXIT': 'I_EXIT_1',
|
|
|
|
|
+ 'I_FRIENDS': 'I_FRIENDS_1',
|
|
|
|
|
+ },
|
|
|
|
|
+ BattleType.COSTUME_BATTLE_6: {
|
|
|
|
|
+ 'I_LOCAL': 'I_LOCAL_1',
|
|
|
|
|
+ 'I_EXIT': 'I_EXIT_1',
|
|
|
|
|
+ 'I_FRIENDS': 'I_FRIENDS_1',
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
class CostumeBase:
|
|
class CostumeBase:
|
|
|
|
|
|
|
@@ -87,13 +112,17 @@ class CostumeBase:
|
|
|
self.check_costume_realm(config.costume_realm_type)
|
|
self.check_costume_realm(config.costume_realm_type)
|
|
|
self.check_costume_battle(config.costume_battle_type)
|
|
self.check_costume_battle(config.costume_battle_type)
|
|
|
|
|
|
|
|
- def replace_img(self, asset_before: str, asset_after: RuleImage):
|
|
|
|
|
|
|
+ def replace_img(self,
|
|
|
|
|
+ asset_before: str,
|
|
|
|
|
+ asset_after: RuleImage,
|
|
|
|
|
+ rp_roi_back: bool = True):
|
|
|
if not hasattr(self, asset_before):
|
|
if not hasattr(self, asset_before):
|
|
|
return
|
|
return
|
|
|
# setattr(self, asset_before, asset_after)
|
|
# setattr(self, asset_before, asset_after)
|
|
|
asset_before_object: RuleImage = getattr(self, asset_before)
|
|
asset_before_object: RuleImage = getattr(self, asset_before)
|
|
|
asset_before_object.roi_front = asset_after.roi_front
|
|
asset_before_object.roi_front = asset_after.roi_front
|
|
|
- asset_before_object.roi_back = asset_after.roi_back
|
|
|
|
|
|
|
+ if rp_roi_back:
|
|
|
|
|
+ asset_before_object.roi_back = asset_after.roi_back
|
|
|
asset_before_object.threshold = asset_after.threshold
|
|
asset_before_object.threshold = asset_after.threshold
|
|
|
asset_before_object.file = asset_after.file
|
|
asset_before_object.file = asset_after.file
|
|
|
|
|
|
|
@@ -119,7 +148,11 @@ class CostumeBase:
|
|
|
costume_battle_assets = CostumeBattleAssets()
|
|
costume_battle_assets = CostumeBattleAssets()
|
|
|
for key, value in battle_theme_model[battle_type].items():
|
|
for key, value in battle_theme_model[battle_type].items():
|
|
|
assert_value: RuleImage = getattr(costume_battle_assets, value)
|
|
assert_value: RuleImage = getattr(costume_battle_assets, value)
|
|
|
- self.replace_img(key, assert_value)
|
|
|
|
|
|
|
+ # 绿标的坐标点范围不变
|
|
|
|
|
+ if key == 'I_LOCAL':
|
|
|
|
|
+ self.replace_img(key, assert_value, rp_roi_back=False)
|
|
|
|
|
+ else:
|
|
|
|
|
+ self.replace_img(key, assert_value)
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|