New cards

[CHK] Befoul / Bushi Tenderfoot / Crushing Pain / Feast of Worms / Field of Reality / Forbidden Orchad / Initiate of Blood / Teller of Tales
[FUT] Witch's Mist
[TMP] Opportunist

Fixed cards
Akki Lavarunner - Rarity, removed land untap effect
LaternLit Graveyard - changed blue to black mana
Sphere of the Suns - fixed enters the battlefield tapped effect
Skinrender - changed outcome

Framework changes
TriggeredAbility - enhanced getRule() method
CreateTokenTargetEffect - enhanced getText() method
FilterCreaturePermanent - added DamageDealt filter

Some minor text/comment changes
This commit is contained in:
LevelX 2011-12-29 08:11:20 +01:00
parent 842d2b0d42
commit 9e13ac418b
22 changed files with 977 additions and 18 deletions

View file

@ -31,7 +31,7 @@ import java.util.UUID;
public class AkkiLavarunner extends CardImpl<AkkiLavarunner> {
public AkkiLavarunner(UUID ownerId) {
super(ownerId, 153, "Akki Lavarunner", Constants.Rarity.COMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}");
super(ownerId, 153, "Akki Lavarunner", Constants.Rarity.RARE, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "CHK";
this.subtype.add("Goblin");
this.subtype.add("Warrior");
@ -57,7 +57,6 @@ class AkkiLavarunnerAbility extends TriggeredAbilityImpl<AkkiLavarunnerAbility>
public AkkiLavarunnerAbility() {
super(Constants.Zone.BATTLEFIELD, new FlipSourceEffect());
this.addEffect(new UntapAllLandsControllerEffect());
}
public AkkiLavarunnerAbility(final AkkiLavarunnerAbility ability) {

View file

@ -0,0 +1,75 @@
/*
*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.ObjectColor;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.filter.FilterPermanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreatureOrPlayer;
/**
*
* @author LevelX
*/
public class Befoul extends CardImpl<Befoul> {
public static final FilterPermanent filter = new FilterPermanent("land or nonblack creature");
static {
filter.getCardType().add(CardType.LAND);
filter.getCardType().add(CardType.CREATURE);
filter.setNotColor(true);
filter.setColor(ObjectColor.BLACK);
}
public Befoul (UUID ownerId) {
super(ownerId, 102, "Befoul", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{2}{B}{B}");
this.expansionSetCode = "CHK";
this.color.setBlack(true);
// Destroy target land or nonblack creature. It can't be regenerated.
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
this.getSpellAbility().addTarget(new TargetPermanent(filter));
}
public Befoul (final Befoul card) {
super(card);
}
@Override
public Befoul copy() {
return new Befoul(this);
}
}

View file

@ -56,7 +56,6 @@ public class BenBenAkkiHermit extends CardImpl<BenBenAkkiHermit> {
filter.setTapped(false);
filter.setUseTapped(true);
filter.getSubtype().add("Mountain");
filter.setScopeCardType(Filter.ComparisonScope.Any);
filter.setScopeSubtype(Filter.ComparisonScope.Any);
}

View file

@ -0,0 +1,102 @@
/*
*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.MageInt;
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.abilities.keyword.BushidoAbility;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.Token;
/**
* @author LevelX
*/
public class BushiTenderfoot extends CardImpl<BushiTenderfoot> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
public BushiTenderfoot(UUID ownerId) {
super(ownerId, 2, "Bushi Tenderfoot", Constants.Rarity.UNCOMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{W}");
this.expansionSetCode = "CHK";
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setWhite(true);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// When that creature is put into a graveyard this turn, flip Initiate of Blood.
this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new FlipSourceEffect()));
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new KenzoTheHardhearted()), FlippedCondition.getInstance(), "")));
}
public BushiTenderfoot(final BushiTenderfoot card) {
super(card);
}
@Override
public BushiTenderfoot copy() {
return new BushiTenderfoot(this);
}
}
class KenzoTheHardhearted extends Token {
KenzoTheHardhearted() {
super("Kenzo the Hardhearted", "");
supertype.add("Legendary");
cardType.add(Constants.CardType.CREATURE);
color.setWhite(true);
subtype.add("Human");
subtype.add("Samurai");
power = new MageInt(3);
toughness = new MageInt(4);
// Double strike; bushido 2 (When this blocks or becomes blocked, it gets +2/+2 until end of turn.)
this.addAbility(DoubleStrikeAbility.getInstance());
this.addAbility(new BushidoAbility(2));
}
}

