From 97d87154886d75fb2d696656a2746288202d4283 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sat, 3 Jan 2015 15:25:21 +0100 Subject: [PATCH] [FRF] Added Temur War-Shaman, Yasova Dragonclaw, Whisperwood Elemental and Dromka, the Eternal. --- Mage.Client/serverlist.txt | 8 +- .../sets/fatereforged/DromokaTheEternal.java | 69 +++++++++ .../sets/fatereforged/TemurWarShaman.java | 138 ++++++++++++++++++ .../fatereforged/WhisperwoodElemental.java | 90 ++++++++++++ .../sets/fatereforged/YasovaDragonclaw.java | 112 ++++++++++++++ Mage/src/mage/game/GameImpl.java | 5 - 6 files changed, 413 insertions(+), 9 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/fatereforged/DromokaTheEternal.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/WhisperwoodElemental.java create mode 100644 Mage.Sets/src/mage/sets/fatereforged/YasovaDragonclaw.java diff --git a/Mage.Client/serverlist.txt b/Mage.Client/serverlist.txt index 8ccd5db6a1..e48b45d95f 100644 --- a/Mage.Client/serverlist.txt +++ b/Mage.Client/serverlist.txt @@ -1,5 +1,5 @@ -woogerworks (Version 1.3.0 dev 2014-10-29V4) :xmage.woogerworks.com:17171 -XMage.info 1 (Version 1.3.0 dev 2014-11-29v4) :176.31.186.181:17171 -XMage.info 2 (Version 1.3.0 dev 2014-11-29V5) :176.31.186.181:17000 -Seedds Server (Version 1.3.0 dev 2014-11-29v2) :115.29.203.80:17171 +woogerworks :xmage.woogerworks.com:17171 +XMage.info 1 :176.31.186.181:17171 +XMage.info 2 :176.31.186.181:17000 +Seedds Server (inactive?) :115.29.203.80:17171 localhost -> connect to your local server (must be started):localhost:17171 diff --git a/Mage.Sets/src/mage/sets/fatereforged/DromokaTheEternal.java b/Mage.Sets/src/mage/sets/fatereforged/DromokaTheEternal.java new file mode 100644 index 0000000000..ed24cff880 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/DromokaTheEternal.java @@ -0,0 +1,69 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.fatereforged; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.effects.keyword.BolsterEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class DromokaTheEternal extends CardImpl { + + public DromokaTheEternal(UUID ownerId) { + super(ownerId, 151, "Dromoka, the Eternal", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{W}"); + this.expansionSetCode = "FRF"; + this.supertype.add("Legendary"); + this.subtype.add("Dragon"); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever a Dragon you control attacks, bolster 2. + this.addAbility(new AttacksCreatureYouControlTriggeredAbility( + new BolsterEffect(2), false, new FilterControlledCreaturePermanent("Dragon", "Dragon you control"))); + } + + public DromokaTheEternal(final DromokaTheEternal card) { + super(card); + } + + @Override + public DromokaTheEternal copy() { + return new DromokaTheEternal(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java b/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java new file mode 100644 index 0000000000..581b8ad41b --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/TemurWarShaman.java @@ -0,0 +1,138 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.TurnedFaceUpAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.keyword.ManifestEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class TemurWarShaman extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public TemurWarShaman(UUID ownerId) { + super(ownerId, 142, "Temur War Shaman", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Human"); + this.subtype.add("Shaman"); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // When Temur War Shaman enters the battlefield, manifest the top card of your library. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ManifestEffect(1), false)); + + // Whenever a permanent you control is turned face up, if it is a creature, you may have it fight target creature you don't control. + Ability ability = new TemurWarShamanTriggeredAbility(); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public TemurWarShaman(final TemurWarShaman card) { + super(card); + } + + @Override + public TemurWarShaman copy() { + return new TemurWarShaman(this); + } +} + +class TemurWarShamanTriggeredAbility extends TurnedFaceUpAllTriggeredAbility { + + public TemurWarShamanTriggeredAbility() { + super(new TemurWarShamanFightEffect(), new FilterControlledCreaturePermanent(), true); + } + + public TemurWarShamanTriggeredAbility(final TemurWarShamanTriggeredAbility ability) { + super(ability); + } + + @Override + public TemurWarShamanTriggeredAbility copy() { + return new TemurWarShamanTriggeredAbility(this); + } + + @Override + public String getRule() { + return "Whenever a permanent you control is turned face up, if it is a creature, you may have it fight target creature you don't control."; + } +} + +class TemurWarShamanFightEffect extends OneShotEffect { + + TemurWarShamanFightEffect() { + super(Outcome.Damage); + } + + TemurWarShamanFightEffect(final TemurWarShamanFightEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent triggeredCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + Permanent target = game.getPermanent(source.getFirstTarget()); + if (triggeredCreature != null + && target != null + && triggeredCreature.getCardType().contains(CardType.CREATURE) + && target.getCardType().contains(CardType.CREATURE)) { + triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, false, true); + target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, false, true); + return true; + } + return false; + } + + @Override + public TemurWarShamanFightEffect copy() { + return new TemurWarShamanFightEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/WhisperwoodElemental.java b/Mage.Sets/src/mage/sets/fatereforged/WhisperwoodElemental.java new file mode 100644 index 0000000000..5cf8660bb7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/WhisperwoodElemental.java @@ -0,0 +1,90 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continious.GainAbilityControlledEffect; +import mage.abilities.effects.keyword.ManifestEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.other.FaceDownPredicate; +import mage.filter.predicate.permanent.TokenPredicate; + +/** + * + * @author LevelX2 + */ +public class WhisperwoodElemental extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("face-up, nontoken creatures you control"); + + static { + filter.add(Predicates.not(new FaceDownPredicate())); + filter.add(Predicates.not(new TokenPredicate())); + } + + public WhisperwoodElemental(UUID ownerId) { + super(ownerId, 145, "Whisperwood Elemental", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "FRF"; + this.subtype.add("Elemental"); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // At the beginning of your end step, manifest the top card of your library. + this.addAbility(new BeginningOfEndStepTriggeredAbility(new ManifestEffect(1), TargetController.YOU, false)); + + // Sacrifice Whisperwood Elemental: Until end of turn, face-up, nontoken creatures you control gain "When this creature dies, manifest the top card of your library." + Ability abilityToGain = new DiesTriggeredAbility(new ManifestEffect(1)); + Effect effect = new GainAbilityControlledEffect(abilityToGain, Duration.EndOfTurn, filter); + effect.setText("Until end of turn, face-up, nontoken creatures you control gain \"When this creature dies, manifest the top card of your library.\""); + this.addAbility(new SimpleActivatedAbility( + Zone.BATTLEFIELD, effect, new SacrificeSourceCost())); + } + + public WhisperwoodElemental(final WhisperwoodElemental card) { + super(card); + } + + @Override + public WhisperwoodElemental copy() { + return new WhisperwoodElemental(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fatereforged/YasovaDragonclaw.java b/Mage.Sets/src/mage/sets/fatereforged/YasovaDragonclaw.java new file mode 100644 index 0000000000..840501a812 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fatereforged/YasovaDragonclaw.java @@ -0,0 +1,112 @@ +/* + * 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.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.continious.GainControlTargetEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.ObjectSourcePlayer; +import mage.filter.predicate.ObjectSourcePlayerPredicate; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class YasovaDragonclaw extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls with power less than Yasova Dragonclaw's power"); + + static { + filter.add(new YasovaDragonclawPowerLessThanSourcePredicate()); + filter.add(new ControllerPredicate(TargetController.OPPONENT)); + } + + public YasovaDragonclaw(UUID ownerId) { + super(ownerId, 148, "Yasova Dragonclaw", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "FRF"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.power = new MageInt(4); + this.toughness = new MageInt(2); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // At the beginning of combat on your turn, you may pay {1}{(U/R)}{(U/R)}. If you do, gain control of target creature an opponent controls with power less than Yasova Dragonclaw's power until end of turn, untap that creature, and it gains haste until end of turn. + DoIfCostPaid effect = new DoIfCostPaid(new GainControlTargetEffect(Duration.EndOfTurn, true), new ManaCostsImpl("{1}{U/R}{U/R}")); + Effect effect2 = new UntapTargetEffect(); + effect2.setText(", untap that creature"); + effect.addEffect(effect2); + effect.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, ", and it gains haste until end of turn")); + Ability ability = new BeginningOfCombatTriggeredAbility(effect, TargetController.YOU, false); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public YasovaDragonclaw(final YasovaDragonclaw card) { + super(card); + } + + @Override + public YasovaDragonclaw copy() { + return new YasovaDragonclaw(this); + } +} + +class YasovaDragonclawPowerLessThanSourcePredicate implements ObjectSourcePlayerPredicate> { + + @Override + public boolean apply(ObjectSourcePlayer input, Game game) { + Permanent sourcePermanent = game.getPermanent(input.getSourceId()); + return sourcePermanent != null && input.getObject().getPower().getValue() < sourcePermanent.getPower().getValue(); + } + + @Override + public String toString() { + return "power less than Yasova Dragonclaw's power"; + } +} diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index af4e96fc8b..83b777ba94 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -2191,11 +2191,6 @@ public abstract class GameImpl implements Game, Serializable { return getLastKnownInformation(objectId, zone); } - @Override - public Map getLastKnownInformation(Zone zone) { - return lki.get(zone); - } - @Override public MageObject getShortLivingLKI(UUID objectId, Zone zone) { Map shortLivingLkiMap = shortLivingLKI.get(zone);