Fix cost reduction for Not of This World when targeting an Abzan Charm that's exiling a creature.

This commit is contained in:
Myrd
2016-12-22 18:58:02 +00:00
parent e9385941cc
commit 2b0c76ad66

View File

@@ -581,6 +581,13 @@ public class AbilityUtils {
for (final SpellAbility s : saList) { for (final SpellAbility s : saList) {
tgtList.addAll(getDefinedCards(s.getHostCard(), "Targeted", s)); tgtList.addAll(getDefinedCards(s.getHostCard(), "Targeted", s));
// Check sub-abilities, so that modal cards like Abzan Charm are correctly handled.
// TODO: Should this be done in a more general place, like in getDefinedCards()?
AbilitySub abSub = s.getSubAbility();
while (abSub != null) {
tgtList.addAll(getDefinedCards(abSub.getHostCard(), "Targeted", abSub));
abSub = abSub.getSubAbility();
}
} }
return CardFactoryUtil.handlePaid(tgtList, calcX[1], card) * multiplier; return CardFactoryUtil.handlePaid(tgtList, calcX[1], card) * multiplier;
} }