From dd45977a9b465174c57310ffd41897bd7b155e7e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:22:54 -0400 Subject: [PATCH] [MID] Implemented Tavern Ruffian // Tavern Smasher --- Mage.Sets/src/mage/cards/t/TavernRuffian.java | 43 +++++++++++++++++++ Mage.Sets/src/mage/cards/t/TavernSmasher.java | 40 +++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 2 + .../abilities/keyword/DayboundAbility.java | 43 +++++++++++++++++++ .../abilities/keyword/NightboundAbility.java | 43 +++++++++++++++++++ Utils/keywords.txt | 2 + 6 files changed, 173 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TavernRuffian.java create mode 100644 Mage.Sets/src/mage/cards/t/TavernSmasher.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java diff --git a/Mage.Sets/src/mage/cards/t/TavernRuffian.java b/Mage.Sets/src/mage/cards/t/TavernRuffian.java new file mode 100644 index 0000000000..624dd68e15 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TavernRuffian.java @@ -0,0 +1,43 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.keyword.DayboundAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TavernRuffian extends CardImpl { + + public TavernRuffian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + this.transformable = true; + this.secondSideCardClazz = mage.cards.t.TavernSmasher.class; + + // Daybound + this.addAbility(DayboundAbility.getInstance()); + this.addAbility(new TransformAbility()); + } + + private TavernRuffian(final TavernRuffian card) { + super(card); + } + + @Override + public TavernRuffian copy() { + return new TavernRuffian(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TavernSmasher.java b/Mage.Sets/src/mage/cards/t/TavernSmasher.java new file mode 100644 index 0000000000..5f9a91bc9c --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TavernSmasher.java @@ -0,0 +1,40 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.keyword.NightboundAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TavernSmasher extends CardImpl { + + public TavernSmasher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.WEREWOLF); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + this.nightCard = true; + + // Nightbound + this.addAbility(NightboundAbility.getInstance()); + this.addAbility(new TransformAbility()); + } + + private TavernSmasher(final TavernSmasher card) { + super(card); + } + + @Override + public TavernSmasher copy() { + return new TavernSmasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 4489535914..c597258284 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -54,6 +54,8 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Snarling Wolf", 199, Rarity.COMMON, mage.cards.s.SnarlingWolf.class)); cards.add(new SetCardInfo("Stormrider Spirit", 79, Rarity.COMMON, mage.cards.s.StormriderSpirit.class)); cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Tavern Ruffian", 163, Rarity.COMMON, mage.cards.t.TavernRuffian.class)); + cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class)); cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class)); cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class)); cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java b/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java new file mode 100644 index 0000000000..968846cc88 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java @@ -0,0 +1,43 @@ +package mage.abilities.keyword; + +import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +import java.io.ObjectStreamException; + +/** + * @author TheElk801 + * TODO: Implement this + */ +public class DayboundAbility extends StaticAbility implements MageSingleton { + + private static final DayboundAbility instance; + + static { + instance = new DayboundAbility(); + // instance.addIcon(DayboundAbilityIcon.instance); (needs to be added) + } + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static DayboundAbility getInstance() { + return instance; + } + + private DayboundAbility() { + super(Zone.ALL, null); + } + + @Override + public String getRule() { + return "daybound (If a player casts no spells during their own turn, it becomes night next turn.)"; + } + + @Override + public DayboundAbility copy() { + return instance; + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java b/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java new file mode 100644 index 0000000000..13f232d50d --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java @@ -0,0 +1,43 @@ +package mage.abilities.keyword; + +import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +import java.io.ObjectStreamException; + +/** + * @author TheElk801 + * TODO: Implement this + */ +public class NightboundAbility extends StaticAbility implements MageSingleton { + + private static final NightboundAbility instance; + + static { + instance = new NightboundAbility(); + // instance.addIcon(NightboundAbilityIcon.instance); (needs to be added) + } + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static NightboundAbility getInstance() { + return instance; + } + + private NightboundAbility() { + super(Zone.ALL, null); + } + + @Override + public String getRule() { + return "nightbound (If a player casts at least two spells during their own turn, it becomes day next turn.)"; + } + + @Override + public NightboundAbility copy() { + return instance; + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 5d8f5ff431..0d906828ec 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -16,6 +16,7 @@ Crew|number| Cumulative upkeep|cost| Cycling|cost| Dash|card, manaString| +Daybound|instance| Deathtouch|instance| Demonstrate|new| Delve|new| @@ -71,6 +72,7 @@ Mountainwalk|new| Morph|card, cost| Mutate|card, manaString| Myriad|new| +Nightbound|instance| Ninjutsu|cost| Outlast|cost| Partner|instance|