mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[ZNR] Implemented Relic Vial
This commit is contained in:
parent
8b843b4ca9
commit
b188dc51b9
2 changed files with 70 additions and 0 deletions
69
Mage.Sets/src/mage/cards/r/RelicVial.java
Normal file
69
Mage.Sets/src/mage/cards/r/RelicVial.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RelicVial extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.CLERIC);
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||
|
||||
public RelicVial(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// {2}, {T}, Sacrifice a creature: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new GenericManaCost(2)
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(
|
||||
new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT)
|
||||
));
|
||||
this.addAbility(ability);
|
||||
|
||||
// As long as you control a Cleric, Relic Vial has "Whenever a creature you control dies, each opponent loses 1 life and you gain 1 life."
|
||||
ability = new DiesCreatureTriggeredAbility(
|
||||
new LoseLifeOpponentsEffect(1), false,
|
||||
StaticFilters.FILTER_CONTROLLED_A_CREATURE
|
||||
);
|
||||
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(ability), condition, "As long as you control a Cleric, " +
|
||||
"{this} has \"Whenever a creature you control dies, each opponent loses 1 life and you gain 1 life.\""
|
||||
)));
|
||||
}
|
||||
|
||||
private RelicVial(final RelicVial card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RelicVial copy() {
|
||||
return new RelicVial(this);
|
||||
}
|
||||
}
|
|
@ -269,6 +269,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ravager's Mace", 235, Rarity.UNCOMMON, mage.cards.r.RavagersMace.class));
|
||||
cards.add(new SetCardInfo("Relic Golem", 249, Rarity.UNCOMMON, mage.cards.r.RelicGolem.class));
|
||||
cards.add(new SetCardInfo("Relic Robber", 153, Rarity.RARE, mage.cards.r.RelicRobber.class));
|
||||
cards.add(new SetCardInfo("Relic Vial", 250, Rarity.UNCOMMON, mage.cards.r.RelicVial.class));
|
||||
cards.add(new SetCardInfo("Resolute Strike", 35, Rarity.COMMON, mage.cards.r.ResoluteStrike.class));
|
||||
cards.add(new SetCardInfo("Risen Riptide", 73, Rarity.COMMON, mage.cards.r.RisenRiptide.class));
|
||||
cards.add(new SetCardInfo("Riverglide Pathway", 264, Rarity.RARE, mage.cards.r.RiverglidePathway.class));
|
||||
|
|
Loading…
Reference in a new issue