[VOW] Implemented Wedding Announcement

This commit is contained in:
Daniel Bomar 2021-10-29 09:20:42 -05:00
parent 003eeb81b8
commit 5fd961aefe
No known key found for this signature in database
GPG key ID: C86C8658F4023918
4 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,73 @@
package mage.cards.w;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.token.HumanToken;
import mage.watchers.common.AttackedThisTurnWatcher;
/**
*
* @author weirddan455
*/
public final class WeddingAnnouncement extends CardImpl {
public WeddingAnnouncement(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.transformable = true;
this.secondSideCardClazz = mage.cards.w.WeddingFestivity.class;
// At the beginning of your end step, put an invitation counter on Wedding Announcement.
// If you attacked with two or more creatures this turn, draw card.
// Otherwise, create a 1/1 white Human creature token.
// Then if Wedding Announcement has three or more invitation counters on it, transform it.
this.addAbility(new TransformAbility());
Ability ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.INVITATION.createInstance()), false);
ability.addEffect(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(1),
new CreateTokenEffect(new HumanToken()),
WeddingAnnouncementCondition.instance,
"If you attacked with two or more creatures this turn, draw card. Otherwise, create a 1/1 white Human creature token"
));
ability.addEffect(new ConditionalOneShotEffect(
new TransformSourceEffect(true, true),
new SourceHasCounterCondition(CounterType.INVITATION, 3),
"Then if {this} has three or more invitation counters on it, transform it"
));
this.addAbility(ability, new AttackedThisTurnWatcher());
}
private WeddingAnnouncement(final WeddingAnnouncement card) {
super(card);
}
@Override
public WeddingAnnouncement copy() {
return new WeddingAnnouncement(this);
}
}
enum WeddingAnnouncementCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
AttackedThisTurnWatcher watcher = game.getState().getWatcher(AttackedThisTurnWatcher.class);
return watcher != null && watcher.getAttackedThisTurnCreatures().size() >= 2;
}
}

View file

@ -0,0 +1,36 @@
package mage.cards.w;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import java.util.UUID;
/**
*
* @author weirddan455
*/
public class WeddingFestivity extends CardImpl {
public WeddingFestivity(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
this.color.setWhite(true);
this.nightCard = true;
// Creatures you control get +1/+1
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield)));
}
private WeddingFestivity(final WeddingFestivity card) {
super(card);
}
@Override
public WeddingFestivity copy() {
return new WeddingFestivity(this);
}
}

View file

@ -55,6 +55,8 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Thalia, Guardian of Thraben", 38, Rarity.RARE, mage.cards.t.ThaliaGuardianOfThraben.class)); cards.add(new SetCardInfo("Thalia, Guardian of Thraben", 38, Rarity.RARE, mage.cards.t.ThaliaGuardianOfThraben.class));
cards.add(new SetCardInfo("Vampires' Vengeance", 180, Rarity.UNCOMMON, mage.cards.v.VampiresVengeance.class)); cards.add(new SetCardInfo("Vampires' Vengeance", 180, Rarity.UNCOMMON, mage.cards.v.VampiresVengeance.class));
cards.add(new SetCardInfo("Weary Prisoner", 184, Rarity.COMMON, mage.cards.w.WearyPrisoner.class)); cards.add(new SetCardInfo("Weary Prisoner", 184, Rarity.COMMON, mage.cards.w.WearyPrisoner.class));
cards.add(new SetCardInfo("Wedding Announcement", 45, Rarity.RARE, mage.cards.w.WeddingAnnouncement.class));
cards.add(new SetCardInfo("Wedding Festivity", 45, Rarity.RARE, mage.cards.w.WeddingFestivity.class));
cards.add(new SetCardInfo("Wedding Invitation", 260, Rarity.COMMON, mage.cards.w.WeddingInvitation.class)); cards.add(new SetCardInfo("Wedding Invitation", 260, Rarity.COMMON, mage.cards.w.WeddingInvitation.class));
cards.add(new SetCardInfo("Wrathful Jailbreaker", 184, Rarity.COMMON, mage.cards.w.WrathfulJailbreaker.class)); cards.add(new SetCardInfo("Wrathful Jailbreaker", 184, Rarity.COMMON, mage.cards.w.WrathfulJailbreaker.class));

View file

@ -91,6 +91,7 @@ public enum CounterType {
INDESTRUCTIBLE("indestructible"), INDESTRUCTIBLE("indestructible"),
INFECTION("infection"), INFECTION("infection"),
INTERVENTION("intervention"), INTERVENTION("intervention"),
INVITATION("invitation"),
ISOLATION("isolation"), ISOLATION("isolation"),
JAVELIN("javelin"), JAVELIN("javelin"),
KNOWLEDGE("knowledge"), KNOWLEDGE("knowledge"),