mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-15 18:07:23 +08:00
Fix: map_is_2x_book is in emotion calculation before map_get_info()
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import numpy as np
|
||||
|
||||
from module.base.decorator import cached_property
|
||||
from module.base.timer import Timer
|
||||
from module.combat.assets import *
|
||||
from module.combat.combat_auto import CombatAuto
|
||||
from module.combat.combat_manual import CombatManual
|
||||
from module.combat.emotion import Emotion
|
||||
from module.combat.hp_balancer import HPBalancer
|
||||
from module.combat.level import Level
|
||||
from module.combat.submarine import SubmarineCall
|
||||
@@ -21,11 +19,6 @@ from module.ui.assets import BACK_ARROW
|
||||
class Combat(Level, HPBalancer, Retirement, SubmarineCall, CombatAuto, CombatManual, AutoSearchHandler):
|
||||
_automation_set_timer = Timer(1)
|
||||
battle_status_click_interval = 0
|
||||
emotion: Emotion
|
||||
|
||||
@cached_property
|
||||
def emotion(self):
|
||||
return Emotion(config=self.config)
|
||||
|
||||
def combat_appear(self):
|
||||
"""
|
||||
|
||||
@@ -175,6 +175,15 @@ class Emotion:
|
||||
else:
|
||||
return 2
|
||||
|
||||
@property
|
||||
def reduce_per_battle_before_entering(self):
|
||||
if self.map_is_2x_book:
|
||||
return 4
|
||||
elif self.config.Campaign_Use2xBook:
|
||||
return 4
|
||||
else:
|
||||
return 2
|
||||
|
||||
def check_reduce(self, battle):
|
||||
"""
|
||||
Check emotion before entering a campaign.
|
||||
@@ -185,6 +194,8 @@ class Emotion:
|
||||
Raise:
|
||||
ScriptEnd: Delay current task to prevent emotion control in the future.
|
||||
"""
|
||||
if not self.config.Emotion_CalculateEmotion:
|
||||
return
|
||||
|
||||
method = self.config.Fleet_FleetOrder
|
||||
|
||||
@@ -199,7 +210,7 @@ class Emotion:
|
||||
else:
|
||||
raise ScriptError(f'Unknown fleet order: {method}')
|
||||
|
||||
battle = tuple(np.array(battle) * self.reduce_per_battle)
|
||||
battle = tuple(np.array(battle) * self.reduce_per_battle_before_entering)
|
||||
logger.info(f'Expect emotion reduce: {battle}')
|
||||
|
||||
self.update()
|
||||
|
||||
Reference in New Issue
Block a user