@Override public DevotionCount copy() { return new DevotionCount(this); }
@Override public void init(Ability source, Game game) { super.init(source, game); amount = new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this); }
public Skyreaping(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); // Skyreaping deals damage to each creature with flying equal to your devotion to green. Effect effect = new DamageAllEffect(new DevotionCount(ColoredManaSymbol.G), filter); effect.setText("{this} deals damage to each creature with flying equal to your devotion to green <i>(Each {G} in the mana costs of permanents you control counts toward your devotion to green.)</i>"); this.getSpellAbility().addEffect(effect); }
public ReverentHunter(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ARCHER); this.power = new MageInt(1); this.toughness = new MageInt(1); // When Reverent Hunter enters the battlefield, put a number of +1/+1 counters on it equal to your devotion to green. this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new DevotionCount(ColoredManaSymbol.G), true))); }
public ThassasRebuff(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Counter target spell unless its controller pays {X}, where X is your devotion to blue. this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new DevotionCount(ColoredManaSymbol.U))); this.getSpellAbility().addTarget(new TargetSpell()); }
public KarametrasAcolyte(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.DRUID); this.power = new MageInt(1); this.toughness = new MageInt(4); // {T}: Add an amount of {G} equal to your devotion to green. this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new DevotionCount(ColoredManaSymbol.G), "Add an amount of {G} equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts towards your devotion to green.)")); }
public EvangelOfHeliod(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(3); // When Evangel of Heliod enters the battlefield, create a number of 1/1 white Soldier creature tokens equal to your devotion to white. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), new DevotionCount(ColoredManaSymbol.W)))); }
public NyleasDisciple(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); this.subtype.add(SubType.CENTAUR); this.subtype.add(SubType.ARCHER); this.power = new MageInt(3); this.toughness = new MageInt(3); // When Nylea's Disciple enters the battlefield, you gain life equal to your devotion to green. Effect effect = new GainLifeEffect(new DevotionCount(ColoredManaSymbol.G)); effect.setText("you gain life equal to your devotion to green"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); }
public FanaticOfMogis(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); this.subtype.add(SubType.MINOTAUR); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(4); this.toughness = new MageInt(2); // When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red. Effect effect = new DamagePlayersEffect(Outcome.Damage, new DevotionCount(ColoredManaSymbol.R), TargetController.OPPONENT); effect.setText("it deals damage to each opponent equal to your devotion to red. (Each {R} in the mana costs of permanents you control counts towards your devotion to red.)"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); }
@Override public void adjustTargets(Ability ability, Game game) { ability.getTargets().clear(); int numbTargets = new DevotionCount(ColoredManaSymbol.B).calculate(game, ability, null); if (numbTargets > 0) { ability.addTarget(new TargetCreaturePermanent(0, numbTargets)); } } }
public AspectOfHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Target creature gets +X/+X until end of turn, where X is your devotion to green. DynamicValue greenDevotion = new DevotionCount(ColoredManaSymbol.G); Effect effect = new BoostTargetEffect(greenDevotion, greenDevotion, Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public Sanguimancy(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); // You draw X cards and you lose X life, where X is your devotion to black. DynamicValue blackDevotion = new DevotionCount(ColoredManaSymbol.B); Effect effect = new DrawCardSourceControllerEffect(blackDevotion); effect.setText("You draw X cards"); this.getSpellAbility().addEffect(effect); effect = new LoseLifeSourceControllerEffect(blackDevotion); effect.setText("and you lose X life, where X is your devotion to black"); this.getSpellAbility().addEffect(effect); }
public KeranosGodOfStorms(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(5); // Indestructible this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to blue and red is less than seven, Keranos isn't a creature. Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.R), 7); effect.setText("As long as your devotion to blue and red is less than seven, Keranos isn't a creature"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // Reveal the first card you draw on each of your turns. // Whenever you reveal a land card this way, draw a card. // Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target. this.addAbility(new KeranosGodOfStormsTriggeredAbility(), new CardsAmountDrawnThisTurnWatcher()); }
public AbhorrentOverlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); this.subtype.add(SubType.DEMON); this.power = new MageInt(6); this.toughness = new MageInt(6); // Flying this.addAbility(FlyingAbility.getInstance()); // When Abhorrent Overlord enters the battlefield, create a number of 1/1 black Harpy creature tokens with flying equal to your devotion to black. Effect effect = new CreateTokenEffect(new AbhorrentOverlordHarpyToken(), new DevotionCount(ColoredManaSymbol.B)); effect.setText("create a number of 1/1 black Harpy creature tokens with flying equal to your devotion to black. <i>(Each {B} in the mana costs of permanents you control counts toward your devotion to black.)</i>"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); // At the beginning of your upkeep, sacrifice a creature. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, null), TargetController.YOU, false)); }
public MasterOfWaves(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); this.toughness = new MageInt(1); // Protection from red this.addAbility(ProtectionAbility.from(ObjectColor.RED)); // Elemental creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterBoost, false))); // When Master of Waves enters the battlefield, create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. // <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i> Effect effect = new CreateTokenEffect(new MasterOfWavesElementalToken(), new DevotionCount(ColoredManaSymbol.U)); effect.setText("create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); }
public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. BoostEnchantedEffect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn); effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red"); effect.setLockedIn(true); this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false)); }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int lifeLost = 0; int damage = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); if (damage > 0) { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(playerId); if (opponent != null) { lifeLost += opponent.loseLife(damage, game, false); } } } controller.gainLife(lifeLost, game, source); return true; } return false; } }
public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); this.power = new MageInt(6); this.toughness = new MageInt(7); // Indestructible this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to green and white is less than seven, Karametra isn't a creature. Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.W), 7); effect.setText("As long as your devotion to green and white is less than seven, Karametra isn't a creature"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library. this.addAbility(new SpellCastControllerTriggeredAbility( new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), StaticFilters.FILTER_SPELL_A_CREATURE, true)); }
@Override public boolean apply(Game game, Ability source, Ability abilityToModify) { SpellAbility spellAbility = (SpellAbility)abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { int count = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); int newCount = mana.getGeneric() - count; if (newCount < 0) { newCount = 0; } mana.setGeneric(newCount); spellAbility.getManaCostsToPay().load(mana.toString()); return true; } return false; }
public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); this.power = new MageInt(5); this.toughness = new MageInt(6); // Indestructible this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i> Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W), 5); effect.setText("As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i>"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); // Other creatures you control have vigilance. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true))); // {2}{W}{W}: Create a 2/1 white Cleric enchantment creature token. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HeliodGodOfTheSunToken()), new ManaCostsImpl("{2}{W}{W}"))); }