public OldManOfTheSeaStateBasedTriggeredAbility() { super(Zone.BATTLEFIELD, new InfoEffect("")); this.setRuleVisible(false); this.usesStack = false; }
public AttachableToRestrictedAbility(Target target) { super(Zone.BATTLEFIELD, new InfoEffect("{this} can be attached only to a " + target.getTargetName())); addTarget(target); }
public CallerOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.HUMAN); // As an additional cost to cast Caller of the Hunt, choose a creature type. // Caller of the Hunt's power and toughness are each equal to the number of creatures of the chosen type on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("as an additional cost to cast this spell, choose a creature type. \r" + "{this}'s power and toughness are each equal to the number of creatures of the chosen type on the battlefield"))); this.getSpellAbility().setCostAdjuster(CallerOfTheHuntAdjuster.instance); }
public WoodElemental(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(0); this.toughness = new MageInt(0); // As Wood Elemental enters the battlefield, sacrifice any number of untapped Forests. this.addAbility(new AsEntersBattlefieldAbility(new WoodElementalEffect())); // Wood Elemental's power and toughness are each equal to the number of Forests sacrificed as it entered the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this}'s power and toughness are each equal to the number of Forests sacrificed as it entered the battlefield"))); }
public NamelessRace(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.power = new MageInt(0); this.toughness = new MageInt(0); // Trample this.addAbility(TrampleAbility.getInstance()); // As Nameless Race enters the battlefield, pay any amount of life. The amount you pay can't be more than the total number of white nontoken permanents your opponents control plus the total number of white cards in their graveyards. this.addAbility(new AsEntersBattlefieldAbility(new NamelessRaceEffect())); // Nameless Race's power and toughness are each equal to the life paid as it entered the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this}'s power and toughness are each equal to the life paid as it entered the battlefield"))); }
public TransguildCourier(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(3); this.toughness = new MageInt(3); this.color.setWhite(true); this.color.setBlue(true); this.color.setBlack(true); this.color.setRed(true); this.color.setGreen(true); this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this} is all colors"))); }
public SanctumOfTheSun(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); this.addSuperType(SuperType.LEGENDARY); this.nightCard = true; // <i>(Transforms from Azor's Gateway.)</i> this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("<i>(Transforms from Azor's Gateway.)</i>")).setRuleAtTheTop(true)); // {T}: Add X mana of any one color, where X is your life total. this.addAbility(new DynamicManaAbility(new Mana(0, 0, 0, 0, 0, 0, 1, 0), ControllerLifeCount.instance, new TapSourceCost(), "Add X mana of any one color, where X is is your life total", true)); }
public MyrSuperion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{2}"); this.subtype.add(SubType.MYR); this.power = new MageInt(5); this.toughness = new MageInt(6); // Spend only mana produced by creatures to cast Myr Superion. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("Spend only mana produced by creatures to cast {this}"))); this.getSpellAbility().getManaCostsToPay().setSourceFilter(StaticFilters.FILTER_PERMANENT_CREATURES); this.getSpellAbility().getManaCosts().setSourceFilter(StaticFilters.FILTER_PERMANENT_CREATURES); }
public MinionOfTheWastes(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}{B}"); this.subtype.add(SubType.MINION); this.power = new MageInt(0); this.toughness = new MageInt(0); // Trample this.addAbility(TrampleAbility.getInstance()); // As Minion of the Wastes enters the battlefield, pay any amount of life. The amount you pay can't be more than the total number of white nontoken permanents your opponents control plus the total number of white cards in their graveyards. this.addAbility(new AsEntersBattlefieldAbility(new MinionOfTheWastesEffect())); // Minion of the Wastes's power and toughness are each equal to the life paid as it entered the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("{this}'s power and toughness are each equal to the life paid as it entered the battlefield"))); }
public AbandonHope(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}"); // As an additional cost to cast Abandon Hope, discard X cards. Ability ability = new SimpleStaticAbility(Zone.ALL, new InfoEffect("As an additional cost to cast this spell, discard X cards")); ability.setRuleAtTheTop(true); this.addAbility(ability); // Look at target opponent's hand and choose X cards from it. That player discards those cards. ManacostVariableValue manaX = ManacostVariableValue.instance; this.getSpellAbility().addEffect(new DiscardCardYouChooseTargetEffect(manaX, TargetController.ANY)); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().setCostAdjuster(AbandonHopeAdjuster.instance); }
public GhostfireBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +2/+2 this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 2))); // Equip {3} this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3))); // Ghostfire Blade's equip ability costs {2} less to activate if it targets a colorless creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("{this}'s equip ability costs {2} less to activate if it targets a colorless creature"))); } @Override
public AetherTide(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{U}"); // As an additional cost to cast Aether Tide, discard X creature cards. Ability ability = new SimpleStaticAbility(Zone.ALL, new InfoEffect("As an additional cost to cast {this}, discard X creature cards")); ability.setRuleAtTheTop(true); this.addAbility(ability); // Return X target creatures to their owners' hands. Effect effect = new ReturnToHandTargetEffect(true); effect.setText("Return X target creatures to their owners' hands"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().setTargetAdjuster(AetherTideTargetAdjuster.instance); this.getSpellAbility().setCostAdjuster(AetherTideCostAdjuster.instance); }
public HanweirGarrison(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); this.toughness = new MageInt(3); // Whenever Hanweir Garrison attacks, create two 1/1 red Human creature tokens tapped and attacking. this.addAbility(new AttacksTriggeredAbility(new CreateTokenEffect(new RedHumanToken(), 2, true, true), false)); // <i>(Melds with Hanweir Battlements.)</i> this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("(Melds with Hannweir Battlements.)"))); }
public RatColony(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(1); // Rat Colony gets +1/+0 for each other Rat you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new PermanentsOnBattlefieldCount(filter), new StaticValue(0), Duration.WhileOnBattlefield, false))); // A deck can have any number of cards named Rat Colony. this.addAbility(new SimpleStaticAbility(Zone.ALL, new InfoEffect("A deck can have any number of cards named Rat Colony."))); }
public Lightsaber(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); this.subtype.add(SubType.EQUIPMENT); // Equiped creature gets +1/+0 and has firsttrike this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 0))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT))); // Equip 3 this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(3))); // Lightsaber's equip ability costs {1} if it targets a Jedi or Sith. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new InfoEffect("{this}'s equip ability costs {1} if it targets a Jedi or Sith"))); }
public Ghostfire(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); // Ghostfire is colorless. this.color = new ObjectColor(); this.getSpellAbility().addEffect(new InfoEffect("{this} is colorless")); // Ghostfire deals 3 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public RelentlessRats(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); this.subtype.add(SubType.RAT); this.power = new MageInt(2); this.toughness = new MageInt(2); // Relentless Rats gets +1/+1 for each other creature on the battlefield named Relentless Rats. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RelentlessRatsEffect())); // A deck can have any number of cards named Relentless Rats. this.getSpellAbility().addEffect(new InfoEffect("A deck can have any number of cards named Relentless Rats.")); }
public SamiteSanctuary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // {2}: Prevent the next 1 damage that would be dealt to target creature this turn. Any player may activate this ability. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventDamageToTargetEffect(Duration.EndOfTurn ,1), new ManaCostsImpl("{2}")); ability.addTarget(new TargetCreaturePermanent()); ability.setMayActivate(TargetController.ANY); ability.addEffect(new InfoEffect("Any player may activate this ability")); this.addAbility(ability); }
public GlyphOfLife(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); // Choose target Wall creature. Whenever that creature is dealt damage by an attacking creature this turn, you gain that much life. this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new InfoEffect("Choose target Wall creature")); this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new GlyphOfLifeTriggeredAbility())); }
public GlyphOfDoom(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); // Choose target Wall creature. At this turn's next end of combat, destroy all creatures that were blocked by that creature this turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new InfoEffect("Choose target Wall creature")); this.getSpellAbility().addEffect(new GlyphOfDoomCreateDelayedTriggeredAbilityEffect()); this.getSpellAbility().addWatcher(new BlockedAttackerWatcher()); }