diff --git a/Mage.Sets/src/mage/cards/w/WeddingAnnouncement.java b/Mage.Sets/src/mage/cards/w/WeddingAnnouncement.java new file mode 100644 index 0000000000..1c256f09d3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeddingAnnouncement.java @@ -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; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WeddingFestivity.java b/Mage.Sets/src/mage/cards/w/WeddingFestivity.java new file mode 100644 index 0000000000..e456652aa2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WeddingFestivity.java @@ -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); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 76e8baac3e..9f6823fb79 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -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("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("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("Wrathful Jailbreaker", 184, Rarity.COMMON, mage.cards.w.WrathfulJailbreaker.class)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 3a4612fb27..c868b5d2d1 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -91,6 +91,7 @@ public enum CounterType { INDESTRUCTIBLE("indestructible"), INFECTION("infection"), INTERVENTION("intervention"), + INVITATION("invitation"), ISOLATION("isolation"), JAVELIN("javelin"), KNOWLEDGE("knowledge"),