mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 09:48:01 +08:00
Fix: Optimize map configs
This commit is contained in:
@@ -35,7 +35,7 @@ MAP.spawn_data = [
|
|||||||
{'battle': 1},
|
{'battle': 1},
|
||||||
{'battle': 2},
|
{'battle': 2},
|
||||||
{'battle': 3},
|
{'battle': 3},
|
||||||
{'battle': 4,'enemy': 14},
|
{'battle': 4, 'enemy': 14},
|
||||||
{'battle': 5},
|
{'battle': 5},
|
||||||
{'battle': 6},
|
{'battle': 6},
|
||||||
{'battle': 7, 'boss': 1},
|
{'battle': 7, 'boss': 1},
|
||||||
@@ -65,11 +65,14 @@ class Config(ConfigBase):
|
|||||||
STAR_REQUIRE_3 = 0
|
STAR_REQUIRE_3 = 0
|
||||||
# ===== End of generated config =====
|
# ===== End of generated config =====
|
||||||
|
|
||||||
|
MAP_IS_ONE_TIME_STAGE = True
|
||||||
|
|
||||||
|
|
||||||
# hard to find a dynamic solution
|
# hard to find a dynamic solution
|
||||||
# therefore overwrite all MAP girds with ME
|
# therefore overwrite all MAP girds with ME
|
||||||
# and use a serial of static actions
|
# and use a serial of static actions
|
||||||
actions = {
|
actions = {
|
||||||
4 : [
|
4: [
|
||||||
['1_R_2_', '1_L_2_', '1_R_2_B'],
|
['1_R_2_', '1_L_2_', '1_R_2_B'],
|
||||||
['2_U_2_', '1_S_0_B'],
|
['2_U_2_', '1_S_0_B'],
|
||||||
['1_L_1_B'],
|
['1_L_1_B'],
|
||||||
@@ -78,7 +81,7 @@ actions = {
|
|||||||
['1_L_2_', '1_L_1_B'],
|
['1_L_2_', '1_L_1_B'],
|
||||||
['1_R_2_', '1_R_1_B']
|
['1_R_2_', '1_R_1_B']
|
||||||
],
|
],
|
||||||
5 : [
|
5: [
|
||||||
['1_L_2_', '1_R_2_', '1_L_2_B'],
|
['1_L_2_', '1_R_2_', '1_L_2_B'],
|
||||||
['2_U_2_', '1_S_0_B'],
|
['2_U_2_', '1_S_0_B'],
|
||||||
['1_RU_2_', '1_RU_2_B'],
|
['1_RU_2_', '1_RU_2_B'],
|
||||||
@@ -89,6 +92,7 @@ actions = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def parse_move(movement: str, step: int):
|
def parse_move(movement: str, step: int):
|
||||||
if step % len(movement) != 0:
|
if step % len(movement) != 0:
|
||||||
raise ScriptError('Invalid movement')
|
raise ScriptError('Invalid movement')
|
||||||
@@ -126,7 +130,8 @@ class Campaign(CampaignBase):
|
|||||||
|
|
||||||
fleet_location = self.__getattribute__(f'fleet_{fleet_index}_location')
|
fleet_location = self.__getattribute__(f'fleet_{fleet_index}_location')
|
||||||
if fleet_location not in [src, dst]:
|
if fleet_location not in [src, dst]:
|
||||||
raise RequestHumanTakeover(f'Fleet{fleet_index} fail to move {src} -> {dst}, now on {fleet_location}')
|
raise RequestHumanTakeover(
|
||||||
|
f'Fleet{fleet_index} fail to move {src} -> {dst}, now on {fleet_location}')
|
||||||
elif fleet_location == dst:
|
elif fleet_location == dst:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user