mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Merge pull request #1292 from LoneFox78/master
Third part of the big token cleanup + a few other fixes and new cards
This commit is contained in:
commit
f5b411c516
54 changed files with 1097 additions and 804 deletions
88
Mage.Sets/src/mage/sets/alliances/WhipVine1.java
Normal file
88
Mage.Sets/src/mage/sets/alliances/WhipVine1.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* 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.sets.alliances;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.permanent.BlockedByIdPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class WhipVine1 extends CardImpl {
|
||||
|
||||
public WhipVine1(UUID ownerId) {
|
||||
super(ownerId, 89, "Whip Vine", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||
this.expansionSetCode = "ALL";
|
||||
this.subtype.add("Plant");
|
||||
this.subtype.add("Wall");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
// Reach
|
||||
this.addAbility(ReachAbility.getInstance());
|
||||
// You may choose not to untap Whip Vine during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {tap}: Tap target creature with flying blocked by Whip Vine. That creature doesn't untap during its controller's untap step for as long as Whip Vine remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying blocked by {this}");
|
||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||
filter.add(new BlockedByIdPredicate(this.getId()));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public WhipVine1(final WhipVine1 card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhipVine1 copy() {
|
||||
return new WhipVine1(this);
|
||||
}
|
||||
}
|
51
Mage.Sets/src/mage/sets/alliances/WhipVine2.java
Normal file
51
Mage.Sets/src/mage/sets/alliances/WhipVine2.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.sets.alliances;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class WhipVine2 extends WhipVine1 {
|
||||
|
||||
public WhipVine2(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 90;
|
||||
}
|
||||
|
||||
public WhipVine2(final WhipVine2 card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WhipVine2 copy() {
|
||||
return new WhipVine2(this);
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/sets/antiquities/PhyrexianGremlins.java
Normal file
74
Mage.Sets/src/mage/sets/antiquities/PhyrexianGremlins.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.sets.antiquities;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class PhyrexianGremlins extends CardImpl {
|
||||
|
||||
public PhyrexianGremlins(UUID ownerId) {
|
||||
super(ownerId, 48, "Phyrexian Gremlins", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.expansionSetCode = "ATQ";
|
||||
this.subtype.add("Gremlin");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// You may choose not to untap Phyrexian Gremlins during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Phyrexian Gremlins remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public PhyrexianGremlins(final PhyrexianGremlins card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhyrexianGremlins copy() {
|
||||
return new PhyrexianGremlins(this);
|
||||
}
|
||||
}
|
|
@ -58,7 +58,7 @@ public class FungalShambler extends CardImpl {
|
|||
// Whenever Fungal Shambler deals damage to an opponent, you draw a card and that opponent discards a card.
|
||||
Effect effect = new DrawCardSourceControllerEffect(1);
|
||||
effect.setText("you draw a card");
|
||||
Ability ability = new DealsDamageToOpponentTriggeredAbility(effect, false);
|
||||
Ability ability = new DealsDamageToOpponentTriggeredAbility(effect, false, false, true);
|
||||
effect = new DiscardTargetEffect(1);
|
||||
effect.setText("and that opponent discards a card");
|
||||
ability.addEffect(effect);
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.abilities.keyword.TributeAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -75,20 +75,3 @@ public class Ornitharch extends CardImpl {
|
|||
return new Ornitharch(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature tokens with flying");
|
||||
this.setOriginalExpansionSetCode("BNG");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
}
|
|
@ -28,16 +28,15 @@
|
|||
package mage.sets.commander;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.DragonToken2;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -90,7 +89,7 @@ class DeathByDragonsEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
for (UUID playerId : controller.getInRange()) {
|
||||
if (!playerId.equals(this.getTargetPointer().getFirst(game, source))) {
|
||||
Token token = new DragonToken();
|
||||
Token token = new DragonToken2();
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), playerId);
|
||||
}
|
||||
}
|
||||
|
@ -99,18 +98,3 @@ class DeathByDragonsEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class DragonToken extends Token {
|
||||
|
||||
public DragonToken() {
|
||||
super("Dragon", "5/5 red Dragon creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
// set a set with correct token image
|
||||
this.setOriginalExpansionSetCode("WWK");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class HydraOmnivore extends CardImpl {
|
|||
this.toughness = new MageInt(8);
|
||||
|
||||
// Whenever Hydra Omnivore deals combat damage to an opponent, it deals that much damage to each other opponent.
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new HydraOmnivoreEffect(), false, true));
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new HydraOmnivoreEffect(), false, true, true));
|
||||
}
|
||||
|
||||
public HydraOmnivore(final HydraOmnivore card) {
|
||||
|
|
|
@ -29,14 +29,12 @@
|
|||
package mage.sets.dragonsmaze;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.WurmToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -50,9 +48,8 @@ public class AdventOfTheWurm extends CardImpl {
|
|||
super(ownerId, 51, "Advent of the Wurm", Rarity.RARE, new CardType[]{CardType.INSTANT}, "{1}{G}{G}{W}");
|
||||
this.expansionSetCode = "DGM";
|
||||
|
||||
|
||||
// Put a 5/5 green Wurm creature token with trample onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new WurmToken()));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new WurmToken2()));
|
||||
}
|
||||
|
||||
public AdventOfTheWurm(final AdventOfTheWurm card) {
|
||||
|
@ -63,21 +60,4 @@ public class AdventOfTheWurm extends CardImpl {
|
|||
public AdventOfTheWurm copy() {
|
||||
return new AdventOfTheWurm(this);
|
||||
}
|
||||
|
||||
private class WurmToken extends Token {
|
||||
|
||||
private WurmToken() {
|
||||
super("Wurm", "5/5 green Wurm creature token with trample");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Wurm");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
// for image
|
||||
setOriginalExpansionSetCode("RTR");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,9 +39,10 @@ import mage.constants.Duration;
|
|||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -31,22 +31,20 @@ package mage.sets.dragonsmaze;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.SoldierTokenWithHaste;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
|
@ -82,12 +80,13 @@ public class BlazeCommando extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class BlazeCommandoTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private final List<UUID> handledStackObjects = new ArrayList<>();
|
||||
|
||||
public BlazeCommandoTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new BlazeCommandoSoldierToken(), 2), false);
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new SoldierTokenWithHaste(), 2), false);
|
||||
}
|
||||
|
||||
public BlazeCommandoTriggeredAbility(final BlazeCommandoTriggeredAbility ability) {
|
||||
|
@ -138,17 +137,3 @@ class BlazeCommandoTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return new StringBuilder("Whenever an instant or sorcery spell you control deals damage, ").append(super.getRule()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
class BlazeCommandoSoldierToken extends Token {
|
||||
|
||||
public BlazeCommandoSoldierToken() {
|
||||
super("Soldier", "1/1 red and white Soldier creature tokens with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
color.setWhite(true);
|
||||
subtype.add("Soldier");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -29,8 +29,6 @@
|
|||
package mage.sets.dragonsmaze;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -38,9 +36,10 @@ import mage.abilities.condition.common.CastFromHandCondition;
|
|||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.PopulateEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
import mage.watchers.common.CastFromHandWatcher;
|
||||
|
||||
/**
|
||||
|
@ -77,17 +76,3 @@ public class ScionOfVituGhazi extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class BirdToken extends Token {
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
setOriginalExpansionSetCode("RTR");
|
||||
}
|
||||
}
|
74
Mage.Sets/src/mage/sets/fifthedition/MoleWorms.java
Normal file
74
Mage.Sets/src/mage/sets/fifthedition/MoleWorms.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.sets.fifthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class MoleWorms extends CardImpl {
|
||||
|
||||
public MoleWorms(UUID ownerId) {
|
||||
super(ownerId, 41, "Mole Worms", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.expansionSetCode = "5ED";
|
||||
this.subtype.add("Worm");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// You may choose not to untap Mole Worms during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mole Worms remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public MoleWorms(final MoleWorms card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MoleWorms copy() {
|
||||
return new MoleWorms(this);
|
||||
}
|
||||
}
|
|
@ -28,20 +28,17 @@
|
|||
package mage.sets.gatecrash;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.CountersCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.counters.Counter;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.permanent.token.SoldierTokenWithHaste;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -55,7 +52,9 @@ public class AssembleTheLegion extends CardImpl {
|
|||
|
||||
|
||||
// At the beginning of your upkeep, put a muster counter on Assemble the Legion. Then put a 1/1 red and white Soldier creature token with haste onto the battlefield for each muster counter on Assemble the Legion.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AssembleTheLegionEffect(), TargetController.YOU, false));
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.MUSTER.createInstance()), TargetController.YOU, false);
|
||||
ability.addEffect(new CreateTokenEffect(new SoldierTokenWithHaste(), new CountersCount(CounterType.MUSTER)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public AssembleTheLegion(final AssembleTheLegion card) {
|
||||
|
@ -67,46 +66,3 @@ public class AssembleTheLegion extends CardImpl {
|
|||
return new AssembleTheLegion(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AssembleTheLegionEffect extends OneShotEffect {
|
||||
private static final String MUSTER_COUNTER_NAME = "Muster";
|
||||
|
||||
public AssembleTheLegionEffect() {
|
||||
super(Outcome.Copy);
|
||||
this.staticText = "put a muster counter on {this}. Then put a 1/1 red and white Soldier creature token with haste onto the battlefield for each muster counter on {this}";
|
||||
}
|
||||
|
||||
public AssembleTheLegionEffect(final AssembleTheLegionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssembleTheLegionEffect copy() {
|
||||
return new AssembleTheLegionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
/* 1/24/2013: If Assemble the Legion isn’t on the battlefield when its ability resolves,
|
||||
* use the number of muster counters it had when it was last on the battlefield to
|
||||
* determine how many Soldier tokens to put onto the battlefield.
|
||||
*/
|
||||
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
int amountCounters = 0;
|
||||
if (sourcePermanent == null) {
|
||||
Permanent lki = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);
|
||||
if (lki != null) {
|
||||
amountCounters = lki.getCounters().getCount(MUSTER_COUNTER_NAME);
|
||||
}
|
||||
} else {
|
||||
new AddCountersSourceEffect(new Counter(MUSTER_COUNTER_NAME),false).apply(game, source);
|
||||
amountCounters = sourcePermanent.getCounters().getCount(MUSTER_COUNTER_NAME);
|
||||
|
||||
}
|
||||
if (amountCounters > 0) {
|
||||
return new CreateTokenEffect(new SoldierToken(), amountCounters).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,13 +34,12 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.SoldierTokenWithHaste;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -54,17 +53,14 @@ public class SunhomeGuildmage extends CardImpl {
|
|||
this.subtype.add("Human");
|
||||
this.subtype.add("Wizard");
|
||||
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
|
||||
//{1}{R}{W}: Creatures you control get +1/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{W}")));
|
||||
|
||||
//{2}{R}{W}: Put a 1/1 red and white Soldier creature token with haste onto the battlefield.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SoldierToken()), new ManaCostsImpl("{2}{R}{W}")));
|
||||
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SoldierTokenWithHaste()), new ManaCostsImpl("{2}{R}{W}")));
|
||||
}
|
||||
|
||||
public SunhomeGuildmage(final SunhomeGuildmage card) {
|
||||
|
@ -76,20 +72,3 @@ public class SunhomeGuildmage extends CardImpl {
|
|||
return new SunhomeGuildmage(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class SoldierToken extends Token {
|
||||
|
||||
public SoldierToken() {
|
||||
super("Soldier", "1/1 red and white Soldier creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
color.setRed(true);
|
||||
subtype.add("Soldier");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
52
Mage.Sets/src/mage/sets/iceage/MoleWorms.java
Normal file
52
Mage.Sets/src/mage/sets/iceage/MoleWorms.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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.sets.iceage;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class MoleWorms extends mage.sets.fifthedition.MoleWorms {
|
||||
|
||||
public MoleWorms(UUID ownerId) {
|
||||
super(ownerId);
|
||||
this.cardNumber = 40;
|
||||
this.expansionSetCode = "ICE";
|
||||
}
|
||||
|
||||
public MoleWorms(final MoleWorms card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MoleWorms copy() {
|
||||
return new MoleWorms(this);
|
||||
}
|
||||
}
|
|
@ -29,21 +29,16 @@ package mage.sets.journeyintonyx;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -60,12 +55,11 @@ public class DesertersQuarters extends CardImpl {
|
|||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
|
||||
// {6}, T: Tap target creature. It doesn't untap during its controller's untap step for as long as Deserter's Quarters remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DesertersQuartersTapTargetEffect(), new GenericManaCost(6));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(6));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DesertersQuartersRestrictionEffect()));
|
||||
}
|
||||
|
||||
public DesertersQuarters(final DesertersQuarters card) {
|
||||
|
@ -77,79 +71,3 @@ public class DesertersQuarters extends CardImpl {
|
|||
return new DesertersQuarters(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DesertersQuartersTapTargetEffect extends TapTargetEffect {
|
||||
|
||||
public DesertersQuartersTapTargetEffect() {
|
||||
super();
|
||||
staticText = "Tap target creature. It doesn't untap during its controller's untap step for as long as {this} remains tapped";
|
||||
}
|
||||
|
||||
public DesertersQuartersTapTargetEffect(final DesertersQuartersTapTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
sourcePermanent.clearConnectedCards("DesertersQuarters");
|
||||
}
|
||||
for (UUID target : targetPointer.getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
if (sourcePermanent != null) {
|
||||
sourcePermanent.addConnectedCard("DesertersQuarters", permanent.getId());
|
||||
}
|
||||
if (permanent != null) {
|
||||
permanent.tap(game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesertersQuartersTapTargetEffect copy() {
|
||||
return new DesertersQuartersTapTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
}
|
||||
|
||||
class DesertersQuartersRestrictionEffect extends RestrictionEffect {
|
||||
|
||||
public DesertersQuartersRestrictionEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
}
|
||||
|
||||
public DesertersQuartersRestrictionEffect(final DesertersQuartersRestrictionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||
if (rustTick != null && rustTick.isTapped()) {
|
||||
if (rustTick.getConnectedCards("DesertersQuarters").size() > 0) {
|
||||
UUID target = rustTick.getConnectedCards("DesertersQuarters").get(0);
|
||||
if (target != null && target.equals(permanent.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeUntapped(Permanent permanent, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesertersQuartersRestrictionEffect copy() {
|
||||
return new DesertersQuartersRestrictionEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,12 +28,10 @@
|
|||
package mage.sets.judgment;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlashbackAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -42,7 +40,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
@ -79,20 +77,3 @@ public class BattleScreech extends CardImpl {
|
|||
return new BattleScreech(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature tokens with flying");
|
||||
this.setOriginalExpansionSetCode("BNG");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
}
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.khansoftarkir;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -40,7 +39,7 @@ import mage.constants.Rarity;
|
|||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinTokenWithHaste;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -58,9 +57,8 @@ public class Goblinslide extends CardImpl {
|
|||
super(ownerId, 109, "Goblinslide", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
this.expansionSetCode = "KTK";
|
||||
|
||||
|
||||
// Whenever you cast a noncreature spell, you may pay {1}. If you do, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new GoblinslideGoblinToken()), new GenericManaCost(1)), filter, false));
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new GoblinTokenWithHaste()), new GenericManaCost(1)), filter, false));
|
||||
}
|
||||
|
||||
public Goblinslide(final Goblinslide card) {
|
||||
|
@ -72,17 +70,3 @@ public class Goblinslide extends CardImpl {
|
|||
return new Goblinslide(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinslideGoblinToken extends Token {
|
||||
|
||||
GoblinslideGoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token with haste");
|
||||
this.setOriginalExpansionSetCode("KTK");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Goblin");
|
||||
color.setRed(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class NicolBolas extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new ManaCostsImpl("{U}{B}{R}")), TargetController.YOU, false));
|
||||
|
||||
// Whenever Nicol Bolas deals damage to an opponent, that player discards his or her hand.
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardHandTargetEffect("that player"), false));
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardHandTargetEffect("that player"), false, false, true));
|
||||
}
|
||||
|
||||
public NicolBolas(final NicolBolas card) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class HypnoticSpecter extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Hypnotic Specter deals damage to an opponent, that player discards a card at random.
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1, true)));
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1, true), false, false, true));
|
||||
}
|
||||
|
||||
public HypnoticSpecter(final HypnoticSpecter card) {
|
||||
|
|
|
@ -38,7 +38,6 @@ import mage.abilities.effects.Effect;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -49,7 +48,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinTokenWithHaste;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
|
@ -83,7 +82,7 @@ public class GoblinRabblemaster extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher());
|
||||
|
||||
// At the beginning of combat on your turn, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new CreateTokenEffect(new GoblinToken()), TargetController.YOU, false));
|
||||
this.addAbility(new BeginningOfCombatTriggeredAbility(new CreateTokenEffect(new GoblinTokenWithHaste()), TargetController.YOU, false));
|
||||
|
||||
// When Goblin Rabblemaster attacks, it gets +1/+0 until end of turn for each other attacking Goblin.
|
||||
this.addAbility(new AttacksTriggeredAbility(new BoostSourceEffect(new PermanentsOnBattlefieldCount(attackingFilter), new StaticValue(0), Duration.EndOfTurn, true), false));
|
||||
|
@ -98,18 +97,3 @@ public class GoblinRabblemaster extends CardImpl {
|
|||
return new GoblinRabblemaster(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinToken extends Token {
|
||||
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token with haste");
|
||||
this.setOriginalExpansionSetCode("M15");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Goblin");
|
||||
color.setRed(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
78
Mage.Sets/src/mage/sets/mercadianmasques/SandSquid.java
Normal file
78
Mage.Sets/src/mage/sets/mercadianmasques/SandSquid.java
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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.sets.mercadianmasques;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.IslandwalkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class SandSquid extends CardImpl {
|
||||
|
||||
public SandSquid(UUID ownerId) {
|
||||
super(ownerId, 96, "Sand Squid", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.expansionSetCode = "MMQ";
|
||||
this.subtype.add("Squid");
|
||||
this.subtype.add("Beast");
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Islandwalk
|
||||
this.addAbility(new IslandwalkAbility());
|
||||
// You may choose not to untap Sand Squid during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {tap}: Tap target creature. That creature doesn't untap during its controller's untap step for as long as Sand Squid remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public SandSquid(final SandSquid card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SandSquid copy() {
|
||||
return new SandSquid(this);
|
||||
}
|
||||
}
|
|
@ -29,27 +29,19 @@ package mage.sets.mirage;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
|
@ -75,12 +67,11 @@ public class AmberPrison extends CardImpl {
|
|||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
|
||||
// {4}, {tap}: Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as Amber Prison remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AmberPrisonTapTargetEffect(), new GenericManaCost(4));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new AmberPrisonUntapTriggeredAbility());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AmberPrisonRestrictionEffect()));
|
||||
}
|
||||
|
||||
public AmberPrison(final AmberPrison card) {
|
||||
|
@ -92,124 +83,3 @@ public class AmberPrison extends CardImpl {
|
|||
return new AmberPrison(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AmberPrisonTapTargetEffect extends OneShotEffect {
|
||||
|
||||
public AmberPrisonTapTargetEffect() {
|
||||
super(Outcome.Tap);
|
||||
this.staticText = "Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as {source} remains tapped.";
|
||||
}
|
||||
|
||||
public AmberPrisonTapTargetEffect(final AmberPrisonTapTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmberPrisonTapTargetEffect copy() {
|
||||
return new AmberPrisonTapTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
for (UUID target : targetPointer.getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
if (permanent != null) {
|
||||
if (sourcePermanent != null) {
|
||||
sourcePermanent.addConnectedCard("AmberPrison", permanent.getId());
|
||||
}
|
||||
permanent.tap(game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AmberPrisonRestrictionEffect extends RestrictionEffect {
|
||||
|
||||
public AmberPrisonRestrictionEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
}
|
||||
|
||||
public AmberPrisonRestrictionEffect(final AmberPrisonRestrictionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmberPrisonRestrictionEffect copy() {
|
||||
return new AmberPrisonRestrictionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null && sourcePermanent.isTapped()) {
|
||||
if (sourcePermanent.getConnectedCards("AmberPrison") != null) {
|
||||
return sourcePermanent.getConnectedCards("AmberPrison").contains(permanent.getId());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeUntapped(Permanent permanent, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class AmberPrisonUntapTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public AmberPrisonUntapTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AmberPrisonReleaseOnUntapEffect(), false);
|
||||
this.usesStack = false;
|
||||
this.ruleVisible = false;
|
||||
}
|
||||
|
||||
public AmberPrisonUntapTriggeredAbility(final AmberPrisonUntapTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmberPrisonUntapTriggeredAbility copy() {
|
||||
return new AmberPrisonUntapTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.UNTAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getTargetId().equals(this.getSourceId());
|
||||
}
|
||||
}
|
||||
|
||||
class AmberPrisonReleaseOnUntapEffect extends OneShotEffect {
|
||||
|
||||
public AmberPrisonReleaseOnUntapEffect() {
|
||||
super(Outcome.Detriment);
|
||||
}
|
||||
|
||||
public AmberPrisonReleaseOnUntapEffect(final AmberPrisonReleaseOnUntapEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AmberPrisonReleaseOnUntapEffect copy() {
|
||||
return new AmberPrisonReleaseOnUntapEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
sourcePermanent.clearConnectedCards("AmberPrison");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
|
@ -45,7 +44,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinTokenWithHaste;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -73,7 +72,7 @@ public class ChancellorOfTheForge extends CardImpl {
|
|||
|
||||
// When Chancellor of the Forge enters the battlefield, put X 1/1 red Goblin creature tokens with haste onto the battlefield, where X is the number of creatures you control.
|
||||
DynamicValue value = new PermanentsOnBattlefieldCount(filter);
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinToken(), value), false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinTokenWithHaste(), value), false));
|
||||
}
|
||||
|
||||
public ChancellorOfTheForge(final ChancellorOfTheForge card) {
|
||||
|
@ -89,7 +88,7 @@ public class ChancellorOfTheForge extends CardImpl {
|
|||
class ChancellorOfTheForgeDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
ChancellorOfTheForgeDelayedTriggeredAbility () {
|
||||
super(new CreateTokenEffect(new GoblinToken()));
|
||||
super(new CreateTokenEffect(new GoblinTokenWithHaste()));
|
||||
}
|
||||
|
||||
ChancellorOfTheForgeDelayedTriggeredAbility(ChancellorOfTheForgeDelayedTriggeredAbility ability) {
|
||||
|
@ -110,15 +109,3 @@ class ChancellorOfTheForgeDelayedTriggeredAbility extends DelayedTriggeredAbilit
|
|||
return new ChancellorOfTheForgeDelayedTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinToken extends Token {
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Goblin");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
package mage.sets.odyssey;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
@ -37,7 +36,7 @@ import mage.cards.CardImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,9 +48,8 @@ public class BeastAttack extends CardImpl {
|
|||
super(ownerId, 230, "Beast Attack", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{2}{G}{G}{G}");
|
||||
this.expansionSetCode = "ODY";
|
||||
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken_44()));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2()));
|
||||
|
||||
// Flashback {2}{G}{G}{G}
|
||||
this.addAbility(new FlashbackAbility(new ManaCostsImpl("{2}{G}{G}{G}"), TimingRule.INSTANT));
|
||||
|
@ -66,18 +64,3 @@ public class BeastAttack extends CardImpl {
|
|||
return new BeastAttack(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BeastToken_44 extends Token {
|
||||
|
||||
public BeastToken_44() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
// to get an image for the token
|
||||
this.setOriginalExpansionSetCode("ZEN");
|
||||
}
|
||||
|
||||
}
|
|
@ -53,7 +53,7 @@ public class WeiNightRaiders extends CardImpl {
|
|||
// Horsemanship
|
||||
this.addAbility(HorsemanshipAbility.getInstance());
|
||||
// Whenever Wei Night Raiders deals damage to an opponent, that player discards a card.
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1), false));
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1), false, false, true));
|
||||
}
|
||||
|
||||
public WeiNightRaiders(final WeiNightRaiders card) {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ZhangLiaoHeroOfHefei extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Zhang Liao, Hero of Hefei deals damage to an opponent, that opponent discards a card.
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1), false));
|
||||
this.addAbility(new DealsDamageToOpponentTriggeredAbility(new DiscardTargetEffect(1), false, false, true));
|
||||
}
|
||||
|
||||
public ZhangLiaoHeroOfHefei(final ZhangLiaoHeroOfHefei card) {
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.WurmToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,7 +59,7 @@ public class ArmadaWurm extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Armada Wurm enters the battlefield, put a 5/5 green Wurm creature token with trample onto the battlefield.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ArmadaWurmToken()), false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new WurmToken2()), false));
|
||||
|
||||
}
|
||||
|
||||
|
@ -71,18 +71,4 @@ public class ArmadaWurm extends CardImpl {
|
|||
public ArmadaWurm copy() {
|
||||
return new ArmadaWurm(this);
|
||||
}
|
||||
|
||||
private class ArmadaWurmToken extends Token {
|
||||
|
||||
private ArmadaWurmToken() {
|
||||
super("Wurm", "a 5/5 green Wurm creature token with trample");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Wurm");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,14 +28,12 @@
|
|||
package mage.sets.returntoravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.PopulateEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,7 +45,6 @@ public class EyesInTheSkies extends CardImpl {
|
|||
super(ownerId, 10, "Eyes in the Skies", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{3}{W}");
|
||||
this.expansionSetCode = "RTR";
|
||||
|
||||
|
||||
// Put a 1/1 white Bird creature token with flying onto the battlefield, then populate.
|
||||
// (Put a token onto the battlefield that's a copy of a creature token you control.)
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BirdToken()));
|
||||
|
@ -62,17 +59,5 @@ public class EyesInTheSkies extends CardImpl {
|
|||
public EyesInTheSkies copy() {
|
||||
return new EyesInTheSkies(this);
|
||||
}
|
||||
private class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
package mage.sets.returntoravnica;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
|
@ -63,17 +63,4 @@ public class SellerOfSongbirds extends CardImpl {
|
|||
public SellerOfSongbirds copy() {
|
||||
return new SellerOfSongbirds(this);
|
||||
}
|
||||
|
||||
private class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import mage.abilities.keyword.TrampleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.WurmToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -57,7 +57,7 @@ public class WorldspineWurm extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Worldspine Wurm dies, put three 5/5 green Wurm creature tokens with trample onto the battlefield.
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new WorldspineWurmToken(), 3)));
|
||||
this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new WurmToken2(), 3)));
|
||||
|
||||
// When Worldspine Wurm is put into a graveyard from anywhere, shuffle it into its owner's library.
|
||||
this.addAbility(new PutIntoGraveFromAnywhereSourceTriggeredAbility(new ShuffleIntoLibrarySourceEffect()));
|
||||
|
@ -72,17 +72,3 @@ public class WorldspineWurm extends CardImpl {
|
|||
return new WorldspineWurm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WorldspineWurmToken extends Token {
|
||||
|
||||
public WorldspineWurmToken() {
|
||||
super("Wurm", "5/5 green Wurm creature tokens with trample");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Wurm");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -30,22 +30,17 @@ package mage.sets.scarsofmirrodin;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
|
||||
/**
|
||||
* @author nantuko
|
||||
|
@ -64,12 +59,11 @@ public class RustTick extends CardImpl {
|
|||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
|
||||
// {1}, {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Rust Tick remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RustTickTapTargetEffect(), new GenericManaCost(1));
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetArtifactPermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new RustTickRestrictionEffect()));
|
||||
}
|
||||
|
||||
public RustTick(final RustTick card) {
|
||||
|
@ -81,79 +75,3 @@ public class RustTick extends CardImpl {
|
|||
return new RustTick(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RustTickTapTargetEffect extends TapTargetEffect {
|
||||
|
||||
public RustTickTapTargetEffect() {
|
||||
super();
|
||||
staticText = "Tap target artifact. It doesn't untap during its controller's untap step for as long as Rust Tick remains tapped";
|
||||
}
|
||||
|
||||
public RustTickTapTargetEffect(final RustTickTapTargetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||
if (rustTick != null) {
|
||||
rustTick.clearConnectedCards("RustTick");
|
||||
}
|
||||
for (UUID target : targetPointer.getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
if (permanent != null) {
|
||||
rustTick.addConnectedCard("RustTick", permanent.getId());
|
||||
permanent.tap(game);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RustTickTapTargetEffect copy() {
|
||||
return new RustTickTapTargetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
}
|
||||
|
||||
class RustTickRestrictionEffect extends RestrictionEffect {
|
||||
|
||||
public RustTickRestrictionEffect() {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
}
|
||||
|
||||
public RustTickRestrictionEffect(final RustTickRestrictionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Permanent rustTick = game.getPermanent(source.getSourceId());
|
||||
if (rustTick != null && rustTick.isTapped()) {
|
||||
if (rustTick.getConnectedCards("RustTick").size() > 0) {
|
||||
UUID target = rustTick.getConnectedCards("RustTick").get(0);
|
||||
if (target != null && target.equals(permanent.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeUntapped(Permanent permanent, Ability source, Game game) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RustTickRestrictionEffect copy() {
|
||||
return new RustTickRestrictionEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,17 +28,19 @@
|
|||
package mage.sets.scourge;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.*;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -46,7 +48,7 @@ import mage.filter.predicate.permanent.ControllerPredicate;
|
|||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.DragonToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -106,7 +108,7 @@ class DayOfTheDragonsEntersEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
DragonToken token = new DragonToken();
|
||||
DragonToken2 token = new DragonToken2();
|
||||
token.putOntoBattlefield(creaturesExiled, game, source.getSourceId(), source.getControllerId());
|
||||
return true;
|
||||
}
|
||||
|
@ -163,16 +165,3 @@ class DayOfTheDragonsLeavesEffect extends OneShotEffect {
|
|||
return new DayOfTheDragonsLeavesEffect(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonToken extends Token {
|
||||
|
||||
public DragonToken() {
|
||||
super("Dragon", "5/5 red Dragon creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -30,12 +30,10 @@ package mage.sets.scourge;
|
|||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.StormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -47,9 +45,8 @@ public class HuntingPack extends CardImpl {
|
|||
super(ownerId, 121, "Hunting Pack", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{5}{G}{G}");
|
||||
this.expansionSetCode = "SCG";
|
||||
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new HuntingPackToken(), 1));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2(), 1));
|
||||
// Storm
|
||||
this.addAbility(new StormAbility());
|
||||
}
|
||||
|
@ -63,15 +60,3 @@ public class HuntingPack extends CardImpl {
|
|||
return new HuntingPack(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HuntingPackToken extends Token {
|
||||
|
||||
public HuntingPackToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Beast");
|
||||
this.color.setGreen(true);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,12 +28,10 @@
|
|||
package mage.sets.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.AttacksIfAbleAllEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -42,7 +40,7 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.GoblinTokenWithHaste;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +60,7 @@ public class GoblinAssault extends CardImpl {
|
|||
this.expansionSetCode = "ALA";
|
||||
|
||||
// At the beginning of your upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinAssaultToken()), TargetController.YOU, false));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinTokenWithHaste()), TargetController.YOU, false));
|
||||
|
||||
// Goblin creatures attack each turn if able.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(filter, Duration.WhileOnBattlefield)), new AttackedThisTurnWatcher());
|
||||
|
@ -77,17 +75,3 @@ public class GoblinAssault extends CardImpl {
|
|||
return new GoblinAssault(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GoblinAssaultToken extends Token {
|
||||
|
||||
public GoblinAssaultToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Goblin");
|
||||
|
||||
color.setRed(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
|
76
Mage.Sets/src/mage/sets/tempest/ThalakosDreamsower.java
Normal file
76
Mage.Sets/src/mage/sets/tempest/ThalakosDreamsower.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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.sets.tempest;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsDamageToOpponentTriggeredAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.abilities.keyword.ShadowAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class ThalakosDreamsower extends CardImpl {
|
||||
|
||||
public ThalakosDreamsower(UUID ownerId) {
|
||||
super(ownerId, 92, "Thalakos Dreamsower", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
this.expansionSetCode = "TMP";
|
||||
this.subtype.add("Thalakos");
|
||||
this.subtype.add("Wizard");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Shadow
|
||||
this.addAbility(ShadowAbility.getInstance());
|
||||
// You may choose not to untap Thalakos Dreamsower during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// Whenever Thalakos Dreamsower deals damage to an opponent, tap target creature. That creature doesn't untap during its controller's untap step for as long as Thalakos Dreamsower remains tapped.
|
||||
Ability ability = new DealsDamageToOpponentTriggeredAbility(new TapTargetEffect(), false);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ThalakosDreamsower(final ThalakosDreamsower card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThalakosDreamsower copy() {
|
||||
return new ThalakosDreamsower(this);
|
||||
}
|
||||
}
|
|
@ -28,18 +28,15 @@
|
|||
package mage.sets.tenthedition;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.DragonToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -63,16 +60,3 @@ public class DragonRoost extends CardImpl {
|
|||
return new DragonRoost(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonToken2 extends Token {
|
||||
DragonToken2() {
|
||||
super("Dragon", "5/5 red Dragon creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
74
Mage.Sets/src/mage/sets/urzassaga/ManaLeech.java
Normal file
74
Mage.Sets/src/mage/sets/urzassaga/ManaLeech.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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.sets.urzassaga;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SkipUntapOptionalAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DontUntapAsLongAsSourceTappedEffect;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetLandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class ManaLeech extends CardImpl {
|
||||
|
||||
public ManaLeech(UUID ownerId) {
|
||||
super(ownerId, 141, "Mana Leech", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.expansionSetCode = "USG";
|
||||
this.subtype.add("Leech");
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// You may choose not to untap Mana Leech during your untap step.
|
||||
this.addAbility(new SkipUntapOptionalAbility());
|
||||
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mana Leech remains tapped.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public ManaLeech(final ManaLeech card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManaLeech copy() {
|
||||
return new ManaLeech(this);
|
||||
}
|
||||
}
|
|
@ -38,12 +38,11 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.DragonToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -67,7 +66,7 @@ public class DragonmasterOutcast extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken(), 1), TargetController.YOU, false);
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new DragonToken2(), 1), TargetController.YOU, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 5), "At the beginning of your upkeep, if you control six or more lands, put a 5/5 red Dragon creature token with flying onto the battlefield."));
|
||||
}
|
||||
|
||||
|
@ -80,16 +79,3 @@ public class DragonmasterOutcast extends CardImpl {
|
|||
return new DragonmasterOutcast(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonToken extends Token {
|
||||
|
||||
public DragonToken() {
|
||||
super("Dragon", "5/5 red Dragon creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,21 +28,19 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.AlternativeCostImpl;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/**
|
||||
|
@ -62,7 +60,7 @@ public class BalothCageTrap extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new BalothCageTrapWatcher());
|
||||
|
||||
// Put a 4/4 green Beast creature token onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastGreenToken()));
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BeastToken2()));
|
||||
}
|
||||
|
||||
public BalothCageTrap(final BalothCageTrap card) {
|
||||
|
@ -140,15 +138,3 @@ class BalothCageTrapAlternativeCost extends AlternativeCostImpl {
|
|||
return "If an opponent had an artifact enter the battlefield under his or her control this turn, you may pay {1}{G} rather than pay Baloth Cage Trap's mana cost";
|
||||
}
|
||||
}
|
||||
|
||||
class BeastGreenToken extends Token {
|
||||
|
||||
public BeastGreenToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ import mage.abilities.common.LandfallAbility;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -66,16 +66,3 @@ public class EmeriaAngel extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -29,14 +29,14 @@
|
|||
package mage.sets.zendikar;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.LandfallAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.game.permanent.token.BeastToken2;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +52,7 @@ public class RampagingBaloths extends CardImpl {
|
|||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
this.addAbility(new LandfallAbility(new CreateTokenEffect(new RampagingBalothsToken()), true));
|
||||
this.addAbility(new LandfallAbility(new CreateTokenEffect(new BeastToken2()), true));
|
||||
}
|
||||
|
||||
public RampagingBaloths(final RampagingBaloths card) {
|
||||
|
@ -65,15 +65,3 @@ public class RampagingBaloths extends CardImpl {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class RampagingBalothsToken extends Token {
|
||||
|
||||
public RampagingBalothsToken() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Beast");
|
||||
this.color.setGreen(true);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
|
@ -40,24 +40,30 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
public class DealsDamageToOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
boolean onlyCombat;
|
||||
private final boolean onlyCombat, setTargetPointer;
|
||||
|
||||
public DealsDamageToOpponentTriggeredAbility(Effect effect) {
|
||||
this(effect, false, false);
|
||||
this(effect, false, false, false);
|
||||
}
|
||||
|
||||
public DealsDamageToOpponentTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, optional, false);
|
||||
this(effect, optional, false, false);
|
||||
}
|
||||
|
||||
public DealsDamageToOpponentTriggeredAbility(Effect effect, boolean optional, boolean onlyCombat) {
|
||||
this(effect, optional, onlyCombat, false);
|
||||
}
|
||||
|
||||
public DealsDamageToOpponentTriggeredAbility(Effect effect, boolean optional, boolean onlyCombat, boolean setTargetPointer) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.onlyCombat = onlyCombat;
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
}
|
||||
|
||||
public DealsDamageToOpponentTriggeredAbility(final DealsDamageToOpponentTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.onlyCombat = ability.onlyCombat;
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,10 +86,12 @@ public class DealsDamageToOpponentTriggeredAbility extends TriggeredAbilityImpl
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if(setTargetPointer) {
|
||||
for (Effect effect : getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
effect.setValue("damage", event.getAmount());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -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.abilities.effects.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.SourceTappedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousRuleModifyingEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepTargetEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
|
||||
public class DontUntapAsLongAsSourceTappedEffect extends ConditionalContinuousRuleModifyingEffect {
|
||||
|
||||
public DontUntapAsLongAsSourceTappedEffect() {
|
||||
super(new DontUntapInControllersUntapStepTargetEffect(Duration.Custom), SourceTappedCondition.getInstance());
|
||||
staticText = "It doesn't untap during its controller's untap step for as long as {source} remains tapped.";
|
||||
}
|
||||
|
||||
public DontUntapAsLongAsSourceTappedEffect(final DontUntapAsLongAsSourceTappedEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if(event.getType() == GameEvent.EventType.UNTAP && event.getTargetId().equals(source.getSourceId())) {
|
||||
effect.discard();
|
||||
}
|
||||
return super.applies(event, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DontUntapAsLongAsSourceTappedEffect copy() {
|
||||
return new DontUntapAsLongAsSourceTappedEffect(this);
|
||||
}
|
||||
}
|
|
@ -28,15 +28,14 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.constants.Outcome;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
|
@ -49,9 +48,11 @@ public class TapTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
public TapTargetEffect(String text) {
|
||||
this();
|
||||
super(Outcome.Tap);
|
||||
if(text != null) {
|
||||
this.staticText = text;
|
||||
}
|
||||
}
|
||||
|
||||
public TapTargetEffect(final TapTargetEffect effect) {
|
||||
super(effect);
|
||||
|
|
|
@ -71,6 +71,7 @@ public enum CounterType {
|
|||
M1M1(new BoostCounter(-1, -1).name),
|
||||
M2M2(new BoostCounter(-2, -2).name),
|
||||
MINING("mining"),
|
||||
MUSTER("muster"),
|
||||
P1P0(new BoostCounter(1, 0).name),
|
||||
P1P1(new BoostCounter(1, 1).name),
|
||||
P2P2(new BoostCounter(2, 2).name),
|
||||
|
|
67
Mage/src/mage/game/permanent/token/BeastToken2.java
Normal file
67
Mage/src/mage/game/permanent/token/BeastToken2.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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 BeastToken2 extends Token {
|
||||
|
||||
public BeastToken2() {
|
||||
super("Beast", "4/4 green Beast creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Beast");
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
availableImageSetCodes.addAll(Arrays.asList("ZEN", "C14", "DDD"));
|
||||
}
|
||||
|
||||
public BeastToken2(final BeastToken2 token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeastToken2 copy() {
|
||||
return new BeastToken2(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpansionSetCodeForImage(String code) {
|
||||
super.setExpansionSetCodeForImage(code);
|
||||
if(getOriginalExpansionSetCode().equals("C14") || getOriginalExpansionSetCode().equals("DDD")) {
|
||||
this.setTokenType(2);
|
||||
}
|
||||
}
|
||||
}
|
69
Mage/src/mage/game/permanent/token/BirdToken.java
Normal file
69
Mage/src/mage/game/permanent/token/BirdToken.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class BirdToken extends Token {
|
||||
|
||||
public BirdToken() {
|
||||
super("Bird", "1/1 white Bird creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add("Bird");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
availableImageSetCodes.addAll(Arrays.asList("BNG", "RTR", "ZEN"));
|
||||
}
|
||||
|
||||
public BirdToken(final BirdToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BirdToken copy() {
|
||||
return new BirdToken(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpansionSetCodeForImage(String code) {
|
||||
super.setExpansionSetCodeForImage(code);
|
||||
if (getOriginalExpansionSetCode().equals("BNG")) {
|
||||
this.setTokenType(1);
|
||||
}
|
||||
}
|
||||
}
|
52
Mage/src/mage/game/permanent/token/DragonToken2.java
Normal file
52
Mage/src/mage/game/permanent/token/DragonToken2.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class DragonToken2 extends Token {
|
||||
|
||||
public DragonToken2() {
|
||||
super("Dragon", "5/5 red Dragon creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
availableImageSetCodes.addAll(Arrays.asList("WWK", "10E"));
|
||||
}
|
||||
}
|
|
@ -39,7 +39,8 @@ public class GoblinToken extends Token {
|
|||
|
||||
public GoblinToken() {
|
||||
super("Goblin", "1/1 red Goblin creature token");
|
||||
availableImageSetCodes.addAll(Arrays.asList("SOM", "M10", "C14", "KTK", "EVG", "DTK", "ORI", "DDG"));
|
||||
availableImageSetCodes.addAll(Arrays.asList("10E", "ALA", "SOM", "M10", "NPH", "M13", "RTR",
|
||||
"MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN"));
|
||||
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add("Goblin");
|
||||
|
|
45
Mage/src/mage/game/permanent/token/GoblinTokenWithHaste.java
Normal file
45
Mage/src/mage/game/permanent/token/GoblinTokenWithHaste.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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 mage.abilities.keyword.HasteAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
|
||||
// Currently there are no separate images for this, let's use the same ones as the regular Goblin token.
|
||||
public class GoblinTokenWithHaste extends GoblinToken {
|
||||
|
||||
public GoblinTokenWithHaste() {
|
||||
super();
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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 mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class SoldierTokenWithHaste extends Token {
|
||||
|
||||
public SoldierTokenWithHaste() {
|
||||
super("Soldier", "1/1 red and white Soldier creature token with haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
color.setRed(true);
|
||||
subtype.add("Soldier");
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
addAbility(HasteAbility.getInstance());
|
||||
setOriginalExpansionSetCode("GTC");
|
||||
}
|
||||
}
|
|
@ -44,7 +44,7 @@ public class ThopterColorlessToken extends Token {
|
|||
final static private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("EXO", "ORI"));
|
||||
tokenImageSets.addAll(Arrays.asList("MBS", "ORI"));
|
||||
}
|
||||
|
||||
public ThopterColorlessToken() {
|
||||
|
|
51
Mage/src/mage/game/permanent/token/WurmToken2.java
Normal file
51
Mage/src/mage/game/permanent/token/WurmToken2.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 mage.constants.CardType;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public class WurmToken2 extends Token {
|
||||
|
||||
public WurmToken2() {
|
||||
super("Wurm", "5/5 green Wurm creature token with trample");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setGreen(true);
|
||||
subtype.add("Wurm");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
setOriginalExpansionSetCode("RTR");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue