diff --git a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java index 826add7420e..c9f5dad4248 100644 --- a/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java +++ b/Mage.Sets/src/mage/sets/commander2014/NahiriTheLithomancer.java @@ -61,6 +61,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.KorSoldierToken; import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.Target; @@ -79,20 +80,20 @@ public class NahiriTheLithomancer extends CardImpl { this.expansionSetCode = "C14"; this.subtype.add("Nahiri"); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(3)), false)); // +2: Put a 1/1 white Kor Soldier creature token onto the battlefield. You may attach an Equipment you control to it. this.addAbility(new LoyaltyAbility(new NahiriTheLithomancerFirstAbilityEffect(), 2)); - + // -2: You may put an Equipment card from your hand or graveyard onto the battlefield. this.addAbility(new LoyaltyAbility(new NahiriTheLithomancerSecondAbilityEffect(), -2)); - + // -10: Put a colorless Equipment artifact token named Stoneforged Blade onto the battlefield. It has indestructible, "Equipped creature gets +5/+5 and has double strike," and equip {0}. Effect effect = new CreateTokenEffect(new NahiriTheLithomancerEquipmentToken()); effect.setText("Put a colorless Equipment artifact token named Stoneforged Blade onto the battlefield. It has indestructible, \"Equipped creature gets +5/+5 and has double strike,\" and equip {0}"); this.addAbility(new LoyaltyAbility(effect, -10)); - + // Nahiri, the Lithomancer can be your commander. this.addAbility(CanBeYourCommanderAbility.getInstance()); } @@ -108,31 +109,31 @@ public class NahiriTheLithomancer extends CardImpl { } class NahiriTheLithomancerFirstAbilityEffect extends OneShotEffect { - + private static final FilterControlledPermanent filter = new FilterControlledPermanent("an Equipment you control"); static { filter.add(new SubtypePredicate("Equipment")); } - + NahiriTheLithomancerFirstAbilityEffect() { super(Outcome.PutCreatureInPlay); this.staticText = "Put a 1/1 white Kor Soldier creature token onto the battlefield. You may attach an Equipment you control to it"; } - + NahiriTheLithomancerFirstAbilityEffect(final NahiriTheLithomancerFirstAbilityEffect effect) { super(effect); } - + @Override public NahiriTheLithomancerFirstAbilityEffect copy() { return new NahiriTheLithomancerFirstAbilityEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - Token token = new NahiriTheLithomancerKorSoldierToken(); + Token token = new KorSoldierToken(); if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) { Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken()); if (tokenPermanent != null) { @@ -160,41 +161,27 @@ class NahiriTheLithomancerFirstAbilityEffect extends OneShotEffect { } } -class NahiriTheLithomancerKorSoldierToken extends Token { - - NahiriTheLithomancerKorSoldierToken() { - super("Kor Soldier", "1/1 white Kor Soldier creature token"); - setOriginalExpansionSetCode("C14"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Kor"); - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } -} - class NahiriTheLithomancerSecondAbilityEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("an Equipment"); static { filter.add(new SubtypePredicate("Equipment")); } - + NahiriTheLithomancerSecondAbilityEffect() { super(Outcome.PutCardInPlay); this.staticText = "You may put an Equipment card from your hand or graveyard onto the battlefield"; } - + NahiriTheLithomancerSecondAbilityEffect(final NahiriTheLithomancerSecondAbilityEffect effect) { super(effect); } - + @Override public NahiriTheLithomancerSecondAbilityEffect copy() { return new NahiriTheLithomancerSecondAbilityEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); @@ -227,13 +214,13 @@ class NahiriTheLithomancerEquipmentToken extends Token { super("Stoneforged Blade", "colorless Equipment artifact token named Stoneforged Blade with indestructible, \"Equipped creature gets +5/+5 and has double strike,\" and equip {0}"); cardType.add(CardType.ARTIFACT); subtype.add("Equipment"); - + this.addAbility(IndestructibleAbility.getInstance()); - + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(5, 5)); ability.addEffect(new GainAbilityAttachedEffect(DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT, Duration.WhileOnBattlefield, "and has double strike")); this.addAbility(ability); - + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(0))); } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java index 7dd99c31499..12b1af89ef3 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/NomadsAssembly.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.ReboundAbility; import mage.cards.CardImpl; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.game.permanent.token.SoldierToken; +import mage.game.permanent.token.KorSoldierToken; /** * @@ -50,7 +50,7 @@ public class NomadsAssembly extends CardImpl { this.expansionSetCode = "ROE"; - this.getSpellAbility().addEffect(new CreateTokenEffect(new SoldierToken(), new PermanentsOnBattlefieldCount(filter))); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KorSoldierToken(), new PermanentsOnBattlefieldCount(filter))); this.addAbility(new ReboundAbility()); } diff --git a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java index de37a7675b9..02fbd720725 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java +++ b/Mage.Sets/src/mage/sets/zendikar/ConquerorsPledge.java @@ -37,7 +37,7 @@ import mage.abilities.decorator.ConditionalOneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; -import mage.game.permanent.token.Token; +import mage.game.permanent.token.KorSoldierToken; /** * @@ -67,17 +67,3 @@ public class ConquerorsPledge extends CardImpl { } } - -class KorSoldierToken extends Token { - - public KorSoldierToken() { - super("Kor Soldier", "1/1 white Kor Soldier creature token"); - cardType.add(CardType.CREATURE); - color.setWhite(true); - subtype.add("Kor"); - subtype.add("Soldier"); - power = new MageInt(1); - toughness = new MageInt(1); - } - -} diff --git a/Mage/src/mage/game/permanent/token/KorSoldierToken.java b/Mage/src/mage/game/permanent/token/KorSoldierToken.java new file mode 100644 index 00000000000..8f6b41c93bd --- /dev/null +++ b/Mage/src/mage/game/permanent/token/KorSoldierToken.java @@ -0,0 +1,51 @@ +/* +* 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 O +R +* 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.game.permanent.token; + +import java.util.Arrays; +import mage.constants.CardType; +import mage.MageInt; + +/** + * + * @author LoneFox + */ +public class KorSoldierToken extends Token { + + public KorSoldierToken() { + super("Kor Soldier", "1/1 white Kor Soldier creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add("Kor"); + subtype.add("Soldier"); + power = new MageInt(1); + toughness = new MageInt(1); + availableImageSetCodes.addAll(Arrays.asList("C14", "ZEN")); } +}