@Override public CantAttackYouAllEffect copy() { return new CantAttackYouAllEffect(this); } }
public Reverence(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); // Creatures with power 2 or less can't attack you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield, filter))); }
public BlazingArchon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{W}{W}{W}"); this.subtype.add(SubType.ARCHON); this.power = new MageInt(5); this.toughness = new MageInt(6); // Flying this.addAbility(FlyingAbility.getInstance()); // Creatures can't attack you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield))); }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player controller = game.getPlayer(event.getPlayerId()); if (controller != null && controller.chooseUse(outcome, "Skip draw card? (If you do, until your next turn, you can't be attacked except by creatures with flying and/or islandwalk)", source, game)) { game.informPlayers(controller.getLogName() + " skips their draw card action. Until their next turn, he or she can't be attacked except by creatures with flying and/or islandwalk"); game.addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, notFlyingorIslandwalkCreatures), source); return true; } return false; }
public FormOfTheDragon(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}{R}{R}"); // At the beginning of your upkeep, Form of the Dragon deals 5 damage to any target. Ability ability = new BeginningOfUpkeepTriggeredAbility(new DamageTargetEffect(5), TargetController.YOU, false); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); // At the beginning of each end step, your life total becomes 5. this.addAbility(new BeginningOfEndStepTriggeredAbility(new SetPlayerLifeSourceEffect(5), TargetController.ANY, false)); // Creatures without flying can't attack you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield, filter))); }
public ElephantGrass(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); // Cumulative upkeep {1} this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}"))); // Black creatures can't attack you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield, filterBlack))); // Nonblack creatures can't attack you unless their controller pays {2} for each creature he or she controls that's attacking you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2"), false, filter))); }
public FormOfTheSquirrel(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); // As Form of the Squirrel enters the battlefield, create a 1/1 green Squirrel creature token. You lose the game when that creature leaves the battlefield. this.addAbility(new AsEntersBattlefieldAbility(new FormOfTheSquirrelCreateTokenEffect())); // Creatures can't attack you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield))); // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); // You can't cast spells. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new FormOfTheSquirrelCantCastEffect())); }
FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(playerId)); game.addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, filter, true), source);
public ChronomanticEscape(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W}{W}"); // Until your next turn, creatures can't attack you. Exile Chronomantic Escape with three time counters on it. getSpellAbility().addEffect(new CantAttackYouAllEffect(Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); getSpellAbility().addEffect(ExileSpellEffect.getInstance()); Effect effect = new AddCountersSourceEffect(CounterType.TIME.createInstance(), new StaticValue(3), true, true); effect.setText("with 3 time counters on it"); getSpellAbility().addEffect(effect); // Suspend 3-{2}{W} this.addAbility(new SuspendAbility(3, new ManaCostsImpl("{2}{W}"), this)); }