mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Silverflame Ritual
This commit is contained in:
parent
3179d35167
commit
83d95cfe96
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/s/SilverflameRitual.java
Normal file
75
Mage.Sets/src/mage/cards/s/SilverflameRitual.java
Normal file
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.AdamantCondition;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersAllEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SilverflameRitual extends CardImpl {
|
||||
|
||||
public SilverflameRitual(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
|
||||
|
||||
// Put a +1/+1 counter on each creature you control.
|
||||
this.getSpellAbility().addEffect(new AddCountersAllEffect(
|
||||
CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE
|
||||
));
|
||||
|
||||
// Adamant — If at least three white mana was spent to cast this spell, creatures you control gain vigilance until end of turn.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new SilverflameRitualEffect(), AdamantCondition.WHITE,
|
||||
"<br><i>Adamant</i> — If at least three white mana was spent to cast this spell, " +
|
||||
"creatures you control gain vigilance until end of turn."
|
||||
));
|
||||
}
|
||||
|
||||
private SilverflameRitual(final SilverflameRitual card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SilverflameRitual copy() {
|
||||
return new SilverflameRitual(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SilverflameRitualEffect extends OneShotEffect {
|
||||
|
||||
SilverflameRitualEffect() {
|
||||
super(Outcome.Benefit);
|
||||
}
|
||||
|
||||
private SilverflameRitualEffect(final SilverflameRitualEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SilverflameRitualEffect copy() {
|
||||
return new SilverflameRitualEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.addEffect(new GainAbilityControlledEffect(
|
||||
VigilanceAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -39,6 +39,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class));
|
||||
cards.add(new SetCardInfo("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));
|
||||
cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class));
|
||||
cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class));
|
||||
cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.COMMON, mage.cards.s.SlayingFire.class));
|
||||
cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class));
|
||||
cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class));
|
||||
|
|
Loading…
Reference in a new issue