mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
[DOM] Aryel update.
This commit is contained in:
parent
3820c6155c
commit
d51e8c70b4
2 changed files with 2 additions and 13 deletions
|
@ -64,8 +64,6 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class AryelKnightOfWindgrace extends CardImpl {
|
public class AryelKnightOfWindgrace extends CardImpl {
|
||||||
|
|
||||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creature with power X or less");
|
|
||||||
|
|
||||||
private UUID adjustTargetAbilityId;
|
private UUID adjustTargetAbilityId;
|
||||||
|
|
||||||
public AryelKnightOfWindgrace(UUID ownerId, CardSetInfo setInfo) {
|
public AryelKnightOfWindgrace(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
@ -100,12 +98,13 @@ public class AryelKnightOfWindgrace extends CardImpl {
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (adjustTargetAbilityId.equals(ability.getOriginalId())) {
|
if (adjustTargetAbilityId.equals(ability.getOriginalId())) {
|
||||||
for (VariableCost cost : ability.getCosts().getVariableCosts()) {
|
for (VariableCost cost : ability.getCosts().getVariableCosts()) {
|
||||||
if (cost instanceof AryelKnightOfWindgrace) {
|
if (cost instanceof AryelTapXTargetCost) {
|
||||||
int value = ((AryelTapXTargetCost) cost).getAmount();
|
int value = ((AryelTapXTargetCost) cost).getAmount();
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power " + value + " or less");
|
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power " + value + " or less");
|
||||||
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, value + 1));
|
filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, value + 1));
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,16 +389,6 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false));
|
ability.getTargets().add(new TargetPermanent(minTargets, maxTargets, permanentFilter, false));
|
||||||
break;
|
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:
|
case VERSE_COUNTER_TARGETS:
|
||||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId());
|
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId());
|
||||||
if (sourcePermanent != null) {
|
if (sourcePermanent != null) {
|
||||||
|
|
Loading…
Reference in a new issue