diff --git a/Mage.Sets/src/mage/sets/arabiannights/Dandan.java b/Mage.Sets/src/mage/sets/arabiannights/Dandan.java new file mode 100644 index 0000000000..af99c808fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/Dandan.java @@ -0,0 +1,53 @@ +/* + * 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.arabiannights; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class Dandan extends mage.sets.fifthedition.Dandan { + + public Dandan(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "ARN"; + } + + public Dandan(final Dandan card) { + super(card); + } + + @Override + public Dandan copy() { + return new Dandan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/Seasinger.java b/Mage.Sets/src/mage/sets/fallenempires/Seasinger.java index 650f0c5984..ebaed495e2 100644 --- a/Mage.Sets/src/mage/sets/fallenempires/Seasinger.java +++ b/Mage.Sets/src/mage/sets/fallenempires/Seasinger.java @@ -44,15 +44,13 @@ import mage.abilities.effects.common.continious.GainControlTargetEffect; import mage.cards.CardImpl; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; -import mage.filter.common.FilterLandPermanent; -import mage.filter.predicate.Predicate; import mage.filter.predicate.mageobject.CardIdPredicate; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; /** * @@ -106,23 +104,6 @@ public class Seasinger extends CardImpl { } } -class ControllerControlsIslandPredicate implements Predicate { - public static final FilterLandPermanent filter = new FilterLandPermanent("Island"); - { - filter.add(new SubtypePredicate("Island")); - } - - @Override - public boolean apply(Permanent input, Game game) { - return (game.getBattlefield().countAll(filter, input.getControllerId(), game) > 0); - } - - @Override - public String toString() { - return "Controls an island"; - } -} - class SeasingerTriggeredAbility extends StateTriggeredAbility { public SeasingerTriggeredAbility() { diff --git a/Mage.Sets/src/mage/sets/fifthedition/Dandan.java b/Mage.Sets/src/mage/sets/fifthedition/Dandan.java new file mode 100644 index 0000000000..1758fca0c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/Dandan.java @@ -0,0 +1,141 @@ +/* + * 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.fifthedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author KholdFuzion + + */ +public class Dandan extends CardImpl { + + public Dandan(UUID ownerId) { + super(ownerId, 79, "Dandan", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}{U}"); + this.expansionSetCode = "5ED"; + this.subtype.add("Fish"); + + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(1); + + // Dandan can't attack unless defending player controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DandanEffect())); + // When you control no Islands, sacrifice Dandan. + this.addAbility(new DandanTriggeredAbility()); + } + + public Dandan(final Dandan card) { + super(card); + } + + @Override + public Dandan copy() { + return new Dandan(this); + } +} + +class DandanEffect extends ReplacementEffectImpl { + + public DandanEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "{this} can't attack unless defending player controls an Island"; + } + + public DandanEffect(final DandanEffect effect) { + super(effect); + } + + @Override + public DandanEffect copy() { + return new DandanEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) { + FilterPermanent filter = new FilterPermanent(); + filter.add(new SubtypePredicate("Island")); + + if (game.getBattlefield().countAll(filter, event.getTargetId(), game) == 0) { + return true; + } + } + return false; + } +} + +class DandanTriggeredAbility extends StateTriggeredAbility { + + public DandanTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); + } + + public DandanTriggeredAbility(final DandanTriggeredAbility ability) { + super(ability); + } + + @Override + public DandanTriggeredAbility copy() { + return new DandanTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return (game.getBattlefield().countAll(ControllerControlsIslandPredicate.filter, controllerId, game) == 0); + } + + @Override + public String getRule() { + return "When you control no islands, sacrifice {this}."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/fifthedition/PirateShip.java b/Mage.Sets/src/mage/sets/fifthedition/PirateShip.java new file mode 100644 index 0000000000..153898b0c6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/PirateShip.java @@ -0,0 +1,53 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 109; + this.expansionSetCode = "5ED"; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/SeaSerpent.java b/Mage.Sets/src/mage/sets/fifthedition/SeaSerpent.java new file mode 100644 index 0000000000..1a04017468 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/SeaSerpent.java @@ -0,0 +1,53 @@ +/* + * 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.fifthedition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends mage.sets.limitedalpha.SeaSerpent { + + public SeaSerpent(UUID ownerId) { + super(ownerId); + this.cardNumber = 52; + this.expansionSetCode = "5ED"; + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/PirateShip.java b/Mage.Sets/src/mage/sets/fourthedition/PirateShip.java new file mode 100644 index 0000000000..0139fd8521 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/PirateShip.java @@ -0,0 +1,53 @@ +/* + * 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.fourthedition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 91; + this.expansionSetCode = "4ED"; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/SeaSerpent.java b/Mage.Sets/src/mage/sets/fourthedition/SeaSerpent.java new file mode 100644 index 0000000000..f758dbb84e --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/SeaSerpent.java @@ -0,0 +1,53 @@ +/* + * 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.fourthedition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends mage.sets.limitedalpha.SeaSerpent { + + public SeaSerpent(UUID ownerId) { + super(ownerId); + this.cardNumber = 98; + this.expansionSetCode = "4ED"; + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedalpha/PirateShip.java b/Mage.Sets/src/mage/sets/limitedalpha/PirateShip.java new file mode 100644 index 0000000000..5d2a7867b0 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/PirateShip.java @@ -0,0 +1,150 @@ +/* + * 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.limitedalpha; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends CardImpl { + + public PirateShip(UUID ownerId) { + super(ownerId, 71, "Pirate Ship", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "LEA"; + this.subtype.add("Human"); + this.subtype.add("Pirate"); + + this.color.setBlue(true); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // Pirate Ship can't attack unless defending player controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PirateShipEffect())); + // {tap}: Pirate Ship deals 1 damage to target creature or player. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); + ability.addTarget(new TargetCreatureOrPlayer()); + this.addAbility(ability); + // When you control no Islands, sacrifice Pirate Ship. + this.addAbility(new PirateShipTriggeredAbility()); + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} + +class PirateShipEffect extends ReplacementEffectImpl { + + public PirateShipEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "{this} can't attack unless defending player controls an Island"; + } + + public PirateShipEffect(final PirateShipEffect effect) { + super(effect); + } + + @Override + public PirateShipEffect copy() { + return new PirateShipEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) { + FilterPermanent filter = new FilterPermanent(); + filter.add(new SubtypePredicate("Island")); + + if (game.getBattlefield().countAll(filter, event.getTargetId(), game) == 0) { + return true; + } + } + return false; + } +} + +class PirateShipTriggeredAbility extends StateTriggeredAbility { + + public PirateShipTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); + } + + public PirateShipTriggeredAbility(final PirateShipTriggeredAbility ability) { + super(ability); + } + + @Override + public PirateShipTriggeredAbility copy() { + return new PirateShipTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return (game.getBattlefield().countAll(ControllerControlsIslandPredicate.filter, controllerId, game) == 0); + } + + @Override + public String getRule() { + return "When you control no islands, sacrifice {this}."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/limitedalpha/SeaSerpent.java b/Mage.Sets/src/mage/sets/limitedalpha/SeaSerpent.java new file mode 100644 index 0000000000..fa19879fde --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedalpha/SeaSerpent.java @@ -0,0 +1,141 @@ +/* + * 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.limitedalpha; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.StateTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.cards.CardImpl; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.ControllerControlsIslandPredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.events.GameEvent; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends CardImpl { + + public SeaSerpent(UUID ownerId) { + super(ownerId, 77, "Sea Serpent", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}"); + this.expansionSetCode = "LEA"; + this.subtype.add("Serpent"); + + this.color.setBlue(true); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Sea Serpent can't attack unless defending player controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SeaSerpentEffect())); + // When you control no Islands, sacrifice Sea Serpent. + this.addAbility(new SeaSerpentTriggeredAbility()); + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} + +class SeaSerpentEffect extends ReplacementEffectImpl { + + public SeaSerpentEffect() { + super(Duration.WhileOnBattlefield, Outcome.Detriment); + staticText = "{this} can't attack unless defending player controls an Island"; + } + + public SeaSerpentEffect(final SeaSerpentEffect effect) { + super(effect); + } + + @Override + public SeaSerpentEffect copy() { + return new SeaSerpentEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + return true; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getType() == GameEvent.EventType.DECLARE_ATTACKER && source.getSourceId().equals(event.getSourceId())) { + FilterPermanent filter = new FilterPermanent(); + filter.add(new SubtypePredicate("Island")); + + if (game.getBattlefield().countAll(filter, event.getTargetId(), game) == 0) { + return true; + } + } + return false; + } +} + +class SeaSerpentTriggeredAbility extends StateTriggeredAbility { + + public SeaSerpentTriggeredAbility() { + super(Zone.BATTLEFIELD, new SacrificeSourceEffect()); + } + + public SeaSerpentTriggeredAbility(final SeaSerpentTriggeredAbility ability) { + super(ability); + } + + @Override + public SeaSerpentTriggeredAbility copy() { + return new SeaSerpentTriggeredAbility(this); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return (game.getBattlefield().countAll(ControllerControlsIslandPredicate.filter, controllerId, game) == 0); + } + + @Override + public String getRule() { + return "When you control no islands, sacrifice {this}."; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/limitedbeta/PirateShip.java b/Mage.Sets/src/mage/sets/limitedbeta/PirateShip.java new file mode 100644 index 0000000000..55394d4678 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/PirateShip.java @@ -0,0 +1,53 @@ +/* + * 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.limitedbeta; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "LEB"; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/limitedbeta/SeaSerpent.java b/Mage.Sets/src/mage/sets/limitedbeta/SeaSerpent.java new file mode 100644 index 0000000000..b0564db9d4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/limitedbeta/SeaSerpent.java @@ -0,0 +1,53 @@ +/* + * 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.limitedbeta; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends mage.sets.limitedalpha.SeaSerpent { + + public SeaSerpent(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "LEB"; + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/PirateShip.java b/Mage.Sets/src/mage/sets/revisededition/PirateShip.java new file mode 100644 index 0000000000..41a9260632 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/PirateShip.java @@ -0,0 +1,53 @@ +/* + * 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.revisededition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 72; + this.expansionSetCode = "3ED"; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/revisededition/SeaSerpent.java b/Mage.Sets/src/mage/sets/revisededition/SeaSerpent.java new file mode 100644 index 0000000000..ea66ffb532 --- /dev/null +++ b/Mage.Sets/src/mage/sets/revisededition/SeaSerpent.java @@ -0,0 +1,53 @@ +/* + * 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.revisededition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends mage.sets.limitedalpha.SeaSerpent { + + public SeaSerpent(UUID ownerId) { + super(ownerId); + this.cardNumber = 78; + this.expansionSetCode = "3ED"; + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/Dandan.java b/Mage.Sets/src/mage/sets/timeshifted/Dandan.java new file mode 100644 index 0000000000..a298360ca4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/Dandan.java @@ -0,0 +1,55 @@ +/* + * 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.timeshifted; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author KholdFuzion + + */ +public class Dandan extends mage.sets.fifthedition.Dandan { + + public Dandan(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public Dandan(final Dandan card) { + super(card); + } + + @Override + public Dandan copy() { + return new Dandan(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/PirateShip.java b/Mage.Sets/src/mage/sets/timeshifted/PirateShip.java new file mode 100644 index 0000000000..4585fca68e --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/PirateShip.java @@ -0,0 +1,55 @@ +/* + * 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.timeshifted; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/PirateShip.java b/Mage.Sets/src/mage/sets/unlimitededition/PirateShip.java new file mode 100644 index 0000000000..1692b02319 --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/PirateShip.java @@ -0,0 +1,53 @@ +/* + * 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.unlimitededition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class PirateShip extends mage.sets.limitedalpha.PirateShip { + + public PirateShip(UUID ownerId) { + super(ownerId); + this.cardNumber = 71; + this.expansionSetCode = "2ED"; + } + + public PirateShip(final PirateShip card) { + super(card); + } + + @Override + public PirateShip copy() { + return new PirateShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/unlimitededition/SeaSerpent.java b/Mage.Sets/src/mage/sets/unlimitededition/SeaSerpent.java new file mode 100644 index 0000000000..027d4b4aca --- /dev/null +++ b/Mage.Sets/src/mage/sets/unlimitededition/SeaSerpent.java @@ -0,0 +1,53 @@ +/* + * 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.unlimitededition; + +import java.util.UUID; + +/** + * + * @author KholdFuzion + + */ +public class SeaSerpent extends mage.sets.limitedalpha.SeaSerpent { + + public SeaSerpent(UUID ownerId) { + super(ownerId); + this.cardNumber = 77; + this.expansionSetCode = "2ED"; + } + + public SeaSerpent(final SeaSerpent card) { + super(card); + } + + @Override + public SeaSerpent copy() { + return new SeaSerpent(this); + } +} diff --git a/Mage/src/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java b/Mage/src/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java new file mode 100644 index 0000000000..f56779f161 --- /dev/null +++ b/Mage/src/mage/filter/predicate/permanent/ControllerControlsIslandPredicate.java @@ -0,0 +1,56 @@ +/* + * 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.filter.predicate.permanent; + +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.Predicate; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author KholdFuzion + */ + +public class ControllerControlsIslandPredicate implements Predicate { + public static final FilterLandPermanent filter = new FilterLandPermanent("Island"); + { + filter.add(new SubtypePredicate("Island")); + } + + @Override + public boolean apply(Permanent input, Game game) { + return (game.getBattlefield().countAll(filter, input.getControllerId(), game) > 0); + } + + @Override + public String toString() { + return "Controls an island"; + } +} \ No newline at end of file