mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed AI handling of cost reduction of reductions defined with "up to" causing game locks.
This commit is contained in:
parent
ee5675a0fc
commit
441b6bc2e9
1 changed files with 7 additions and 0 deletions
|
@ -31,6 +31,7 @@ import java.util.LinkedHashSet;
|
|||
import java.util.Set;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.choices.ChoiceImpl;
|
||||
|
@ -85,6 +86,12 @@ public class SpellsCostReductionAllEffect extends CostModificationEffectImpl {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||
if (upTo) {
|
||||
if (abilityToModify instanceof ActivatedAbility) {
|
||||
if (((ActivatedAbility) abilityToModify).isCheckPlayableMode()) {
|
||||
CardUtil.reduceCost(abilityToModify, this.amount);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Mana mana = abilityToModify.getManaCostsToPay().getMana();
|
||||
int reduceMax = mana.getGeneric();
|
||||
if (reduceMax > 2) {
|
||||
|
|
Loading…
Reference in a new issue