mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
Add Goblin Rogue token and use it for existing cards.
This commit is contained in:
parent
795bf74f11
commit
5d51e03a69
5 changed files with 63 additions and 57 deletions
|
@ -38,14 +38,14 @@ import mage.constants.Rarity;
|
|||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinRogueToken;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public class BoggartMob extends CardImpl {
|
||||
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Goblin you control");
|
||||
|
||||
static {
|
||||
|
@ -62,10 +62,10 @@ public class BoggartMob extends CardImpl {
|
|||
|
||||
// Champion a Goblin
|
||||
this.addAbility(new ChampionAbility(this, "Goblin"));
|
||||
|
||||
|
||||
// Whenever a Goblin you control deals combat damage to a player, you may put a 1/1 black Goblin Rogue creature token onto the battlefield.
|
||||
this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(
|
||||
new CreateTokenEffect(new BlackGoblinRogueToken()),
|
||||
new CreateTokenEffect(new GoblinRogueToken()),
|
||||
filter, true, SetTargetPointer.NONE, true));
|
||||
}
|
||||
|
||||
|
@ -78,15 +78,3 @@ public class BoggartMob extends CardImpl {
|
|||
return new BoggartMob(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlackGoblinRogueToken extends Token {
|
||||
BlackGoblinRogueToken() {
|
||||
super("Goblin Rogue", "1/1 black Goblin Rogue creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add("Goblin");
|
||||
subtype.add("Rogue");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
|
@ -44,7 +44,7 @@ import mage.constants.Rarity;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinRogueToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -70,7 +70,7 @@ public class MarshFlitter extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Marsh Flitter enters the battlefield, put two 1/1 black Goblin Rogue creature tokens onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BlackGoblinRogueToken(), 2), false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinRogueToken(), 2), false));
|
||||
// Sacrifice a Goblin: Marsh Flitter has base power and toughness 3/3 until end of turn.
|
||||
Effect effect = new SetPowerToughnessSourceEffect(3, 3, Duration.EndOfTurn);
|
||||
effect.setText("{this} has base power and toughness 3/3 until end of turn");
|
||||
|
@ -88,15 +88,3 @@ public class MarshFlitter extends CardImpl {
|
|||
return new MarshFlitter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BlackGoblinRogueToken extends Token {
|
||||
BlackGoblinRogueToken() {
|
||||
super("Goblin Rogue", "1/1 black Goblin Rogue creature tokens");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add("Goblin");
|
||||
subtype.add("Rogue");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate;
|
|||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.GoblinRogueToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -83,9 +84,11 @@ public class WarrenWeirding extends CardImpl {
|
|||
class WarrenWeirdingEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCreaturePermanent filterGoblin = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filterGoblin.add(new SubtypePredicate("Goblin"));
|
||||
}
|
||||
|
||||
WarrenWeirdingEffect ( ) {
|
||||
super(Outcome.Sacrifice);
|
||||
staticText = "Target player sacrifices a creature. If a Goblin is sacrificed this way, that player puts two 1/1 black Goblin Rogue creature tokens onto the battlefield, and those tokens gain haste until end of turn";
|
||||
|
@ -113,7 +116,7 @@ class WarrenWeirdingEffect extends OneShotEffect {
|
|||
permanent.sacrifice(source.getSourceId(), game);
|
||||
if (filterGoblin.match(permanent, game)) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
Token token = new WarrenWeirdingBlackGoblinRogueToken();
|
||||
Token token = new GoblinRogueToken();
|
||||
Effect effect = new CreateTokenTargetEffect(token);
|
||||
effect.setTargetPointer(new FixedTarget(player.getId()));
|
||||
if (effect.apply(game, source)) {
|
||||
|
@ -138,15 +141,3 @@ class WarrenWeirdingEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class WarrenWeirdingBlackGoblinRogueToken extends Token {
|
||||
WarrenWeirdingBlackGoblinRogueToken() {
|
||||
super("Goblin Rogue", "1/1 black Goblin Rogue creature tokens, and those tokens gain haste until end of turn");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add("Goblin");
|
||||
subtype.add("Rogue");
|
||||
power.setValue(1);
|
||||
toughness.setValue(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinRogueToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
@ -64,7 +64,7 @@ public class WeirdingShaman extends CardImpl {
|
|||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new goblinRogueToken(), 2), new ManaCostsImpl("{3}{B}"));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new GoblinRogueToken(), 2), new ManaCostsImpl("{3}{B}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
@ -78,15 +78,3 @@ public class WeirdingShaman extends CardImpl {
|
|||
return new WeirdingShaman(this);
|
||||
}
|
||||
}
|
||||
|
||||
class goblinRogueToken extends Token {
|
||||
goblinRogueToken() {
|
||||
super("Goblin", "1/1 black Goblin Rogue creature tokens");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add("Goblin");
|
||||
subtype.add("Rogue");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
}
|
||||
}
|
||||
|
|
51
Mage/src/mage/game/permanent/token/GoblinRogueToken.java
Normal file
51
Mage/src/mage/game/permanent/token/GoblinRogueToken.java
Normal file
|
@ -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 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.game.permanent.token;
|
||||
|
||||
import java.util.Arrays;
|
||||
import mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class GoblinRogueToken extends Token {
|
||||
|
||||
public GoblinRogueToken() {
|
||||
super("Goblin Rogue", "1/1 black Goblin Rogue creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add("Goblin");
|
||||
subtype.add("Rogue");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
availableImageSetCodes.addAll(Arrays.asList("LRW", "MMA"));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue