Skip to content

Commit 7eb5b37

Browse files
committed
Fix: emotion lower limit in gemsfarming
1 parent fcdafcf commit 7eb5b37

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

module/campaign/gems_farming.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def emotion(self) -> GemsEmotion:
116116
self.campaign.config.override(Emotion_Mode='ignore')
117117
self.campaign.config.override(EnemyPriority_EnemyScaleBalanceWeight='S1_enemy_first')
118118

119+
@property
120+
def emotion_lower_bound(self):
121+
return 4 + self.campaign._map_battle * 2
122+
119123
@property
120124
def change_flagship(self):
121125
return 'ship' in self.config.GemsFarming_ChangeFlagship
@@ -225,7 +229,8 @@ def get_common_rarity_cv(self):
225229

226230
logger.hr('FINDING FLAGSHIP')
227231

228-
scanner = ShipScanner(level=(1, 31), emotion=(10, 150),
232+
scanner = ShipScanner(level=(1, 31),
233+
emotion=(self.emotion_lower_bound, 150),
229234
fleet=self.fleet_to_attack, status='free')
230235
scanner.disable('rarity')
231236

@@ -273,7 +278,8 @@ def get_common_rarity_cv(self):
273278

274279
def get_common_rarity_dd(self):
275280
"""
276-
Get a common rarity dd with level is 100 (70 for servers except CN) and emotion > 10
281+
Get a common rarity dd with level is 100 (70 for servers except CN)
282+
and emotion >= self.emotion_lower_bound
277283
Returns:
278284
Ship:
279285
"""
@@ -284,7 +290,8 @@ def get_common_rarity_dd(self):
284290
else:
285291
max_level = 70
286292

287-
scanner = ShipScanner(level=(max_level, max_level), emotion=(10, 150),
293+
scanner = ShipScanner(level=(max_level, max_level),
294+
emotion=(self.emotion_lower_bound, 150),
288295
fleet=self.fleet_to_attack, status='free')
289296
scanner.disable('rarity')
290297

0 commit comments

Comments
 (0)