@Override public GainAbilityControllerEffect copy() { return new GainAbilityControllerEffect(this); }
public IvoryMask(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); }
public LeylineOfSanctity(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}{W}"); // If Leyline of Sanctity is in your opening hand, you may begin the game with it on the battlefield. this.addAbility(LeylineAbility.getInstance()); // You have hexproof. (You can't be the target of spells or abilities your opponents control.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance()))); }
public TrueBeliever(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(2); this.toughness = new MageInt(2); // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield))); }
public WitchbaneOrb(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // When Witchbane Orb enters the battlefield, destroy all Curses attached to you. this.addAbility(new EntersBattlefieldTriggeredAbility(new WitchbaneOrbEffect())); // You have hexproof. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance()))); }
public OrbsOfWarding(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}"); // You have hexproof. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield))); // If a creature would deal damage to you, prevent 1 of that damage. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new OrbsOfWardingEffect())); }
public AegisOfTheGods(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(1); // You have hexproof. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield))); }
public SpiritOfTheHearth(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); this.subtype.add(SubType.CAT); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // You have hexproof. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { game.addEffect(new GainAbilityControllerEffect(new TeferisProtectionAbility(), Duration.UntilYourNextTurn), source); return true; } return false; }
public ImperialMask(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}"); // When Imperial Mask enters the battlefield, if it's not a token, each of your teammates puts a token that's a copy of Imperial Mask onto the battlefield. // No implementation of teammates currently, so no effect needed this.addAbility(new ConditionalInterveningIfTriggeredAbility( new EntersBattlefieldTriggeredAbility(new InfoEffect("each of your teammates puts a token that's a copy of {this} onto the battlefield"), false), new SourceMatchesFilterCondition(filter), "When {this} enters the battlefield, if it's not a token, " + "each of your teammates puts a token that's a copy of {this} onto the battlefield" )); // You have hexproof. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(HexproofAbility.getInstance()))); }
public GildedLight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // You gain shroud until end of turn. this.getSpellAbility().addEffect(new GainAbilityControllerEffect(ShroudAbility.getInstance(), Duration.EndOfTurn)); // Cycling {2} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}"))); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (controller != null && cardName != null && !cardName.isEmpty()) { FilterObject filter = new FilterObject("the name [" + cardName + ']'); filter.add(new NamePredicate(cardName)); ContinuousEffect effect = new GainAbilityControllerEffect(new ProtectionAbility(filter), Duration.Custom); game.addEffect(effect, source); return true; } return false; }
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())); }
public GruulSpellbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); this.subtype.add(SubType.OGRE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); this.toughness = new MageInt(3); // Riot this.addAbility(new RiotAbility()); // Trample this.addAbility(TrampleAbility.getInstance()); // As long as it's your turn, you and Gruul Spellbreaker have hexproof. Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, new ConditionalContinuousEffect( new GainAbilityControllerEffect( HexproofAbility.getInstance(), Duration.WhileOnBattlefield ), MyTurnCondition.instance, "As long as it's your turn, you and" ) ); ability.addEffect(new ConditionalContinuousEffect( new GainAbilitySourceEffect( HexproofAbility.getInstance(), Duration.WhileOnBattlefield ), MyTurnCondition.instance, "{this} have hexproof." )); this.addAbility(ability); }
public SolitaryConfinement(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); // At the beginning of your upkeep, sacrifice Solitary Confinement unless you discard a card. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new SacrificeSourceUnlessPaysEffect(new DiscardTargetCost(new TargetCardInHand())), TargetController.YOU, false)); // Skip your draw step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); // You have shroud. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControllerEffect(ShroudAbility.getInstance()))); // Prevent all damage that would be dealt to you. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventDamageToControllerEffect(Duration.WhileOnBattlefield))); }
public YodaEmblem() { this.setName("Emblem Yoda, Jedi Master"); Effect effect = new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.EndOfGame); effect.setText("Hexproof, you"); Ability ability = new SimpleStaticAbility(Zone.COMMAND, effect); effect = new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.EndOfGame, new FilterCreaturePermanent()); effect.setText(" you and your creatures have"); ability.addEffect(effect); getAbilities().add(ability); } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject mageObject = game.getObject(source.getSourceId()); ChoiceColor choice = new ChoiceColor(); if (controller != null && mageObject != null && controller.choose(Outcome.Protect, choice, game)) { game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); FilterCard filter = new FilterCard(); filter.add(new ColorPredicate(choice.getColor())); filter.setMessage(choice.getChoice()); Ability ability = new ProtectionAbility(filter); game.addEffect(new GainAbilityControllerEffect(ability, Duration.EndOfTurn), source); return true; } return false; }
public SigardaHeronsGrace(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ANGEL); this.power = new MageInt(4); this.toughness = new MageInt(5); // Flying this.addAbility(FlyingAbility.getInstance()); // You and Humans you control have hexproof. Effect effect = new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield); effect.setText("You and"); Ability ability =new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter); effect.setText("and Humans you control have hexproof"); ability.addEffect(effect); this.addAbility(ability); // {2}, Exile a card from your graveyard: Create a 1/1 white Human Soldier creature token. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HumanSoldierToken()), new GenericManaCost(2)); ability.addCost(new ExileFromGraveCost(new TargetCardInYourGraveyard())); this.addAbility(ability); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject mageObject = game.getObject(source.getSourceId()); if (controller != null && mageObject != null) { if (FatefulHourCondition.instance.apply(game, source)) { ChoiceColor choice = new ChoiceColor(); if (!controller.choose(Outcome.Protect, choice, game)) { return false; } if (choice.getColor() != null) { game.informPlayers(mageObject.getLogName() + ": " + controller.getLogName() + " has chosen " + choice.getChoice()); FilterCard filter = new FilterCard(); filter.add(new ColorPredicate(choice.getColor())); filter.setMessage(choice.getChoice()); Ability ability = new ProtectionAbility(filter); game.addEffect(new GainAbilityControlledEffect(ability, Duration.EndOfTurn), source); game.addEffect(new GainAbilityControllerEffect(ability, Duration.EndOfTurn), source); return true; } } else { game.addEffect(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), source); return true; } } return false; }
public ShalaiVoiceOfPlenty(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.ANGEL); this.power = new MageInt(3); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // You, planeswalkers you control, and other creatures you control have hexproof. Effect effect = new GainAbilityControllerEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield); effect.setText("You"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, filter1); effect.setText(", planeswalkers you control"); ability.addEffect(effect); effect = new GainAbilityControlledEffect(HexproofAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, true); effect.setText(", and other creatures you control have hexproof"); ability.addEffect(effect); this.addAbility(ability); // {4}{G}{G}: Put a +1/+1 counter on each creature you control. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAllEffect( CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent("creature you control") ), new ManaCostsImpl("{4}{G}{G}") )); }