@Override public AttacksIfAbleAllEffect copy() { return new AttacksIfAbleAllEffect(this); }
public ThantisTheWarweaver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.SPIDER); this.power = new MageInt(5); this.toughness = new MageInt(5); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Reach this.addAbility(ReachAbility.getInstance()); // All creatures attack each combat if able. this.addAbility(new SimpleStaticAbility( Zone.BATTLEFIELD, new AttacksIfAbleAllEffect( StaticFilters.FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield, true ).setText("All creatures attack each combat if able") )); // Whenever a creature attacks you or a planeswalker you control, put a +1/+1 counter on Thantis the Warweaver. this.addAbility(new AttacksAllTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, true )); }
public GrandMelee(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // All creatures attack each turn if able. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES)); this.addAbility(ability, new AttackedThisTurnWatcher()); // All creatures block each turn if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleAllEffect(FILTER_PERMANENT_CREATURES))); }
public SpyMasterGoblinToken() { super("Goblin", "1/1 red Goblin creature token with \"Creatures you control attack each combat if able.\""); cardType.add(CardType.CREATURE); color.setRed(true); subtype.add(SubType.GOBLIN); power = new MageInt(1); toughness = new MageInt(1); Effect effect = new AttacksIfAbleAllEffect(filter, Duration.WhileOnBattlefield, true); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); }
public GoblinAssault(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); // At the beginning of your upkeep, create a 1/1 red Goblin creature token with haste. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinToken(true)), TargetController.YOU, false)); // Goblin creatures attack each turn if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE_GOBLINS, Duration.WhileOnBattlefield)), new AttackedThisTurnWatcher()); }
public MaddeningImp(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); // Flying this.addAbility(FlyingAbility.getInstance()); // {T}: Non-Wall creatures the active player controls attack this turn if able. At the beginning of the next end step, destroy each of those creatures that didn't attack this turn. Activate this ability only during an opponent's turn and only before combat. Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn), new TapSourceCost(), new MaddeningImpTurnCondition(), "{T}: Non-Wall creatures the active player controls attack this turn if able. " + "At the beginning of the next end step, destroy each of those creatures that didn't attack this turn. " + "Activate this ability only during an opponent's turn and only before combat."); ability.addEffect(new MaddeningImpCreateDelayedTriggeredAbilityEffect()); this.addAbility(ability, new AttackedThisTurnWatcher()); }
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()); }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (player != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(player.getId())); RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn); game.addEffect(effect, source); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (player != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(player.getId())); RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn); game.addEffect(effect, source); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (player != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(player.getId())); RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn); game.addEffect(effect, source); return true; } return false; } }
public AvatarOfSlaughter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{R}{R}"); this.subtype.add(SubType.AVATAR); this.power = new MageInt(8); this.toughness = new MageInt(8); // All creatures have double strike and attack each turn if able. Effect effect = new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES); effect.setText("All creatures have double strike"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES); effect.setText("and attack each turn if able"); ability.addEffect(effect); this.addAbility(ability, new AttackedThisTurnWatcher()); }
public WarmongerHellkite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(5); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // All creatures attack each combat if able. Effect effect = new AttacksIfAbleAllEffect(FILTER_PERMANENT_CREATURES, Duration.WhileOnBattlefield, true); effect.setText("All creatures attack each combat if able"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // {1}{R}: Attacking creatures get +1/+0 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature("Attacking creatures"), false), new ManaCostsImpl("{1}{R}"))); }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { if (sourceObject != null) { Choice typeChoice = new ChoiceCreatureType(sourceObject); if (player.choose(outcome, typeChoice, game)) { game.informPlayers(sourceObject.getLogName() + " chosen type: " + typeChoice.getChoice()); FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice()))); RequirementEffect effect = new AttacksIfAbleAllEffect(filter, Duration.EndOfTurn); game.addEffect(effect, source); return true; } } } return false; }
public GoblinRabblemaster(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); this.toughness = new MageInt(2); // Other Goblin creatures you control attack each turn if able. Effect effect = new AttacksIfAbleAllEffect(otherGoblinFilter); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher()); // At the beginning of combat on your turn, create a 1/1 red Goblin creature token with haste. this.addAbility(new BeginningOfCombatTriggeredAbility(new CreateTokenEffect(new GoblinToken(true)), TargetController.YOU, false)); // When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin. this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(attackingFilter), new StaticValue(0), Duration.EndOfTurn, true), false)); }