mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
* Trained Condor - Fixed that the gain flying ability could also target the condor itself.
This commit is contained in:
parent
062a00f65e
commit
bb52fbb8b5
1 changed files with 10 additions and 1 deletions
|
@ -38,6 +38,9 @@ import mage.cards.CardImpl;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.Duration;
|
import mage.constants.Duration;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||||
|
import mage.target.Target;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,6 +49,10 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
*/
|
*/
|
||||||
public class TrainedCondor extends CardImpl<TrainedCondor> {
|
public class TrainedCondor extends CardImpl<TrainedCondor> {
|
||||||
|
|
||||||
|
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
|
||||||
|
static {
|
||||||
|
filter.add(new AnotherPredicate());
|
||||||
|
}
|
||||||
public TrainedCondor(UUID ownerId) {
|
public TrainedCondor(UUID ownerId) {
|
||||||
super(ownerId, 76, "Trained Condor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
super(ownerId, 76, "Trained Condor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||||
this.expansionSetCode = "M14";
|
this.expansionSetCode = "M14";
|
||||||
|
@ -60,7 +67,9 @@ public class TrainedCondor extends CardImpl<TrainedCondor> {
|
||||||
// Whenever Trained Condor attacks, another target creature you control gains flying until end of turn.
|
// Whenever Trained Condor attacks, another target creature you control gains flying until end of turn.
|
||||||
Effect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
|
Effect effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
|
||||||
Ability ability = new AttacksTriggeredAbility(effect, false);
|
Ability ability = new AttacksTriggeredAbility(effect, false);
|
||||||
ability.addTarget(new TargetControlledCreaturePermanent(true));
|
Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
||||||
|
target.setRequired(true);
|
||||||
|
ability.addTarget(target);
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue