mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-26 16:17:54 +08:00
Fix: trigger lv32 limit for AllowHighFlagshipLevel
This commit is contained in:
@@ -428,6 +428,8 @@ class GemsFarming(CampaignRun, GemsEquipmentHandler, Retirement):
|
|||||||
Get the filter of common rarity cv,
|
Get the filter of common rarity cv,
|
||||||
If the filter is invalid, export default value to config and use it
|
If the filter is invalid, export default value to config and use it
|
||||||
|
|
||||||
|
Args:
|
||||||
|
string (str): filter string
|
||||||
Returns:
|
Returns:
|
||||||
List[str]:
|
List[str]:
|
||||||
"""
|
"""
|
||||||
@@ -572,6 +574,9 @@ class GemsFarming(CampaignRun, GemsEquipmentHandler, Retirement):
|
|||||||
self.ui_back(check_button=FLEET_PREPARATION)
|
self.ui_back(check_button=FLEET_PREPARATION)
|
||||||
|
|
||||||
def flagship_change_with_emotion(self, ship):
|
def flagship_change_with_emotion(self, ship):
|
||||||
|
"""
|
||||||
|
Change flagship and calculate emotion
|
||||||
|
"""
|
||||||
target_ship = max(ship, key=lambda s: (s.level, s.emotion))
|
target_ship = max(ship, key=lambda s: (s.level, s.emotion))
|
||||||
if self.config.GemsFarming_ALLowHighFlagshipLevel:
|
if self.config.GemsFarming_ALLowHighFlagshipLevel:
|
||||||
self.set_emotion(target_ship.emotion)
|
self.set_emotion(target_ship.emotion)
|
||||||
@@ -613,6 +618,9 @@ class GemsFarming(CampaignRun, GemsEquipmentHandler, Retirement):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def vanguard_change_with_emotion(self, ship):
|
def vanguard_change_with_emotion(self, ship):
|
||||||
|
"""
|
||||||
|
Change vanguard and calculate emotion
|
||||||
|
"""
|
||||||
target_ship = max(ship, key=lambda s: s.emotion)
|
target_ship = max(ship, key=lambda s: s.emotion)
|
||||||
if self.config.GemsFarming_ALLowHighFlagshipLevel:
|
if self.config.GemsFarming_ALLowHighFlagshipLevel:
|
||||||
self.set_emotion(min(self.get_emotion(), target_ship.emotion))
|
self.set_emotion(min(self.get_emotion(), target_ship.emotion))
|
||||||
@@ -670,12 +678,18 @@ class GemsFarming(CampaignRun, GemsEquipmentHandler, Retirement):
|
|||||||
return super().triggered_stop_condition(oil_check=oil_check)
|
return super().triggered_stop_condition(oil_check=oil_check)
|
||||||
|
|
||||||
def get_emotion(self):
|
def get_emotion(self):
|
||||||
|
"""
|
||||||
|
Get fleet emotion value from config
|
||||||
|
"""
|
||||||
if self.config.Fleet_FleetOrder == 'fleet1_standby_fleet2_all':
|
if self.config.Fleet_FleetOrder == 'fleet1_standby_fleet2_all':
|
||||||
return self.campaign.config.Emotion_Fleet2Value
|
return self.campaign.config.Emotion_Fleet2Value
|
||||||
else:
|
else:
|
||||||
return self.campaign.config.Emotion_Fleet1Value
|
return self.campaign.config.Emotion_Fleet1Value
|
||||||
|
|
||||||
def set_emotion(self, emotion):
|
def set_emotion(self, emotion):
|
||||||
|
"""
|
||||||
|
Set fleet emotion value
|
||||||
|
"""
|
||||||
if self.config.Fleet_FleetOrder == 'fleet1_standby_fleet2_all':
|
if self.config.Fleet_FleetOrder == 'fleet1_standby_fleet2_all':
|
||||||
self.campaign.config.set_record(Emotion_Fleet2Value=emotion)
|
self.campaign.config.set_record(Emotion_Fleet2Value=emotion)
|
||||||
else:
|
else:
|
||||||
@@ -715,8 +729,7 @@ class GemsFarming(CampaignRun, GemsEquipmentHandler, Retirement):
|
|||||||
raise GameStuckError
|
raise GameStuckError
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if (self._trigger_lv32 and not self.config.GemsFarming_ALLowHighFlagshipLevel) \
|
if self._trigger_lv32 or self._trigger_emotion:
|
||||||
or self._trigger_emotion:
|
|
||||||
success = True
|
success = True
|
||||||
self.hard_mode_override()
|
self.hard_mode_override()
|
||||||
if self.change_flagship:
|
if self.change_flagship:
|
||||||
|
|||||||
Reference in New Issue
Block a user