mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
Add 5/5 Dragon token and use it for existing cards.
This commit is contained in:
parent
54acb445db
commit
4e5bcddd56
5 changed files with 66 additions and 71 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
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.setWhite(true);
|
||||
subtype.add("Dragon");
|
||||
power = new MageInt(5);
|
||||
toughness = new MageInt(5);
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
availableImageSetCodes.addAll(Arrays.asList("WWK", "10E"));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue