[DOM] Update Aryel, Knight of Windgrace.

This commit is contained in:
LevelX2 2018-04-19 12:31:42 +02:00
parent 83ab8528d2
commit 265bcf5004
3 changed files with 15 additions and 26 deletions

View file

@ -36,6 +36,7 @@ import mage.Mana;
import mage.ObjectColor;
import mage.abilities.*;
import mage.abilities.costs.Cost;
import mage.abilities.costs.VariableCost;
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
import mage.abilities.effects.common.NameACardEffect;
import mage.abilities.mana.ActivatedManaAbilityImpl;
@ -457,6 +458,16 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
newFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1));
ability.addTarget(new TargetCreaturePermanent(newFilter));
break;
case CREATURE_POWER_X_OR_LESS: // Aryel, Knight of Windgrace
int value = 0;
for (VariableCost cost : ability.getCosts().getVariableCosts()) {
value = cost.getAmount();
}
FilterCreaturePermanent filterCreaturePermanent = new FilterCreaturePermanent("creature with power " + value + " or less");
filterCreaturePermanent.add(new PowerPredicate(ComparisonType.FEWER_THAN, value + 1));
ability.getTargets().clear();
ability.addTarget(new TargetCreaturePermanent(filterCreaturePermanent));
break;
}
}

View file

@ -13,5 +13,6 @@ public enum TargetAdjustment {
CHOSEN_COLOR,
VERSE_COUNTER_TARGETS,
TREASURE_COUNTER_POWER,
SIMIC_MANIPULATOR
SIMIC_MANIPULATOR,
CREATURE_POWER_X_OR_LESS
}