public CreepingChill(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); // Creeping Chill deals 3 damage to each opponent and you gain 3 life. this.getSpellAbility().addEffect( new DamagePlayersEffect(3, TargetController.OPPONENT) ); this.getSpellAbility().addEffect( new GainLifeEffect(3).setText("and you gain 3 life") ); // When Creeping Chill is put into your graveyard from your library, you may exile it. If you do, Creeping Chill deals 3 damage to each opponent and you gain 3 life. this.addAbility(new CreepingChillAbility()); }
@Override public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanentOrLKIBattlefield(source.getFirstTarget()); if (creature == null) { return false; } return new GainLifeEffect(creature.getToughness().getValue()).apply(game, source); } }
public VindictiveVampire(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.VAMPIRE); this.power = new MageInt(2); this.toughness = new MageInt(3); // Whenever another creature you control dies, Vindictive Vampire deals 1 damage to each opponent and you gain 1 life. Ability ability = new DiesCreatureTriggeredAbility( new DamagePlayersEffect(1, TargetController.OPPONENT), false, filter, true ); ability.addEffect(new GainLifeEffect(1).concatBy("and")); this.addAbility(ability); }
public DegaSanctuary(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. If you control a black permanent and a red permanent, you gain 4 life instead. Ability ability = new SanctuaryInterveningIfTriggeredAbility( new GainLifeEffect(2), new GainLifeEffect(4), ObjectColor.BLACK, ObjectColor.RED, "At the beginning of your upkeep, if you control a black or red permanent, you gain 2 life. " + "If you control a black permanent and a red permanent, you gain 4 life instead." ); this.addAbility(ability); }
public GainLifeEffect(DynamicValue life) { super(Outcome.GainLife); this.life = life; setText(); }
public FeedTheClan(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // You gain 5 life. // Ferocious - You gain 10 life instead if you control a creature with power 4 or greater this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new GainLifeEffect(10), new GainLifeEffect(5), FerociousCondition.instance, "You gain 5 life. <br><i>Ferocious</i> — You gain 10 life instead if you control a creature with power 4 or greater")); }
public BasilicaBellHaunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}{B}{B}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(4); // When Basilica Bell-Haunt enters the battlefield, each opponent discards a card and you gain 3 life. Ability ability = new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(TargetController.OPPONENT)); ability.addEffect(new GainLifeEffect(3).setText("and you gain 3 life")); this.addAbility(ability); }
public AjanisWelcome(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); // Whenever a creature enters the battlefield under your control, you gain 1 life. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( new GainLifeEffect(1), StaticFilters.FILTER_PERMANENT_CREATURE )); }
@Override public boolean apply(Game game, Ability source) { Permanent perm = game.getPermanent(source.getSourceId()); GainLifeEffect lifeEffect = new GainLifeEffect(perm.getPower().getValue()); return lifeEffect.apply(game, source); } }
public IllGottenInheritance(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}"); // At the beginning of your upkeep, Ill-Gotten Inheritance deals 1 damage to each opponent and you gain 1 life. Ability ability = new BeginningOfUpkeepTriggeredAbility( new DamagePlayersEffect(1, TargetController.OPPONENT), TargetController.YOU, false ); ability.addEffect(new GainLifeEffect(1).concatBy("and")); this.addAbility(ability); // {5}{B}, Sacrifice Ill-Gotten Inheritance: It deals 4 damage to target opponent and you gain 4 life. ability = new SimpleActivatedAbility( new DamageTargetEffect(4, "it"), new ManaCostsImpl("{5}{B}") ); ability.addEffect(new GainLifeEffect(4).concatBy("and")); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); }
public SovereignsBite(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Target player loses 3 life and you gain 3 life. this.getSpellAbility().addEffect(new LoseLifeTargetEffect(3)); this.getSpellAbility().addEffect(new GainLifeEffect(3).setText("and you gain 3 life")); this.getSpellAbility().addTarget(new TargetPlayer()); }
public Thoughtleech(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}{G}"); // Whenever an Island an opponent controls becomes tapped, you may gain 1 life. this.addAbility(new BecomesTappedTriggeredAbility(new GainLifeEffect(1), true, filter)); }
@Override public boolean apply(Game game, Ability source) { RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { return false; } int xValue = cost.getNumberRevealedCards(); return new GainLifeEffect(2 * xValue).apply(game, source); } }
public CarrionImp(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.IMP); this.power = new MageInt(2); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); // When Carrion Imp enters the battlefield, you may exile target creature card from a graveyard. If you do, you gain 2 life. Ability ability = new EntersBattlefieldTriggeredAbility(new ExileTargetEffect(), true); ability.addEffect(new GainLifeEffect(2).concatBy("If you do,")); ability.addTarget(new TargetCardInGraveyard(filter)); this.addAbility(ability); }
public WarleadersHelix(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{W}"); // Warleader's Helix deals 4 damage to any target and you gain 4 life. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new GainLifeEffect(4).setText("and you gain 4 life")); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public LifeGoesOn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // You gain 4 life. If a creature died this turn, you gain 8 life instead. getSpellAbility().addWatcher(new MorbidWatcher()); getSpellAbility().addEffect(new ConditionalOneShotEffect(new GainLifeEffect(8), new GainLifeEffect(4), MorbidCondition.instance, "You gain 4 life. If a creature died this turn, you gain 8 life instead")); }
@Override public boolean apply(Game game, Ability source) { RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { return false; } int xValue = cost.getNumberRevealedCards(); return new GainLifeEffect(2 * xValue).apply(game, source); } }
public ConsumeSpirit(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{1}{B}"); // Spend only black mana on X. this.addAbility(new SimpleStaticAbility( Zone.ALL, new InfoEffect("Spend only black mana on X")).setRuleAtTheTop(true) ); // Consume Spirit deals X damage to any target and you gain X life. this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance)); this.getSpellAbility().addEffect(new GainLifeEffect(ManacostVariableValue.instance).concatBy("and")); VariableCost variableCost = this.getSpellAbility().getManaCostsToPay().getVariableCosts().get(0); if (variableCost instanceof VariableManaCost) { ((VariableManaCost) variableCost).setFilter(filterBlack); } }
public Finn(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.TROOPER); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever Finn or another nontoken creature you control enters the battlefield under your control, you gain 1 life for each nontoken creature you control. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(new PermanentsOnBattlefieldCount(filter)) .setText("you gain 1 life for each nontoken creature you control"), filter, false)); }
public BatheInBacta(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // You gain 6 life. If you lost life from a source other than combat damage this turn, you gain 9 life instead. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new GainLifeEffect(6), new GainLifeEffect(9), new InvertCondition(HateCondition.instance), "You gain 6 life. If you lost life from a source other than combat damage this turn, you gain 9 life instead")); this.getSpellAbility().addWatcher(new LifeLossOtherFromCombatWatcher()); }