mirror of
https://github.com/W1NDes/M-AzurLaneAutoScript.git
synced 2026-05-14 07:08:04 +08:00
Merge pull request #60 from LmeSzinc/master
[pull] master from LmeSzinc:master
This commit is contained in:
commit
283782cf35
@ -59,6 +59,7 @@ class Config:
|
||||
|
||||
STAGE_ENTRANCE = ['half', '20240725']
|
||||
MAP_CHAPTER_SWITCH_20241219 = True
|
||||
MAP_HAS_MODE_SWITCH = True
|
||||
MAP_HAS_MOVABLE_NORMAL_ENEMY = True
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
|
||||
|
||||
@ -60,6 +60,7 @@ class Config:
|
||||
|
||||
STAGE_ENTRANCE = ['half', '20240725']
|
||||
MAP_CHAPTER_SWITCH_20241219 = True
|
||||
MAP_HAS_MODE_SWITCH = True
|
||||
MAP_HAS_MOVABLE_NORMAL_ENEMY = True
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ class Campaign(CampaignBase):
|
||||
def battle_0(self):
|
||||
if self.clear_siren():
|
||||
return True
|
||||
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
|
||||
if self.clear_enemy(sort=('weight', 'cost_2', 'cost_1')):
|
||||
return True
|
||||
|
||||
return self.battle_default()
|
||||
|
||||
@ -59,6 +59,7 @@ class Config:
|
||||
|
||||
STAGE_ENTRANCE = ['half', '20240725']
|
||||
MAP_CHAPTER_SWITCH_20241219 = True
|
||||
MAP_HAS_MODE_SWITCH = True
|
||||
MAP_HAS_MOVABLE_NORMAL_ENEMY = True
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
|
||||
|
||||
@ -60,6 +60,7 @@ class Config:
|
||||
|
||||
STAGE_ENTRANCE = ['half', '20240725']
|
||||
MAP_CHAPTER_SWITCH_20241219 = True
|
||||
MAP_HAS_MODE_SWITCH = True
|
||||
MAP_HAS_MOVABLE_NORMAL_ENEMY = True
|
||||
MAP_SIREN_HAS_BOSS_ICON_SMALL = True
|
||||
|
||||
|
||||
@ -25,11 +25,11 @@ 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 50 50 50 50 50
|
||||
50 50 50 50 50 50 50 50 50 50 50
|
||||
50 50 10 50 50 50 50 50 50 50 50
|
||||
50 50 10 10 10 10 10 50 50 50 50
|
||||
50 50 10 10 10 10 10 50 50 50 50
|
||||
50 50 10 10 10 10 10 50 50 50 50
|
||||
50 50 10 10 10 10 10 50 50 50 50
|
||||
"""
|
||||
MAP.spawn_data = [
|
||||
{'battle': 0, 'enemy': 2, 'siren': 2},
|
||||
@ -76,7 +76,7 @@ class Campaign(CampaignBase):
|
||||
def battle_0(self):
|
||||
if self.clear_siren():
|
||||
return True
|
||||
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
|
||||
if self.clear_enemy(sort=('weight', 'cost_2', 'cost_1')):
|
||||
return True
|
||||
|
||||
return self.battle_default()
|
||||
@ -84,7 +84,7 @@ class Campaign(CampaignBase):
|
||||
def battle_5(self):
|
||||
if self.clear_siren():
|
||||
return True
|
||||
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
|
||||
if self.clear_enemy(sort=('weight', 'cost_2', 'cost_1')):
|
||||
return True
|
||||
|
||||
return self.battle_default()
|
||||
|
||||
@ -197,7 +197,7 @@ class CampaignUI(MapOperation, CampaignEvent, CampaignOcr):
|
||||
Button:
|
||||
"""
|
||||
entrance_name = name
|
||||
if self.config.MAP_HAS_MODE_SWITCH or self.config.MAP_CHAPTER_SWITCH_20241219:
|
||||
if self.config.MAP_HAS_MODE_SWITCH:
|
||||
for mode_name in self.campaign_get_mode_names(name):
|
||||
if mode_name in self.stage_entrance:
|
||||
name = mode_name
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
import numpy as np
|
||||
|
||||
from module.base.timer import Timer
|
||||
from module.base.utils import get_color, color_similar
|
||||
from module.base.utils import color_similar, get_color
|
||||
from module.combat.assets import *
|
||||
from module.combat_ui.assets import *
|
||||
from module.combat.combat_auto import CombatAuto
|
||||
from module.combat.combat_manual import CombatManual
|
||||
from module.combat.hp_balancer import HPBalancer
|
||||
from module.combat.level import Level
|
||||
from module.combat.submarine import SubmarineCall
|
||||
from module.combat_ui.assets import *
|
||||
from module.handler.auto_search import AutoSearchHandler
|
||||
from module.logger import logger
|
||||
from module.map.assets import MAP_OFFENSIVE
|
||||
from module.retire.retirement import Retirement
|
||||
from module.statistics.azurstats import DropImage
|
||||
from module.template.assets import TEMPLATE_COMBAT_LOADING
|
||||
from module.ui.assets import BACK_ARROW, MUNITIONS_CHECK
|
||||
from module.ui.assets import BACK_ARROW, EXERCISE_CHECK, MUNITIONS_CHECK
|
||||
|
||||
|
||||
class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatManual, AutoSearchHandler):
|
||||
@ -423,7 +423,12 @@ class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatMan
|
||||
Returns:
|
||||
bool:
|
||||
"""
|
||||
if self.appear(MUNITIONS_CHECK, offset=(20, 20), interval=2):
|
||||
if self.appear(MUNITIONS_CHECK, offset=(20, 20), interval=5):
|
||||
logger.info(f'{MUNITIONS_CHECK} -> {BACK_ARROW}')
|
||||
self.device.click(BACK_ARROW)
|
||||
return True
|
||||
if self.appear(EXERCISE_CHECK, offset=(20, 20), interval=5):
|
||||
logger.info(f'{EXERCISE_CHECK} -> {BACK_ARROW}')
|
||||
self.device.click(BACK_ARROW)
|
||||
return True
|
||||
|
||||
|
||||
@ -37,11 +37,11 @@ class BuyFurniture(UI):
|
||||
# Enter furniture shop page from page_dorm, only need to enter once
|
||||
if self.appear(DORM_CHECK, offset=(20, 20), interval=3):
|
||||
self.device.click(DORM_FURNITURE_SHOP_ENTER)
|
||||
self.interval_reset(GET_SHIP)
|
||||
self.interval_reset([GET_SHIP, EXERCISE_PREPARATION])
|
||||
continue
|
||||
|
||||
if self.appear(DORM_FURNITURE_SHOP_FIRST_SELECTED, offset=(20, 20)):
|
||||
self.interval_reset(EXERCISE_PREPARATION)
|
||||
self.interval_reset([GET_SHIP, EXERCISE_PREPARATION])
|
||||
# Enter furniture details page from furniture shop page
|
||||
if self.appear(DORM_FURNITURE_DETAILS_ENTER, offset=(20, 20), interval=3):
|
||||
self.device.click(DORM_FURNITURE_DETAILS_ENTER)
|
||||
@ -50,6 +50,7 @@ class BuyFurniture(UI):
|
||||
# Re select the first piece of furniture on left side of furniture list below.
|
||||
elif self.appear(DORM_FURNITURE_SHOP_FIRST, offset=(20, 20), interval=3):
|
||||
self.device.click(DORM_FURNITURE_SHOP_FIRST)
|
||||
self.interval_reset([GET_SHIP, EXERCISE_PREPARATION])
|
||||
continue
|
||||
|
||||
if self.appear(DORM_FURNITURE_DETAILS_QUIT, offset=(20, 20)):
|
||||
|
||||
@ -265,7 +265,7 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand
|
||||
bool: If map mode satisfied
|
||||
Always True if map doesn't have mode switch in map preparation
|
||||
"""
|
||||
if not self.config.MAP_HAS_MODE_SWITCH and not self.config.MAP_CHAPTER_SWITCH_20241219:
|
||||
if not self.config.MAP_HAS_MODE_SWITCH:
|
||||
return True
|
||||
|
||||
if mode == 'normal':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user