From 49ee8f98565920716312e451292c24dbb76da889 Mon Sep 17 00:00:00 2001 From: igoudt Date: Sun, 8 Apr 2018 02:16:52 +0200 Subject: [PATCH] add 3 DOM cards, added a token, updated card text --- Mage.Sets/src/mage/cards/b/BlessedLight.java | 68 +++++++++++++++++++ Mage.Sets/src/mage/cards/h/HoldTheGates.java | 3 +- .../src/mage/cards/j/JosuVessLichKnight.java | 47 +++++++++++++ Mage.Sets/src/mage/sets/Dominaria.java | 4 ++ .../org/mage/test/turnmod/ExtraTurnsTest.java | 12 ++-- .../permanent/token/ZombieKnightToken.java | 29 ++++++++ 6 files changed, 156 insertions(+), 7 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/b/BlessedLight.java create mode 100644 Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/ZombieKnightToken.java diff --git a/Mage.Sets/src/mage/cards/b/BlessedLight.java b/Mage.Sets/src/mage/cards/b/BlessedLight.java new file mode 100644 index 00000000000..a45ef260e73 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BlessedLight.java @@ -0,0 +1,68 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.effects.common.ExileTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +/** + * + * @author LevelX2 + */ +public class BlessedLight extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("creature or enchantment"); + static { + filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.ENCHANTMENT))); + } + + public BlessedLight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{W}"); + + + // Exile target creature or enchantment. + getSpellAbility().addEffect(new ExileTargetEffect()); + getSpellAbility().addTarget(new TargetPermanent(filter)); + } + + public BlessedLight(final BlessedLight card) { + super(card); + } + + @Override + public BlessedLight copy() { + return new BlessedLight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HoldTheGates.java b/Mage.Sets/src/mage/cards/h/HoldTheGates.java index c6090b112d4..82130a1f31b 100644 --- a/Mage.Sets/src/mage/cards/h/HoldTheGates.java +++ b/Mage.Sets/src/mage/cards/h/HoldTheGates.java @@ -65,7 +65,8 @@ public class HoldTheGates extends CardImpl { // Creatures you control get +0/+1 for each Gate you control and have vigilance. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(new StaticValue(0),new PermanentsOnBattlefieldCount(filter), Duration.WhileOnBattlefield)); - ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))); + ability.addEffect(new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures")) + .setText("Creatures you control get +0/+1 for each Gate you control and have vigilance")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java b/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java new file mode 100644 index 00000000000..f4deafcbc2b --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JosuVessLichKnight.java @@ -0,0 +1,47 @@ +package mage.cards.j; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.keyword.KickerAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.game.permanent.token.ZombieKnightToken; + +import java.util.UUID; + +; + +public class JosuVessLichKnight extends CardImpl { + + public JosuVessLichKnight(UUID ownerID, CardSetInfo cardSetInfo){ + super(ownerID, cardSetInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + supertype.add(SuperType.LEGENDARY); + subtype.add(SubType.ZOMBIE, SubType.KNIGHT); + power = new MageInt(4); + toughness = new MageInt(5); + + addAbility(new MenaceAbility()); + addAbility(new KickerAbility("{5}{B}")); + + EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ZombieKnightToken(), 8), false); + this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, + "When {this} enters the battlefield, if it was kicked, create eight 2/2 black Zombie Knight creature tokens with menace.")); + + } + + public JosuVessLichKnight(final JosuVessLichKnight josuVessLichKnight){ + super(josuVessLichKnight); + } + @Override + public Card copy() { + return new JosuVessLichKnight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Dominaria.java b/Mage.Sets/src/mage/sets/Dominaria.java index 94681b989ec..08d3b5defc2 100644 --- a/Mage.Sets/src/mage/sets/Dominaria.java +++ b/Mage.Sets/src/mage/sets/Dominaria.java @@ -57,6 +57,7 @@ public class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Arvad the Cursed", 191, Rarity.UNCOMMON, mage.cards.a.ArvadTheCursed.class)); cards.add(new SetCardInfo("Baird, Steward of Argive", 4, Rarity.UNCOMMON, mage.cards.b.BairdStewardOfArgive.class)); cards.add(new SetCardInfo("Benalish Marshal", 10, Rarity.UNCOMMON, mage.cards.b.BenalishMarshal.class)); + cards.add(new SetCardInfo("Blessed Light", 31, Rarity.UNCOMMON, mage.cards.b.BlessedLight.class)); cards.add(new SetCardInfo("Cabal Evangel", 78, Rarity.COMMON, mage.cards.c.CabalEvangel.class)); cards.add(new SetCardInfo("Cast Down", 81, Rarity.UNCOMMON, mage.cards.c.CastDown.class)); cards.add(new SetCardInfo("Charge", 11, Rarity.COMMON, mage.cards.c.Charge.class)); @@ -65,6 +66,7 @@ public class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Divest", 87, Rarity.COMMON, mage.cards.d.Divest.class)); cards.add(new SetCardInfo("Dub", 999, Rarity.SPECIAL, mage.cards.d.Dub.class)); //TODO: Update once full spoiler cards.add(new SetCardInfo("Ghitu Lavarunner", 127, Rarity.COMMON, mage.cards.g.GhituLavarunner.class)); //TODO: Update once full spoiler + cards.add(new SetCardInfo("Fire Elemental", 120, Rarity.COMMON, mage.cards.f.FireElemental.class)); cards.add(new SetCardInfo("Gilded Lotus", 215, Rarity.RARE, mage.cards.g.GildedLotus.class)); cards.add(new SetCardInfo("Goblin Warchief", 130, Rarity.UNCOMMON, mage.cards.g.GoblinWarchief.class)); cards.add(new SetCardInfo("Grunn, the Lonely King", 165, Rarity.UNCOMMON, mage.cards.g.GrunnTheLonelyKing.class)); @@ -75,6 +77,7 @@ public class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Isolated Chapel", 241, Rarity.RARE, mage.cards.i.IsolatedChapel.class)); cards.add(new SetCardInfo("Jhoira, Weatherlight Captain", 200, Rarity.MYTHIC, mage.cards.j.JhoiraWeatherlightCaptain.class)); cards.add(new SetCardInfo("Jodah, Archmage Eternal", 198, Rarity.RARE, mage.cards.j.JodahArchmageEternal.class)); + cards.add(new SetCardInfo("Josu Vess, Lich Knight",95, Rarity.RARE, mage.cards.j.JosuVessLichKnight.class)); cards.add(new SetCardInfo("Juggernaut", 222, Rarity.UNCOMMON, mage.cards.j.Juggernaut.class)); cards.add(new SetCardInfo("Karn, Scion of Urza", 554, Rarity.MYTHIC, mage.cards.k.KarnScionOfUrza.class)); cards.add(new SetCardInfo("Knight of Grace", 23, Rarity.UNCOMMON, mage.cards.k.KnightOfGrace.class)); @@ -87,6 +90,7 @@ public class Dominaria extends ExpansionSet { cards.add(new SetCardInfo("Seal Away", 31, Rarity.UNCOMMON, mage.cards.s.SealAway.class)); cards.add(new SetCardInfo("Serra Angel", 33, Rarity.UNCOMMON, mage.cards.s.SerraAngel.class)); cards.add(new SetCardInfo("Serra Disciple", 34, Rarity.COMMON, mage.cards.s.SerraDisciple.class)); + cards.add(new SetCardInfo("Skizzik", 35, Rarity.RARE, mage.cards.s.Skizzik.class)); cards.add(new SetCardInfo("Sulfur Falls", 247, Rarity.RARE, mage.cards.s.SulfurFalls.class)); cards.add(new SetCardInfo("Syncopate", 67, Rarity.UNCOMMON, mage.cards.s.Syncopate.class)); cards.add(new SetCardInfo("Tatyova, Benthic Druid", 206, Rarity.UNCOMMON, mage.cards.t.TatyovaBenthicDruid.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/turnmod/ExtraTurnsTest.java b/Mage.Tests/src/test/java/org/mage/test/turnmod/ExtraTurnsTest.java index c7746838f34..4c5edd9a0f4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/turnmod/ExtraTurnsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/turnmod/ExtraTurnsTest.java @@ -66,8 +66,8 @@ public class ExtraTurnsTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Emrakul, the Promised End", 1); Assert.assertTrue("Turn 3 is no extra turn ", !currentGame.getState().isExtraTurn()); - Assert.assertTrue("For turn " + currentGame.getTurnNum() + ", playerA has to be the active player but active player is: " - + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId().equals(playerA.getId())); + Assert.assertEquals("For turn " + currentGame.getTurnNum() + ", playerA has to be the active player but active player is: " + + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId(), playerA.getId()); } @Test @@ -93,8 +93,8 @@ public class ExtraTurnsTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Emrakul, the Promised End", 1); Assert.assertTrue("Turn 4 is a controlled turn ", !playerB.isGameUnderControl()); - Assert.assertTrue("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: " - + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId().equals(playerB.getId())); + Assert.assertEquals("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: " + + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId(), playerB.getId()); } @Test @@ -120,7 +120,7 @@ public class ExtraTurnsTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Emrakul, the Promised End", 1); Assert.assertTrue("Turn 5 is an extra turn ", currentGame.getState().isExtraTurn()); - Assert.assertTrue("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: " - + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId().equals(playerB.getId())); + Assert.assertEquals("For turn " + currentGame.getTurnNum() + ", playerB has to be the active player but active player is: " + + currentGame.getPlayer(currentGame.getActivePlayerId()).getName(), currentGame.getActivePlayerId(), playerB.getId()); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieKnightToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieKnightToken.java new file mode 100644 index 00000000000..136850dab42 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieKnightToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.keyword.MenaceAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +public class ZombieKnightToken extends TokenImpl { + + public ZombieKnightToken(){ + super("Zombie Knight", "a 2/2 black Zombie Knight creature token with menace"); + color.addColor(ObjectColor.BLACK); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ZOMBIE, SubType.KNIGHT); + addAbility(new MenaceAbility()); + power = new MageInt(2); + toughness = new MageInt(2); + } + + public ZombieKnightToken(final ZombieKnightToken zombieKnightToken){ + super(zombieKnightToken); + } + + @Override + public ZombieKnightToken copy() { + return new ZombieKnightToken(this); + } +}