From 773ff1e068ecd91781bb66f8f491f4a3729c0c16 Mon Sep 17 00:00:00 2001 From: Mel Miller Date: Thu, 28 Jan 2021 01:04:03 -0500 Subject: [PATCH] Fixed issue where optimal target did not remove players who have active cards from consideration --- cardcalc_cards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardcalc_cards.py b/cardcalc_cards.py index acf5767..3ada40c 100644 --- a/cardcalc_cards.py +++ b/cardcalc_cards.py @@ -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?'