Skip to content

Commit

Permalink
Fixed issue where optimal target did not remove players who have acti…
Browse files Browse the repository at this point in the history
…ve cards from consideration
  • Loading branch information
meldontaragon committed Jan 28, 2021
1 parent 13107fe commit 773ff1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cardcalc_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def _handle_card_play(card, cards, damage_report, actors, fight_info):
card_damage_table.sort_values(by='adjustedDamage', ascending=False, inplace=True)

# get the highest damage target that isn't LimitBreak
optimal_target = card_damage_table[card_damage_table['role'] != 'LimitBreak']['adjustedDamage'].idxmax()
optimal_target = card_damage_table[ (card_damage_table['role'] != 'LimitBreak') & (card_damage_table['hasCard'] == 'No')]['adjustedDamage'].idxmax()

if optimal_target is None:
optimal_target = 'Nobody?'
Expand Down

0 comments on commit 773ff1e

Please sign in to comment.