From 8759b6de336ab71f1a0f761182787e390ad0d7c9 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Thu, 17 May 2012 15:20:21 +0400 Subject: [PATCH] [AVR] 13 cards with Soulbond --- .../sets/avacynrestored/DruidsFamiliar.java | 74 ++++++++++++++++++ .../sets/avacynrestored/ElgaudShieldmate.java | 74 ++++++++++++++++++ .../avacynrestored/GalvanicAlchemist.java | 78 +++++++++++++++++++ .../sets/avacynrestored/GeistTrappers.java | 74 ++++++++++++++++++ .../sets/avacynrestored/HanweirLancer.java | 74 ++++++++++++++++++ .../sets/avacynrestored/LightningMauler.java | 76 ++++++++++++++++++ .../sets/avacynrestored/NearheathPilgrim.java | 74 ++++++++++++++++++ .../avacynrestored/NightshadePeddler.java | 74 ++++++++++++++++++ .../sets/avacynrestored/PathbreakerWurm.java | 74 ++++++++++++++++++ .../avacynrestored/SilverbladePaladin.java | 74 ++++++++++++++++++ .../avacynrestored/SpectralGateguards.java | 74 ++++++++++++++++++ .../sets/avacynrestored/TrustedForcemage.java | 2 +- .../mage/sets/avacynrestored/Wingcrafter.java | 76 ++++++++++++++++++ .../avacynrestored/WolfirSilverheart.java | 73 +++++++++++++++++ .../keywords/SoulbondKeywordTest.java | 26 +++++++ .../continious/GainAbilityPairedEffect.java | 78 +++++++++++++++++++ 16 files changed, 1074 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/DruidsFamiliar.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/ElgaudShieldmate.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/GalvanicAlchemist.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/GeistTrappers.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/HanweirLancer.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/LightningMauler.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/NearheathPilgrim.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/NightshadePeddler.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/PathbreakerWurm.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/SilverbladePaladin.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/SpectralGateguards.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/Wingcrafter.java create mode 100644 Mage.Sets/src/mage/sets/avacynrestored/WolfirSilverheart.java create mode 100644 Mage/src/mage/abilities/effects/common/continious/GainAbilityPairedEffect.java diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DruidsFamiliar.java b/Mage.Sets/src/mage/sets/avacynrestored/DruidsFamiliar.java new file mode 100644 index 00000000000..1bd6b523907 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/DruidsFamiliar.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.BoostPairedEffect; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * + * @author noxx + + */ +public class DruidsFamiliar extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures gets +2/+2"; + + public DruidsFamiliar(UUID ownerId) { + super(ownerId, 175, "Druid's Familiar", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{G}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Bear"); + + this.color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Druid's Familiar is paired with another creature, each of those creatures gets +2/+2. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostPairedEffect(2, 2, ruleText))); + } + + public DruidsFamiliar(final DruidsFamiliar card) { + super(card); + } + + @Override + public DruidsFamiliar copy() { + return new DruidsFamiliar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/ElgaudShieldmate.java b/Mage.Sets/src/mage/sets/avacynrestored/ElgaudShieldmate.java new file mode 100644 index 00000000000..a0f76884dba --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/ElgaudShieldmate.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.HexproofAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class ElgaudShieldmate extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have hexproof"; + + public ElgaudShieldmate(UUID ownerId) { + super(ownerId, 50, "Elgaud Shieldmate", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + + this.color.setBlue(true); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Elgaud Shieldmate is paired with another creature, both creatures have hexproof. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(HexproofAbility.getInstance(), ruleText))); + } + + public ElgaudShieldmate(final ElgaudShieldmate card) { + super(card); + } + + @Override + public ElgaudShieldmate copy() { + return new ElgaudShieldmate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/GalvanicAlchemist.java b/Mage.Sets/src/mage/sets/avacynrestored/GalvanicAlchemist.java new file mode 100644 index 00000000000..91e9519c0ec --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/GalvanicAlchemist.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.UntapSourceEffect; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class GalvanicAlchemist extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures has \"{2}{U}: Untap this creature.\""; + + public GalvanicAlchemist(UUID ownerId) { + super(ownerId, 54, "Galvanic Alchemist", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Galvanic Alchemist is paired with another creature, each of those creatures has "{2}{U}: Untap this creature." + Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{2}{U}")); + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(ability, ruleText))); + } + + public GalvanicAlchemist(final GalvanicAlchemist card) { + super(card); + } + + @Override + public GalvanicAlchemist copy() { + return new GalvanicAlchemist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/GeistTrappers.java b/Mage.Sets/src/mage/sets/avacynrestored/GeistTrappers.java new file mode 100644 index 00000000000..b580d0bd8af --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/GeistTrappers.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.ReachAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class GeistTrappers extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have reach"; + + public GeistTrappers(UUID ownerId) { + super(ownerId, 179, "Geist Trappers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Geist Trappers is paired with another creature, both creatures have reach. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(ReachAbility.getInstance(), ruleText))); + } + + public GeistTrappers(final GeistTrappers card) { + super(card); + } + + @Override + public GeistTrappers copy() { + return new GeistTrappers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/HanweirLancer.java b/Mage.Sets/src/mage/sets/avacynrestored/HanweirLancer.java new file mode 100644 index 00000000000..d47c957daea --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/HanweirLancer.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class HanweirLancer extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have first strike"; + + public HanweirLancer(UUID ownerId) { + super(ownerId, 138, "Hanweir Lancer", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Hanweir Lancer is paired with another creature, both creatures have first strike. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(FirstStrikeAbility.getInstance(), ruleText))); + } + + public HanweirLancer(final HanweirLancer card) { + super(card); + } + + @Override + public HanweirLancer copy() { + return new HanweirLancer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/LightningMauler.java b/Mage.Sets/src/mage/sets/avacynrestored/LightningMauler.java new file mode 100644 index 00000000000..c865f4a04de --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/LightningMauler.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * + * @author noxx + + */ +public class LightningMauler extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have haste"; + + public LightningMauler(UUID ownerId) { + super(ownerId, 144, "Lightning Mauler", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{R}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Berserker"); + + this.color.setRed(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Lightning Mauler is paired with another creature, both creatures have haste. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(HasteAbility.getInstance(), ruleText))); + } + + public LightningMauler(final LightningMauler card) { + super(card); + } + + @Override + public LightningMauler copy() { + return new LightningMauler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/NearheathPilgrim.java b/Mage.Sets/src/mage/sets/avacynrestored/NearheathPilgrim.java new file mode 100644 index 00000000000..acd2a2d78f2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/NearheathPilgrim.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class NearheathPilgrim extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have lifelink"; + + public NearheathPilgrim(UUID ownerId) { + super(ownerId, 31, "Nearheath Pilgrim", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{W}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Cleric"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Nearheath Pilgrim is paired with another creature, both creatures have lifelink. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(LifelinkAbility.getInstance(), ruleText))); + } + + public NearheathPilgrim(final NearheathPilgrim card) { + super(card); + } + + @Override + public NearheathPilgrim copy() { + return new NearheathPilgrim(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/NightshadePeddler.java b/Mage.Sets/src/mage/sets/avacynrestored/NightshadePeddler.java new file mode 100644 index 00000000000..8bf2e9dcfd6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/NightshadePeddler.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class NightshadePeddler extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have deathtouch"; + + public NightshadePeddler(UUID ownerId) { + super(ownerId, 187, "Nightshade Peddler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{G}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Druid"); + + this.color.setGreen(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Nightshade Peddler is paired with another creature, both creatures have deathtouch. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(DeathtouchAbility.getInstance(), ruleText))); + } + + public NightshadePeddler(final NightshadePeddler card) { + super(card); + } + + @Override + public NightshadePeddler copy() { + return new NightshadePeddler(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/PathbreakerWurm.java b/Mage.Sets/src/mage/sets/avacynrestored/PathbreakerWurm.java new file mode 100644 index 00000000000..7f4aae6a2ee --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/PathbreakerWurm.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.SoulbondAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class PathbreakerWurm extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have trample"; + + public PathbreakerWurm(UUID ownerId) { + super(ownerId, 188, "Pathbreaker Wurm", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{G}{G}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Wurm"); + + this.color.setGreen(true); + this.power = new MageInt(6); + this.toughness = new MageInt(4); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Pathbreaker Wurm is paired with another creature, both creatures have trample. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(TrampleAbility.getInstance(), ruleText))); + + } + + public PathbreakerWurm(final PathbreakerWurm card) { + super(card); + } + + @Override + public PathbreakerWurm copy() { + return new PathbreakerWurm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/SilverbladePaladin.java b/Mage.Sets/src/mage/sets/avacynrestored/SilverbladePaladin.java new file mode 100644 index 00000000000..43ca67e2ffa --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/SilverbladePaladin.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class SilverbladePaladin extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have double strike"; + + public SilverbladePaladin(UUID ownerId) { + super(ownerId, 36, "Silverblade Paladin", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Silverblade Paladin is paired with another creature, both creatures have double strike. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(DoubleStrikeAbility.getInstance(), ruleText))); + } + + public SilverbladePaladin(final SilverbladePaladin card) { + super(card); + } + + @Override + public SilverbladePaladin copy() { + return new SilverbladePaladin(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/SpectralGateguards.java b/Mage.Sets/src/mage/sets/avacynrestored/SpectralGateguards.java new file mode 100644 index 00000000000..0823963f9e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/SpectralGateguards.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.SoulbondAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class SpectralGateguards extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have vigilance"; + + public SpectralGateguards(UUID ownerId) { + super(ownerId, 37, "Spectral Gateguards", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{4}{W}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Spirit"); + this.subtype.add("Soldier"); + + this.color.setWhite(true); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Spectral Gateguards is paired with another creature, both creatures have vigilance. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(VigilanceAbility.getInstance(), ruleText))); + } + + public SpectralGateguards(final SpectralGateguards card) { + super(card); + } + + @Override + public SpectralGateguards copy() { + return new SpectralGateguards(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/TrustedForcemage.java b/Mage.Sets/src/mage/sets/avacynrestored/TrustedForcemage.java index 39ad76fd001..e560bf88afc 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/TrustedForcemage.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/TrustedForcemage.java @@ -43,7 +43,7 @@ import java.util.UUID; */ public class TrustedForcemage extends CardImpl { - private static final String ruleText = "As long as Trusted Forcemage is paired with another creature, each of those creatures gets +1/+1"; + private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures gets +1/+1"; public TrustedForcemage(UUID ownerId) { super(ownerId, 199, "Trusted Forcemage", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{G}"); diff --git a/Mage.Sets/src/mage/sets/avacynrestored/Wingcrafter.java b/Mage.Sets/src/mage/sets/avacynrestored/Wingcrafter.java new file mode 100644 index 00000000000..3ee5c68fcc4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/Wingcrafter.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.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.GainAbilityPairedEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * + * @author noxx + + */ +public class Wingcrafter extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, both creatures have flying"; + + public Wingcrafter(UUID ownerId) { + super(ownerId, 83, "Wingcrafter", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Human"); + this.subtype.add("Wizard"); + + this.color.setBlue(true); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Wingcrafter is paired with another creature, both creatures have flying. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new GainAbilityPairedEffect(FlyingAbility.getInstance(), ruleText))); + } + + public Wingcrafter(final Wingcrafter card) { + super(card); + } + + @Override + public Wingcrafter copy() { + return new Wingcrafter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/avacynrestored/WolfirSilverheart.java b/Mage.Sets/src/mage/sets/avacynrestored/WolfirSilverheart.java new file mode 100644 index 00000000000..612811ef1c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/avacynrestored/WolfirSilverheart.java @@ -0,0 +1,73 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.avacynrestored; + +import mage.Constants; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continious.BoostPairedEffect; +import mage.abilities.keyword.SoulbondAbility; +import mage.cards.CardImpl; + +import java.util.UUID; + +/** + * @author noxx + */ +public class WolfirSilverheart extends CardImpl { + + private static final String ruleText = "As long as {this} is paired with another creature, each of those creatures gets +4/+4"; + + public WolfirSilverheart(UUID ownerId) { + super(ownerId, 206, "Wolfir Silverheart", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + this.expansionSetCode = "AVR"; + this.subtype.add("Wolf"); + this.subtype.add("Warrior"); + + this.color.setGreen(true); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Soulbond + this.addAbility(SoulbondAbility.getInstance()); + + // As long as Wolfir Silverheart is paired with another creature, each of those creatures gets +4/+4. + this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostPairedEffect(4, 4, ruleText))); + } + + public WolfirSilverheart(final WolfirSilverheart card) { + super(card); + } + + @Override + public WolfirSilverheart copy() { + return new WolfirSilverheart(this); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SoulbondKeywordTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SoulbondKeywordTest.java index bf6c434c36c..ddaabe8cd84 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SoulbondKeywordTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SoulbondKeywordTest.java @@ -1,6 +1,9 @@ package org.mage.test.cards.abilities.keywords; import mage.Constants; +import mage.abilities.Abilities; +import mage.abilities.AbilitiesImpl; +import mage.abilities.keyword.LifelinkAbility; import mage.filter.Filter; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; @@ -322,4 +325,27 @@ public class SoulbondKeywordTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Trusted Forcemage", 3, 3); assertPowerToughness(playerA, "Phantasmal Bear", 3, 3); } + + /** + * Tests Soulbond that adds an ability to both creatures + */ + @Test + public void testGrantingAbility() { + addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard"); + addCard(Constants.Zone.HAND, playerA, "Nearheath Pilgrim"); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 2); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Nearheath Pilgrim"); + + setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, "Nearheath Pilgrim", 2, 1); + assertPowerToughness(playerA, "Elite Vanguard", 2, 1); + + Abilities abilities = new AbilitiesImpl(); + abilities.add(LifelinkAbility.getInstance()); + assertAbilities(playerA, "Nearheath Pilgrim", abilities); + assertAbilities(playerA, "Elite Vanguard", abilities); + } } diff --git a/Mage/src/mage/abilities/effects/common/continious/GainAbilityPairedEffect.java b/Mage/src/mage/abilities/effects/common/continious/GainAbilityPairedEffect.java new file mode 100644 index 00000000000..4b4457d8faf --- /dev/null +++ b/Mage/src/mage/abilities/effects/common/continious/GainAbilityPairedEffect.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.effects.common.continious; + +import mage.Constants.Duration; +import mage.Constants.Layer; +import mage.Constants.Outcome; +import mage.Constants.SubLayer; +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.game.Game; +import mage.game.permanent.Permanent; + +/** + * + * @author noxx + */ +public class GainAbilityPairedEffect extends ContinuousEffectImpl { + + protected Ability ability; + + public GainAbilityPairedEffect(Ability ability, String rule) { + super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); + this.ability = ability; + staticText = rule; + } + + public GainAbilityPairedEffect(final GainAbilityPairedEffect effect) { + super(effect); + this.ability = effect.ability.copy(); + } + + @Override + public GainAbilityPairedEffect copy() { + return new GainAbilityPairedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null && permanent.getPairedCard() != null) { + Permanent paired = game.getPermanent(permanent.getPairedCard()); + if (paired != null) { + permanent.addAbility(ability, game); + paired.addAbility(ability, game); + return true; + } + } + return false; + } + +}