@Override public AttackingCreatureCount copy() { return new AttackingCreatureCount(this); }
public OrimsPrayerTriggeredAbility() { super(Zone.BATTLEFIELD, new GainLifeEffect(new AttackingCreatureCount())); }
public KeepWatch(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}"); // Draw a card for each attacking creature. this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new AttackingCreatureCount())); }
MobMentalityTriggeredAbility() { super(Zone.BATTLEFIELD, new BoostTargetEffect(new AttackingCreatureCount(), new StaticValue(0), Duration.EndOfTurn, true)); }
public StrengthInNumbers(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Until end of turn, target creature gains trample and gets +X/+X, where X is the number of attacking creatures. this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); this.getSpellAbility().addEffect(new BoostTargetEffect(new AttackingCreatureCount("the number of attacking creatures"), new AttackingCreatureCount(), Duration.EndOfTurn, true)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public RubblebeltRaiders(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R/G}{R/G}{R/G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever Rubblebelt Raiders attacks, put a +1/+1 counter on it for each attacking creature you control. this.addAbility(new AttacksTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new AttackingCreatureCount("attacking creature you control"), true),false)); }
public Respite(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Prevent all combat damage that would be dealt this turn. this.getSpellAbility().addEffect(new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true)); // You gain 1 life for each attacking creature. this.getSpellAbility().addEffect(new GainLifeEffect(new AttackingCreatureCount())); }
public TearsOfRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{R}"); // Cast Tears of Rage only during the declare attackers step. this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(PhaseStep.DECLARE_ATTACKERS)); // Attacking creatures you control get +X/+0 until end of turn, where X is the number of attacking creatures. Sacrifice those creatures at the beginning of the next end step. BoostControlledEffect effect = new BoostControlledEffect(new AttackingCreatureCount("the number of attacking creatures"), new StaticValue(0), Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false); effect.setLockedIn(true); getSpellAbility().addEffect(effect); getSpellAbility().addEffect(new TearsOfRageEffect()); }
public FumikoTheLowblood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SAMURAI); this.power = new MageInt(3); this.toughness = new MageInt(2); // Fumiko the Lowblood has bushido X, where X is the number of attacking creatures. this.addAbility(new BushidoAbility(new AttackingCreatureCount("the number of attacking creatures"))); // Creatures your opponents control attack each turn if able. FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); filter.add(new ControllerPredicate(TargetController.OPPONENT)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter)), new AttackedThisTurnWatcher()); }
public WingmateRoc(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(3); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // <em>Raid</em> - When Wingmate Roc enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying. this.addAbility(new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WingmateRocToken())), RaidCondition.instance, "<i>Raid</i> — When {this} enters the battlefield, if you attacked with a creature this turn, create a 3/4 white Bird creature token with flying."), new PlayerAttackedWatcher()); // Whenever Wingmate Roc attacks, you gain 1 life for each attacking creature. Effect effect = new GainLifeEffect(new AttackingCreatureCount()); effect.setText("you gain 1 life for each attacking creature"); this.addAbility(new AttacksTriggeredAbility(effect, false)); }
public JazalGoldmane(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.CAT); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(4); // First strike this.addAbility(FirstStrikeAbility.getInstance()); // {3}{W}{W}: Attacking creatures you control get +X/+X until end of turn, where X is the number of attacking creatures. DynamicValue xValue = new AttackingCreatureCount("the number of attacking creatures"); this.addAbility(new SimpleActivatedAbility( Zone.BATTLEFIELD, new BoostControlledEffect(xValue, xValue, Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false, true), new ManaCostsImpl("{3}{W}{W}"))); }
public VeteransArmaments(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.TRIBAL,CardType.ARTIFACT},"{2}"); this.subtype.add(SubType.SOLDIER); this.subtype.add(SubType.EQUIPMENT); // Equipped creature has "Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature." DynamicValue attackingCreatures = new AttackingCreatureCount("attacking creature"); Ability gainedAbility = new AttacksOrBlocksTriggeredAbility(new BoostSourceEffect(attackingCreatures,attackingCreatures, Duration.EndOfTurn),false); Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.EQUIPMENT); effect.setText("Equipped creature has \"Whenever this creature attacks or blocks, it gets +1/+1 until end of turn for each attacking creature.\""); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); this.addAbility(ability); // Whenever a Soldier creature enters the battlefield, you may attach Veteran's Armaments to it. this.addAbility(new EntersBattlefieldAllTriggeredAbility( Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"), filter, true, SetTargetPointer.PERMANENT, null)); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2))); }