From ebefae5ddb474b41d2103756401f424c576277fb Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jul 2011 00:03:24 +0300 Subject: [PATCH] Added AllyEntersBattlefieldTriggeredAbility.java Added AllyCards --- .../mage/sets/alarareborn/LichLordofUnx.java | 9 +- .../sets/worldwake/AkoumBattlesinger.java | 76 +++++++++++++++++ .../mage/sets/worldwake/BojukaBrigand.java | 69 ++++++++++++++++ .../mage/sets/worldwake/GraypeltHunter.java | 69 ++++++++++++++++ .../mage/sets/worldwake/HadaFreeblade.java | 67 +++++++++++++++ .../mage/sets/worldwake/HalimarExcavator.java | 79 ++++++++++++++++++ .../src/mage/sets/zendikar/KazuulWarlord.java | 76 +++++++++++++++++ .../mage/sets/zendikar/SeaGateLoremaster.java | 78 ++++++++++++++++++ .../src/mage/sets/zendikar/TajuruArcher.java | 82 +++++++++++++++++++ ...AllyEntersBattlefieldTriggeredAbility.java | 78 ++++++++++++++++++ .../effects/common/DamageTargetEffect.java | 29 ++++--- .../PutLibraryIntoGraveTargetEffect.java | 4 +- 12 files changed, 696 insertions(+), 20 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/worldwake/AkoumBattlesinger.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/BojukaBrigand.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/GraypeltHunter.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/HadaFreeblade.java create mode 100644 Mage.Sets/src/mage/sets/worldwake/HalimarExcavator.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/KazuulWarlord.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/SeaGateLoremaster.java create mode 100644 Mage.Sets/src/mage/sets/zendikar/TajuruArcher.java create mode 100644 Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java diff --git a/Mage.Sets/src/mage/sets/alarareborn/LichLordofUnx.java b/Mage.Sets/src/mage/sets/alarareborn/LichLordofUnx.java index 334949b90ab..e04ebe8e09b 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/LichLordofUnx.java +++ b/Mage.Sets/src/mage/sets/alarareborn/LichLordofUnx.java @@ -34,23 +34,18 @@ import mage.Constants; import mage.Constants.CardType; import mage.Constants.Rarity; import mage.MageInt; -import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.LoseLifeTargetEffect; import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; import mage.cards.CardImpl; import mage.filter.Filter; import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.game.Game; import mage.game.permanent.token.Token; -import mage.players.Player; import mage.target.TargetPlayer; /** @@ -58,7 +53,7 @@ import mage.target.TargetPlayer; * @author Loki */ public class LichLordofUnx extends CardImpl { - private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Zombies you control"); static { filter.getSubtype().add("Zombie"); @@ -70,10 +65,12 @@ public class LichLordofUnx extends CardImpl { this.expansionSetCode = "ARB"; this.subtype.add("Zombie"); this.subtype.add("Wizard"); + this.color.setBlue(true); this.color.setBlack(true); this.power = new MageInt(2); this.toughness = new MageInt(2); + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieWizardToken()), new ManaCostsImpl("{U}{B}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/worldwake/AkoumBattlesinger.java b/Mage.Sets/src/mage/sets/worldwake/AkoumBattlesinger.java new file mode 100644 index 00000000000..2c659c6c45f --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/AkoumBattlesinger.java @@ -0,0 +1,76 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Duration; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.continious.BoostControlledEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author North + */ +public class AkoumBattlesinger extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Ally creatures you control"); + + static { + filter.getSubtype().add("Ally"); + filter.setTargetController(TargetController.YOU); + } + + public AkoumBattlesinger(UUID ownerId) { + super(ownerId, 71, "Akoum Battlesinger", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Human"); + this.subtype.add("Berserker"); + this.subtype.add("Ally"); + + this.color.setRed(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new BoostControlledEffect(1, 0, Duration.EndOfTurn, filter, false), true)); + } + + public AkoumBattlesinger(final AkoumBattlesinger card) { + super(card); + } + + @Override + public AkoumBattlesinger copy() { + return new AkoumBattlesinger(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/BojukaBrigand.java b/Mage.Sets/src/mage/sets/worldwake/BojukaBrigand.java new file mode 100644 index 00000000000..a1389b0a778 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/BojukaBrigand.java @@ -0,0 +1,69 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.common.CantBlockAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class BojukaBrigand extends CardImpl { + + public BojukaBrigand(UUID ownerId) { + super(ownerId, 51, "Bojuka Brigand", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + + this.color.setBlack(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + this.addAbility(CantBlockAbility.getInstance()); + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true)); + } + + public BojukaBrigand(final BojukaBrigand card) { + super(card); + } + + @Override + public BojukaBrigand copy() { + return new BojukaBrigand(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/GraypeltHunter.java b/Mage.Sets/src/mage/sets/worldwake/GraypeltHunter.java new file mode 100644 index 00000000000..3c35584e225 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/GraypeltHunter.java @@ -0,0 +1,69 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class GraypeltHunter extends CardImpl { + + public GraypeltHunter(UUID ownerId) { + super(ownerId, 103, "Graypelt Hunter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + this.addAbility(TrampleAbility.getInstance()); + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true)); + } + + public GraypeltHunter(final GraypeltHunter card) { + super(card); + } + + @Override + public GraypeltHunter copy() { + return new GraypeltHunter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/HadaFreeblade.java b/Mage.Sets/src/mage/sets/worldwake/HadaFreeblade.java new file mode 100644 index 00000000000..64d9ace1676 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/HadaFreeblade.java @@ -0,0 +1,67 @@ +/* + * 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.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; + +/** + * + * @author North + */ +public class HadaFreeblade extends CardImpl { + + public HadaFreeblade(UUID ownerId) { + super(ownerId, 7, "Hada Freeblade", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{W}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.subtype.add("Ally"); + + this.color.setWhite(true); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), true)); + } + + public HadaFreeblade(final HadaFreeblade card) { + super(card); + } + + @Override + public HadaFreeblade copy() { + return new HadaFreeblade(this); + } +} diff --git a/Mage.Sets/src/mage/sets/worldwake/HalimarExcavator.java b/Mage.Sets/src/mage/sets/worldwake/HalimarExcavator.java new file mode 100644 index 00000000000..9d136101573 --- /dev/null +++ b/Mage.Sets/src/mage/sets/worldwake/HalimarExcavator.java @@ -0,0 +1,79 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.worldwake; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPlayer; + +/** + * + * @author North + */ +public class HalimarExcavator extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Allies you control"); + + static { + filter.getSubtype().add("Ally"); + filter.setTargetController(TargetController.YOU); + } + + public HalimarExcavator(UUID ownerId) { + super(ownerId, 29, "Halimar Excavator", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "WWK"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + this.subtype.add("Ally"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + Ability ability = new AllyEntersBattlefieldTriggeredAbility(new PutLibraryIntoGraveTargetEffect(new PermanentsOnBattlefieldCount(filter)), false); + ability.addTarget(new TargetPlayer()); + this.addAbility(ability); + } + + public HalimarExcavator(final HalimarExcavator card) { + super(card); + } + + @Override + public HalimarExcavator copy() { + return new HalimarExcavator(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/KazuulWarlord.java b/Mage.Sets/src/mage/sets/zendikar/KazuulWarlord.java new file mode 100644 index 00000000000..42c4e8caed8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/KazuulWarlord.java @@ -0,0 +1,76 @@ +/* + * 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.Constants.TargetController; +import mage.MageInt; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.cards.CardImpl; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author North + */ +public class KazuulWarlord extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Ally creatures you control"); + + static { + filter.getSubtype().add("Ally"); + filter.setTargetController(TargetController.YOU); + } + + public KazuulWarlord(UUID ownerId) { + super(ownerId, 134, "Kazuul Warlord", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{R}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Minotaur"); + this.subtype.add("Warrior"); + this.subtype.add("Ally"); + + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), true)); + } + + public KazuulWarlord(final KazuulWarlord card) { + super(card); + } + + @Override + public KazuulWarlord copy() { + return new KazuulWarlord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/SeaGateLoremaster.java b/Mage.Sets/src/mage/sets/zendikar/SeaGateLoremaster.java new file mode 100644 index 00000000000..f826e8092fb --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/SeaGateLoremaster.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.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.Zone; +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author North + */ +public class SeaGateLoremaster extends CardImpl { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Ally you control"); + + static { + filter.getSubtype().add("Ally"); + } + + public SeaGateLoremaster(UUID ownerId) { + super(ownerId, 63, "Sea Gate Loremaster", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{4}{U}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Merfolk"); + this.subtype.add("Wizard"); + this.subtype.add("Ally"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, + new DrawCardControllerEffect(new PermanentsOnBattlefieldCount(filter)), + new TapSourceCost())); + } + + public SeaGateLoremaster(final SeaGateLoremaster card) { + super(card); + } + + @Override + public SeaGateLoremaster copy() { + return new SeaGateLoremaster(this); + } +} diff --git a/Mage.Sets/src/mage/sets/zendikar/TajuruArcher.java b/Mage.Sets/src/mage/sets/zendikar/TajuruArcher.java new file mode 100644 index 00000000000..1b08b270470 --- /dev/null +++ b/Mage.Sets/src/mage/sets/zendikar/TajuruArcher.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.zendikar; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.Constants.TargetController; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author North + */ +public class TajuruArcher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Allies you control"); + private static final FilterCreaturePermanent filterTarget = new FilterCreaturePermanent("creature with flying"); + + static { + filter.getSubtype().add("Ally"); + filter.setTargetController(TargetController.YOU); + filterTarget.getAbilities().add(FlyingAbility.getInstance()); + } + + public TajuruArcher(UUID ownerId) { + super(ownerId, 185, "Tajuru Archer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); + this.expansionSetCode = "ZEN"; + this.subtype.add("Elf"); + this.subtype.add("Archer"); + this.subtype.add("Ally"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + Ability ability = new AllyEntersBattlefieldTriggeredAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter)), true); + ability.addTarget(new TargetCreaturePermanent(filterTarget)); + this.addAbility(ability); + } + + public TajuruArcher(final TajuruArcher card) { + super(card); + } + + @Override + public TajuruArcher copy() { + return new TajuruArcher(this); + } +} diff --git a/Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java b/Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.java new file mode 100644 index 00000000000..db3422a03c8 --- /dev/null +++ b/Mage/src/mage/abilities/common/AllyEntersBattlefieldTriggeredAbility.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.abilities.common; + +import java.util.UUID; +import mage.Constants.Zone; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.GameEvent.EventType; +import mage.game.events.ZoneChangeEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author North + */ +public class AllyEntersBattlefieldTriggeredAbility extends TriggeredAbilityImpl { + + public AllyEntersBattlefieldTriggeredAbility(Effect effect, boolean optional) { + super(Zone.BATTLEFIELD, effect, optional); + } + + public AllyEntersBattlefieldTriggeredAbility(AllyEntersBattlefieldTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(this.getSourceId())) { + UUID targetId = event.getTargetId(); + Permanent permanent = game.getPermanent(targetId); + ZoneChangeEvent zEvent = (ZoneChangeEvent) event; + if (zEvent.getToZone() == Zone.BATTLEFIELD + && (targetId.equals(this.getSourceId()) + || (permanent.getSubtype().contains("Ally") && !targetId.equals(this.getSourceId())))) { + return true; + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} or another Ally enters the battlefield under your control, " + super.getRule(); + } + + @Override + public AllyEntersBattlefieldTriggeredAbility copy() { + return new AllyEntersBattlefieldTriggeredAbility(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java index 79104e0b77c..3b5c9ee27b6 100644 --- a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java @@ -98,19 +98,24 @@ public class DamageTargetEffect extends OneShotEffect { return false; } - @Override - public String getText(Ability source) { - StringBuilder sb = new StringBuilder(); - sb.append("{source} deals ").append(amount).append(" damage to target "); - sb.append(source.getTargets().get(0).getTargetName()); + @Override + public String getText(Ability source) { + StringBuilder sb = new StringBuilder(); String message = amount.getMessage(); - if (message.length() > 0) { - sb.append(" for each "); + sb.append("{source} deals "); + if (message.isEmpty()) { + sb.append(amount); } - sb.append(message); - if (!preventable) - sb.append(". The damage can't be prevented"); - return sb.toString(); - } + sb.append(" damage to target "); + sb.append(source.getTargets().get(0).getTargetName()); + if (message.length() > 0) { + sb.append(" equal to the number of "); + sb.append(message); + } + if (!preventable) { + sb.append(". The damage can't be prevented"); + } + return sb.toString(); + } } diff --git a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java index ae5ac8d3eac..e10ed436e03 100644 --- a/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/PutLibraryIntoGraveTargetEffect.java @@ -90,11 +90,11 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect 0) { - sb.append(" for each "); + sb.append(", where X is the number of "); } sb.append(message); return sb.toString();