View file

@ -0,0 +1,73 @@
/*
*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author LevelX
*/
public class CrushingPain extends CardImpl<CrushingPain> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
public CrushingPain (UUID ownerId) {
super(ownerId, 162, "Crushing Pain", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
this.expansionSetCode = "CHK";
this.color.setRed(true);
// Crushing Pain deals 6 damage to target creature that was dealt damage this turn.
this.getSpellAbility().addEffect(new DamageTargetEffect(6));
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
}
public CrushingPain (final CrushingPain card) {
super(card);
}
@Override
public CrushingPain copy() {
return new CrushingPain(this);
}
}

View file

@ -0,0 +1,123 @@
/*
* Copyright 2011 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterControlledPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetLandPermanent;
/**
*
* @author LevelX
*/
public class FeastOfWorms extends CardImpl<FeastOfWorms> {
private final static FilterControlledPermanent filter = new FilterControlledPermanent();
static {
filter.getCardType().add(CardType.LAND);
}
public FeastOfWorms (UUID ownerId) {
super(ownerId, 216, "Feast of Worms", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{G}{G}");
this.expansionSetCode = "CHK";
this.subtype.add("Arcane");
this.color.setGreen(true);
// Destroy target land. If that land was legendary, its controller sacrifices another land.
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetLandPermanent());
this.getSpellAbility().addEffect(new FeastOfWormsEffect());
}
public FeastOfWorms (final FeastOfWorms card) {
super(card);
}
@Override
public FeastOfWorms copy() {
return new FeastOfWorms(this);
}
}
class FeastOfWormsEffect extends OneShotEffect<FeastOfWormsEffect> {
FeastOfWormsEffect() {
super(Outcome.Sacrifice);
staticText = "If that land was legendary, its controller sacrifices another land";
}
FeastOfWormsEffect(FeastOfWormsEffect effect) {
super(effect);
}
@Override
public FeastOfWormsEffect copy() {
return new FeastOfWormsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
//Player player = game.getPlayer(source.getControllerId());
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
Player targetPlayer = game.getPlayer(permanent.getControllerId());
if (targetPlayer != null && permanent != null
&& (permanent.getSupertype().get(0).toString().equals("Legendary"))) {
FilterControlledPermanent filter = new FilterControlledPermanent("land to sacrifice");
filter.getCardType().add(CardType.LAND);
filter.getControllerId().add(targetPlayer.getId());
filter.setNotController(false);
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, false);
if (target.canChoose(targetPlayer.getId(), game)) {
targetPlayer.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
Permanent land = game.getPermanent(target.getFirstTarget());
if (land != null) {
return land.sacrifice(source.getId(), game);
}
return true;
}
}
return false;
}
}

View file

@ -0,0 +1,127 @@
/*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.AttachmentType;
import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.EvasionAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.CantBlockSourceEffect;
import mage.abilities.effects.common.ReturnToHandSourceEffect;
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
/**
* @author LevelX
*/
public class FieldOfReality extends CardImpl<FieldOfReality> {
public FieldOfReality(UUID ownerId) {
super(ownerId, 60, "Field of Reality", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
this.expansionSetCode = "CHK";
this.subtype.add("Aura");
this.color.setBlue(true);
// Enchanted creature can't be blocked by Spirits.
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(new FieldOfRealityEvasionAbility(), AttachmentType.AURA )));
// {1}{U}: Return Field of Reality to its owner's hand.
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{U}")));
}
public FieldOfReality(final FieldOfReality card) {
super(card);
}
@Override
public FieldOfReality copy() {
return new FieldOfReality(this);
}
}
class FieldOfRealityEvasionAbility extends EvasionAbility<FieldOfRealityEvasionAbility> {
public FieldOfRealityEvasionAbility() {
this.addEffect(new FieldOfRealityEvasionEffect());
}
public FieldOfRealityEvasionAbility(final FieldOfRealityEvasionAbility ability) {
super(ability);
}
@Override
public String getRule() {
return "can't be blocked by Spirits";
}
@Override
public FieldOfRealityEvasionAbility copy() {
return new FieldOfRealityEvasionAbility(this);
}
}
class FieldOfRealityEvasionEffect extends CantBlockSourceEffect {
public FieldOfRealityEvasionEffect() {
super(Duration.WhileOnBattlefield);
}
public FieldOfRealityEvasionEffect(final FieldOfRealityEvasionEffect effect) {
super(effect);
}
@Override
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) {
return !blocker.hasSubtype("Spirit") ;
}
@Override
public FieldOfRealityEvasionEffect copy() {
return new FieldOfRealityEvasionEffect(this);
}
}

