@Override public AttacksIfAbleTargetEffect copy() { return new AttacksIfAbleTargetEffect(this); }
public AlluringSiren(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(1); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); }
public HecklingFiends(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.DEVIL); this.power = new MageInt(2); this.toughness = new MageInt(2); // {2}{R}: Target creature attacks this turn if able. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{2}{R}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public ImpsTaunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}"); // Buyback {3} this.addAbility(new BuybackAbility("{3}")); // Target creature attacks this turn if able. this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public RageNimbus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(5); this.toughness = new MageInt(3); this.addAbility(DefenderAbility.getInstance()); this.addAbility(FlyingAbility.getInstance()); SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{R}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public IntoTheFray(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); this.subtype.add(SubType.ARCANE); // Target creature attacks this turn if able. this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Splice onto Arcane {R} this.addAbility(new SpliceOntoArcaneAbility("{R}")); }
@Override public boolean apply(Game game, Ability source) { for (Permanent creature : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { AttacksIfAbleTargetEffect effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(creature.getId())); game.addEffect(effect, source); } return true; }
public NettlingImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); // {T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. If it doesn't, destroy it at the beginning of the next end step. Activate this ability only during an opponent's turn, before attackers are declared. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost(), new NettlingImpTurnCondition(), "{T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. " + "That creature attacks this turn if able. If it doesn't, destroy it at the beginning of the next end step. " + "Activate this ability only during an opponent's turn, before attackers are declared."); ability.addEffect(new NettlingImpDelayedDestroyEffect()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability, new AttackedThisTurnWatcher()); }
public Incite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); // Target creature becomes red until end of turn and attacks this turn if able. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new BecomesColorTargetEffect(ObjectColor.RED, Duration.EndOfTurn, "Target creature becomes red until end of turn")); this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); }
public BoilingBlood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); // Target creature attacks this turn if able. this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); // Draw a card. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); }
public BasandraBattleSeraph(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // Players can't cast spells during combat. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BasandraBattleSeraphEffect())); // {R}: Target creature attacks this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{R}")); ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public ShipwreckSinger(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}{B}"); this.subtype.add(SubType.SIREN); this.power = new MageInt(1); this.toughness = new MageInt(2); // Flying this.addAbility(FlyingAbility.getInstance()); // {1}{U}: Target creature an opponent controls attacks this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")); Target target = new TargetCreaturePermanent(filter); ability.addTarget(target); this.addAbility(ability); // {1}{B}, {T}: Attacking creatures get -1/-1 until end of turn. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(-1,-1, Duration.EndOfTurn, filterAttacking, false), new ManaCostsImpl("{1}{B}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); }
public Norritt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.IMP); this.power = new MageInt(1); this.toughness = new MageInt(1); // {T}: Untap target blue creature. Ability ability1 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapSourceCost()); ability1.addTarget(new TargetCreaturePermanent(filterBlue)); this.addAbility(ability1); // {T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. That creature attacks this turn if able. If it doesn't, destroy it at the beginning of the next end step. Activate this ability only before attackers are declared. Ability ability2 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost(), BeforeAttackersAreDeclaredCondition.instance, "{T}: Choose target non-Wall creature the active player has controlled continuously since the beginning of the turn. " + "That creature attacks this turn if able. If it doesn't, destroy it at the beginning of the next end step. " + "Activate this ability only before attackers are declared."); ability2.addEffect(new NorrittDelayedDestroyEffect()); ability2.addTarget(new TargetCreaturePermanent(filterCreature)); this.addAbility(ability2, new AttackedThisTurnWatcher()); }
public Bullwhip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {2}, {tap}: Bullwhip deals 1 damage to target creature. That creature attacks this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); Effect effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); effect.setText("that creature attacks this turn if able"); ability.addEffect(effect); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public CourtlyProvocateur(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Target creature attacks this turn if able. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null)); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); // {tap}: Target creature blocks this turn if able. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BlocksIfAbleTargetEffect(Duration.EndOfTurn), new TapSourceCost()); ability2.addEffect(new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, null)); ability2.addTarget(new TargetCreaturePermanent()); this.addAbility(ability2); }
public ChemistersTrick(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{R}"); // Target creature you don't control gets -2/-0 until end of turn and attacks this turn if able. this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new BoostTargetEffect(-2,0, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn)); // Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") OverloadAbility ability = new OverloadAbility(this, new BoostAllEffect(-2,0, Duration.EndOfTurn,filter,false), new ManaCostsImpl("{3}{U}{R}")); ability.addEffect(new ChemistersTrickEffect(filter)); this.addAbility(ability); }
@Override public boolean apply(Game game, Ability source) { Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (targetCreature != null && controller != null) { ContinuousEffect effect = new AttacksIfAbleTargetEffect(Duration.UntilYourNextTurn); effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); effect = new CantAttackYouEffect(Duration.UntilYourNextTurn); effect.setTargetPointer(new FixedTarget(getTargetPointer().getFirst(game, source))); game.addEffect(effect, source); game.informPlayers(controller.getLogName() + " is goading " + targetCreature.getLogName()); } return true; } }
public Resistance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}{W}"); // Whenever a creature enters the battlefield under your control, Resistance deals 1 damage to each opponent. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), StaticFilters.FILTER_PERMANENT_CREATURE, false)); // {R}{W}: Target creature gains haste until end of turn and must attack or block this turn if able. Ability ability = new SimpleActivatedAbility( new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn) .setText("Target creature gains haste until end of turn"), new ManaCostsImpl("{R}{W}")); ability.addEffect(new AttacksIfAbleTargetEffect(Duration.EndOfTurn).setText("and must attack")); //ability.addEffect(new GainAbilityTargetEffect(AttacksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "").setText("")); ability.addEffect(new BlocksIfAbleTargetEffect(Duration.EndOfTurn).setText("or block this turn if able")); //ability.addEffect(new GainAbilityTargetEffect(BlocksThisTurnMarkerAbility.getInstance(), Duration.EndOfTurn, "").setText("")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
RequirementEffect effect = new AttacksIfAbleTargetEffect(Duration.EndOfCombat); effect.setText(""); effect.setTargetPointer(new FixedTarget(permanent.getId()));
} else { ContinuousEffectImpl effect = new AttacksIfAbleTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(creature1.getId())); game.addEffect(effect, source);