From 68d8c5dcc2689428922a9c1d3c18122cc2ec0dc8 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 28 Jun 2011 20:36:32 +0300 Subject: [PATCH] CHK --- .../championsofkamigawa/AkkiAvalanchers.java | 79 +++++++++ .../championsofkamigawa/AkkiRockspeaker.java | 95 +++++++++++ .../championsofkamigawa/AkkiUnderminer.java | 111 +++++++++++++ .../championsofkamigawa/AshenSkinZubera.java | 153 ++++++++++++++++++ .../championsofkamigawa/AuraofDominion.java | 120 ++++++++++++++ .../AzamiLadyofScrolls.java | 82 ++++++++++ .../AzusaLostbutSeeking.java | 68 ++++++++ .../championsofkamigawa/BattleMadRonin.java | 66 ++++++++ .../championsofkamigawa/BenBenAkkiHermit.java | 86 ++++++++++ .../championsofkamigawa/BlindwithAnger.java | 80 +++++++++ .../sets/championsofkamigawa/BloodRites.java | 68 ++++++++ .../sets/championsofkamigawa/CageofHands.java | 123 ++++++++++++++ .../sets/championsofkamigawa/Earthshaker.java | 78 +++++++++ .../championsofkamigawa/EmberFistZubera.java | 145 +++++++++++++++++ .../sets/championsofkamigawa/RendFlesh.java | 74 +++++++++ .../championsofkamigawa/StrengthofCedars.java | 75 +++++++++ .../dynamicvalue/common/CountersCount.java | 2 +- .../common/SignInversionDynamicValue.java | 37 +++++ .../effects/common/SacrificeEffect.java | 2 +- .../abilities/keyword/BushidoAbility.java | 35 ++++ Mage/src/mage/counters/CounterType.java | 5 +- .../mage/counters/common/DevotionCounter.java | 16 ++ 22 files changed, 1597 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AkkiAvalanchers.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AkkiUnderminer.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AshenSkinZubera.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AuraofDominion.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AzamiLadyofScrolls.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/AzusaLostbutSeeking.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/BattleMadRonin.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/BlindwithAnger.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/BloodRites.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/CageofHands.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/Earthshaker.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/EmberFistZubera.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/RendFlesh.java create mode 100644 Mage.Sets/src/mage/sets/championsofkamigawa/StrengthofCedars.java create mode 100644 Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java create mode 100644 Mage/src/mage/abilities/keyword/BushidoAbility.java create mode 100644 Mage/src/mage/counters/common/DevotionCounter.java diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiAvalanchers.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiAvalanchers.java new file mode 100644 index 0000000000..3c8df4a507 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiAvalanchers.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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ActivateOncePerTurnActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * @author Loki + */ +public class AkkiAvalanchers extends CardImpl { + + private final static FilterControlledPermanent filter = new FilterControlledPermanent("a land"); + + static { + filter.getCardType().add(CardType.LAND); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + public AkkiAvalanchers(UUID ownerId) { + super(ownerId, 151, "Akki Avalanchers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Goblin"); + this.subtype.add("Warrior"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + Ability ability = new ActivateOncePerTurnActivatedAbility(Constants.Zone.BATTLEFIELD, new BoostSourceEffect(2, 0, Constants.Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(filter))); + this.addAbility(ability); + } + + public AkkiAvalanchers(final AkkiAvalanchers card) { + super(card); + } + + @Override + public AkkiAvalanchers copy() { + return new AkkiAvalanchers(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java new file mode 100644 index 0000000000..2e643de675 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiRockspeaker.java @@ -0,0 +1,95 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author Loki + */ +public class AkkiRockspeaker extends CardImpl { + + public AkkiRockspeaker (UUID ownerId) { + super(ownerId, 154, "Akki Rockspeaker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new EntersBattlefieldAbility(new AkkiRockspeakerEffect(), "add {R} to your mana pool")); + } + + public AkkiRockspeaker (final AkkiRockspeaker card) { + super(card); + } + + @Override + public AkkiRockspeaker copy() { + return new AkkiRockspeaker(this); + } +} + +class AkkiRockspeakerEffect extends OneShotEffect { + AkkiRockspeakerEffect() { + super(Constants.Outcome.PutManaInPool); + } + + AkkiRockspeakerEffect(final AkkiRockspeakerEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.getManaPool().changeMana(Mana.RedMana); + return true; + } + return false; + } + + @Override + public AkkiRockspeakerEffect copy() { + return new AkkiRockspeakerEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiUnderminer.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiUnderminer.java new file mode 100644 index 0000000000..df9e31b67d --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AkkiUnderminer.java @@ -0,0 +1,111 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.SacrificeEffect; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Loki + */ +public class AkkiUnderminer extends CardImpl { + + public AkkiUnderminer (UUID ownerId) { + super(ownerId, 155, "Akki Underminer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Goblin"); + this.subtype.add("Rogue"); + this.subtype.add("Shaman"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new AkkiUnderminerAbility()); + } + + public AkkiUnderminer (final AkkiUnderminer card) { + super(card); + } + + @Override + public AkkiUnderminer copy() { + return new AkkiUnderminer(this); + } + +} + +class AkkiUnderminerAbility extends TriggeredAbilityImpl { + + public AkkiUnderminerAbility() { + super(Constants.Zone.BATTLEFIELD, new SacrificeEffect(new FilterPermanent(), 1, "")); + } + + public AkkiUnderminerAbility(final AkkiUnderminerAbility ability) { + super(ability); + } + + @Override + public AkkiUnderminerAbility copy() { + return new AkkiUnderminerAbility(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())) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(event.getPlayerId())); + } + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever Akki Underminer deals combat damage to a player, that player sacrifices a permanent."; + } +} + + diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AshenSkinZubera.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AshenSkinZubera.java new file mode 100644 index 0000000000..1c59f677e5 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AshenSkinZubera.java @@ -0,0 +1,153 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.players.Player; +import mage.target.common.TargetOpponent; +import mage.watchers.Watcher; +import mage.watchers.WatcherImpl; + +/** + * @author Loki + */ +public class AshenSkinZubera extends CardImpl { + + public AshenSkinZubera(UUID ownerId) { + super(ownerId, 101, "Ashen-Skin Zubera", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Zubera"); + this.subtype.add("Spirit"); + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + Ability ability = new PutIntoGraveFromBattlefieldTriggeredAbility(new AshenSkinZuberaEffect()); + ability.addTarget(new TargetOpponent()); + this.addAbility(ability); + this.watchers.add(new AshenSkinZuberaWatcher(ownerId)); + } + + public AshenSkinZubera(final AshenSkinZubera card) { + super(card); + } + + @Override + public AshenSkinZubera copy() { + return new AshenSkinZubera(this); + } + +} + +class AshenSkinZuberaWatcher extends WatcherImpl { + + public int zuberasDiedThisTurn = 0; + + public AshenSkinZuberaWatcher(UUID controllerId) { + super("ZuberasDiedAshenSkinZubera", controllerId); + } + + public AshenSkinZuberaWatcher(final AshenSkinZuberaWatcher watcher) { + super(watcher); + } + + @Override + public AshenSkinZuberaWatcher copy() { + return new AshenSkinZuberaWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + if (((ZoneChangeEvent) event).getFromZone() == Constants.Zone.BATTLEFIELD && + ((ZoneChangeEvent) event).getToZone() == Constants.Zone.GRAVEYARD) { + Card card = game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD); + if (card != null && card.getSubtype().contains("Zubera")) { + zuberasDiedThisTurn++; + } + } + } + } + + @Override + public void reset() { + super.reset(); + zuberasDiedThisTurn = 0; + } + +} + +class AshenSkinZuberaEffect extends OneShotEffect { + + public AshenSkinZuberaEffect() { + super(Constants.Outcome.Discard); + } + + public AshenSkinZuberaEffect(final AshenSkinZuberaEffect effect) { + super(effect); + } + + @Override + public AshenSkinZuberaEffect copy() { + return new AshenSkinZuberaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Watcher watcher = game.getState().getWatchers().get(source.getControllerId(), "ZuberasDiedAshenSkinZubera"); + Player player = game.getPlayer(targetPointer.getFirst(source)); + if (player != null && watcher != null) { + int amount = ((AshenSkinZuberaWatcher) watcher).zuberasDiedThisTurn; + if (amount > 0) { + player.discard(amount, source, game); + return true; + } + } + return false; + } + + @Override + public String getText(Ability source) { + return "target opponent discards a card for each Zubera put into a graveyard from the battlefield this turn"; + } +} + + diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AuraofDominion.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AuraofDominion.java new file mode 100644 index 0000000000..81c9e5ecd4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AuraofDominion.java @@ -0,0 +1,120 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * @author Loki + */ +public class AuraofDominion extends CardImpl { + + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control"); + + static { + filter.setTapped(false); + filter.setUseTapped(true); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + + public AuraofDominion(UUID ownerId) { + super(ownerId, 51, "Aura of Dominion", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Aura"); + this.color.setBlue(true); + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.Untap)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new AuraofDominionEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)))); + } + + public AuraofDominion(final AuraofDominion card) { + super(card); + } + + @Override + public AuraofDominion copy() { + return new AuraofDominion(this); + } + +} + +class AuraofDominionEffect extends OneShotEffect { + AuraofDominionEffect() { + super(Constants.Outcome.Untap); + } + + AuraofDominionEffect(final AuraofDominionEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + Permanent attach = game.getPermanent(permanent.getAttachedTo()); + if (attach != null) { + attach.untap(game); + return true; + } + } + return false; + } + + @Override + public AuraofDominionEffect copy() { + return new AuraofDominionEffect(this); + } + + @Override + public String getText(Ability source) { + return "untap enchanted creature"; + } +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AzamiLadyofScrolls.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AzamiLadyofScrolls.java new file mode 100644 index 0000000000..8d7c3215e3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AzamiLadyofScrolls.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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Loki + */ +public class AzamiLadyofScrolls extends CardImpl { + + private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped wizard you control"); + + static { + filter.setTapped(false); + filter.setUseTapped(true); + filter.getSubtype().add("Wizard"); + filter.setScopeCardType(Filter.ComparisonScope.Any); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public AzamiLadyofScrolls (UUID ownerId) { + super(ownerId, 52, "Azami, Lady of Scrolls", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}{U}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.color.setBlue(true); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DrawCardControllerEffect(1), new TapTargetCost(new TargetControlledPermanent(1, 1, filter, false)))); + } + + public AzamiLadyofScrolls (final AzamiLadyofScrolls card) { + super(card); + } + + @Override + public AzamiLadyofScrolls copy() { + return new AzamiLadyofScrolls(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/AzusaLostbutSeeking.java b/Mage.Sets/src/mage/sets/championsofkamigawa/AzusaLostbutSeeking.java new file mode 100644 index 0000000000..85467fe56c --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/AzusaLostbutSeeking.java @@ -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.sets.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.PlayAdditionalLandsControllerEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class AzusaLostbutSeeking extends CardImpl { + + public AzusaLostbutSeeking (UUID ownerId) { + super(ownerId, 201, "Azusa, Lost but Seeking", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Human"); + this.subtype.add("Monk"); + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new PlayAdditionalLandsControllerEffect(2, Constants.Duration.WhileOnBattlefield))); + } + + public AzusaLostbutSeeking (final AzusaLostbutSeeking card) { + super(card); + } + + @Override + public AzusaLostbutSeeking copy() { + return new AzusaLostbutSeeking(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BattleMadRonin.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BattleMadRonin.java new file mode 100644 index 0000000000..0f88df6a47 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BattleMadRonin.java @@ -0,0 +1,66 @@ +/* + * 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.common.AttacksEachTurnStaticAbility; +import mage.abilities.keyword.BushidoAbility; +import mage.cards.CardImpl; + +/** + * + * @author loki + */ +public class BattleMadRonin extends CardImpl { + + public BattleMadRonin (UUID ownerId) { + super(ownerId, 156, "Battle-Mad Ronin", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Human"); + this.subtype.add("Samurai"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + this.addAbility(new BushidoAbility(2)); + this.addAbility(new AttacksEachTurnStaticAbility()); + } + + public BattleMadRonin (final BattleMadRonin card) { + super(card); + } + + @Override + public BattleMadRonin copy() { + return new BattleMadRonin(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java new file mode 100644 index 0000000000..6dbf53a9d1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BenBenAkkiHermit.java @@ -0,0 +1,86 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterLandPermanent; +import mage.target.common.TargetAttackingCreature; + +/** + * + * @author Loki + */ +public class BenBenAkkiHermit extends CardImpl { + + private final static FilterLandPermanent filter = new FilterLandPermanent("untapped Mountain you control"); + + static { + filter.setTapped(false); + filter.setUseTapped(true); + filter.getSubtype().add("Mountain"); + filter.setScopeCardType(Filter.ComparisonScope.Any); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public BenBenAkkiHermit (UUID ownerId) { + super(ownerId, 157, "Ben-Ben, Akki Hermit", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); + this.expansionSetCode = "CHK"; + this.supertype.add("Legendary"); + this.subtype.add("Goblin"); + this.subtype.add("Shaman"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter), true), new TapSourceCost()); + ability.addTarget(new TargetAttackingCreature()); + this.addAbility(ability); + } + + public BenBenAkkiHermit (final BenBenAkkiHermit card) { + super(card); + } + + @Override + public BenBenAkkiHermit copy() { + return new BenBenAkkiHermit(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BlindwithAnger.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BlindwithAnger.java new file mode 100644 index 0000000000..a3f8b95932 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BlindwithAnger.java @@ -0,0 +1,80 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +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.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * @author Loki + */ +public class BlindwithAnger extends CardImpl { + + private final static FilterCreaturePermanent filter = new FilterCreaturePermanent("nonlegendary creature"); + + static { + filter.getSupertype().add("Legendary"); + filter.setNotSupertype(true); + filter.setScopeSupertype(Filter.ComparisonScope.Any); + } + + public BlindwithAnger(UUID ownerId) { + super(ownerId, 158, "Blind with Anger", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{3}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + this.color.setRed(true); + this.getSpellAbility().addEffect(new UntapTargetEffect()); + this.getSpellAbility().addEffect(new GainControlTargetEffect(Constants.Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Constants.Duration.EndOfTurn)); + Target target = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(target); + } + + public BlindwithAnger(final BlindwithAnger card) { + super(card); + } + + @Override + public BlindwithAnger copy() { + return new BlindwithAnger(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/BloodRites.java b/Mage.Sets/src/mage/sets/championsofkamigawa/BloodRites.java new file mode 100644 index 0000000000..400d5e2579 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/BloodRites.java @@ -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.sets.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * @author Loki + */ +public class BloodRites extends CardImpl { + public BloodRites(UUID ownerId) { + super(ownerId, 159, "Blood Rites", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); + this.expansionSetCode = "CHK"; + this.color.setRed(true); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public BloodRites(final BloodRites card) { + super(card); + } + + @Override + public BloodRites copy() { + return new BloodRites(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/CageofHands.java b/Mage.Sets/src/mage/sets/championsofkamigawa/CageofHands.java new file mode 100644 index 0000000000..19d1447e57 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/CageofHands.java @@ -0,0 +1,123 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.RestrictionEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CantAttackSourceEffect; +import mage.abilities.effects.common.CantBlockSourceEffect; +import mage.abilities.effects.common.ReturnToHandSourceEffect; +import mage.abilities.effects.common.continious.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class CageofHands extends CardImpl { + + public CageofHands (UUID ownerId) { + super(ownerId, 3, "Cage of Hands", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Aura"); + this.color.setWhite(true); + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.Neutral)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new CageofHandsEffect())); + this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{W}"))); + } + + public CageofHands (final CageofHands card) { + super(card); + } + + @Override + public CageofHands copy() { + return new CageofHands(this); + } +} + +class CageofHandsEffect extends RestrictionEffect { + + public CageofHandsEffect() { + super(Constants.Duration.WhileOnBattlefield); + } + + public CageofHandsEffect(final CageofHandsEffect effect) { + super(effect); + } + + @Override + public boolean applies(Permanent permanent, Ability source, Game game) { + if (permanent.getAttachments().contains((source.getSourceId()))) { + return true; + } + return false; + } + + @Override + public boolean canAttack(Game game) { + return false; + } + + @Override + public boolean canBlock(Permanent attacker, Permanent blocker, Game game) { + return false; + } + + @Override + public CageofHandsEffect copy() { + return new CageofHandsEffect(this); + } + + @Override + public String getText(Ability source) { + return "Enchanted creature can't attack or block"; + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Earthshaker.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Earthshaker.java new file mode 100644 index 0000000000..233cfdad74 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Earthshaker.java @@ -0,0 +1,78 @@ +/* + * 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.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.FilterCard; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * @author Loki + */ +public class Earthshaker extends CardImpl { + + private final static FilterCard filter = new FilterCard("spirit of arcane spell"); + + static { + filter.getSubtype().add("Spirit"); + filter.getSubtype().add("Arcane"); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public Earthshaker(UUID ownerId) { + super(ownerId, 165, "Earthshaker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Spirit"); + this.color.setRed(true); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + Ability ability = new SpellCastTriggeredAbility(new DamageTargetEffect(2), filter, false); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + } + + public Earthshaker(final Earthshaker card) { + super(card); + } + + @Override + public Earthshaker copy() { + return new Earthshaker(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/EmberFistZubera.java b/Mage.Sets/src/mage/sets/championsofkamigawa/EmberFistZubera.java new file mode 100644 index 0000000000..02c58421e8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/EmberFistZubera.java @@ -0,0 +1,145 @@ +/* + * 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.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.PutIntoGraveFromBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; +import mage.watchers.Watcher; +import mage.watchers.WatcherImpl; + +/** + * + * @author + */ +public class EmberFistZubera extends CardImpl { + + public EmberFistZubera (UUID ownerId) { + super(ownerId, 166, "Ember-Fist Zubera", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Zubera"); + this.subtype.add("Spirit"); + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + Ability ability = new PutIntoGraveFromBattlefieldTriggeredAbility(new DamageTargetEffect(new ZuberaDynamicValue())); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + this.watchers.add(new EmberFistZuberaWatcher(ownerId)); + } + + public EmberFistZubera (final EmberFistZubera card) { + super(card); + } + + @Override + public EmberFistZubera copy() { + return new EmberFistZubera(this); + } + +} + +class EmberFistZuberaWatcher extends WatcherImpl { + + public int zuberasDiedThisTurn = 0; + + public EmberFistZuberaWatcher(UUID controllerId) { + super("ZuberasDiedEmberFistZubera", controllerId); + } + + public EmberFistZuberaWatcher(final EmberFistZuberaWatcher watcher) { + super(watcher); + } + + @Override + public EmberFistZuberaWatcher copy() { + return new EmberFistZuberaWatcher(this); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE) { + if (((ZoneChangeEvent) event).getFromZone() == Constants.Zone.BATTLEFIELD && + ((ZoneChangeEvent) event).getToZone() == Constants.Zone.GRAVEYARD) { + Card card = game.getLastKnownInformation(event.getTargetId(), Constants.Zone.BATTLEFIELD); + if (card != null && card.getSubtype().contains("Zubera")) { + zuberasDiedThisTurn++; + } + } + } + } + + @Override + public void reset() { + super.reset(); + zuberasDiedThisTurn = 0; + } + +} + +class ZuberaDynamicValue implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility) { + Watcher watcher = game.getState().getWatchers().get(sourceAbility.getControllerId(), "ZuberasDiedEmberFistZubera"); + return ((EmberFistZuberaWatcher) watcher).zuberasDiedThisTurn; + } + + @Override + public DynamicValue clone() { + return new ZuberaDynamicValue(); + } + + @Override + public String toString() { + return "1"; + } + + @Override + public String getMessage() { + return "Zubera put into all graveyards from the battlefield this turn"; + } +} + diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/RendFlesh.java b/Mage.Sets/src/mage/sets/championsofkamigawa/RendFlesh.java new file mode 100644 index 0000000000..2324cf9439 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/RendFlesh.java @@ -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.championsofkamigawa; + +import java.util.UUID; + +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.Target; +import mage.target.common.TargetCreaturePermanent; + +/** + * @author Loki + */ +public class RendFlesh extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Non-Spirit"); + + static { + filter.getSubtype().add("Spirit"); + filter.setNotSubtype(true); + filter.setScopeSubtype(Filter.ComparisonScope.Any); + } + + public RendFlesh(UUID ownerId) { + super(ownerId, 140, "Rend Flesh", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + this.color.setBlack(true); + Target target = new TargetCreaturePermanent(filter); + this.getSpellAbility().addTarget(target); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + } + + public RendFlesh(final RendFlesh card) { + super(card); + } + + @Override + public RendFlesh copy() { + return new RendFlesh(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/StrengthofCedars.java b/Mage.Sets/src/mage/sets/championsofkamigawa/StrengthofCedars.java new file mode 100644 index 0000000000..4ba61b1474 --- /dev/null +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/StrengthofCedars.java @@ -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; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.filter.Filter; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterLandPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Loki + */ +public class StrengthofCedars extends CardImpl { + private final static FilterControlledPermanent filter = new FilterControlledPermanent("land your control"); + + static { + filter.getCardType().add(CardType.LAND); + filter.setScopeCardType(Filter.ComparisonScope.Any); + } + + public StrengthofCedars (UUID ownerId) { + super(ownerId, 245, "Strength of Cedars", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{4}{G}"); + this.expansionSetCode = "CHK"; + this.subtype.add("Arcane"); + this.color.setGreen(true); + this.getSpellAbility().addEffect(new BoostTargetEffect(new PermanentsOnBattlefieldCount(filter), + new PermanentsOnBattlefieldCount(filter), Constants.Duration.EndOfTurn)); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + public StrengthofCedars (final StrengthofCedars card) { + super(card); + } + + @Override + public StrengthofCedars copy() { + return new StrengthofCedars(this); + } + +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java b/Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java index 80cb3b824b..b68b9b239d 100644 --- a/Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java +++ b/Mage/src/mage/abilities/dynamicvalue/common/CountersCount.java @@ -43,6 +43,6 @@ public class CountersCount implements DynamicValue { @Override public String getMessage() { - return counter.getName() + " on {this}"; + return counter.getName() + " counter on {this}"; } } diff --git a/Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java b/Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java new file mode 100644 index 0000000000..505d831c5b --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/SignInversionDynamicValue.java @@ -0,0 +1,37 @@ +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.game.Game; + +public class SignInversionDynamicValue implements DynamicValue { + private DynamicValue value; + + public SignInversionDynamicValue(DynamicValue value) { + this.value = value.clone(); + } + + SignInversionDynamicValue(final SignInversionDynamicValue dynamicValue) { + this.value = dynamicValue.value.clone(); + } + + @Override + public int calculate(Game game, Ability sourceAbility) { + return -1 * value.calculate(game, sourceAbility); + } + + @Override + public DynamicValue clone() { + return new SignInversionDynamicValue(this); + } + + @Override + public String toString() { + return "-" + value.toString(); + } + + @Override + public String getMessage() { + return value.getMessage(); + } +} diff --git a/Mage/src/mage/abilities/effects/common/SacrificeEffect.java b/Mage/src/mage/abilities/effects/common/SacrificeEffect.java index 8638c24fbb..751ff36259 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeEffect.java +++ b/Mage/src/mage/abilities/effects/common/SacrificeEffect.java @@ -65,7 +65,7 @@ public class SacrificeEffect extends OneShotEffect{ @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getTargets().getFirstTarget()); + Player player = game.getPlayer(targetPointer.getFirst(source)); filter.setTargetController(TargetController.YOU); Target target = new TargetControlledPermanent(count, count, filter, false); diff --git a/Mage/src/mage/abilities/keyword/BushidoAbility.java b/Mage/src/mage/abilities/keyword/BushidoAbility.java new file mode 100644 index 0000000000..8553232136 --- /dev/null +++ b/Mage/src/mage/abilities/keyword/BushidoAbility.java @@ -0,0 +1,35 @@ +package mage.abilities.keyword; + +import mage.Constants; +import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility; +import mage.abilities.effects.common.continious.BoostSourceEffect; +import mage.game.Game; +import mage.game.events.GameEvent; + +public class BushidoAbility extends BlocksOrBecomesBlockedTriggeredAbility { + private int value; + + public BushidoAbility(int value) { + super(new BoostSourceEffect(value, value, Constants.Duration.EndOfTurn), false); + this.value = value; + } + + public BushidoAbility(final BushidoAbility ability) { + super(ability); + this.value = ability.value; + } + + @Override + public BushidoAbility copy() { + return new BushidoAbility(this); + } + + public int getValue() { + return value; + } + + @Override + public String getRule() { + return "Bushido " + value; + } +} diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 2e1909c1a0..57c75fc965 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -48,7 +48,8 @@ public enum CounterType { QUEST(new QuestCounter().name), ARROWHEAD(new ArrowheadCounter().name), EON(new EonCounter().name), - AWAKENING(new AwakeningCounter().name); + AWAKENING(new AwakeningCounter().name), + DEVOTION(new DevotionCounter().name); private String name; @@ -108,6 +109,8 @@ public enum CounterType { return new EonCounter(amount); case AWAKENING: return new AwakeningCounter(amount); + case DEVOTION: + return new DevotionCounter(amount); } return null; } diff --git a/Mage/src/mage/counters/common/DevotionCounter.java b/Mage/src/mage/counters/common/DevotionCounter.java new file mode 100644 index 0000000000..52fe16f550 --- /dev/null +++ b/Mage/src/mage/counters/common/DevotionCounter.java @@ -0,0 +1,16 @@ +package mage.counters.common; + +import mage.counters.Counter; + +public class DevotionCounter extends Counter { + + public DevotionCounter() { + super("Devotion"); + this.count = 1; + } + + public DevotionCounter(int amount) { + super("Devotion"); + this.count = amount; + } +} \ No newline at end of file