mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[FRF] Added Hungering Yeti.
This commit is contained in:
parent
f27f46bbf7
commit
fe3486c208
14 changed files with 192 additions and 63 deletions
|
@ -42,7 +42,7 @@ import mage.game.Game;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
|
@ -69,7 +69,7 @@ public class AlchemistsRefuge extends CardImpl {
|
|||
|
||||
// {G}{U}, {tap}: You may cast nonland cards this turn as though they had flash.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AddContinuousEffectToGame(new CastAsThoughItHadFlashEffect(Duration.EndOfTurn, filter)),
|
||||
new AddContinuousEffectToGame(new CastAsThoughItHadFlashAllEffect(Duration.EndOfTurn, filter)),
|
||||
new CompositeCost(new ManaCostsImpl("{G}{U}"), new TapSourceCost(), "{G}{U}, {T}")));
|
||||
}
|
||||
|
||||
|
|
82
Mage.Sets/src/mage/sets/fatereforged/HungeringYeti.java
Normal file
82
Mage.Sets/src/mage/sets/fatereforged/HungeringYeti.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* 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.fatereforged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalAsThoughEffect;
|
||||
import mage.abilities.effects.AsThoughEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class HungeringYeti extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("as long as you control a green or blue permanent");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new ColorPredicate(ObjectColor.GREEN), new ColorPredicate(ObjectColor.BLUE)));
|
||||
}
|
||||
|
||||
public HungeringYeti(UUID ownerId) {
|
||||
super(ownerId, 105, "Hungering Yeti", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
this.expansionSetCode = "FRF";
|
||||
this.subtype.add("Yeti");
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// As long as you control a green or blue permanent, you may cast Hungering Yeti as though it had flash.
|
||||
AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame);
|
||||
effect.setText("As long as you control a green or blue permanent, you may cast Hungering Yeti as though it had flash");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect,
|
||||
new PermanentsOnTheBattlefieldCondition(filter))));
|
||||
|
||||
}
|
||||
|
||||
public HungeringYeti(final HungeringYeti card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HungeringYeti copy() {
|
||||
return new HungeringYeti(this);
|
||||
}
|
||||
}
|
|
@ -31,10 +31,13 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.FerociousCondition;
|
||||
import mage.abilities.decorator.ConditionalAsThoughEffect;
|
||||
import mage.abilities.effects.AsThoughEffect;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continious.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashSourceEffect;
|
||||
import mage.abilities.effects.common.continious.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
@ -64,6 +67,11 @@ public class DragonGrip extends CardImpl {
|
|||
this.color.setRed(true);
|
||||
|
||||
// Ferocious - If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash.
|
||||
AsThoughEffect effect = new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame);
|
||||
effect.setText("<i>Ferocious</i> — If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash");
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new ConditionalAsThoughEffect(effect,
|
||||
FerociousCondition.getInstance())));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new DragonGripCastAsThoughItHadFlashEffect()));
|
||||
|
||||
// Enchant creature
|
||||
|
@ -74,12 +82,12 @@ public class DragonGrip extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature gets +2/+0 and has first strike.
|
||||
Effect effect = new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield);
|
||||
effect.setText("Enchanted creature gets +2/+0");
|
||||
Effect effect2 = new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield);
|
||||
effect2.setText("Enchanted creature gets +2/+0");
|
||||
ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(2, 0, Duration.WhileOnBattlefield));
|
||||
effect = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA);
|
||||
effect.setText("and has first strike");
|
||||
ability.addEffect(effect);
|
||||
effect2 = new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA);
|
||||
effect2.setText("and has first strike");
|
||||
ability.addEffect(effect2);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
@ -92,35 +100,3 @@ public class DragonGrip extends CardImpl {
|
|||
return new DragonGrip(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DragonGripCastAsThoughItHadFlashEffect extends AsThoughEffectImpl {
|
||||
|
||||
public DragonGripCastAsThoughItHadFlashEffect() {
|
||||
super(AsThoughEffectType.CAST_AS_INSTANT, Duration.EndOfGame, Outcome.Benefit);
|
||||
staticText = "<i>Ferocious</i> - If you control a creature with power 4 or greater, you may cast Dragon Grip as though it had flash";
|
||||
}
|
||||
|
||||
public DragonGripCastAsThoughItHadFlashEffect(final DragonGripCastAsThoughItHadFlashEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragonGripCastAsThoughItHadFlashEffect copy() {
|
||||
return new DragonGripCastAsThoughItHadFlashEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID affectedSpellId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (affectedSpellId.equals(source.getSourceId())) {
|
||||
if (FerociousCondition.getInstance().apply(game, source)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.legions;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -63,7 +63,7 @@ public class QuickSliver extends CardImpl {
|
|||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// Any player may play Sliver cards as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter, true)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter, true)));
|
||||
}
|
||||
|
||||
public QuickSliver(final QuickSliver card) {
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.magic2011;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.keyword.LeylineAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -63,7 +63,7 @@ public class LeylineOfAnticipation extends CardImpl {
|
|||
this.addAbility(LeylineAbility.getInstance());
|
||||
|
||||
// You may cast nonland cards as though they had flash. (You may cast them any time you could cast an instant.)
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public LeylineOfAnticipation(final LeylineOfAnticipation card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -66,7 +66,7 @@ public class YevaNaturesHerald extends CardImpl {
|
|||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// You may cast green creature cards as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public YevaNaturesHerald(final YevaNaturesHerald card) {
|
||||
|
|
|
@ -31,7 +31,7 @@ package mage.sets.mirrodinbesieged;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -62,7 +62,7 @@ public class ShimmerMyr extends CardImpl {
|
|||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
// You may cast artifact cards as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public ShimmerMyr (final ShimmerMyr card) {
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.returntoravnica;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -67,7 +67,7 @@ public class HypersonicDragon extends CardImpl {
|
|||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
// You may cast sorcery spells as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
public HypersonicDragon(final HypersonicDragon card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.condition.common.SourceIsSpellCondition;
|
|||
import mage.abilities.costs.AlternativeCostSourceAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
@ -80,7 +80,7 @@ public class Aluren extends CardImpl {
|
|||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AlurenRuleEffect());
|
||||
// and as though they had flash.
|
||||
// TODO: This as thought effect may only be used if the creature is cast by the aluren effect
|
||||
Effect effect = new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, filter, true);
|
||||
Effect effect = new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filter, true);
|
||||
effect.setText("and as though they had flash");
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.sets.theros;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.effects.common.continious.UntapAllDuringEachOtherPlayersUntapStepEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -69,7 +69,7 @@ public class ProphetOfKruphix extends CardImpl {
|
|||
// Untap all creatures and lands you control during each other player's untap step.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new UntapAllDuringEachOtherPlayersUntapStepEffect(filter)));
|
||||
// You may cast creature cards as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashEffect(Duration.WhileOnBattlefield, new FilterCreatureCard("creature cards"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, new FilterCreatureCard("creature cards"))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AddContinuousEffectToGame;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashEffect;
|
||||
import mage.abilities.effects.common.continious.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
|
@ -57,7 +57,7 @@ public class WindingCanyons extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}, {tap}: Until end of turn, you may play creature cards as though they had flash.
|
||||
Effect effect = new AddContinuousEffectToGame(new CastAsThoughItHadFlashEffect(Duration.EndOfTurn, new FilterCreatureCard()));
|
||||
Effect effect = new AddContinuousEffectToGame(new CastAsThoughItHadFlashAllEffect(Duration.EndOfTurn, new FilterCreatureCard()));
|
||||
effect.setText("Until end of turn, you may play creature cards as though they had flash");
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
@ -28,11 +28,10 @@
|
|||
|
||||
package mage.abilities.costs;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.target.Target;
|
||||
import mage.target.Targets;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class CostImpl implements Cost {
|
||||
|
||||
protected UUID id;
|
||||
|
@ -58,6 +57,10 @@ public abstract class CostImpl implements Cost {
|
|||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public void addTarget(Target target) {
|
||||
if (target != null) {
|
||||
this.targets.add(target);
|
||||
|
|
|
@ -43,23 +43,23 @@ import mage.game.Game;
|
|||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CastAsThoughItHadFlashEffect extends AsThoughEffectImpl {
|
||||
public class CastAsThoughItHadFlashAllEffect extends AsThoughEffectImpl {
|
||||
|
||||
private final FilterCard filter;
|
||||
private final boolean anyPlayer;
|
||||
|
||||
public CastAsThoughItHadFlashEffect(Duration duration, FilterCard filter) {
|
||||
public CastAsThoughItHadFlashAllEffect(Duration duration, FilterCard filter) {
|
||||
this(duration, filter, false);
|
||||
}
|
||||
|
||||
public CastAsThoughItHadFlashEffect(Duration duration, FilterCard filter, boolean anyPlayer) {
|
||||
public CastAsThoughItHadFlashAllEffect(Duration duration, FilterCard filter, boolean anyPlayer) {
|
||||
super(AsThoughEffectType.CAST_AS_INSTANT, duration, Outcome.Benefit);
|
||||
this.filter = filter;
|
||||
this.anyPlayer = anyPlayer;
|
||||
staticText = setText();
|
||||
}
|
||||
|
||||
public CastAsThoughItHadFlashEffect(final CastAsThoughItHadFlashEffect effect) {
|
||||
public CastAsThoughItHadFlashAllEffect(final CastAsThoughItHadFlashAllEffect effect) {
|
||||
super(effect);
|
||||
this.filter = effect.filter;
|
||||
this.anyPlayer = effect.anyPlayer;
|
||||
|
@ -71,8 +71,8 @@ public class CastAsThoughItHadFlashEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public CastAsThoughItHadFlashEffect copy() {
|
||||
return new CastAsThoughItHadFlashEffect(this);
|
||||
public CastAsThoughItHadFlashAllEffect copy() {
|
||||
return new CastAsThoughItHadFlashAllEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -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.continious;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class CastAsThoughItHadFlashSourceEffect extends AsThoughEffectImpl {
|
||||
|
||||
public CastAsThoughItHadFlashSourceEffect(Duration duration) {
|
||||
super(AsThoughEffectType.CAST_AS_INSTANT, duration, Outcome.Benefit);
|
||||
staticText = "you may cast {this} as though it had flash";
|
||||
}
|
||||
|
||||
public CastAsThoughItHadFlashSourceEffect(final CastAsThoughItHadFlashSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CastAsThoughItHadFlashSourceEffect copy() {
|
||||
return new CastAsThoughItHadFlashSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID affectedSpellId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return affectedSpellId.equals(source.getSourceId());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue