diff --git a/Mage.Sets/src/mage/sets/eventide/HatchetBully.java b/Mage.Sets/src/mage/sets/eventide/HatchetBully.java new file mode 100644 index 0000000000..dba3cb5866 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/HatchetBully.java @@ -0,0 +1,148 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.CostImpl; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + */ +public class HatchetBully extends CardImpl { + + public HatchetBully(UUID ownerId) { + super(ownerId, 54, "Hatchet Bully", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{R}, {tap}, Put a -1/-1 counter on a creature you control: Hatchet Bully deals 2 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HatchetBullyEffect(), new ManaCostsImpl("{2}{R}")); + ability.addCost(new TapSourceCost()); + ability.addCost(new HatchetBullyCost()); + ability.addTarget(new TargetCreatureOrPlayer(true)); + Target target = new TargetControlledCreaturePermanent(true); + target.setNotTarget(true); + ability.addTarget(target); + this.addAbility(ability); + + } + + public HatchetBully(final HatchetBully card) { + super(card); + } + + @Override + public HatchetBully copy() { + return new HatchetBully(this); + } +} + +class HatchetBullyCost extends CostImpl { + + public HatchetBullyCost() { + this.text = "Put a -1/-1 counter on a creature you control"; + } + + public HatchetBullyCost(HatchetBullyCost cost) { + super(cost); + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return true; + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + Permanent permanent = game.getPermanent(ability.getTargets().get(1).getFirstTarget()); + if (permanent != null) { + permanent.addCounters(CounterType.M1M1.createInstance(), game); + this.paid = true; + } + return paid; + } + + @Override + public HatchetBullyCost copy() { + return new HatchetBullyCost(this); + } +} + +class HatchetBullyEffect extends OneShotEffect { + + public HatchetBullyEffect() { + super(Outcome.Damage); + staticText = "{this} deals 2 damage to target creature or player"; + } + + public HatchetBullyEffect(final HatchetBullyEffect effect) { + super(effect); + } + + @Override + public HatchetBullyEffect copy() { + return new HatchetBullyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent != null) { + permanent.damage(2, source.getSourceId(), game, true, false); + } + Player player = game.getPlayer(source.getFirstTarget()); + if (player != null) { + player.damage(2, source.getSourceId(), game, false, true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/Hateflayer.java b/Mage.Sets/src/mage/sets/eventide/Hateflayer.java new file mode 100644 index 0000000000..090968681e --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/Hateflayer.java @@ -0,0 +1,79 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.UntapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.WitherAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + */ +public class Hateflayer extends CardImpl { + + public Hateflayer(UUID ownerId) { + super(ownerId, 55, "Hateflayer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{R}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elemental"); + + this.color.setRed(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Wither + this.addAbility(WitherAbility.getInstance()); + + // {2}{R}, {untap}: Hateflayer deals damage equal to its power to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{2}{R}")); + ability.addCost(new UntapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + + } + + public Hateflayer(final Hateflayer card) { + super(card); + } + + @Override + public Hateflayer copy() { + return new Hateflayer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java b/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java new file mode 100644 index 0000000000..2fa79332ae --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/HotheadedGiant.java @@ -0,0 +1,144 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.InvertCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.WatcherScope; +import mage.counters.CounterType; +import mage.filter.FilterSpell; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.stack.Spell; +import mage.watchers.WatcherImpl; + +/** + * + * @author jeffwadsworth + */ +public class HotheadedGiant extends CardImpl { + + public HotheadedGiant(UUID ownerId) { + super(ownerId, 57, "Hotheaded Giant", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Hotheaded Giant enters the battlefield with two -1/-1 counters on it unless you've cast another red spell this turn. + Condition condition = new CastRedSpellThisTurnCondition(); + this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), new InvertCondition(condition), ""), "with two -1/-1 counters on it unless you've cast another red spell this turn")); + this.addWatcher(new HotHeadedGiantWatcher(this.getId())); + + } + + public HotheadedGiant(final HotheadedGiant card) { + super(card); + } + + @Override + public HotheadedGiant copy() { + return new HotheadedGiant(this); + } +} + +class CastRedSpellThisTurnCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + HotHeadedGiantWatcher watcher = (HotHeadedGiantWatcher) game.getState().getWatchers().get("HotHeadedGiantWatcher", source.getControllerId()); + if (watcher != null) { + return watcher.conditionMet(); + } + return false; + } +} + +class HotHeadedGiantWatcher extends WatcherImpl { + + private static final FilterSpell filter = new FilterSpell(); + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + private UUID cardId; + + public HotHeadedGiantWatcher(UUID cardId) { + super("HotHeadedGiantWatcher", WatcherScope.PLAYER); + this.cardId = cardId; + } + + public HotHeadedGiantWatcher(final HotHeadedGiantWatcher watcher) { + super(watcher); + this.cardId = watcher.cardId; + } + + @Override + public HotHeadedGiantWatcher copy() { + return new HotHeadedGiantWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (condition == true) { //no need to check - condition has already occured + return; + } + if (event.getType() == EventType.SPELL_CAST + && controllerId == event.getPlayerId()) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (!spell.getSourceId().equals(cardId) && filter.match(spell, game)) { + condition = true; + } + } + } + + @Override + public void reset() { + super.reset(); + condition = false; + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java b/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java new file mode 100644 index 0000000000..5b3949f093 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/ImpelledGiant.java @@ -0,0 +1,173 @@ +/* + * 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.eventide; + +import java.util.List; +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.CostImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +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.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledPermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author jeffwadsworth + */ +public class ImpelledGiant extends CardImpl { + + static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped red creature you control other than Impelled Giant"); + + static { + filter.add(Predicates.not(new TappedPredicate())); + filter.add(new ColorPredicate(ObjectColor.RED)); + filter.add(new AnotherPredicate()); + } + + public ImpelledGiant(UUID ownerId) { + super(ownerId, 58, "Impelled Giant", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Giant"); + this.subtype.add("Warrior"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Tap an untapped red creature you control other than Impelled Giant: Impelled Giant gets +X/+0 until end of turn, where X is the power of the creature tapped this way. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ImpelledGiantBoostEffect(), new ImpelledGiantCost(new TargetControlledPermanent(filter)))); + + } + + public ImpelledGiant(final ImpelledGiant card) { + super(card); + } + + @Override + public ImpelledGiant copy() { + return new ImpelledGiant(this); + } +} + +class ImpelledGiantCost extends CostImpl { + + TargetControlledPermanent target; + + public ImpelledGiantCost(TargetControlledPermanent target) { + this.target = target; + this.text = "Tap an untapped red creature you control other than Impelled Giant"; + } + + public ImpelledGiantCost(final ImpelledGiantCost cost) { + super(cost); + this.target = cost.target.copy(); + } + + @Override + public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) { + if (target.choose(Outcome.Tap, controllerId, sourceId, game)) { + for (UUID targetId: (List)target.getTargets()) { + Permanent permanent = game.getPermanent(targetId); + if (permanent == null) + return false; + paid |= permanent.tap(game); + for (Effect effect : ability.getEffects()) { + effect.setTargetPointer(new FixedTarget(permanent.getId())); + } + } + } + return paid; + } + + @Override + public boolean canPay(UUID sourceId, UUID controllerId, Game game) { + return target.canChoose(controllerId, game); + } + + @Override + public ImpelledGiantCost copy() { + return new ImpelledGiantCost(this); + } + + +} + + +class ImpelledGiantBoostEffect extends OneShotEffect { + + public ImpelledGiantBoostEffect() { + super(Outcome.BoostCreature); + staticText = "{this} gets +X/+0 until end of turn, where X is the power of the creature tapped this way"; + } + + public ImpelledGiantBoostEffect(ImpelledGiantBoostEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent impelledGiant = game.getPermanent(source.getSourceId()); + Permanent tappedCreature = game.getPermanent(this.targetPointer.getFirst(game, source)); + if (tappedCreature == null) { + tappedCreature = (Permanent) game.getLastKnownInformation(this.targetPointer.getFirst(game, source), Zone.BATTLEFIELD); + } + if (tappedCreature != null && impelledGiant != null) { + int amount = tappedCreature.getPower().getValue(); + impelledGiant.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(amount, 0, Duration.EndOfTurn)), source.getSourceId(), game); + } + return true; + } + + @Override + public ImpelledGiantBoostEffect copy() { + return new ImpelledGiantBoostEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/RekindledFlame.java b/Mage.Sets/src/mage/sets/eventide/RekindledFlame.java new file mode 100644 index 0000000000..48047cb0df --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/RekindledFlame.java @@ -0,0 +1,96 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author jeffwadsworth + */ +public class RekindledFlame extends CardImpl { + + final String rule = "if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand"; + + public RekindledFlame(UUID ownerId) { + super(ownerId, 61, "Rekindled Flame", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); + this.expansionSetCode = "EVE"; + + this.color.setRed(true); + + // Rekindled Flame deals 4 damage to target creature or player. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer(true)); + + // At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand. + Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ConditionalOneShotEffect(new ReturnSourceFromGraveyardToHandEffect(), new OpponentHasNoCardsInHandCondition(), rule), TargetController.YOU, true); + ability.setRuleVisible(true); + this.addAbility(ability); + + } + + public RekindledFlame(final RekindledFlame card) { + super(card); + } + + @Override + public RekindledFlame copy() { + return new RekindledFlame(this); + } +} + +class OpponentHasNoCardsInHandCondition implements Condition { + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + for (UUID playerId : game.getOpponents(source.getControllerId())) { + Player opponent = game.getPlayer(playerId); + if (opponent != null && opponent.getHand().size() == 0) { + return true; + } + } + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/StigmaLasher.java b/Mage.Sets/src/mage/sets/eventide/StigmaLasher.java new file mode 100644 index 0000000000..83de470631 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/StigmaLasher.java @@ -0,0 +1,104 @@ +/* + * 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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.WitherAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class StigmaLasher extends CardImpl { + + public StigmaLasher(UUID ownerId) { + super(ownerId, 62, "Stigma Lasher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{R}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elemental"); + this.subtype.add("Shaman"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Wither + this.addAbility(WitherAbility.getInstance()); + + // Whenever Stigma Lasher deals damage to a player, that player can't gain life for the rest of the game. + this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new StigmaLasherEffect(), false, true)); + + } + + public StigmaLasher(final StigmaLasher card) { + super(card); + } + + @Override + public StigmaLasher copy() { + return new StigmaLasher(this); + } +} + +class StigmaLasherEffect extends ContinuousEffectImpl { + + public StigmaLasherEffect() { + super(Duration.EndOfGame, Layer.PlayerEffects, SubLayer.NA, Outcome.Neutral); + staticText = "that player can't gain life for the rest of the game"; + } + + public StigmaLasherEffect(final StigmaLasherEffect effect) { + super(effect); + } + + @Override + public StigmaLasherEffect copy() { + return new StigmaLasherEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(this.targetPointer.getFirst(game, source)); + if (player != null) { + player.setCanGainLife(false); + } + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/Thunderblust.java b/Mage.Sets/src/mage/sets/eventide/Thunderblust.java new file mode 100644 index 0000000000..891d9fbef3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/Thunderblust.java @@ -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.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.HasCounterCondition; +import mage.abilities.decorator.ConditionalContinousEffect; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.GainAbilitySourceEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.PersistAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.counters.CounterType; + +/** + * + * @author jeffwadsworth + */ +public class Thunderblust extends CardImpl { + + private String rule = "Thunderblust has trample as long as it has a -1/-1 counter on it"; + + public Thunderblust(UUID ownerId) { + super(ownerId, 63, "Thunderblust", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elemental"); + + this.color.setRed(true); + this.power = new MageInt(7); + this.toughness = new MageInt(2); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Thunderblust has trample as long as it has a -1/-1 counter on it. + Effect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance()), new HasCounterCondition(CounterType.M1M1), rule); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + + // Persist + this.addAbility(new PersistAbility()); + } + + public Thunderblust(final Thunderblust card) { + super(card); + } + + @Override + public Thunderblust copy() { + return new Thunderblust(this); + } +}