From c4d8f97061e6f4f7555b4638cf940338ee61a359 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Fri, 23 Aug 2013 21:34:05 -0400 Subject: [PATCH 01/31] Create AvenArcher.java --- .../src/mage/sets/odyssey/AvenArcher.java | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AvenArcher.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java new file mode 100644 index 00000000000..aa2947cc934 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.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.odyssey; + +import mage.constants.CardType; +import mage.MageInt; +import mage.constants.Rarity; +import mage.abilities.common.SimpleActivatedAbility; +import mage.cards.CardImpl; +import mage.constants.Zone; +import mage.abilities.Ability; +import mage.abilities.cost.common.TapSourceCost; +import mage.target.common.TargetAttackingOrBlockingCreature; +import mage.abilites.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; + + +import java.util.UUID; + + +public class AvenArcher extends CardImpl { + + public AvenArcher(ownerID UUID){ + super(ownerID, 6, "Aven Archer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.ExpansionSetCode = "ODY"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.color.setWhite(true); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Has {T}, Pay 2W: Aven Archer deals 2 damage to target attacking or blocking creature. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), "{2}{W}"); + ability.addCost = new TapSourceCost(); + ability.addTarget(TargetAttackingOrBlockingCreature()); + this.addAbility(ability); + } + + public AvenArcher(final AvenArcher card){ + super(card); + } + + @Override + public AvenArcher copy(){ + return new AvenArcher(this); + } + + + } From ea85b86308194e93defac51459d254fe668ab254 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sat, 24 Aug 2013 00:12:26 -0400 Subject: [PATCH 02/31] Create AvenShrine.java --- .../src/mage/sets/odyssey/AvenShrine.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AvenShrine.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java new file mode 100644 index 00000000000..053ea1bd74a --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java @@ -0,0 +1,60 @@ +package mage.sets.odyssey + +import mage.card.CardImpl; +import + + +import java.util.UUID + +public class AvenShrine extends CardImpl { + + public AvenShrine(ownerID UUID){ + super(ownerID, 9, "Aven Shrine", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.ExpansionSetCode = "ODY"; + + // Whenever a player casts a spell, that player gains X life, + // where X is the number of cards in all graveyards with the same name as that spell. + + this.addAbility = new(AvenShrineAbility()); + + } + + public AvenShrine(final AngelShrine card) { + super(card); + } + + @Override + public AvenShrine copy() { + return new AvenShrine(this); + } + + } + +public class AvenShrineAbility extends TriggeredAbilityImpl { + + + public AvenShrineAbility(){ + super(Zone.BATTLEFILED, new GainLifeEffect(new CardsInAllGraveyardCount(filter)), true); + } + + public AvenShrineAbility(final AvenShrineAbility ability) { + super(ability); + } + + @Override + public AvenShrineAbility copy() { + return new AngelsFeatherAbility(this); + } + + // I don't know if you can use the filter before it is declared nor if the code as written will correctly count + // all of the cards with the same name as the spell just cast that are in all graveyards. + public boolean checkTrigger(GameEvent event, Game game) { + if (event.GetType == EventType.SPELL_CAST) { + String cardName = game.getStack().getSpell(event.getName()); + FilterCard filter = FilterCard(cardName); + if (CardsInAllGraveyardCount(filter) != 0) { + return true; + } + } + return false; + } From 3ddd07548170e1b1bd521b5b664b663c5b3be2f8 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sat, 24 Aug 2013 02:10:37 -0400 Subject: [PATCH 03/31] Create Oppression.java --- .../mage/sets/seventhedition/Oppression.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/seventhedition/Oppression.java diff --git a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java new file mode 100644 index 00000000000..06e9ecb64f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java @@ -0,0 +1,33 @@ +package mage.sets.seventh + +import mage.abilities.Ability; +import mage.abilities.common.SimpleTriggeredAbility; +import mage.card.CardImpl; +import mage.constants.Rarity; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.abilities.effects.common.DiscardControllerEffect; + +import java.util.UUID + +public class Oppression extends CardImpl { + + public Oppression(ownerID UUID) { + super(ownerID, 152, "Oppression", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); + this.ExpansionSetCode = "7ED" + Ability ability = SimpleTriggeredAbility(Zone.BATTLEFIELD, eventType.CAST_SPELL, new Effect DiscardControllerEffect(1), false); + this.addAbility(ability); + } + + public Oppression(final Oppression card) + super(card); + } + + @Override + public Oppression copy() { + return new Oppression(this); + } + + } From c5c1253905ab4695f01f0e7224510a969922c66a Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sat, 24 Aug 2013 23:52:31 -0400 Subject: [PATCH 04/31] Create AegisOfHonor.java --- .../src/mage/sets/odyssey/AegisOfHonor.java | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java b/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java new file mode 100644 index 00000000000..ad1122d0207 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java @@ -0,0 +1,110 @@ +/* + * 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.odyssey; + +import mage.constants.CardType; +import mage.target.TargetSource; +import mage.abilities.effects.RedirectionEffect; +import mage.constants.Rarity; +import mage.cards.CardImpl; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.costs.mana.ManaCostImpl; +import mage.abilities.common.SimpleActivatedAbility; + +import java.util.UUID; + + +public class AegisOfHonor extends CardImpl{ + + public AegisOfHonor(ownerId UUID){ + super(ownerId, 1, "Aegis of Honor", Rarity.RARE, new CardType[]{Cardtype.ENCHANTMENT}, "{W}"); + this.ExpansionSetCode = "ODY"; + + this.color.setWhite(true); + + // {1} The next time The next time an instant or sorcery spell would deal damage to you this + //turn, that spell deals that damage to its controller instead. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AegisOfHonorEffect(), ManaCostsImpl("1"))); + + + } + public AegisOfHonor(final AegisOfHonor card) { + super(card); + } + + @Override + public AegisOfHonor copy() { + return new AegisOfHonor(this); + +} + +} + class AegisOfHonorEffect extends RedirectionEffect { + + + + public AegisOfHonorEffect() { + super(Duration.EndOfTurn); + staticText = "The next time The next time an instant or sorcery spell would deal " + + "damage to you this turn, that spell deals that damage to its controller " + + "instead."; + } + + + @Override + public AegisOfHonorEffect copy() { + return new AegisOfHonorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER) //Checks for player damage + && event.getTargetID().equals(source.getControllerID()) //Checks to see the damage is to Aven Shrine's controller + { + Card sourceCard = game.getCard(event.getSourceID()); + if (sourceCard != null && (sourceCard.getCardType().contains(CardType.INSTANT) || sourceCard.getCardType().containts(CardType.SORCERY))); { + //Checks if damage is from a sorcery or instants + return true; + } + return true; + } + return false; + } + + } From 6bcda61c4f1796567ec056ebd089a4b850a10c61 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 00:52:37 -0400 Subject: [PATCH 05/31] Create AncestralTribute.java --- .../mage/sets/odyssey/AncestralTribute.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java b/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java new file mode 100644 index 00000000000..ba90d77f1c1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.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.odyssey; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.constants.TimingRule; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.common.GainLifeEffect; + +import java.util.UUID; + +public class AncestralTribute extends CardImpl { + + public AncestralTribute(ownerID UUID) { + super(ownerID, 2, "Ancestral Tribute", Rarity.RARE, CardType[](CardType.SORCERY), "{5}{W}{W}"); + this.expansionCode = "ODY"; + + this.Color.setWhite(true); + DynamicValue value = new CardsInControllerGraveyardCount(); + this.getSpellAbility().addEffect(new GainLifeEffect(value.calculate(game, source) * 2)); + this.addAbility(FlashbackAbility("{9}{W}{W}{W}", TimingRule.SORCERY)); +} + +public AncestralTribute(final AncestralTribute card){ + super(card); +} + +@Override +public AncestralTribute copy() { + return new AncestralTribute(this); +} + +} From a31a92995b964d78802fbde4be1a6ff34f2c4ae7 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 01:13:12 -0400 Subject: [PATCH 06/31] Create AnimalBoneyard.java --- .../src/mage/sets/odyssey/AnimalBoneyard.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java new file mode 100644 index 00000000000..41172c14958 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java @@ -0,0 +1,77 @@ +/* + * 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.odyssey; + +import mage.cards.CardImpl; +import mage.constants.Rarity; +import mage.constants.CardType; +import mage.target.common.TargetLandPermanent; +import mage.dynamicvalue.common.SacrificeCostCreaturesToughness; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.TargetPermanent; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.Ability; +import mage.constants.Outcome; + +import java.util.UUID; + +public class AnimalBoneyard extends CardImpl { + + public AnimalBoneyard(ownerID UUID) { + super(ownerID, 4, "Animal Boneyard", Rarity.UNCOMMON, CardType[](CardType.ENCHANTMENT), "{2}{W}" ); + + this.ExpansionSetCode = "ODY"; + this.color.setWhite(true); + this.subtype.add("Aura"); + + // Enchant Land + TargetPermanent auraTarget = new TargetLandPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted Land has "{tap}: Sacrifice a creature: You gain life equal to its toughness." + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new SacrificeCostCreaturesToughness()), new SacrificeTargetCost(TargetControlledCreaturePermanent())); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); + gainedAbility.addCost(new TapSourceCost()); + } + +public AnimalBoneyard(final AnimalBoneyard card){ + super(card); +} + +@Override +public AnimalBoneyard copy() { + return new AnimalBoneyard(this); +} +} From 2b030366dafd79861790683e01bb43c7c4a57429 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 01:58:06 -0400 Subject: [PATCH 07/31] Update AvenShrine.java --- .../src/mage/sets/odyssey/AvenShrine.java | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java index 053ea1bd74a..ec211a1527d 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java +++ b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java @@ -1,7 +1,12 @@ package mage.sets.odyssey import mage.card.CardImpl; -import +import mage.constants.Rarity; +import mage.constants.CardType; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.GainLifeTriggeredEffect; + + import java.util.UUID @@ -11,11 +16,12 @@ public class AvenShrine extends CardImpl { public AvenShrine(ownerID UUID){ super(ownerID, 9, "Aven Shrine", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); this.ExpansionSetCode = "ODY"; + this.color.setWhite(true); // Whenever a player casts a spell, that player gains X life, // where X is the number of cards in all graveyards with the same name as that spell. - this.addAbility = new(AvenShrineAbility()); + this.addAbility = new AvenShrineAbility() ; } @@ -34,7 +40,7 @@ public class AvenShrineAbility extends TriggeredAbilityImpl { public AvenShrineAbility(){ - super(Zone.BATTLEFILED, new GainLifeEffect(new CardsInAllGraveyardCount(filter)), true); + super(Zone.BATTLEFIELD, new GainLifeTargetEffect(new CardsInAllGraveyardCount(filter)), false); } public AvenShrineAbility(final AvenShrineAbility ability) { @@ -46,15 +52,24 @@ public class AvenShrineAbility extends TriggeredAbilityImpl { return new AngelsFeatherAbility(this); } - // I don't know if you can use the filter before it is declared nor if the code as written will correctly count - // all of the cards with the same name as the spell just cast that are in all graveyards. + public boolean checkTrigger(GameEvent event, Game game) { if (event.GetType == EventType.SPELL_CAST) { + Spell spell = game.getStack().getSpell(event.getTargetID()) String cardName = game.getStack().getSpell(event.getName()); FilterCard filter = FilterCard(cardName); - if (CardsInAllGraveyardCount(filter) != 0) { - return true; + if (CardsInAllGraveyardCount(filter) != 0) { + if (spell != null) { + for (Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(spell.getControllerId())); + } + return true; } + } + return true; } return false; } +} + + From 2c1d0fc48effd72ffb692293cf633705bc61f6cd Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 02:01:56 -0400 Subject: [PATCH 08/31] Update Oppression.java --- Mage.Sets/src/mage/sets/seventhedition/Oppression.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java index 06e9ecb64f2..07c7ee46915 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java +++ b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java @@ -17,7 +17,7 @@ public class Oppression extends CardImpl { public Oppression(ownerID UUID) { super(ownerID, 152, "Oppression", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); this.ExpansionSetCode = "7ED" - Ability ability = SimpleTriggeredAbility(Zone.BATTLEFIELD, eventType.CAST_SPELL, new Effect DiscardControllerEffect(1), false); + Ability ability = SimpleTriggeredAbility(Zone.BATTLEFIELD, eventType.CAST_SPELL, new DiscardControllerEffect(1), false); this.addAbility(ability); } From 13e1056d91958fbef08ce06f22fa193d4efbe783 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 02:07:48 -0400 Subject: [PATCH 09/31] Update Oppression.java --- Mage.Sets/src/mage/sets/seventhedition/Oppression.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java index 07c7ee46915..fdda2913c97 100644 --- a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java +++ b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java @@ -17,6 +17,7 @@ public class Oppression extends CardImpl { public Oppression(ownerID UUID) { super(ownerID, 152, "Oppression", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); this.ExpansionSetCode = "7ED" + this.color.setBlack(true); Ability ability = SimpleTriggeredAbility(Zone.BATTLEFIELD, eventType.CAST_SPELL, new DiscardControllerEffect(1), false); this.addAbility(ability); } From 1e94de1b1c0f893369338e3d066efa69bfa08f66 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 02:15:52 -0400 Subject: [PATCH 10/31] Update AvenShrine.java --- Mage.Sets/src/mage/sets/odyssey/AvenShrine.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java index ec211a1527d..7cc69c0ed16 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java +++ b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java @@ -4,9 +4,11 @@ import mage.card.CardImpl; import mage.constants.Rarity; import mage.constants.CardType; import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.GainLifeTriggeredEffect; - - +import mage.abilities.common.GainLifeTargetEffect; +import mage.filter.FilterCard; +import mage.game.events.GameEvent; +import mage.game.stack.Spell; +import mage.target.targetpointer.FixedTarget; import java.util.UUID From f70f5a99c068ca462df70e9b915dc546f77fadc3 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 20:47:38 -0400 Subject: [PATCH 11/31] Update AegisOfHonor.java --- Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java b/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java index ad1122d0207..d2dc513b4d0 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java +++ b/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java @@ -55,7 +55,7 @@ public class AegisOfHonor extends CardImpl{ // {1} The next time The next time an instant or sorcery spell would deal damage to you this //turn, that spell deals that damage to its controller instead. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AegisOfHonorEffect(), ManaCostsImpl("1"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AegisOfHonorEffect(), ManaCostsImpl("{1}"))); } From d595dba42489a1b06ab0cff502d6a0aea2cab967 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 20:55:54 -0400 Subject: [PATCH 12/31] Update AvenArcher.java --- Mage.Sets/src/mage/sets/odyssey/AvenArcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java index aa2947cc934..b38604d7635 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java +++ b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java @@ -39,7 +39,7 @@ import mage.abilities.cost.common.TapSourceCost; import mage.target.common.TargetAttackingOrBlockingCreature; import mage.abilites.effects.common.DamageTargetEffect; import mage.abilities.keyword.FlyingAbility; - +import mage.abilities.costs.mana.ManaCostsImpl; import java.util.UUID; @@ -59,7 +59,7 @@ public class AvenArcher extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Has {T}, Pay 2W: Aven Archer deals 2 damage to target attacking or blocking creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), "{2}{W}"); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{W}")); ability.addCost = new TapSourceCost(); ability.addTarget(TargetAttackingOrBlockingCreature()); this.addAbility(ability); From ef7b36a0f24a3b43f4ee7dafd5ed0a9a9a2cb932 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Sun, 25 Aug 2013 22:53:30 -0400 Subject: [PATCH 13/31] Create CephalidBroker.java --- .../src/mage/sets/odyssey/CephalidBroker.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java diff --git a/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java b/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java new file mode 100644 index 00000000000..0857af6020f --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java @@ -0,0 +1,62 @@ +/* + * 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.odyssey; + +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DrawDiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.Zone; + +import java.util.UUID; + +public class CephalidBroker extends CardImpl { + + public CephalidBroker(UUID ownerID) + super(ownerID, 71, "Cephalid Broker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}") + this.expansionSetCode = "ODY"; + this.subtype.add("Cephalid"); + this.color.setBlue(true); + this.power = MageInt(2); + this.toughness = MageInt(2); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardTargetEffect(2,2), new TapSourceCost())); + + public CephalidBroker(final CephalidBroker card);{ + super(card); + } + +@Override + public CephalidBroker copy() { + return new CephalidBroker(this); + } + +} From ece0c1a5d8e5e31e782f8839d5801d4a47c0cc67 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:16:25 -0400 Subject: [PATCH 14/31] Delete AnimalBoneyard.java --- .../src/mage/sets/odyssey/AnimalBoneyard.java | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java b/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java deleted file mode 100644 index 41172c14958..00000000000 --- a/Mage.Sets/src/mage/sets/odyssey/AnimalBoneyard.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.odyssey; - -import mage.cards.CardImpl; -import mage.constants.Rarity; -import mage.constants.CardType; -import mage.target.common.TargetLandPermanent; -import mage.dynamicvalue.common.SacrificeCostCreaturesToughness; -import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.costs.common.SacrificeTargetCost; -import mage.target.common.TargetControlledCreaturePermanent; -import mage.target.TargetPermanent; -import mage.abilities.effects.common.AttachEffect; -import mage.abilities.keyword.EnchantAbility; -import mage.abilities.Ability; -import mage.constants.Outcome; - -import java.util.UUID; - -public class AnimalBoneyard extends CardImpl { - - public AnimalBoneyard(ownerID UUID) { - super(ownerID, 4, "Animal Boneyard", Rarity.UNCOMMON, CardType[](CardType.ENCHANTMENT), "{2}{W}" ); - - this.ExpansionSetCode = "ODY"; - this.color.setWhite(true); - this.subtype.add("Aura"); - - // Enchant Land - TargetPermanent auraTarget = new TargetLandPermanent(); - this.getSpellAbility().addTarget(auraTarget); - this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); - Ability ability = new EnchantAbility(auraTarget.getTargetName()); - this.addAbility(ability); - - // Enchanted Land has "{tap}: Sacrifice a creature: You gain life equal to its toughness." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(new SacrificeCostCreaturesToughness()), new SacrificeTargetCost(TargetControlledCreaturePermanent())); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA))); - gainedAbility.addCost(new TapSourceCost()); - } - -public AnimalBoneyard(final AnimalBoneyard card){ - super(card); -} - -@Override -public AnimalBoneyard copy() { - return new AnimalBoneyard(this); -} -} From 1d6b4fb3cf4e89a811fecb84da6d1dd02c2d5b2f Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:19:50 -0400 Subject: [PATCH 15/31] Update AvenArcher.java --- .../src/mage/sets/odyssey/AvenArcher.java | 92 ++++++++++--------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java index b38604d7635..9c639065de8 100644 --- a/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java +++ b/Mage.Sets/src/mage/sets/odyssey/AvenArcher.java @@ -25,54 +25,56 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.odyssey; -import mage.constants.CardType; -import mage.MageInt; -import mage.constants.Rarity; -import mage.abilities.common.SimpleActivatedAbility; -import mage.cards.CardImpl; -import mage.constants.Zone; -import mage.abilities.Ability; -import mage.abilities.cost.common.TapSourceCost; -import mage.target.common.TargetAttackingOrBlockingCreature; -import mage.abilites.effects.common.DamageTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.costs.mana.ManaCostsImpl; - import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.target.common.TargetAttackingOrBlockingCreature; - +/** + * + * @author cbt33 + */ public class AvenArcher extends CardImpl { - - public AvenArcher(ownerID UUID){ - super(ownerID, 6, "Aven Archer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); - this.ExpansionSetCode = "ODY"; - this.subtype.add("Bird"); - this.subtype.add("Soldier"); - this.power = new MageInt(2); - this.toughness = new MageInt(2); - this.color.setWhite(true); - - // Flying - this.addAbility(FlyingAbility.getInstance()); - - // Has {T}, Pay 2W: Aven Archer deals 2 damage to target attacking or blocking creature. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{W}")); - ability.addCost = new TapSourceCost(); - ability.addTarget(TargetAttackingOrBlockingCreature()); + + public AvenArcher(UUID ownerId) { + super(ownerId, 6, "Aven Archer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Bird"); + this.subtype.add("Soldier"); + this.subtype.add("Archer"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // {2}{W}, {tap}: Aven Archer deals 2 damage to target attacking or blocking creature. + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetAttackingOrBlockingCreature()); this.addAbility(ability); - } - - public AvenArcher(final AvenArcher card){ - super(card); - } - - @Override - public AvenArcher copy(){ - return new AvenArcher(this); - } - - - } + } + + public AvenArcher(final AvenArcher card) { + super(card); + } + + @Override + public AvenArcher copy() { + return new AvenArcher(this); + } +} From d1aca3e7cf2031ac3e261ade45380bd7ca256ab2 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:25:35 -0400 Subject: [PATCH 16/31] Create BalancingAct.java --- .../src/mage/sets/odyssey/BalancingAct.java | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/BalancingAct.java diff --git a/Mage.Sets/src/mage/sets/odyssey/BalancingAct.java b/Mage.Sets/src/mage/sets/odyssey/BalancingAct.java new file mode 100644 index 00000000000..9623674ab66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/BalancingAct.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.odyssey; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledPermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetControlledPermanent; + +/** + * + * @author Plopman (Restore Balance), cbt33 + */ +public class BalancingAct extends CardImpl { + + public BalancingAct(UUID ownerId) { + super(ownerId, 10, "Balancing Act", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "ODY"; + + this.color.setWhite(true); + + this.getSpellAbility().addEffect(new BalancingActEffect()); + // Each player chooses a number of permanents he or she controls equal to the number of permanents controlled by the player who controls the fewest, then sacrifices the rest. Each player discards cards the same way. + } + + public BalancingAct(final BalancingAct card) { + super(card); + } + + @Override + public BalancingAct copy() { + return new BalancingAct(this); + } +} + +class BalancingActEffect extends OneShotEffect { + + + public BalancingActEffect() { + super(Outcome.Sacrifice); + } + + public BalancingActEffect(final mage.sets.odyssey.BalancingActEffect effect) { + super(effect); + } + + @Override + public mage.sets.odyssey.BalancingActEffect copy() { + return new mage.sets.odyssey.BalancingActEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int minPermanent = Integer.MAX_VALUE, minCard = Integer.MAX_VALUE; + //PERMANENTS + for(Player player : game.getPlayers().values()){ + if(player != null){ + int count = game.getBattlefield().getActivePermanents(new FilterControlledPermanent(), player.getId(), source.getId(), game).size(); + if(count < minPermanent){ + minPermanent = count; + } + } + } + + for(Player player : game.getPlayers().values()){ + if(player != null){ + TargetControlledPermanent target = new TargetControlledPermanent(minPermanent, minPermanent, new FilterControlledPermanent(), true); + target.setRequired(true); + if(target.choose(Outcome.Benefit, player.getId(), source.getId(), game)){ + for(Permanent permanent : game.getBattlefield().getActivePermanents(new FilterControlledPermanent(), player.getId(), source.getId(), game)){ + if(permanent != null && !target.getTargets().contains(permanent.getId())){ + permanent.sacrifice(source.getSourceId(), game); + } + } + } + } + } + + + + + //CARD IN HAND + for(Player player : game.getPlayers().values()){ + if(player != null){ + int count = player.getHand().size(); + if(count < minCard){ + minCard = count; + } + } + } + + for(Player player : game.getPlayers().values()){ + if(player != null){ + TargetCardInHand target = new TargetCardInHand(minCard, new FilterCard()); + target.setRequired(true); + if(target.choose(Outcome.Benefit, player.getId(), source.getId(), game)){ + Cards cards = player.getHand().copy(); + for(UUID cardUUID : cards){ + Card card = player.getHand().get(cardUUID, game); + if(card != null && !target.getTargets().contains(cardUUID)){ + player.discard(card, source, game); + } + } + } + } + } + + return true; + } + + @Override + public String getText(Mode mode) { + return "Each player chooses a number of lands he or she controls equal to the number of lands controlled by the player who controls the fewest, then sacrifices the rest. Players sacrifice creatures and discard cards the same way"; + } +} From 7d57ec4681a9f2da3abbb2715a51c48773f473a5 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:27:15 -0400 Subject: [PATCH 17/31] Create BelovedChaplain.java --- .../mage/sets/odyssey/BelovedChaplain.java | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/BelovedChaplain.java diff --git a/Mage.Sets/src/mage/sets/odyssey/BelovedChaplain.java b/Mage.Sets/src/mage/sets/odyssey/BelovedChaplain.java new file mode 100644 index 00000000000..8365b75da12 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/BelovedChaplain.java @@ -0,0 +1,73 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.keyword.ProtectionAbility; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author cbt33, BetaSteward (Black Knight) + */ +public class BelovedChaplain extends CardImpl { + + public static final FilterCard filter = new FilterCard("Creature"); + + static { + filter.add(new CardTypePredicate(CardType.CREATURE)); + } + + public BelovedChaplain(UUID ownerId) { + super(ownerId, 11, "Beloved Chaplain", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Protection from creatures + this.addAbility(new ProtectionAbility(filter)); + } + + public BelovedChaplain(final BelovedChaplain card) { + super(card); + } + + @Override + public BelovedChaplain copy() { + return new BelovedChaplain(this); + } +} From 3e733f5175f31b6ca620bd704d20ee8200180009 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:30:26 -0400 Subject: [PATCH 18/31] Create BlessedOrator.java --- .../mage/sets/ninthedition/BlessedOrator.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java diff --git a/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java b/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java new file mode 100644 index 00000000000..2726b0de0ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.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.ninthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author noxx (Angel of Jubilation), cbt + */ +public class BlessedOrator extends CardImpl { + + public BlessedOrator(UUID ownerId) { + super(ownerId, 6, "Blessed Orator", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{W}"); + this.expansionSetCode = "9ED"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Other creatures you control get +0/+1. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, true))); + } + + public BlessedOrator(final BlessedOrator card) { + super(card); + } + + @Override + public BlessedOrator copy() { + return new BlessedOrator(this); + } +} From 66a4d513c6d0904633e50fe8c55dfec779054593 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:31:56 -0400 Subject: [PATCH 19/31] Update BlessedOrator.java --- Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java b/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java index 2726b0de0ca..15bb1502f70 100644 --- a/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java +++ b/Mage.Sets/src/mage/sets/ninthedition/BlessedOrator.java @@ -39,7 +39,7 @@ import mage.constants.Zone; /** * - * @author noxx (Angel of Jubilation), cbt + * @author noxx (Angel of Jubilation), cbt33 */ public class BlessedOrator extends CardImpl { From 439d95cb70a2beadec04976c31d9d0a353092900 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:32:03 -0400 Subject: [PATCH 20/31] Create BlessedOrator.java --- .../src/mage/sets/odyssey/BlessedOrator.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/BlessedOrator.java diff --git a/Mage.Sets/src/mage/sets/odyssey/BlessedOrator.java b/Mage.Sets/src/mage/sets/odyssey/BlessedOrator.java new file mode 100644 index 00000000000..5e954868c66 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/BlessedOrator.java @@ -0,0 +1,52 @@ +/* + * 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.odyssey; + +import java.util.UUID; + +/** + * + * @author cbt33 + */ +public class BlessedOrator extends mage.sets.ninthedition.BlessedOrator { + + public BlessedOrator(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "ODY"; + } + + public BlessedOrator(final BlessedOrator card) { + super(card); + } + + @Override + public BlessedOrator copy() { + return new BlessedOrator(this); + } +} From 329d24806cb1f89c52043096ae2978d2bf6ecaa1 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:32:41 -0400 Subject: [PATCH 21/31] Create Cantivore.java --- .../src/mage/sets/odyssey/Cantivore.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/Cantivore.java diff --git a/Mage.Sets/src/mage/sets/odyssey/Cantivore.java b/Mage.Sets/src/mage/sets/odyssey/Cantivore.java new file mode 100644 index 00000000000..78108c0ba71 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Cantivore.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; +import mage.abilities.effects.common.continious.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.CardTypePredicate; + +/** + * + * @author Loki (Mortivore), cbt33 + */ +public class Cantivore extends CardImpl { + + public static final FilterCard filter = new FilterCard("Enchantment"); + + static { + filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); + } + + public Cantivore(UUID ownerId) { + super(ownerId, 13, "Cantivore", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Lhurgoyf"); + + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + // Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. + DynamicValue value = (new CardsInAllGraveyardsCount(filter)); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(value , Duration.WhileOnBattlefield))); + } + + public Cantivore(final Cantivore card) { + super(card); + } + + @Override + public Cantivore copy() { + return new Cantivore(this); + } +} From 3128a08a9b6e4f7ec2c1a1dd9c0b2e81c1395616 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:34:07 -0400 Subject: [PATCH 22/31] Update CephalidBroker.java --- .../src/mage/sets/odyssey/CephalidBroker.java | 60 ++++++++++++------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java b/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java index 0857af6020f..cc3da2ce3f3 100644 --- a/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java +++ b/Mage.Sets/src/mage/sets/odyssey/CephalidBroker.java @@ -25,38 +25,54 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.sets.odyssey; +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DiscardTargetEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; import mage.abilities.effects.common.DrawDiscardTargetEffect; -import mage.cards.CardImpl; import mage.constants.Zone; +import mage.target.TargetPlayer; -import java.util.UUID; + +/** + * + * @author cbt33, North (Merfolk Looter) + * + */ public class CephalidBroker extends CardImpl { - public CephalidBroker(UUID ownerID) - super(ownerID, 71, "Cephalid Broker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}") - this.expansionSetCode = "ODY"; - this.subtype.add("Cephalid"); - this.color.setBlue(true); - this.power = MageInt(2); - this.toughness = MageInt(2); - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawDiscardTargetEffect(2,2), new TapSourceCost())); - - public CephalidBroker(final CephalidBroker card);{ - super(card); - } - -@Override - public CephalidBroker copy() { - return new CephalidBroker(this); - } - + public CephalidBroker(UUID ownerId) { + super(ownerId, 71, "Cephalid Broker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Cephalid"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {tap}: Target player draws two cards, then discards two cards. + + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardTargetEffect(2), new TapSourceCost()); + ability.addEffect(new DiscardTargetEffect(2)); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public CephalidBroker(final CephalidBroker card) { + super(card); + } + + @Override + public CephalidBroker copy() { + return new CephalidBroker(this); + } } From 4aba784931ea58baa91567864dd3e1fdf28f2caa Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:35:39 -0400 Subject: [PATCH 23/31] Create Confessor.java --- .../src/mage/sets/odyssey/Confessor.java | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/Confessor.java diff --git a/Mage.Sets/src/mage/sets/odyssey/Confessor.java b/Mage.Sets/src/mage/sets/odyssey/Confessor.java new file mode 100644 index 00000000000..410258b9a9e --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/Confessor.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.events.GameEvent.EventType; + +/** + * + * @author cbt33 + */ +public class Confessor extends CardImpl { + + public Confessor(UUID ownerId) { + super(ownerId, 15, "Confessor", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever a player discards a card, you may gain 1 life. + this.addAbility(new SimpleTriggeredAbility(Zone.BATTLEFIELD, EventType.DISCARDED_CARD, new GainLifeEffect(1), "Whenever a player discards a card, ", true)); + } + + public Confessor(final Confessor card) { + super(card); + } + + @Override + public Confessor copy() { + return new Confessor(this); + } +} From 92c50a6e0b00ab11845507c9161caafbbb6c6a4b Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:36:45 -0400 Subject: [PATCH 24/31] Create DedicatedMartyr.java --- .../mage/sets/odyssey/DedicatedMartyr.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/DedicatedMartyr.java diff --git a/Mage.Sets/src/mage/sets/odyssey/DedicatedMartyr.java b/Mage.Sets/src/mage/sets/odyssey/DedicatedMartyr.java new file mode 100644 index 00000000000..9395ca74909 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/DedicatedMartyr.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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.ColoredManaSymbol; +import mage.constants.Rarity; +import mage.constants.Zone; + +/** + * + * @author cbt33 + */ +public class DedicatedMartyr extends CardImpl { + + public DedicatedMartyr(UUID ownerId) { + super(ownerId, 16, "Dedicated Martyr", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {W}, Sacrifice Dedicated Martyr: You gain 3 life. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new SacrificeSourceCost()); + ability.addCost(new ColoredManaCost(ColoredManaSymbol.W)); + this.addAbility(ability); + + + } + + public DedicatedMartyr(final DedicatedMartyr card) { + super(card); + } + + @Override + public DedicatedMartyr copy() { + return new DedicatedMartyr(this); + } +} From fdf66f7b1cc295fdb8a3a81b7b4eb23dfba7308e Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:37:46 -0400 Subject: [PATCH 25/31] Create DoggedHunter.java --- .../src/mage/sets/odyssey/DoggedHunter.java | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/DoggedHunter.java diff --git a/Mage.Sets/src/mage/sets/odyssey/DoggedHunter.java b/Mage.Sets/src/mage/sets/odyssey/DoggedHunter.java new file mode 100644 index 00000000000..3994df0fb21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/DoggedHunter.java @@ -0,0 +1,81 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author noxx (Harvester of Souls), cbt33 + */ +public class DoggedHunter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature token"); + + static { + filter.add(new TokenPredicate()); + } + + public DoggedHunter(UUID ownerId) { + super(ownerId, 20, "Dogged Hunter", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Human"); + this.subtype.add("Nomad"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: Destroy target creature token. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + } + + public DoggedHunter(final DoggedHunter card) { + super(card); + } + + @Override + public DoggedHunter copy() { + return new DoggedHunter(this); + } +} From 2a304c4be844e76a80f325c88e5161fd8fa671b0 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 11:39:18 -0400 Subject: [PATCH 26/31] Create GracefulAntelope.java --- .../mage/sets/odyssey/GracefulAntelope.java | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/GracefulAntelope.java diff --git a/Mage.Sets/src/mage/sets/odyssey/GracefulAntelope.java b/Mage.Sets/src/mage/sets/odyssey/GracefulAntelope.java new file mode 100644 index 00000000000..3cb9cc8c371 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/GracefulAntelope.java @@ -0,0 +1,77 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.continious.BecomesBasicLandTargetEffect; +import mage.abilities.keyword.PlainswalkAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.Target; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author cbt33, Loki (Contaminated Ground), Plopman (Larceny) + */ +public class GracefulAntelope extends CardImpl { + + public GracefulAntelope(UUID ownerId) { + super(ownerId, 24, "Graceful Antelope", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); + this.expansionSetCode = "ODY"; + this.subtype.add("Antelope"); + + this.color.setWhite(true); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Plainswalk + this.addAbility(new PlainswalkAbility()); + // Whenever Graceful Antelope deals combat damage to a player, you may have target land become a Plains until Graceful Antelope leaves the battlefield. + //Ability ability = new SimpleTriggeredAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield), new TapSourceCost()); + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield,"Plains"), true); + Target target = new TargetLandPermanent(); + target.setRequired(true); + ability.addTarget(target); + this.addAbility(ability); + } + + public GracefulAntelope(final GracefulAntelope card) { + super(card); + } + + @Override + public GracefulAntelope copy() { + return new GracefulAntelope(this); + } +} From b508a68fc82513fe496f8b5c49899399c81c3ecc Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 12:05:52 -0400 Subject: [PATCH 27/31] Create DivineSacrament.java --- .../mage/sets/odyssey/DivineSacrament.java | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java diff --git a/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java b/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java new file mode 100644 index 00000000000..fd143068983 --- /dev/null +++ b/Mage.Sets/src/mage/sets/odyssey/DivineSacrament.java @@ -0,0 +1,84 @@ +/* + * 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.odyssey; + +import java.util.UUID; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CardsInControllerGraveCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.abilities.effects.common.AddContinuousEffectToGame; + +/** + * + * @author Beta_Steward (Honor of the Pure), LevelX2 (Demoralize), cbt + */ +public class DivineSacrament extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("White creatures"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public DivineSacrament(UUID ownerId) { + super(ownerId, 19, "Divine Sacrament", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); + this.expansionSetCode = "ODY"; + + this.color.setWhite(true); + + // White creatures get +1/+1. + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false)); + // Threshold - White creatures get an additional +1/+1 as long as seven or more cards are in your graveyard. + ability.addEffect( + new ConditionalOneShotEffect( + new AddContinuousEffectToGame(new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false)), + new CardsInControllerGraveCondition(7), + "

Threshold - If seven or more cards are in your graveyard, white creatures get an additional +1/+1." + )); + this.addAbility(ability); + } + + public DivineSacrament(final DivineSacrament card) { + super(card); + } + + @Override + public DivineSacrament copy() { + return new DivineSacrament(this); + } +} From 4b01d08cec6d5f9512c27d7eaf149532a0bc5b6b Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 12:24:11 -0400 Subject: [PATCH 28/31] Delete AncestralTribute.java --- .../mage/sets/odyssey/AncestralTribute.java | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java b/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java deleted file mode 100644 index ba90d77f1c1..00000000000 --- a/Mage.Sets/src/mage/sets/odyssey/AncestralTribute.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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.odyssey; - -import mage.constants.CardType; -import mage.constants.Rarity; -import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.keyword.FlashbackAbility; -import mage.cards.CardImpl; -import mage.constants.TimingRule; -import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.common.GainLifeEffect; - -import java.util.UUID; - -public class AncestralTribute extends CardImpl { - - public AncestralTribute(ownerID UUID) { - super(ownerID, 2, "Ancestral Tribute", Rarity.RARE, CardType[](CardType.SORCERY), "{5}{W}{W}"); - this.expansionCode = "ODY"; - - this.Color.setWhite(true); - DynamicValue value = new CardsInControllerGraveyardCount(); - this.getSpellAbility().addEffect(new GainLifeEffect(value.calculate(game, source) * 2)); - this.addAbility(FlashbackAbility("{9}{W}{W}{W}", TimingRule.SORCERY)); -} - -public AncestralTribute(final AncestralTribute card){ - super(card); -} - -@Override -public AncestralTribute copy() { - return new AncestralTribute(this); -} - -} From 68f6db84f3e2c3966577fba648a67dd582833e99 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 12:25:25 -0400 Subject: [PATCH 29/31] Delete AegisOfHonor.java --- .../src/mage/sets/odyssey/AegisOfHonor.java | 110 ------------------ 1 file changed, 110 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java b/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java deleted file mode 100644 index d2dc513b4d0..00000000000 --- a/Mage.Sets/src/mage/sets/odyssey/AegisOfHonor.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * 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.odyssey; - -import mage.constants.CardType; -import mage.target.TargetSource; -import mage.abilities.effects.RedirectionEffect; -import mage.constants.Rarity; -import mage.cards.CardImpl; -import mage.constants.Duration; -import mage.constants.Zone; -import mage.game.events.GameEvent.EventType; -import mage.game.events.GameEvent; -import mage.costs.mana.ManaCostImpl; -import mage.abilities.common.SimpleActivatedAbility; - -import java.util.UUID; - - -public class AegisOfHonor extends CardImpl{ - - public AegisOfHonor(ownerId UUID){ - super(ownerId, 1, "Aegis of Honor", Rarity.RARE, new CardType[]{Cardtype.ENCHANTMENT}, "{W}"); - this.ExpansionSetCode = "ODY"; - - this.color.setWhite(true); - - // {1} The next time The next time an instant or sorcery spell would deal damage to you this - //turn, that spell deals that damage to its controller instead. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AegisOfHonorEffect(), ManaCostsImpl("{1}"))); - - - } - public AegisOfHonor(final AegisOfHonor card) { - super(card); - } - - @Override - public AegisOfHonor copy() { - return new AegisOfHonor(this); - -} - -} - class AegisOfHonorEffect extends RedirectionEffect { - - - - public AegisOfHonorEffect() { - super(Duration.EndOfTurn); - staticText = "The next time The next time an instant or sorcery spell would deal " - + "damage to you this turn, that spell deals that damage to its controller " - + "instead."; - } - - - @Override - public AegisOfHonorEffect copy() { - return new AegisOfHonorEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - return true; - } - - @Override - public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType().equals(GameEvent.EventType.DAMAGE_PLAYER) //Checks for player damage - && event.getTargetID().equals(source.getControllerID()) //Checks to see the damage is to Aven Shrine's controller - { - Card sourceCard = game.getCard(event.getSourceID()); - if (sourceCard != null && (sourceCard.getCardType().contains(CardType.INSTANT) || sourceCard.getCardType().containts(CardType.SORCERY))); { - //Checks if damage is from a sorcery or instants - return true; - } - return true; - } - return false; - } - - } From 4bfdef5ecdad0f80b626f1a1b3c8bf3dcb967b80 Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 12:25:44 -0400 Subject: [PATCH 30/31] Delete AvenShrine.java --- .../src/mage/sets/odyssey/AvenShrine.java | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/odyssey/AvenShrine.java diff --git a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java b/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java deleted file mode 100644 index 7cc69c0ed16..00000000000 --- a/Mage.Sets/src/mage/sets/odyssey/AvenShrine.java +++ /dev/null @@ -1,77 +0,0 @@ -package mage.sets.odyssey - -import mage.card.CardImpl; -import mage.constants.Rarity; -import mage.constants.CardType; -import mage.abilities.TriggeredAbilityImpl; -import mage.abilities.common.GainLifeTargetEffect; -import mage.filter.FilterCard; -import mage.game.events.GameEvent; -import mage.game.stack.Spell; -import mage.target.targetpointer.FixedTarget; - - -import java.util.UUID - -public class AvenShrine extends CardImpl { - - public AvenShrine(ownerID UUID){ - super(ownerID, 9, "Aven Shrine", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); - this.ExpansionSetCode = "ODY"; - this.color.setWhite(true); - - // Whenever a player casts a spell, that player gains X life, - // where X is the number of cards in all graveyards with the same name as that spell. - - this.addAbility = new AvenShrineAbility() ; - - } - - public AvenShrine(final AngelShrine card) { - super(card); - } - - @Override - public AvenShrine copy() { - return new AvenShrine(this); - } - - } - -public class AvenShrineAbility extends TriggeredAbilityImpl { - - - public AvenShrineAbility(){ - super(Zone.BATTLEFIELD, new GainLifeTargetEffect(new CardsInAllGraveyardCount(filter)), false); - } - - public AvenShrineAbility(final AvenShrineAbility ability) { - super(ability); - } - - @Override - public AvenShrineAbility copy() { - return new AngelsFeatherAbility(this); - } - - - public boolean checkTrigger(GameEvent event, Game game) { - if (event.GetType == EventType.SPELL_CAST) { - Spell spell = game.getStack().getSpell(event.getTargetID()) - String cardName = game.getStack().getSpell(event.getName()); - FilterCard filter = FilterCard(cardName); - if (CardsInAllGraveyardCount(filter) != 0) { - if (spell != null) { - for (Effect effect : this.getEffects()) { - effect.setTargetPointer(new FixedTarget(spell.getControllerId())); - } - return true; - } - } - return true; - } - return false; - } -} - - From 3fa58fd8a16ad5cdd330a4ce15c76b584658c82b Mon Sep 17 00:00:00 2001 From: cbt33 Date: Mon, 16 Sep 2013 12:28:17 -0400 Subject: [PATCH 31/31] Delete Oppression.java --- .../mage/sets/seventhedition/Oppression.java | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 Mage.Sets/src/mage/sets/seventhedition/Oppression.java diff --git a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java b/Mage.Sets/src/mage/sets/seventhedition/Oppression.java deleted file mode 100644 index fdda2913c97..00000000000 --- a/Mage.Sets/src/mage/sets/seventhedition/Oppression.java +++ /dev/null @@ -1,34 +0,0 @@ -package mage.sets.seventh - -import mage.abilities.Ability; -import mage.abilities.common.SimpleTriggeredAbility; -import mage.card.CardImpl; -import mage.constants.Rarity; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; -import mage.abilities.effects.common.DiscardControllerEffect; - -import java.util.UUID - -public class Oppression extends CardImpl { - - public Oppression(ownerID UUID) { - super(ownerID, 152, "Oppression", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); - this.ExpansionSetCode = "7ED" - this.color.setBlack(true); - Ability ability = SimpleTriggeredAbility(Zone.BATTLEFIELD, eventType.CAST_SPELL, new DiscardControllerEffect(1), false); - this.addAbility(ability); - } - - public Oppression(final Oppression card) - super(card); - } - - @Override - public Oppression copy() { - return new Oppression(this); - } - - }