@Override public AttacksCreatureYouControlTriggeredAbility copy() { return new AttacksCreatureYouControlTriggeredAbility(this); }
public SpiritualAsylum(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // Creatures and lands you control have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, filter))); // When a creature you control attacks, sacrifice Spiritual Asylum. AttacksCreatureYouControlTriggeredAbility ability = new AttacksCreatureYouControlTriggeredAbility(new SacrificeSourceEffect()); ability.setOnce(true); this.addAbility(ability); }
@Override public boolean checkTrigger(GameEvent event, Game game) { Permanent sourcePermanent = game.getPermanent(event.getSourceId()); if (sourcePermanent != null && filter.match(sourcePermanent, sourceId, controllerId, game)) { if (setTargetPointer) { this.getEffects().setTargetPointer(new FixedTarget(event.getSourceId())); } return true; } return false; }
public FerventCharge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}{W}{B}"); // Whenever a creature you control attacks, it gets +2/+2 until end of turn. Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); effect.setText("it gets +2/+2 until end of turn"); this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, true)); }
public SharedAnimosity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); // Whenever a creature you control attacks, it gets +1/+0 until end of turn for each other attacking creature that shares a creature type with it. this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new SharedAnimosityEffect(), false, true)); }
public GleamOfBattle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}{W}"); // Whenever a creature you control attacks, put a +1/+1 counter on it. this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false, true)); }
public TeferisVeil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // Whenever a creature you control attacks, it phases out at end of combat. Effect effect = new CreateDelayedTriggeredAbilityEffect(new AtTheEndOfCombatDelayedTriggeredAbility(new PhaseOutTargetEffect("it", false))); effect.setText("it phases out at end of combat"); this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, true)); }
public BeastmasterAscension(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BeastmasterAscensionEffect())); }
public SanctumSeeker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.KNIGHT); this.power = new MageInt(3); this.toughness = new MageInt(4); // Whenever a Vampire you control attacks, each opponent loses 1 life and you gain 1 life. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new LoseLifeOpponentsEffect(1), false, filter); Effect effect = new GainLifeEffect(1); effect.setText("and you gain 1 life"); ability.addEffect(effect); this.addAbility(ability); }
public AnthemOfRakdos(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{R}{R}"); // Whenever a creature you control attacks, it gets +2/+0 until end of turn and Anthem of Rakdos deals 1 damage to you. Effect effect = new BoostTargetEffect(2, 0, Duration.EndOfTurn); effect.setText("it gets +2/+0 until end of turn"); Ability ability = new AttacksCreatureYouControlTriggeredAbility(effect, false, true); effect = new DamageControllerEffect(1); effect.setText("and {this} deals 1 damage to you"); ability.addEffect(effect); this.addAbility(ability); // Hellbent - As long as you have no cards in hand, if a source you control would deal damage to a creature or player, it deals double that damage to that creature or player instead. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AnthemOfRakdosHellbentEffect())); }
public DromokaTheEternal(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever a Dragon you control attacks, bolster 2. this.addAbility(new AttacksCreatureYouControlTriggeredAbility( new BolsterEffect(2), false, new FilterControlledCreaturePermanent(SubType.DRAGON, "Dragon you control"))); }
public StonebrowKrosanHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CENTAUR); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); // Whenever a creature you control with trample attacks, it gets +2/+2 until end of turn. Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); effect.setText("it gets +2/+2 until end of turn"); this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, filter, true)); }
public DruidsRepository(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}{G}"); // Whenever a creature you control attacks, put a charge counter on Druids' Repository. this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance()))); // Remove a charge counter from Druids' Repository: Add one mana of any color. Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaOfAnyColorEffect(), new RemoveCountersSourceCost(CounterType.CHARGE.createInstance())); this.addAbility(ability); }
public UtvaraHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); // Flying this.addAbility(FlyingAbility.getInstance()); // Whenever a Dragon you control attacks, create a 6/6 red Dragon creature token with flying. this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new CreateTokenEffect(new UtvaraHellkiteDragonToken()), false, filter)); }
public MarduAscendancy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{R}{W}{B}"); // Whenever a nontoken creature you control attacks, create a 1/1 red Goblin creature token tapped and attacking. this.addAbility(new AttacksCreatureYouControlTriggeredAbility(new CreateTokenEffect(new GoblinToken(), 1, true, true), false, attackFilter)); // Sacrifice Mardu Ascendancy: Creatures you control get +0/+3 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 3, Duration.EndOfTurn, filter, false), new SacrificeSourceCost())); }
public KragmaWarcaller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{R}"); this.subtype.add(SubType.MINOTAUR); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(3); // Minotaur creatures you control have haste. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter1, false))); // Whenever a Minotaur you control attacks, it gets +2/+0 until end of turn. Effect effect = new BoostTargetEffect(2,0, Duration.EndOfTurn); effect.setText("it gets +2/+0 until end of turn"); this.addAbility(new AttacksCreatureYouControlTriggeredAbility(effect, false, filter1, true)); }
public EliteScaleguard(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); // When Elite Scaleguard enters the battlefield, bolster 2. this.addAbility(new EntersBattlefieldTriggeredAbility(new BolsterEffect(2))); // Whenever a creature you control with a +1/+1 counter on it attacks, tap target creature defending player controls. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new EliteScaleguardTapEffect(), false, filter, true); ability.addTarget(new TargetCreaturePermanent(filter2)); this.addAbility(ability); }
public RageForger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(2); this.toughness = new MageInt(2); // When Rage Forger enters the battlefield, put a +1/+1 counter on each other Shaman creature you control. this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false)); // Whenever a creature you control with a +1/+1 counter on it attacks, you may have that creature deal 1 damage to target player. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new RageForgerDamageEffect(), true, filterAttack, true); ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(ability); }
public NazahnReveredBladesmith(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CAT); this.subtype.add(SubType.ARTIFICER); this.power = new MageInt(5); this.toughness = new MageInt(4); // When Nazahn, Revered Bladesmith enters the battlefield, search your library for an Equipment card and reveal it. If you reveal a card named Hammer of Nazahn this way, put it onto the battlefield. Otherwise, put that card into your hand. Then shuffle your library. TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandOrOnBattlefieldEffect(target, true, true, "Hammer of Nazahn"), true)); // Whenever an equipped creature you control attacks, you may tap target creature defending player controls. Ability ability = new AttacksCreatureYouControlTriggeredAbility(new NazahnTapEffect(), true, equippedFilter, true); ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); ability.setTargetAdjuster(NazahnReveredBladesmithAdjuster.instance); this.addAbility(ability); }
public ArahboRoarOfTheWorld(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CAT, SubType.AVATAR); this.power = new MageInt(5); this.toughness = new MageInt(5); // Eminence — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn. Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfCombatTriggeredAbility(Zone.ALL, new BoostTargetEffect(3, 3, Duration.EndOfTurn), TargetController.YOU, false, false), SourceOnBattlefieldOrCommandZoneCondition.instance, "<i>Eminence</i> — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn."); ability.addTarget(new TargetCreaturePermanent(filter)); ability.setAbilityWord(AbilityWord.EMINENCE); this.addAbility(ability); // Whenever another Cat you control attacks, you may pay {1}{G}{W}. If you do, it gains trample and gets +X/+X until end of turn, where X is its power. // Effect effect = new DoIfCostPaid(new ArahboEffect(), new ManaCostsImpl("{1}{G}{W}")); ability = new AttacksCreatureYouControlTriggeredAbility( new DoIfCostPaid(new ArahboEffect(), new ManaCostsImpl("{1}{G}{W}")), false, filter2, true); this.addAbility(ability); }