View 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.sets.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.common.CreateTokenTargetEffect;
import mage.abilities.mana.AnyColorManaAbility;
import mage.cards.CardImpl;
import mage.game.permanent.token.SpiritToken;
import mage.target.common.TargetOpponent;
/**
*
* @author LevelX
*/
public class ForbiddenOrchad extends CardImpl<ForbiddenOrchad> {
public ForbiddenOrchad (UUID ownerId) {
super(ownerId, 276, "Forbidden Orchad", Rarity.RARE, new CardType[]{CardType.LAND}, null);
this.expansionSetCode = "CHK";
// {T}: Add one mana of any color to your mana pool.
Ability ability = new AnyColorManaAbility();
// Whenever you tap Forbidden Orchard for mana, put a 1/1 colorless Spirit creature token onto the battlefield under target opponent's control.
ability.addEffect(new CreateTokenTargetEffect(new SpiritToken()));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
public ForbiddenOrchad (final ForbiddenOrchad card) {
super(card);
}
@Override
public ForbiddenOrchad copy() {
return new ForbiddenOrchad(this);
}
}

View file

@ -0,0 +1,118 @@
/*
*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.FlippedCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.CopyTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.FlipSourceEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.permanent.token.Token;
import mage.target.common.TargetCreaturePermanent;
/**
* @author LevelX
*/
public class InitiateOfBlood extends CardImpl<InitiateOfBlood> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
public InitiateOfBlood(UUID ownerId) {
super(ownerId, 173, "Initiate of Blood", Constants.Rarity.UNCOMMON, new Constants.CardType[]{Constants.CardType.CREATURE}, "{3}{R}");
this.expansionSetCode = "CHK";
this.subtype.add("Ogre");
this.subtype.add("Shaman");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {T}: Initiate of Blood deals 1 damage to target creature that was dealt damage this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
// When that creature is put into a graveyard this turn, flip Initiate of Blood.
this.addAbility(new DiesAndDealtDamageThisTurnTriggeredAbility(new FlipSourceEffect()));
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new ConditionalContinousEffect(new CopyTokenEffect(new GokaTheUnjust()), FlippedCondition.getInstance(), "")));
}
public InitiateOfBlood(final InitiateOfBlood card) {
super(card);
}
@Override
public InitiateOfBlood copy() {
return new InitiateOfBlood(this);
}
}
class GokaTheUnjust extends Token {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
GokaTheUnjust() {
super("Goka the Unjust", "");
supertype.add("Legendary");
cardType.add(Constants.CardType.CREATURE);
color.setRed(true);
subtype.add("Ogre");
subtype.add("Shaman");
power = new MageInt(4);
toughness = new MageInt(4);
// {T}: Goka the Unjust deals 4 damage to target creature that was dealt damage this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}
}

View file

@ -32,7 +32,7 @@ import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.effects.common.SkipNextUntapSourceEffect;
import mage.abilities.mana.BlueManaAbility;
import mage.abilities.mana.BlackManaAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.RedManaAbility;
import mage.cards.CardImpl;
@ -47,9 +47,9 @@ public class LanternLitGraveyard extends CardImpl<LanternLitGraveyard> {
super(ownerId, 278, "Lantern-Lit Graveyard", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, "");
this.expansionSetCode = "CHK";
this.addAbility(new ColorlessManaAbility());
Ability blueManaAbility = new BlueManaAbility();
blueManaAbility.addEffect(new SkipNextUntapSourceEffect());
this.addAbility(blueManaAbility);
Ability blackManaAbility = new BlackManaAbility();
blackManaAbility.addEffect(new SkipNextUntapSourceEffect());
this.addAbility(blackManaAbility);
Ability redManaAbility = new RedManaAbility();
redManaAbility.addEffect(new SkipNextUntapSourceEffect());
this.addAbility(redManaAbility);

View file

@ -38,7 +38,6 @@ import mage.abilities.effects.common.continious.BoostControlledEffect;
import mage.abilities.keyword.BushidoAbility;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
/**

View file

@ -0,0 +1,77 @@
/*
*
* 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.championsofkamigawa;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastTriggeredAbility;
import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.filter.common.FilterSpiritOrArcaneCard;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author Ludwig
*/
public class TellerOfTales extends CardImpl<TellerOfTales> {
// Outcome.Benefit, "tap or untap target creature"
public TellerOfTales(UUID ownerId) {
super(ownerId, 95, "Teller of Tales", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.expansionSetCode = "CHK";
this.subtype.add("Spirit");
this.color.setBlue(true);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast a Spirit or Arcane spell, you may tap or untap target creature.
Ability ability = new SpellCastTriggeredAbility(new MayTapOrUntapTargetEffect(),new FilterSpiritOrArcaneCard(), true);
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
public TellerOfTales(final TellerOfTales card) {
super(card);
}
@Override
public TellerOfTales copy() {
return new TellerOfTales(this);
}
}

View 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.futuresight;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.filter.common.FilterCreaturePermanent;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author North
*/
public class WitchsMist extends CardImpl<WitchsMist> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
public WitchsMist(UUID ownerId) {
super(ownerId, 92, "Witch's Mist", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}");
this.expansionSetCode = "FUT";
this.color.setBlack(true);
// {2}{B}, {T}: Destroy target creature that was dealt damage this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(),new ManaCostsImpl("{2}{B}"));
ability.addTarget(new TargetCreaturePermanent(filter));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
}
public WitchsMist(final WitchsMist card) {
super(card);
}
@Override
public WitchsMist copy() {
return new WitchsMist(this);
}
}

View file

@ -32,8 +32,8 @@ import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.costs.common.RemoveCountersSourceCost;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.mana.AnyColorManaAbility;
import mage.cards.CardImpl;
@ -51,8 +51,8 @@ public class SphereOfTheSuns extends CardImpl<SphereOfTheSuns> {
Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(3)),
"Sphere of the Suns enters the battlefield tapped and with three charge counters on it.");
ability.addEffect(new TapSourceEffect());
this.addAbility(ability);
this.addAbility(new EntersBattlefieldTappedAbility());
RemoveCountersSourceCost removeCounterCost = new RemoveCountersSourceCost(CounterType.CHARGE.createInstance());
ability = new AnyColorManaAbility();

View file

@ -31,6 +31,7 @@ package mage.sets.scarsofmirrodin;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.Ability;
@ -55,7 +56,7 @@ public class Skinrender extends CardImpl<Skinrender> {
this.power = new MageInt(3);
this.toughness = new MageInt(3);
Effect putCountersEffect = new AddCountersTargetEffect(CounterType.M1M1.createInstance(3));
Effect putCountersEffect = new AddCountersTargetEffect(CounterType.M1M1.createInstance(3), Outcome.UnboostCreature);
Ability ability = new EntersBattlefieldTriggeredAbility(putCountersEffect, false);
Target target = new TargetCreaturePermanent();
target.setRequired(true);

View file

@ -0,0 +1,94 @@
/*
* 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.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.cards.CardImpl;
import mage.filter.Filter;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreatureOrPlayer;
import mage.target.common.TargetCreaturePermanent;
import mage.watchers.common.DamagedByWatcher;
/**
* @author LevelX
*/
public class Opportunist extends CardImpl<Opportunist> {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature that was dealt damage this turn");
static {
filter.setUseDamageDealt(true);
filter.setDamageDealt(true);
}
public Opportunist(UUID ownerId) {
super(ownerId, 194, "Opportunist", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.expansionSetCode = "TMP";
this.subtype.add("Human");
this.subtype.add("Soldier");
this.color.setRed(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// {T}: Opportunist deals 1 damage to target creature that was dealt damage this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}
public Opportunist(final Opportunist card) {
super(card);
}
@Override
public Opportunist copy() {
return new Opportunist(this);
}
}

View file

@ -44,7 +44,7 @@ import mage.filter.common.FilterControlledCreaturePermanent;
*/
public class ScionOfTheWild extends CardImpl<ScionOfTheWild> {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control");
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control");
public ScionOfTheWild(UUID ownerId) {
super(ownerId, 295, "Scion of the Wild", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");

View file

@ -38,7 +38,6 @@ import mage.abilities.common.LandfallAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.ColoredManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.MayTapOrUntapTargetEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.cards.CardImpl;
@ -50,6 +49,8 @@ import mage.target.common.TargetCreaturePermanent;
* @author Loki
*/
public class TideforceElemental extends CardImpl<TideforceElemental> {
// private final static String text = "You may tap or untap another target creature";
private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
static {
@ -66,7 +67,10 @@ public class TideforceElemental extends CardImpl<TideforceElemental> {
this.toughness = new MageInt(1);
// {U}, {tap}: You may tap or untap another target creature.
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new MayTapOrUntapTargetEffect(), new ColoredManaCost(Constants.ColoredManaSymbol.U));
Ability ability = new SimpleActivatedAbility(
Constants.Zone.BATTLEFIELD,
new MayTapOrUntapTargetEffect(),
new ColoredManaCost(Constants.ColoredManaSymbol.U));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);

View file

@ -101,7 +101,7 @@ public abstract class TriggeredAbilityImpl<T extends TriggeredAbilityImpl<T>> ex
public String getRule() {
String superRule = super.getRule(true);
StringBuilder sb = new StringBuilder();
if (optional) {
if (optional && !superRule.toLowerCase().startsWith("you may")) {
sb.append("you may ");
if (!this.getTargets().isEmpty()) {
sb.append("have ");

View file

@ -63,6 +63,7 @@ public class CreateTokenTargetEffect extends OneShotEffect<CreateTokenTargetEffe
}
sb.append(message);
sb.append(" under target ").append(mode.getTargets().get(0).getTargetName());
sb.append("'s control");
return sb.toString();
}
}

View file

@ -14,7 +14,7 @@ public class FlipSourceEffect extends OneShotEffect<FlipSourceEffect> {
public FlipSourceEffect() {
super(Constants.Outcome.BecomeCreature);
staticText = "flip it.";
staticText = "flip it";
}
public FlipSourceEffect(final FlipSourceEffect effect) {

View file

@ -42,6 +42,8 @@ public class FilterCreaturePermanent<T extends FilterCreaturePermanent<T>> exten
protected boolean attacking;
protected boolean useBlocking;
protected boolean blocking;
protected boolean useDamageDealt;
protected boolean damageDealt;
public FilterCreaturePermanent() {
this("creature");
@ -58,6 +60,8 @@ public class FilterCreaturePermanent<T extends FilterCreaturePermanent<T>> exten
this.attacking = filter.attacking;
this.useBlocking = filter.useBlocking;
this.blocking = filter.blocking;
this.useDamageDealt = filter.useDamageDealt;
this.damageDealt = filter.damageDealt;
this.useTapped = filter.useTapped;
this.tapped = filter.tapped;
}
@ -80,12 +84,17 @@ public class FilterCreaturePermanent<T extends FilterCreaturePermanent<T>> exten
return notFilter;
}
}
return !notFilter;
}
return !notFilter;
}
if (useBlocking && (permanent.getBlocking() > 0) != blocking)
return notFilter;
if (useDamageDealt) {
// use this instead of getDamage() because damage is reset in case of regeneration
if (permanent.getDealtDamageByThisTurn().isEmpty())
return notFilter;
}
return !notFilter;
}
@ -104,6 +113,23 @@ public class FilterCreaturePermanent<T extends FilterCreaturePermanent<T>> exten
public void setBlocking ( boolean blocking ) {
this.blocking = blocking;
}
/**
* Select creatures dependant if they already got damage
* during the current turn. Works also if the creature
* was meanwhile regenerated during the turn.
*
* @param useDamage
*/
public void setUseDamageDealt ( boolean useDamageDealt ) {
this.useDamageDealt = useDamageDealt;
}
/**
* Select creatures that got damage dealt to this turn.
* @param damageDealt
*/
public void setDamageDealt ( boolean damageDealt ) {
this.damageDealt = damageDealt;
}
@Override
public FilterCreaturePermanent<T> copy() {