diff --git a/Mage.Sets/src/mage/sets/zendikar/FelidarSovereign.java b/Mage.Sets/src/mage/sets/zendikar/FelidarSovereign.java new file mode 100644 index 00000000000..da776beb2aa --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/FelidarSovereign.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.zendikar; + +import java.util.UUID; +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalTriggeredAbility; +import mage.abilities.effects.common.ControllerWinsEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.game.Game; + +/** + * + * @author Rafbill + */ +public class FelidarSovereign extends CardImpl { + + public FelidarSovereign(UUID ownerId) { + super(ownerId, 12, "Felidar Sovereign", Rarity.MYTHIC, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Cat"); + this.subtype.add("Beast"); + + this.color.setWhite(true); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + this.addAbility(VigilanceAbility.getInstance()); + this.addAbility(LifelinkAbility.getInstance()); + // At the beginning of your upkeep, if you have 40 or more life, you win the game. + TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new ControllerWinsEffect(), Constants.TargetController.YOU, false); + this.addAbility(new ConditionalTriggeredAbility(ability, new FortyOrMoreLifeCondition(FortyOrMoreLifeCondition.CheckType.CONTROLLER), "At the beginning of your upkeep, if you have 40 or more life, you win the game.")); + + } + + public FelidarSovereign(final FelidarSovereign card) { + super(card); + } + + @Override + public FelidarSovereign copy() { + return new FelidarSovereign(this); + } +} + +class FortyOrMoreLifeCondition implements Condition { + + public static enum CheckType { + + AN_OPPONENT, CONTROLLER, TARGET_OPPONENT + }; + private CheckType type; + + public FortyOrMoreLifeCondition(CheckType type) { + this.type = type; + } + + @Override + public boolean apply(Game game, Ability source) { + boolean conditionApplies = false; + + switch (this.type) { + case AN_OPPONENT: + for (UUID opponentUUID : game.getOpponents(source.getControllerId())) { + conditionApplies |= game.getPlayer(opponentUUID).getLife() >= 40; + } + break; + case CONTROLLER: + conditionApplies |= game.getPlayer(source.getControllerId()).getLife() >= 40; + break; + case TARGET_OPPONENT: + //TODO: Implement this. + break; + } + + return conditionApplies; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/zendikar/ScytheTiger.java b/Mage.Sets/src/mage/sets/zendikar/ScytheTiger.java new file mode 100644 index 00000000000..88958a30a93 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/ScytheTiger.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.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.keyword.ShroudAbility; +import mage.cards.CardImpl; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetControlledPermanent; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +/** + * + * @author Rafbill + */ +import mage.Constants; + +public class ScytheTiger extends CardImpl { + + public ScytheTiger(UUID ownerId) { + super(ownerId, 183, "Scythe Tiger", Rarity.COMMON, + new CardType[]{CardType.CREATURE}, "{G}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Cat"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + this.addAbility(ShroudAbility.getInstance()); + // When Scythe Tiger enters the battlefield, sacrifice it unless you + // sacrifice a land. + FilterControlledPermanent filter = new FilterControlledPermanent("a land."); + filter.getCardType().add(Constants.CardType.LAND); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter))))); + } + + public ScytheTiger(final ScytheTiger card) { + super(card); + } + + @Override + public ScytheTiger copy() { + return new ScytheTiger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java b/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java new file mode 100644 index 00000000000..fe2a13f772d --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/TempestOwl.java @@ -0,0 +1,74 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.filter.FilterPermanent; +import mage.target.TargetPermanent; + +/** + * + * @author Rafbill + */ +public class TempestOwl extends CardImpl { + + public TempestOwl(UUID ownerId) { + super(ownerId, 72, "Tempest Owl", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Bird"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + this.addAbility(FlyingAbility.getInstance()); + // Kicker {4}{U} + // When Tempest Owl enters the battlefield, if it was kicked, tap up to three target permanents. + KickerAbility kickerAbility = new KickerAbility(new TapTargetEffect(), false); + kickerAbility.addTarget(new TargetPermanent(0, 3, new FilterPermanent(), false)); + kickerAbility.addManaCost(new ManaCostsImpl("{4}{U}")); + this.addAbility(kickerAbility); + } + + public TempestOwl(final TempestOwl card) { + super(card); + } + + @Override + public TempestOwl copy() { + return new TempestOwl(this); + } +}