diff --git a/Mage.Sets/src/mage/sets/eventide/AerieOuphes.java b/Mage.Sets/src/mage/sets/eventide/AerieOuphes.java new file mode 100644 index 00000000000..e1429a7c900 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/AerieOuphes.java @@ -0,0 +1,85 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.PersistAbility; +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.mageobject.AbilityPredicate; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author jeffwadsworth + */ +public class AerieOuphes extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying"); + + static { + filter.add(new AbilityPredicate(FlyingAbility.class)); + } + + public AerieOuphes(UUID ownerId) { + super(ownerId, 65, "Aerie Ouphes", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Ouphe"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Sacrifice Aerie Ouphes: Aerie Ouphes deals damage equal to its power to target creature with flying. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new SacrificeSourceCost()); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + + // Persist + this.addAbility(new PersistAbility()); + } + + public AerieOuphes(final AerieOuphes card) { + super(card); + } + + @Override + public AerieOuphes copy() { + return new AerieOuphes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/BloomTender.java b/Mage.Sets/src/mage/sets/eventide/BloomTender.java new file mode 100644 index 00000000000..cad92900ac4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/BloomTender.java @@ -0,0 +1,127 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.MageInt; +import mage.Mana; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.common.ManaEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author jeffwadsworth + */ +public class BloomTender extends CardImpl { + + public BloomTender(UUID ownerId) { + super(ownerId, 66, "Bloom Tender", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "EVE"; + this.subtype.add("Elf"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {tap}: For each color among permanents you control, add one mana of that color to your mana pool. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BloomTenderEffect(), new TapSourceCost())); + + } + + public BloomTender(final BloomTender card) { + super(card); + } + + @Override + public BloomTender copy() { + return new BloomTender(this); + } +} + +class BloomTenderEffect extends ManaEffect { + + public BloomTenderEffect() { + super(); + staticText = "For each color among permanents you control, add one mana of that color to your mana pool"; + } + + public BloomTenderEffect(final BloomTenderEffect effect) { + super(effect); + } + + @Override + public BloomTenderEffect copy() { + return new BloomTenderEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player you = game.getPlayer(source.getControllerId()); + Mana mana = new Mana(); + if (you != null) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(you.getId(), game)) { + if (permanent.getColor().contains(ObjectColor.BLACK) + && !mana.contains(Mana.BlackMana)) { + mana = Mana.BlackMana(1); + } + if (permanent.getColor().contains(ObjectColor.BLUE) + && !mana.contains(Mana.BlueMana)) { + mana = Mana.BlueMana(1); + } + if (permanent.getColor().contains(ObjectColor.RED) + && !mana.contains(Mana.RedMana)) { + mana = Mana.RedMana(1); + } + if (permanent.getColor().contains(ObjectColor.GREEN) + && !mana.contains(Mana.GreenMana)) { + mana = Mana.GreenMana(1); + } + if (permanent.getColor().contains(ObjectColor.WHITE) + && !mana.contains(Mana.WhiteMana)) { + mana = Mana.WhiteMana(1); + } + } + } + if (you != null && mana != null) { + you.getManaPool().addMana(mana, game, source); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/eventide/HelixPinnacle.java b/Mage.Sets/src/mage/sets/eventide/HelixPinnacle.java new file mode 100644 index 00000000000..c139d8fbc24 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/HelixPinnacle.java @@ -0,0 +1,112 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.HasCounterCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.WinGameEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author jeffwadsworth + */ +public class HelixPinnacle extends CardImpl { + + final String rule = "if there are 100 or more tower counters on Helix Pinnacle, you win the game"; + + public HelixPinnacle(UUID ownerId) { + super(ownerId, 68, "Helix Pinnacle", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{G}"); + this.expansionSetCode = "EVE"; + + this.color.setGreen(true); + + // Shroud + this.addAbility(ShroudAbility.getInstance()); + + // {X}: Put X tower counters on Helix Pinnacle. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new HelixPinnacleEffect(), new ManaCostsImpl("{X}"))); + + // At the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game. + Condition condition = new HasCounterCondition(CounterType.TOWER, 100); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ConditionalOneShotEffect(new WinGameEffect(), condition, rule), TargetController.YOU, false)); + + } + + public HelixPinnacle(final HelixPinnacle card) { + super(card); + } + + @Override + public HelixPinnacle copy() { + return new HelixPinnacle(this); + } +} + +class HelixPinnacleEffect extends OneShotEffect { + + HelixPinnacleEffect() { + super(Outcome.Benefit); + staticText = "Put X tower counters on {this}"; + } + + HelixPinnacleEffect(HelixPinnacleEffect effect) { + super(effect); + } + + @Override + public HelixPinnacleEffect copy() { + return new HelixPinnacleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + permanent.addCounters(CounterType.TOWER.createInstance(source.getManaCostsToPay().getX()), game); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/eventide/UnwillingRecruit.java b/Mage.Sets/src/mage/sets/eventide/UnwillingRecruit.java new file mode 100644 index 00000000000..09605465c82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/eventide/UnwillingRecruit.java @@ -0,0 +1,104 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.eventide; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continious.BoostTargetEffect; +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.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author jeffwadsworth + */ +public class UnwillingRecruit extends CardImpl { + + public UnwillingRecruit(UUID ownerId) { + super(ownerId, 64, "Unwilling Recruit", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{X}{R}{R}{R}"); + this.expansionSetCode = "EVE"; + + this.color.setRed(true); + + // Gain control of target creature until end of turn. Untap that creature. It gets +X/+0 and gains haste until end of turn. + this.getSpellAbility().addEffect(new UnwillingRecruitEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent(true)); + + } + + public UnwillingRecruit(final UnwillingRecruit card) { + super(card); + } + + @Override + public UnwillingRecruit copy() { + return new UnwillingRecruit(this); + } +} + +class UnwillingRecruitEffect extends OneShotEffect { + + UnwillingRecruitEffect() { + super(Outcome.Benefit); + staticText = "Gain control of target creature until end of turn. Untap that creature. It gets +X/+0 and gains haste until end of turn"; + } + + UnwillingRecruitEffect(UnwillingRecruitEffect effect) { + super(effect); + } + + @Override + public UnwillingRecruitEffect copy() { + return new UnwillingRecruitEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent targetCreature = game.getPermanent(source.getFirstTarget()); + if (targetCreature != null) { + source.getEffects().get(0).setTargetPointer(new FixedTarget(targetCreature.getId())); + game.addEffect(new GainControlTargetEffect(Duration.EndOfTurn), source); + targetCreature.untap(game); + game.addEffect(new BoostTargetEffect(source.getManaCostsToPay().getX(), 0, Duration.EndOfTurn), source); + game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), source); + return true; + } + return false; + } +} \ No newline at end of file diff --git a/Mage/src/mage/counters/CounterType.java b/Mage/src/mage/counters/CounterType.java index 9edd7196610..4019208694c 100644 --- a/Mage/src/mage/counters/CounterType.java +++ b/Mage/src/mage/counters/CounterType.java @@ -74,7 +74,8 @@ public enum CounterType { AGE(new AgeCounter().name), BLAZE(new BlazeCounter().name), ICE(new IceCounter().name), - BRIBERY(new BriberyCounter().name); + BRIBERY(new BriberyCounter().name), + TOWER(new TowerCounter().name); private String name; @@ -108,6 +109,8 @@ public enum CounterType { */ public Counter createInstance(int amount) { switch(this) { + case TOWER: + return new TowerCounter(amount); case P1P1: return new PlusOneCounter(amount); case M1M1: @@ -184,7 +187,7 @@ public enum CounterType { return new BlazeCounter(amount); case ICE: return new IceCounter(amount); - + } return null; } diff --git a/Mage/src/mage/counters/common/TowerCounter.java b/Mage/src/mage/counters/common/TowerCounter.java new file mode 100644 index 00000000000..97b00b33b14 --- /dev/null +++ b/Mage/src/mage/counters/common/TowerCounter.java @@ -0,0 +1,47 @@ +/* + * 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.counters.common; + +import mage.counters.Counter; + +/** + * + * @author jeffwadsworth + */ +public class TowerCounter extends Counter { + + public TowerCounter() { + super("Tower"); + this.count = 1; + } + + public TowerCounter(int amount) { + super("Tower"); + this.count = amount; + } +}