mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 16:57:20 +08:00
Opt: Use auto search after sinking
Some checks failed
Upstream Sync / Sync with Upstream (push) Has been cancelled
Some checks failed
Upstream Sync / Sync with Upstream (push) Has been cancelled
This commit is contained in:
@@ -164,7 +164,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -240,7 +241,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -316,7 +318,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -405,7 +408,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -482,7 +486,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -558,7 +563,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -638,7 +644,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": false,
|
"UseAutoSearch": false,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -723,7 +730,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": false,
|
"UseAutoSearch": false,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"Coalition": {
|
"Coalition": {
|
||||||
"Mode": "area1-normal",
|
"Mode": "area1-normal",
|
||||||
@@ -789,7 +797,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
"OilThreshold": 0
|
"OilThreshold": 0
|
||||||
@@ -872,7 +881,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -952,7 +962,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -1032,7 +1043,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -1112,7 +1124,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -1188,7 +1201,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": true,
|
"UseAutoSearch": true,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -1267,7 +1281,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": false,
|
"UseAutoSearch": false,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
"OilLimit": 1000,
|
"OilLimit": 1000,
|
||||||
@@ -1313,7 +1328,8 @@
|
|||||||
"UseFleetLock": true,
|
"UseFleetLock": true,
|
||||||
"UseAutoSearch": false,
|
"UseAutoSearch": false,
|
||||||
"Use2xBook": false,
|
"Use2xBook": false,
|
||||||
"AmbushEvade": true
|
"AmbushEvade": true,
|
||||||
|
"ClearAfterSinking": false
|
||||||
},
|
},
|
||||||
"Coalition": {
|
"Coalition": {
|
||||||
"Mode": "area1-normal",
|
"Mode": "area1-normal",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
_auto_search_in_stage_timer = Timer(3, count=6)
|
_auto_search_in_stage_timer = Timer(3, count=6)
|
||||||
_auto_search_status_confirm = False
|
_auto_search_status_confirm = False
|
||||||
_interrupt = False
|
_interrupt = False
|
||||||
_withdraw = False
|
_sinking = False
|
||||||
auto_search_oil_limit_triggered = False
|
auto_search_oil_limit_triggered = False
|
||||||
auto_search_coin_limit_triggered = False
|
auto_search_coin_limit_triggered = False
|
||||||
|
|
||||||
@@ -37,6 +37,35 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def handle_clear_after_sinking(self, emotion_reduce, fleet_index):
|
||||||
|
"""
|
||||||
|
Args:
|
||||||
|
emotion_reduce(bool):
|
||||||
|
fleet_index (int):
|
||||||
|
|
||||||
|
Pages:
|
||||||
|
in: in_map
|
||||||
|
out: is_combat_loading
|
||||||
|
|
||||||
|
Raise:
|
||||||
|
CampaignEnd: withdraw
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: If handled
|
||||||
|
"""
|
||||||
|
if not self._sinking:
|
||||||
|
return False
|
||||||
|
|
||||||
|
if self.appear(WITHDRAW, offset=(30, 30)):
|
||||||
|
if self.map_clear_after_sinking:
|
||||||
|
if emotion_reduce:
|
||||||
|
self.emotion.reduce_sink(fleet_index)
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
self.withdraw()
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def map_offensive_auto_search(self, skip_first_screenshot=True):
|
def map_offensive_auto_search(self, skip_first_screenshot=True):
|
||||||
"""
|
"""
|
||||||
Pages:
|
Pages:
|
||||||
@@ -341,7 +370,7 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
# bunch of popup handlers
|
# bunch of popup handlers
|
||||||
if self.handle_popup_confirm('AUTO_SEARCH_COMBAT_EXECUTE'):
|
if self.handle_popup_confirm('AUTO_SEARCH_COMBAT_EXECUTE'):
|
||||||
continue
|
continue
|
||||||
if not self._withdraw and self.handle_urgent_commission():
|
if not self._sinking and self.handle_urgent_commission():
|
||||||
continue
|
continue
|
||||||
if self.handle_story_skip():
|
if self.handle_story_skip():
|
||||||
continue
|
continue
|
||||||
@@ -362,10 +391,10 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
if self.handle_get_ship():
|
if self.handle_get_ship():
|
||||||
continue
|
continue
|
||||||
if self.appear_then_click(OPTS_INFO_D, offset=(30, 30), interval=2):
|
if self.appear_then_click(OPTS_INFO_D, offset=(30, 30), interval=2):
|
||||||
self._withdraw = True
|
self._sinking = True
|
||||||
continue
|
continue
|
||||||
if confirm_timer.reached():
|
if confirm_timer.reached():
|
||||||
self._withdraw = True
|
self._sinking = True
|
||||||
self.device.click(OPTS_INFO_D)
|
self.device.click(OPTS_INFO_D)
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
continue
|
continue
|
||||||
@@ -379,8 +408,12 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
self.device.screenshot_interval_set()
|
self.device.screenshot_interval_set()
|
||||||
break
|
break
|
||||||
|
|
||||||
def auto_search_combat_status(self):
|
def auto_search_combat_status(self, emotion_reduce, fleet_index):
|
||||||
"""
|
"""
|
||||||
|
Args:
|
||||||
|
emotion_reduce (bool):
|
||||||
|
fleet_index (int):
|
||||||
|
|
||||||
Pages:
|
Pages:
|
||||||
in: any
|
in: any
|
||||||
out: is_auto_search_running()
|
out: is_auto_search_running()
|
||||||
@@ -399,16 +432,14 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
if self.is_in_auto_search_menu() or self._handle_auto_search_menu_missing():
|
if self.is_in_auto_search_menu() or self._handle_auto_search_menu_missing():
|
||||||
raise CampaignEnd
|
raise CampaignEnd
|
||||||
|
|
||||||
# Withdraw
|
if get_urgent_commission and self.handle_clear_after_sinking(emotion_reduce, fleet_index):
|
||||||
if self._withdraw and get_urgent_commission and self.appear(WITHDRAW, offset=(30, 30)):
|
self._sinking = False
|
||||||
self._withdraw = False
|
continue
|
||||||
self.withdraw()
|
|
||||||
break
|
|
||||||
|
|
||||||
# Combat status
|
# Combat status
|
||||||
if self.handle_get_ship():
|
if self.handle_get_ship():
|
||||||
continue
|
continue
|
||||||
if not self._withdraw and self.handle_auto_search_map_option():
|
if not self._sinking and self.handle_auto_search_map_option():
|
||||||
self._auto_search_status_confirm = False
|
self._auto_search_status_confirm = False
|
||||||
continue
|
continue
|
||||||
# bunch of popup handlers
|
# bunch of popup handlers
|
||||||
@@ -451,6 +482,6 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
emotion_reduce = emotion_reduce if emotion_reduce is not None else self.emotion.is_calculate
|
emotion_reduce = emotion_reduce if emotion_reduce is not None else self.emotion.is_calculate
|
||||||
|
|
||||||
self.auto_search_combat_execute(emotion_reduce=emotion_reduce, fleet_index=fleet_index, battle=battle)
|
self.auto_search_combat_execute(emotion_reduce=emotion_reduce, fleet_index=fleet_index, battle=battle)
|
||||||
self.auto_search_combat_status()
|
self.auto_search_combat_status(emotion_reduce=emotion_reduce, fleet_index=fleet_index)
|
||||||
|
|
||||||
logger.info('Combat end.')
|
logger.info('Combat end.')
|
||||||
|
|||||||
@@ -215,6 +215,10 @@ class Emotion:
|
|||||||
else:
|
else:
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
|
@property
|
||||||
|
def reduce_per_sinking(self):
|
||||||
|
return 10
|
||||||
|
|
||||||
def _check_reduce(self, battle):
|
def _check_reduce(self, battle):
|
||||||
"""
|
"""
|
||||||
Returns:
|
Returns:
|
||||||
@@ -305,6 +309,23 @@ class Emotion:
|
|||||||
self.record()
|
self.record()
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
|
def reduce_sink(self, fleet_index):
|
||||||
|
"""
|
||||||
|
Reduce emotion of specific fleet.
|
||||||
|
Should be called after failing a battle
|
||||||
|
|
||||||
|
Args:
|
||||||
|
fleet_index (int): 1 or 2.
|
||||||
|
"""
|
||||||
|
logger.hr('Emotion reduce after sinking')
|
||||||
|
self.update()
|
||||||
|
|
||||||
|
fleet = self.fleets[fleet_index - 1]
|
||||||
|
fleet.current -= self.reduce_per_sinking
|
||||||
|
self.total_reduced += self.reduce_per_sinking
|
||||||
|
self.record()
|
||||||
|
self.show()
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def bug_threshold(self):
|
def bug_threshold(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -724,6 +724,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true
|
"value": true
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -1110,6 +1114,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true
|
"value": true
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -1496,6 +1504,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true
|
"value": true
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -1978,6 +1990,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -2384,6 +2401,10 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -2788,6 +2809,10 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -3211,6 +3236,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -3631,6 +3661,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Coalition": {
|
"Coalition": {
|
||||||
@@ -4148,6 +4183,10 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
@@ -4570,6 +4609,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -4991,6 +5035,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -5412,6 +5461,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -5833,6 +5887,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -6244,6 +6303,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -6663,6 +6727,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"StopCondition": {
|
"StopCondition": {
|
||||||
@@ -6900,6 +6969,11 @@
|
|||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true,
|
"value": true,
|
||||||
"display": "hide"
|
"display": "hide"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": false,
|
||||||
|
"display": "hide"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Coalition": {
|
"Coalition": {
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ Campaign:
|
|||||||
UseAutoSearch: true
|
UseAutoSearch: true
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
InterceptiveCheck:
|
InterceptiveCheck:
|
||||||
OilThreshold: 0
|
OilThreshold: 0
|
||||||
StopCondition:
|
StopCondition:
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ GemsFarming:
|
|||||||
UseFleetLock: true
|
UseFleetLock: true
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -77,6 +78,7 @@ EventA:
|
|||||||
Mode: normal
|
Mode: normal
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -95,6 +97,7 @@ EventB:
|
|||||||
Mode: normal
|
Mode: normal
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -113,6 +116,7 @@ EventC:
|
|||||||
Mode: normal
|
Mode: normal
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -131,6 +135,7 @@ EventD:
|
|||||||
Mode: normal
|
Mode: normal
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -149,6 +154,7 @@ EventSp:
|
|||||||
Mode: normal
|
Mode: normal
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -168,6 +174,7 @@ Raid:
|
|||||||
UseAutoSearch: false
|
UseAutoSearch: false
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
StageIncrease: false
|
StageIncrease: false
|
||||||
@@ -213,6 +220,7 @@ RaidDaily:
|
|||||||
UseAutoSearch: false
|
UseAutoSearch: false
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
StopCondition:
|
StopCondition:
|
||||||
RunCount: 0
|
RunCount: 0
|
||||||
MapAchievement: non_stop
|
MapAchievement: non_stop
|
||||||
@@ -248,6 +256,7 @@ Coalition:
|
|||||||
UseAutoSearch: false
|
UseAutoSearch: false
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
# Coalition:
|
# Coalition:
|
||||||
# Mode:
|
# Mode:
|
||||||
# option: [ easy, normal, hard, ex ]
|
# option: [ easy, normal, hard, ex ]
|
||||||
@@ -278,6 +287,7 @@ CoalitionSp:
|
|||||||
UseAutoSearch: false
|
UseAutoSearch: false
|
||||||
Use2xBook: false
|
Use2xBook: false
|
||||||
AmbushEvade: true
|
AmbushEvade: true
|
||||||
|
ClearAfterSinking: false
|
||||||
Coalition:
|
Coalition:
|
||||||
# CoalitionSp hard-codes Mode='sp'
|
# CoalitionSp hard-codes Mode='sp'
|
||||||
Mode: sp
|
Mode: sp
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ class GeneratedConfig:
|
|||||||
Campaign_UseAutoSearch = True
|
Campaign_UseAutoSearch = True
|
||||||
Campaign_Use2xBook = False
|
Campaign_Use2xBook = False
|
||||||
Campaign_AmbushEvade = True
|
Campaign_AmbushEvade = True
|
||||||
|
Campaign_ClearAfterSinking = False
|
||||||
|
|
||||||
# Group `InterceptiveCheck`
|
# Group `InterceptiveCheck`
|
||||||
InterceptiveCheck_OilThreshold = 0
|
InterceptiveCheck_OilThreshold = 0
|
||||||
|
|||||||
@@ -861,6 +861,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"name": "Evade Ambush(es)",
|
"name": "Evade Ambush(es)",
|
||||||
"help": ""
|
"help": ""
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"name": "Use Auto Search after fleet sinking",
|
||||||
|
"help": "In clear mode, when a fleet sinked, try to use another fleet to run auto search instead of withdrawing"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
|
|||||||
@@ -861,6 +861,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"name": "Campaign.AmbushEvade.name",
|
"name": "Campaign.AmbushEvade.name",
|
||||||
"help": "Campaign.AmbushEvade.help"
|
"help": "Campaign.AmbushEvade.help"
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"name": "Campaign.ClearAfterSinking.name",
|
||||||
|
"help": "Campaign.ClearAfterSinking.help"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
|
|||||||
@@ -861,6 +861,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"name": "规避伏击",
|
"name": "规避伏击",
|
||||||
"help": ""
|
"help": ""
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"name": "沉船后继续自律",
|
||||||
|
"help": "在周回模式自律作战沉船后不撤退,而是使用另一队继续作战"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
|
|||||||
@@ -861,6 +861,10 @@
|
|||||||
"AmbushEvade": {
|
"AmbushEvade": {
|
||||||
"name": "規避伏擊",
|
"name": "規避伏擊",
|
||||||
"help": ""
|
"help": ""
|
||||||
|
},
|
||||||
|
"ClearAfterSinking": {
|
||||||
|
"name": "沉船後繼續自律",
|
||||||
|
"help": "在周回模式自律作戰沉船後不撤退,而是使用另一隊繼續作戰"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"InterceptiveCheck": {
|
"InterceptiveCheck": {
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ class FastForwardHandler(AutoSearchHandler):
|
|||||||
map_is_clear_mode = False # Clear mode == fast forward
|
map_is_clear_mode = False # Clear mode == fast forward
|
||||||
map_is_auto_search = False
|
map_is_auto_search = False
|
||||||
map_is_2x_book = False
|
map_is_2x_book = False
|
||||||
|
map_clear_after_sinking = False
|
||||||
|
|
||||||
STAGE_INCREASE = [
|
STAGE_INCREASE = [
|
||||||
"""
|
"""
|
||||||
@@ -176,6 +177,7 @@ class FastForwardHandler(AutoSearchHandler):
|
|||||||
text = ', '.join([l for l, n in zip(log_names, names) if self.__getattribute__(n)])
|
text = ', '.join([l for l, n in zip(log_names, names) if self.__getattribute__(n)])
|
||||||
text = f'{int(self.map_clear_percentage * 100)}%, ' + text
|
text = f'{int(self.map_clear_percentage * 100)}%, ' + text
|
||||||
logger.attr('Map_info', text)
|
logger.attr('Map_info', text)
|
||||||
|
logger.attr('Campaign_ClearAfterSinking', self.config.Campaign_ClearAfterSinking)
|
||||||
logger.attr('StopCondition_MapAchievement', self.config.StopCondition_MapAchievement)
|
logger.attr('StopCondition_MapAchievement', self.config.StopCondition_MapAchievement)
|
||||||
|
|
||||||
def handle_fast_forward(self):
|
def handle_fast_forward(self):
|
||||||
@@ -183,6 +185,7 @@ class FastForwardHandler(AutoSearchHandler):
|
|||||||
self.map_is_clear_mode = False
|
self.map_is_clear_mode = False
|
||||||
self.map_is_auto_search = False
|
self.map_is_auto_search = False
|
||||||
self.map_is_2x_book = False
|
self.map_is_2x_book = False
|
||||||
|
self.map_clear_after_sinking = False
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.config.Campaign_UseClearMode:
|
if self.config.Campaign_UseClearMode:
|
||||||
@@ -203,12 +206,14 @@ class FastForwardHandler(AutoSearchHandler):
|
|||||||
else:
|
else:
|
||||||
self.map_is_auto_search = self.config.Campaign_UseAutoSearch
|
self.map_is_auto_search = self.config.Campaign_UseAutoSearch
|
||||||
self.map_is_2x_book = self.config.Campaign_Use2xBook
|
self.map_is_2x_book = self.config.Campaign_Use2xBook
|
||||||
|
self.map_clear_after_sinking = self.config.Campaign_ClearAfterSinking
|
||||||
else:
|
else:
|
||||||
# When disable fast forward, MAP_HAS_AMBUSH depends on map settings.
|
# When disable fast forward, MAP_HAS_AMBUSH depends on map settings.
|
||||||
# self.config.MAP_HAS_AMBUSH = True
|
# self.config.MAP_HAS_AMBUSH = True
|
||||||
self.map_is_clear_mode = False
|
self.map_is_clear_mode = False
|
||||||
self.map_is_auto_search = False
|
self.map_is_auto_search = False
|
||||||
self.map_is_2x_book = False
|
self.map_is_2x_book = False
|
||||||
|
self.map_clear_after_sinking = False
|
||||||
pass
|
pass
|
||||||
|
|
||||||
state = 'on' if self.config.Campaign_UseClearMode else 'off'
|
state = 'on' if self.config.Campaign_UseClearMode else 'off'
|
||||||
|
|||||||
Reference in New Issue
Block a user