Skip to content

Commit

Permalink
Fix: emotion lower limit in gemsfarming
Browse files Browse the repository at this point in the history
  • Loading branch information
guoh064 committed Aug 29, 2024
1 parent 13d0b82 commit e9e9e57
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions module/campaign/gems_farming.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def emotion(self) -> GemsEmotion:
self.campaign.config.override(Emotion_Mode='ignore')
self.campaign.config.override(EnemyPriority_EnemyScaleBalanceWeight='S1_enemy_first')

@property
def emotion_lower_bound(self):
return 4 + self.campaign._map_battle * 2

@property
def change_flagship(self):
return 'ship' in self.config.GemsFarming_ChangeFlagship
Expand Down Expand Up @@ -221,7 +225,8 @@ def get_common_rarity_cv(self):

logger.hr('FINDING FLAGSHIP')

scanner = ShipScanner(level=(1, 31), emotion=(10, 150),
scanner = ShipScanner(level=(1, 31),
emotion=(self.emotion_lower_bound, 150),
fleet=self.fleet_to_attack, status='free')
scanner.disable('rarity')

Expand Down Expand Up @@ -269,7 +274,8 @@ def get_common_rarity_cv(self):

def get_common_rarity_dd(self):
"""
Get a common rarity dd with level is 100 (70 for servers except CN) and emotion > 10
Get a common rarity dd with level is 100 (70 for servers except CN)
and emotion >= self.emotion_lower_bound
Returns:
Ship:
"""
Expand All @@ -280,7 +286,8 @@ def get_common_rarity_dd(self):
else:
max_level = 70

scanner = ShipScanner(level=(max_level, max_level), emotion=(10, 150),
scanner = ShipScanner(level=(max_level, max_level),
emotion=(self.emotion_lower_bound, 150),
fleet=self.fleet_to_attack, status='free')
scanner.disable('rarity')

Expand Down

0 comments on commit e9e9e57

Please sign in to comment.