AzurLaneAutoScript/campaign/campaign_main/campaign_15_2.py

107 lines
3.0 KiB
Python
Raw Permalink Normal View History

Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
from module.logger import logger
from module.map.map_base import CampaignMap
from module.map.map_grids import SelectedGrids, RoadGrids
from .campaign_15_base import CampaignBase
from .campaign_15_base import Config as ConfigBase
MAP = CampaignMap('15-2')
MAP.shape = 'I8'
MAP.camera_data = ['C2', 'C6', 'F2', 'F6']
MAP.camera_data_spawn_point = ['F2']
Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
MAP.camera_sight = (-2, -1, 3, 2)
MAP.map_data = """
ME -- ME ME Me -- ++ ++ ++
ME -- -- ++ ME ME ME SP SP
-- ME ME Me -- -- -- -- --
-- -- -- -- -- ME ME Me --
ME -- ++ ME Me -- ME ME --
Me -- ME __ ME ++ ++ ++ Me
++ MB -- ME ME ++ Me MB --
++ MB ME -- ME Me -- -- ME
"""
MAP.weight_data = """
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
50 50 50 50 50 50 50 50 50
"""
MAP.spawn_data = [
{'battle': 0, 'enemy': 6},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 1},
{'battle': 3},
{'battle': 4},
{'battle': 5},
{'battle': 6, 'boss': 1},
]
A1, B1, C1, D1, E1, F1, G1, H1, I1, \
A2, B2, C2, D2, E2, F2, G2, H2, I2, \
A3, B3, C3, D3, E3, F3, G3, H3, I3, \
A4, B4, C4, D4, E4, F4, G4, H4, I4, \
A5, B5, C5, D5, E5, F5, G5, H5, I5, \
A6, B6, C6, D6, E6, F6, G6, H6, I6, \
A7, B7, C7, D7, E7, F7, G7, H7, I7, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, \
= MAP.flatten()
class Config(ConfigBase):
# ===== Start of generated config =====
# MAP_SIREN_TEMPLATE = ['0']
# MOVABLE_ENEMY_TURN = (2,)
# MAP_HAS_SIREN = True
# MAP_HAS_MOVABLE_ENEMY = True
MAP_HAS_MAP_STORY = False
MAP_HAS_FLEET_STEP = False
MAP_HAS_AMBUSH = True
# MAP_HAS_MYSTERY = True
# ===== End of generated config =====
class Campaign(CampaignBase):
MAP = MAP
def battle_function(self):
if self.config.MAP_CLEAR_ALL_THIS_TIME \
and self.battle_count == 0 and not self.map_is_clear_mode:
func = self.FUNCTION_NAME_BASE + str(self.battle_count)
logger.info(f'Using function: {func}')
func = self.__getattribute__(func)
result = func()
return result
return super().battle_function()
Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
def battle_0(self):
if not self.map_is_clear_mode and self.map_has_mob_move:
Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
self.mob_move(I6, I7)
2024-05-20 23:30:47 +08:00
self.mob_move(I7, I8)
if G7.is_accessible:
self.clear_chosen_enemy(G7)
return True
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
return self.battle_default()
def battle_1(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
Add: 15图开荒/周回 (#3563) * Add: W15 maps extracted * Add: template for Special Carrier in W15 * Add: method mob_move * Fix: MapDetectionError in strategy mob move * Fix: adjacent grid judge condition * Fix: should focus on location before moving * Fix: should update view before further operation * Fix: wait for STRATEGY_OPENED after executing mob move * Fix: offset for assets in _mob_move() * Opt: judge if movable before moving camera * Add: W15 mechanism * Opt: Rename Special Carrier asset name * Fix: offset for MOB_MOVE_1/MOB_MOVE_2 * Fix: separate MOB_MOVE_1 and MOB_MOVE_2 * Fix: should use appear_then_click in strategy_mob_move_enter * Fix: function import in campaign_15_base.py * Fix: missing assets import * Fix: missing offset in strategy_mob_move_cancel() * Fix: should move only once in a campaign * Temp: modify special carrier filter string to 3E * Fix: missing self. before 'moved' variable * Revert "Fix: missing self. before 'moved' variable" This reverts commit 00f70e0ab55e422898cb90c5d5e54d4e7c989511. * Revert "Fix: should move only once in a campaign" This reverts commit b588f5bb07dfc4511f39fa0797fbe160f356d604. * Fix: force goto special carrier * Fix: missing return True in battle function * Fix: enlarge offset of MOB_MOVE_ICON * Fix: typo in campaing_15_3 * Fix: update view after moving mob * Fix: should use full_scan_movable since mob moved * Fix: missing map_data_init() in campaign_15_4.py * Fix: battle 4 should be done by mob fleet * Revert "Fix: battle 4 should be done by mob fleet" This reverts commit 0e2af1ec817b7bc89fe123f03a33ea9ad955973f. * Fix: should switch to fleet_1 after battle_3 * Add: battle function when using clear mode * Fix: missing import * Fix: colliding Config class * Fix: Config.when should contain all cases * Opt: pick ammo after third battle in clear mode of 15-4 * Del: old assets CarrierSpecial * Fix: remake of CarrierSpecial template * Add: UI mask for W15 * Fix: missing ASSETS import * Fix: change full_scan_movable() to predict() * Fix: predict should be done after each move * Opt: camera_data in W15 * Del: remove predict * Add: map info process after mob move * Add: support for multi bosses in _expected_end() for W15 * Opt: show map after moving * Del: remove redundant import in fleet.py * Opt: using clear_chosen_enemy() instead of goto() directly * Fix: should first take screenshot before strategy enter/confirm/cancel * Add: asset TEMPLATE_SIREN_BOSS * Opt: Handle first stages of BOSS as Siren in 15-3/15-4 * Fix: missing override map_data * Add: ignore is_boss prediction for siren boss in 15-3/15-4 * Fix: should not use decorator Config with battle_x functions * Opt: camera data in 15-4 * Opt: directly overwrite map info into original map_data * Fix: missing indent block in campaign_15_4.py * Fix: expect 15-3/15-4 first bosses as siren * Revert "Add: ignore is_boss prediction for siren boss in 15-3/15-4" This reverts commit 1104631f92e5df0672dce8c7acaa1eb122731746. * Revert "Add: asset TEMPLATE_SIREN_BOSS" This reverts commit a29d6b6b9bfb9d79963adb404ce2091cbfafb810. * Revert "Add: support for multi bosses in _expected_end() for W15" This reverts commit 8d357abe5bab79a643e23e8513cefa87d31cb3e8. * Del: redundent map config * Fix: recover boss grids * Del: redundant clear_siren() * Del: redundant clear_siren() in battle_6 * Add: template for mob move icon * Opt: enlarge reinforcement fleet mask area for W15 * Opt: method _mob_move * Upd: TEMPLATE_MOB_MOVE_ICON * Fix: should have cool time between clicks of grid * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit b3f2dcbc88dbe166470905f33d041b91c2192f57. * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: TEMPLATE_MOB_MOVE_ICON * Upd: predict_mob_move_icon * Fix: 15-2 camera spawn point * Fix: should update view using self.device.image * Revert "Upd: TEMPLATE_MOB_MOVE_ICON" This reverts commit 92a12596a8f271ec64e249ecb58779d9b64ecea6. * Del: redundant assets MOB_MOVE_ICON.png * Fix: using map_is_clear_mode to get real value of clear mode * Opt: check mob_movable before moving * Opt: Refactor _mob_move * Fix: camera_sight in W15 * Opt: move sight to further point in _mob_move
2024-04-19 01:29:17 +08:00
return self.battle_default()
def battle_5(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True
return self.battle_default()
def battle_6(self):
return self.fleet_boss.clear_boss()