From 8ab96fec958e0d0910720530521270bae29b399f Mon Sep 17 00:00:00 2001 From: Loki Date: Sat, 9 Jul 2011 16:02:57 +0300 Subject: [PATCH] 1 EVE and Soulshift --- .../championsofkamigawa/HundredTalonKami.java | 65 +++++++++++ .../sets/eventide/AshlingtheExtinguisher.java | 109 ++++++++++++++++++ .../abilities/keyword/SoulshiftAbility.java | 37 ++++++ Utils/gen-card.pl | 2 + 4 files changed, 213 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/HundredTalonKami.java create mode 100644 Mage.Sets/src/mage/sets/eventide/AshlingtheExtinguisher.java create mode 100644 Mage/src/mage/abilities/keyword/SoulshiftAbility.java diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/HundredTalonKami.java b/Mage.Sets/src/mage/sets/championsofkamigawa/HundredTalonKami.java new file mode 100644 index 0000000000..158bfa867c --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/HundredTalonKami.java @@ -0,0 +1,65 @@ +/* + * 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.keyword.FlyingAbility; +import mage.abilities.keyword.SoulshiftAbility; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class HundredTalonKami extends CardImpl { + + public HundredTalonKami (UUID ownerId) { + super(ownerId, 16, "Hundred-Talon Kami", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(new SoulshiftAbility(4)); + } + + public HundredTalonKami (final HundredTalonKami card) { + super(card); + } + + @Override + public HundredTalonKami copy() { + return new HundredTalonKami(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/eventide/AshlingtheExtinguisher.java b/Mage.Sets/src/mage/sets/eventide/AshlingtheExtinguisher.java new file mode 100644 index 0000000000..2f9d7a34c2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/AshlingtheExtinguisher.java @@ -0,0 +1,109 @@ +/* + * 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.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.UntapAllLandsControllerEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Loki + */ +public class AshlingtheExtinguisher extends CardImpl { + + public AshlingtheExtinguisher (UUID ownerId) { + super(ownerId, 33, "Ashling, the Extinguisher", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); + this.expansionSetCode = "EVE"; + this.supertype.add("Legendary"); + this.subtype.add("Elemental"); + this.subtype.add("Shaman"); + this.color.setBlack(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + this.addAbility(new AshlingtheExtinguisherTriggeredAbility()); + } + + public AshlingtheExtinguisher (final AshlingtheExtinguisher card) { + super(card); + } + + @Override + public AshlingtheExtinguisher copy() { + return new AshlingtheExtinguisher(this); + } + +} + +class AshlingtheExtinguisherTriggeredAbility extends TriggeredAbilityImpl { + public AshlingtheExtinguisherTriggeredAbility() { + super(Constants.Zone.BATTLEFIELD, new SacrificeTargetEffect()); + this.addTarget(new TargetCreaturePermanent()); + } + + public AshlingtheExtinguisherTriggeredAbility(final AshlingtheExtinguisherTriggeredAbility ability) { + super(ability); + } + + @Override + public AshlingtheExtinguisherTriggeredAbility copy() { + return new AshlingtheExtinguisherTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event instanceof DamagedPlayerEvent) { + DamagedPlayerEvent damageEvent = (DamagedPlayerEvent)event; + if (damageEvent.isCombatDamage() && event.getSourceId().equals(this.getSourceId())) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever Ashling, the Extinguisher deals combat damage to a player, choose target creature that player controls. He or she sacrifices that creature."; + } +} \ No newline at end of file diff --git a/Mage/src/mage/abilities/keyword/SoulshiftAbility.java b/Mage/src/mage/abilities/keyword/SoulshiftAbility.java new file mode 100644 index 0000000000..5159a1601f --- /dev/null +++ b/Mage/src/mage/abilities/keyword/SoulshiftAbility.java @@ -0,0 +1,37 @@ +package mage.abilities.keyword; + +import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.target.common.TargetCardInYourGraveyard; + +public class SoulshiftAbility extends PutIntoGraveFromBattlefieldTriggeredAbility { + private int amount; + + public SoulshiftAbility(int amount) { + super(new ReturnToHandTargetEffect()); + FilterCard filter = new FilterCard(); + filter.setConvertedManaCost(amount + 1); + filter.setConvertedManaCostComparison(Filter.ComparisonType.LessThan); + filter.getSubtype().add("Spirit"); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + this.addTarget(new TargetCardInYourGraveyard(filter)); + this.amount = amount; + } + + public SoulshiftAbility(final SoulshiftAbility ability) { + super(ability); + this.amount = ability.amount; + } + + @Override + public PutIntoGraveFromBattlefieldTriggeredAbility copy() { + return new SoulshiftAbility(this); + } + + @Override + public String getRule() { + return "Soulshift " + amount; + } +} diff --git a/Utils/gen-card.pl b/Utils/gen-card.pl index 65c6666edd..f2000e191d 100755 --- a/Utils/gen-card.pl +++ b/Utils/gen-card.pl @@ -92,6 +92,7 @@ $fulltoshort{'Planar Chaos'} = 'PLC'; $fulltoshort{'Planeshift'} = 'PLS'; $fulltoshort{'Portal'} = 'POR'; $fulltoshort{'Portal Three Kingdoms'} = 'PTK'; +$fulltoshort{'Premium Deck Series: Fire and Lightning'} = 'PD2'; $fulltoshort{'Premium Deck Series: Slivers'} = 'PDS'; $fulltoshort{'Ravnica: City of Guilds'} = 'RAV'; $fulltoshort{'Rise of the Eldrazi'} = 'ROE'; @@ -214,6 +215,7 @@ $wizardstous{'DDF'} = 'DDF'; $wizardstous{'MBS'} = 'MBS'; $wizardstous{'NPH'} = 'NPH'; $wizardstous{'CMD'} = 'CMD'; +$wizardstous{'PD2'} = 'PD2'; my %knownSets; $knownSets{'ARB'} = 'alarareborn';