[DOM] Aryel update.

This commit is contained in:
LevelX2 2018-04-17 22:22:38 +02:00
parent 3820c6155c
commit d51e8c70b4
2 changed files with 2 additions and 13 deletions

View file

@ -64,8 +64,6 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class AryelKnightOfWindgrace extends CardImpl {
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with power X or less");
private UUID adjustTargetAbilityId;
public AryelKnightOfWindgrace(UUID ownerId, CardSetInfo setInfo) {
@ -100,12 +98,13 @@ public class AryelKnightOfWindgrace extends CardImpl {
public void adjustTargets(Ability ability, Game game) {
if (adjustTargetAbilityId.equals(ability.getOriginalId())) {
for (VariableCost cost : ability.getCosts().getVariableCosts()) {
if (cost instanceof AryelKnightOfWindgrace) {
if (cost instanceof AryelTapXTargetCost) {
int value = ((AryelTapXTargetCost) cost).getAmount();
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power " + value + " or less");
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, value + 1));
ability.getTargets().clear();
ability.addTarget(new TargetCreaturePermanent(filter));
break;
}
}
}

View file

@ -389,16 +389,6 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
ability.getTargets().clear();
ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false));
break;
case ARYEL:// Aryel, Knight of Windgrace only
xValue = ability.cost.getFixedCostsFromAnnouncedValue();
oldTargetPermanent = (TargetPermanent) ability.getTargets().get(0);
minTargets = oldTargetPermanent.getMinNumberOfTargets();
maxTargets = oldTargetPermanent.getMaxNumberOfTargets();
permanentFilter = oldTargetPermanent.getFilter().copy();
permanentFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, xValue + 1));
ability.getTargets().clear();
ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false));
break;
case VERSE_COUNTER_TARGETS:
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId());
if (sourcePermanent != null) {