1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-07 17:00:08 -09:00

[VOW] Implemented Voice of the Blessed

This commit is contained in:
Evan Kranzler 2021-11-04 21:47:55 -04:00
parent e3a335d561
commit d2de2229e9
2 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,88 @@
package mage.cards.v;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.GainLifeControllerTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VoiceOfTheBlessed extends CardImpl {
public VoiceOfTheBlessed(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{W}");
this.subtype.add(SubType.SPIRIT);
this.subtype.add(SubType.CLERIC);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// Whenever you gain life, put a +1/+1 counter on Voice of the Blessed.
this.addAbility(new GainLifeControllerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance())
));
// As long as Voice of the Blessed has four or more +1/+1 counters on it, it has flying and vigilance.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(
FlyingAbility.getInstance(), Duration.WhileOnBattlefield
), VoiceOfTheBlessedCondition.FOUR, "as long as {this} has " +
"four or more +1/+1 counters on it, it has flying"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield
), VoiceOfTheBlessedCondition.FOUR, "and vigilance"));
this.addAbility(ability);
// As long as Voice of the Blessed has ten or more +1/+1 counters on it, it has indestructible.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(
IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield
), VoiceOfTheBlessedCondition.TEN, "as long as {this} has " +
"ten or more +1/+1 counters on it, it has indestructible"
)));
}
private VoiceOfTheBlessed(final VoiceOfTheBlessed card) {
super(card);
}
@Override
public VoiceOfTheBlessed copy() {
return new VoiceOfTheBlessed(this);
}
}
enum VoiceOfTheBlessedCondition implements Condition {
FOUR(4),
TEN(10);
private final int counters;
VoiceOfTheBlessedCondition(int counters) {
this.counters = counters;
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
return permanent != null && permanent.getCounters(game).getCount(CounterType.P1P1) >= counters;
}
}

View file

@ -166,6 +166,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Valorous Stance", 42, Rarity.UNCOMMON, mage.cards.v.ValorousStance.class));
cards.add(new SetCardInfo("Vampires' Vengeance", 180, Rarity.UNCOMMON, mage.cards.v.VampiresVengeance.class));
cards.add(new SetCardInfo("Vilespawn Spider", 250, Rarity.UNCOMMON, mage.cards.v.VilespawnSpider.class));
cards.add(new SetCardInfo("Voice of the Blessed", 44, Rarity.RARE, mage.cards.v.VoiceOfTheBlessed.class));
cards.add(new SetCardInfo("Volatile Arsonist", 181, Rarity.MYTHIC, mage.cards.v.VolatileArsonist.class));
cards.add(new SetCardInfo("Voldaren Estate", 267, Rarity.RARE, mage.cards.v.VoldarenEstate.class));
cards.add(new SetCardInfo("Weary Prisoner", 184, Rarity.COMMON, mage.cards.w.WearyPrisoner.class));