From 07cab82ed6dd01b40512a7e3750f0de91c253864 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 5 Sep 2015 16:38:42 +0300 Subject: [PATCH 1/5] Add AttacksAndIsNotBlockedTriggeredAbility. Implement cards: Abyssal Nightstalker, Farrel's Zealot, Ophidian, and Zealot il-Vec --- .../sets/anthologyjacevschandra/Ophidian.java | 52 ++++++++++ .../sets/fallenempires/FarrelsZealot1.java | 70 ++++++++++++++ .../sets/fallenempires/FarrelsZealot2.java | 52 ++++++++++ .../sets/fallenempires/FarrelsZealot3.java | 52 ++++++++++ .../mage/sets/fridaynightmagic/Ophidian.java | 54 +++++++++++ .../src/mage/sets/jacevschandra/Ophidian.java | 52 ++++++++++ .../sets/masterseditionii/FarrelsZealot.java | 54 +++++++++++ .../portalsecondage/AbyssalNightstalker.java | 66 +++++++++++++ .../src/mage/sets/timespiral/ZealotIlVec.java | 78 +++++++++++++++ .../mage/sets/vintagemasters/Ophidian.java | 68 +++++++++++++ .../src/mage/sets/weatherlight/Ophidian.java | 52 ++++++++++ ...ttacksAndIsNotBlockedTriggeredAbility.java | 96 +++++++++++++++++++ .../AssignNoCombatDamageSourceEffect.java | 22 ++++- 13 files changed, 763 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/anthologyjacevschandra/Ophidian.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot1.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot2.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot3.java create mode 100644 Mage.Sets/src/mage/sets/fridaynightmagic/Ophidian.java create mode 100644 Mage.Sets/src/mage/sets/jacevschandra/Ophidian.java create mode 100644 Mage.Sets/src/mage/sets/masterseditionii/FarrelsZealot.java create mode 100644 Mage.Sets/src/mage/sets/portalsecondage/AbyssalNightstalker.java create mode 100644 Mage.Sets/src/mage/sets/timespiral/ZealotIlVec.java create mode 100644 Mage.Sets/src/mage/sets/vintagemasters/Ophidian.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/Ophidian.java create mode 100644 Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java diff --git a/Mage.Sets/src/mage/sets/anthologyjacevschandra/Ophidian.java b/Mage.Sets/src/mage/sets/anthologyjacevschandra/Ophidian.java new file mode 100644 index 0000000000..3816fda1c8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/anthologyjacevschandra/Ophidian.java @@ -0,0 +1,52 @@ +/* + * 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.anthologyjacevschandra; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Ophidian extends mage.sets.vintagemasters.Ophidian { + + public Ophidian(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "DD3"; + } + + public Ophidian(final Ophidian card) { + super(card); + } + + @Override + public Ophidian copy() { + return new Ophidian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot1.java b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot1.java new file mode 100644 index 0000000000..808050be6d --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot1.java @@ -0,0 +1,70 @@ +/* + * 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.fallenempires; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class FarrelsZealot1 extends CardImpl { + + public FarrelsZealot1(UUID ownerId) { + super(ownerId, 139, "Farrel's Zealot", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + this.expansionSetCode = "FEM"; + this.subtype.add("Human"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Farrel's Zealot attacks and isn't blocked, you may have it deal 3 damage to target creature. If you do, Farrel's Zealot assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DamageTargetEffect(3), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public FarrelsZealot1(final FarrelsZealot1 card) { + super(card); + } + + @Override + public FarrelsZealot1 copy() { + return new FarrelsZealot1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot2.java b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot2.java new file mode 100644 index 0000000000..f87feed1cd --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot2.java @@ -0,0 +1,52 @@ +/* + * 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.fallenempires; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FarrelsZealot2 extends FarrelsZealot1 { + + public FarrelsZealot2(UUID ownerId) { + super(ownerId); + this.cardNumber = 140; + } + + public FarrelsZealot2(final FarrelsZealot2 card) { + super(card); + } + + @Override + public FarrelsZealot2 copy() { + return new FarrelsZealot2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot3.java b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot3.java new file mode 100644 index 0000000000..af5d84df98 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/FarrelsZealot3.java @@ -0,0 +1,52 @@ +/* + * 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.fallenempires; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FarrelsZealot3 extends FarrelsZealot1 { + + public FarrelsZealot3(UUID ownerId) { + super(ownerId); + this.cardNumber = 141; + } + + public FarrelsZealot3(final FarrelsZealot3 card) { + super(card); + } + + @Override + public FarrelsZealot3 copy() { + return new FarrelsZealot3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/Ophidian.java b/Mage.Sets/src/mage/sets/fridaynightmagic/Ophidian.java new file mode 100644 index 0000000000..495eb7f297 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/Ophidian.java @@ -0,0 +1,54 @@ +/* + * 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.fridaynightmagic; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Ophidian extends mage.sets.vintagemasters.Ophidian { + + public Ophidian(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "FNMP"; + this.rarity = Rarity.UNCOMMON; + } + + public Ophidian(final Ophidian card) { + super(card); + } + + @Override + public Ophidian copy() { + return new Ophidian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/jacevschandra/Ophidian.java b/Mage.Sets/src/mage/sets/jacevschandra/Ophidian.java new file mode 100644 index 0000000000..2e3c2045e1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/jacevschandra/Ophidian.java @@ -0,0 +1,52 @@ +/* + * 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.jacevschandra; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Ophidian extends mage.sets.vintagemasters.Ophidian { + + public Ophidian(UUID ownerId) { + super(ownerId); + this.cardNumber = 9; + this.expansionSetCode = "DD2"; + } + + public Ophidian(final Ophidian card) { + super(card); + } + + @Override + public Ophidian copy() { + return new Ophidian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/masterseditionii/FarrelsZealot.java b/Mage.Sets/src/mage/sets/masterseditionii/FarrelsZealot.java new file mode 100644 index 0000000000..f3dbcb9a01 --- /dev/null +++ b/Mage.Sets/src/mage/sets/masterseditionii/FarrelsZealot.java @@ -0,0 +1,54 @@ +/* + * 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.masterseditionii; + +import java.util.UUID; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class FarrelsZealot extends mage.sets.fallenempires.FarrelsZealot1 { + + public FarrelsZealot(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "ME2"; + this.rarity = Rarity.UNCOMMON; + } + + public FarrelsZealot(final FarrelsZealot card) { + super(card); + } + + @Override + public FarrelsZealot copy() { + return new FarrelsZealot(this); + } +} diff --git a/Mage.Sets/src/mage/sets/portalsecondage/AbyssalNightstalker.java b/Mage.Sets/src/mage/sets/portalsecondage/AbyssalNightstalker.java new file mode 100644 index 0000000000..9514f3b27e --- /dev/null +++ b/Mage.Sets/src/mage/sets/portalsecondage/AbyssalNightstalker.java @@ -0,0 +1,66 @@ +/* + * 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.portalsecondage; + +import java.util.UUID; +import mage.MageInt; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; + +/** + * + * @author LoneFox + */ +public class AbyssalNightstalker extends CardImpl { + + public AbyssalNightstalker(UUID ownerId) { + super(ownerId, 1, "Abyssal Nightstalker", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "PO2"; + this.subtype.add("Nightstalker"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Abyssal Nightstalker attacks and isn't blocked, defending player discards a card. + Effect effect = new DiscardTargetEffect(1); + effect.setText("defending player discards a card"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); + } + + public AbyssalNightstalker(final AbyssalNightstalker card) { + super(card); + } + + @Override + public AbyssalNightstalker copy() { + return new AbyssalNightstalker(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timespiral/ZealotIlVec.java b/Mage.Sets/src/mage/sets/timespiral/ZealotIlVec.java new file mode 100644 index 0000000000..47fa631957 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timespiral/ZealotIlVec.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.timespiral; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.PreventCombatDamageBySourceEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ZealotIlVec extends CardImpl { + + public ZealotIlVec(UUID ownerId) { + super(ownerId, 47, "Zealot il-Vec", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{W}"); + this.expansionSetCode = "TSP"; + this.subtype.add("Human"); + this.subtype.add("Rebel"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // Whenever Zealot il-Vec attacks and isn't blocked, you may have it deal 1 damage to target creature. If you do, prevent all combat damage Zealot il-Vec would deal this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DamageTargetEffect(1), true); + Effect effect = new PreventCombatDamageBySourceEffect(Duration.EndOfTurn); + effect.setText("if you do, prevent all combat damage {this} would deal this turn"); + ability.addEffect(effect); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + } + + public ZealotIlVec(final ZealotIlVec card) { + super(card); + } + + @Override + public ZealotIlVec copy() { + return new ZealotIlVec(this); + } +} diff --git a/Mage.Sets/src/mage/sets/vintagemasters/Ophidian.java b/Mage.Sets/src/mage/sets/vintagemasters/Ophidian.java new file mode 100644 index 0000000000..4061bbe138 --- /dev/null +++ b/Mage.Sets/src/mage/sets/vintagemasters/Ophidian.java @@ -0,0 +1,68 @@ +/* + * 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.vintagemasters; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Ophidian extends CardImpl { + + public Ophidian(UUID ownerId) { + super(ownerId, 84, "Ophidian", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{U}"); + this.expansionSetCode = "VMA"; + this.subtype.add("Snake"); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Whenever Ophidian attacks and isn't blocked, you may draw a card. If you do, Ophidian assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DrawCardSourceControllerEffect(1), true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + this.addAbility(ability); + } + + public Ophidian(final Ophidian card) { + super(card); + } + + @Override + public Ophidian copy() { + return new Ophidian(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/Ophidian.java b/Mage.Sets/src/mage/sets/weatherlight/Ophidian.java new file mode 100644 index 0000000000..02ac97ce9c --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/Ophidian.java @@ -0,0 +1,52 @@ +/* + * 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.weatherlight; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class Ophidian extends mage.sets.vintagemasters.Ophidian { + + public Ophidian(UUID ownerId) { + super(ownerId); + this.cardNumber = 45; + this.expansionSetCode = "WTH"; + } + + public Ophidian(final Ophidian card) { + super(card); + } + + @Override + public Ophidian copy() { + return new Ophidian(this); + } +} diff --git a/Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java b/Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java new file mode 100644 index 0000000000..d03ae84902 --- /dev/null +++ b/Mage/src/mage/abilities/common/AttacksAndIsNotBlockedTriggeredAbility.java @@ -0,0 +1,96 @@ +/* + * 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 mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.combat.CombatGroup; +import mage.game.events.GameEvent.EventType; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.target.targetpointer.FixedTarget; + +public class AttacksAndIsNotBlockedTriggeredAbility extends TriggeredAbilityImpl { + + private boolean setTargetPointer; + + public AttacksAndIsNotBlockedTriggeredAbility(Effect effect) { + this(effect, false, false); + } + + public AttacksAndIsNotBlockedTriggeredAbility(Effect effect, boolean optional) { + this(effect, optional, false); + } + + public AttacksAndIsNotBlockedTriggeredAbility(Effect effect, boolean optional, boolean setTargetPointer) { + super(Zone.BATTLEFIELD, effect, optional); + this.setTargetPointer = setTargetPointer; + } + + public AttacksAndIsNotBlockedTriggeredAbility(final AttacksAndIsNotBlockedTriggeredAbility ability) { + super(ability); + this.setTargetPointer = ability.setTargetPointer; + } + + @Override + public AttacksAndIsNotBlockedTriggeredAbility copy() { + return new AttacksAndIsNotBlockedTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == EventType.DECLARED_BLOCKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent sourcePermanent = game.getPermanent(getSourceId()); + if(sourcePermanent.isAttacking()) { + for(CombatGroup combatGroup: game.getCombat().getGroups()) { + if(combatGroup.getBlockers().isEmpty() && combatGroup.getAttackers().contains(getSourceId())) { + if(setTargetPointer) { + for(Effect effect : this.getEffects()) { + effect.setTargetPointer(new FixedTarget(game.getCombat().getDefendingPlayerId(getSourceId(), game))); + } + } + return true; + } + } + } + return false; + } + + @Override + public String getRule() { + return "Whenever {this} attacks and isn't blocked, " + super.getRule(); + } +} diff --git a/Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java b/Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java index f7615c0db3..7146608ba7 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/AssignNoCombatDamageSourceEffect.java @@ -45,13 +45,21 @@ import static mage.game.events.GameEvent.EventType.DAMAGE_PLAYER; public class AssignNoCombatDamageSourceEffect extends ReplacementEffectImpl { + private boolean partOfOptionalEffect; + public AssignNoCombatDamageSourceEffect(Duration duration) { + this(duration, false); + } + + public AssignNoCombatDamageSourceEffect(Duration duration, boolean partOfOptionalEffect) { super(duration, Outcome.PreventDamage); + this.partOfOptionalEffect = partOfOptionalEffect; staticText = setText(); } public AssignNoCombatDamageSourceEffect(final AssignNoCombatDamageSourceEffect effect) { super(effect); + this.partOfOptionalEffect = effect.partOfOptionalEffect; } @Override @@ -88,19 +96,23 @@ public class AssignNoCombatDamageSourceEffect extends ReplacementEffectImpl { } private String setText() { - StringBuilder sb = new StringBuilder("{this} assigns no combat damage"); + String text = ""; + if(partOfOptionalEffect) { + text = "If you do, "; + } + text += "{this} assigns no combat damage"; switch(duration) { case EndOfTurn: - sb.append("this turn"); + text += " this turn"; break; case EndOfCombat: - sb.append("this combat"); + text += " this combat"; break; default: if (duration.toString().length() > 0) { - sb.append(" ").append(duration.toString()); + text += " " + duration.toString(); } } - return sb.toString(); + return text; } } From bf3dd1a5bd75c0eef391d5ff1d2da2053c6c221c Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sat, 5 Sep 2015 17:47:34 +0300 Subject: [PATCH 2/5] Implement cards: Dwarven Vigilantes, Goblin Grenadiers, Merchant Ship, and Murk Dwellers, --- .../mage/sets/arabiannights/MerchantShip.java | 76 +++++++++++++++++++ .../mage/sets/fifthedition/MurkDwellers.java | 64 ++++++++++++++++ .../mage/sets/fourthedition/MurkDwellers.java | 52 +++++++++++++ .../src/mage/sets/thedark/MurkDwellers.java | 52 +++++++++++++ .../mage/sets/visions/DwarvenVigilantes.java | 74 ++++++++++++++++++ .../sets/weatherlight/GoblinGrenadiers.java | 74 ++++++++++++++++++ 6 files changed, 392 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/arabiannights/MerchantShip.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/MurkDwellers.java create mode 100644 Mage.Sets/src/mage/sets/fourthedition/MurkDwellers.java create mode 100644 Mage.Sets/src/mage/sets/thedark/MurkDwellers.java create mode 100644 Mage.Sets/src/mage/sets/visions/DwarvenVigilantes.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/GoblinGrenadiers.java diff --git a/Mage.Sets/src/mage/sets/arabiannights/MerchantShip.java b/Mage.Sets/src/mage/sets/arabiannights/MerchantShip.java new file mode 100644 index 0000000000..6f4fa5ff9b --- /dev/null +++ b/Mage.Sets/src/mage/sets/arabiannights/MerchantShip.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.arabiannights; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.common.ControlsPermanentsControllerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.combat.CantAttackUnlessDefenderControllsPermanent; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.Filter; +import mage.filter.common.FilterLandPermanent; + +/** + * + * @author LoneFox + */ +public class MerchantShip extends CardImpl { + + public MerchantShip(UUID ownerId) { + super(ownerId, 23, "Merchant Ship", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "ARN"; + this.subtype.add("Human"); + this.power = new MageInt(0); + this.toughness = new MageInt(2); + + // Merchant Ship can't attack unless defending player controls an Island. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackUnlessDefenderControllsPermanent(new FilterLandPermanent("Island", "an Island")))); + // Whenever Merchant Ship attacks and isn't blocked, you gain 2 life. + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new GainLifeEffect(2))); + // When you control no Islands, sacrifice Merchant Ship. + this.addAbility(new ControlsPermanentsControllerTriggeredAbility( + new FilterLandPermanent("Island", "no Islands"), Filter.ComparisonType.Equal, 0, + new SacrificeSourceEffect())); + } + + public MerchantShip(final MerchantShip card) { + super(card); + } + + @Override + public MerchantShip copy() { + return new MerchantShip(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/MurkDwellers.java b/Mage.Sets/src/mage/sets/fifthedition/MurkDwellers.java new file mode 100644 index 0000000000..2ef577fec3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/MurkDwellers.java @@ -0,0 +1,64 @@ +/* + * 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.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class MurkDwellers extends CardImpl { + + public MurkDwellers(UUID ownerId) { + super(ownerId, 42, "Murk Dwellers", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "5ED"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Murk Dwellers attacks and isn't blocked, it gets +2/+0 until end of combat. + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new BoostSourceEffect(2, 0, Duration.EndOfCombat))); + } + + public MurkDwellers(final MurkDwellers card) { + super(card); + } + + @Override + public MurkDwellers copy() { + return new MurkDwellers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fourthedition/MurkDwellers.java b/Mage.Sets/src/mage/sets/fourthedition/MurkDwellers.java new file mode 100644 index 0000000000..ce073a5788 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fourthedition/MurkDwellers.java @@ -0,0 +1,52 @@ +/* + * 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 LoneFox + */ +public class MurkDwellers extends mage.sets.fifthedition.MurkDwellers { + + public MurkDwellers(UUID ownerId) { + super(ownerId); + this.cardNumber = 32; + this.expansionSetCode = "4ED"; + } + + public MurkDwellers(final MurkDwellers card) { + super(card); + } + + @Override + public MurkDwellers copy() { + return new MurkDwellers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/thedark/MurkDwellers.java b/Mage.Sets/src/mage/sets/thedark/MurkDwellers.java new file mode 100644 index 0000000000..e759ec1c3c --- /dev/null +++ b/Mage.Sets/src/mage/sets/thedark/MurkDwellers.java @@ -0,0 +1,52 @@ +/* + * 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.thedark; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MurkDwellers extends mage.sets.fifthedition.MurkDwellers { + + public MurkDwellers(UUID ownerId) { + super(ownerId); + this.cardNumber = 11; + this.expansionSetCode = "DRK"; + } + + public MurkDwellers(final MurkDwellers card) { + super(card); + } + + @Override + public MurkDwellers copy() { + return new MurkDwellers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/DwarvenVigilantes.java b/Mage.Sets/src/mage/sets/visions/DwarvenVigilantes.java new file mode 100644 index 0000000000..a82414a6a7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/DwarvenVigilantes.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.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class DwarvenVigilantes extends CardImpl { + + public DwarvenVigilantes(UUID ownerId) { + super(ownerId, 77, "Dwarven Vigilantes", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{2}{R}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Dwarf"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Dwarven Vigilantes attacks and isn't blocked, you may have it deal damage equal to its power to target creature. If you do, Dwarven Vigilantes assigns no combat damage this turn. + Effect effect = new DamageTargetEffect(new SourcePermanentPowerCount()); + effect.setText("it deal damage equal to its power to target creature"); + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(effect, true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public DwarvenVigilantes(final DwarvenVigilantes card) { + super(card); + } + + @Override + public DwarvenVigilantes copy() { + return new DwarvenVigilantes(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/GoblinGrenadiers.java b/Mage.Sets/src/mage/sets/weatherlight/GoblinGrenadiers.java new file mode 100644 index 0000000000..13b7c9fcb9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/GoblinGrenadiers.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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetLandPermanent; + +/** + * + * @author LoneFox + */ +public class GoblinGrenadiers extends CardImpl { + + public GoblinGrenadiers(UUID ownerId) { + super(ownerId, 104, "Goblin Grenadiers", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Goblin"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Goblin Grenadiers attacks and isn't blocked, you may sacrifice it. If you do, destroy target creature and target land. + Effect effect = new DoIfCostPaid(new DestroyTargetEffect(), new SacrificeSourceCost(), "Sacrifice {this} to destroy target creature and target land?"); + effect.setText("you may sacrifice it. If you do, destroy target creature and target land"); + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(effect); + ability.addTarget(new TargetCreaturePermanent()); + ability.addTarget(new TargetLandPermanent()); + this.addAbility(ability); + } + + public GoblinGrenadiers(final GoblinGrenadiers card) { + super(card); + } + + @Override + public GoblinGrenadiers copy() { + return new GoblinGrenadiers(this); + } +} From 0a1da41608492e4c6aaed9d2e7780ee07b793263 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 6 Sep 2015 14:10:08 +0300 Subject: [PATCH 3/5] Implement cards: Bone Dancer, Dauthi Mindripper, Mindstab Thrull, and Thalakos Deceiver --- .../sets/fallenempires/MindstabThrull1.java | 52 +++++++++ .../sets/fallenempires/MindstabThrull2.java | 52 +++++++++ .../sets/fallenempires/MindstabThrull3.java | 52 +++++++++ .../sets/fifthedition/MindstabThrull.java | 52 +++++++++ .../sets/mastersedition/MindstabThrull.java | 68 +++++++++++ .../sets/stronghold/ThalakosDeceiver.java | 74 ++++++++++++ .../mage/sets/tempest/DauthiMindripper.java | 72 ++++++++++++ .../mage/sets/weatherlight/BoneDancer.java | 109 ++++++++++++++++++ 8 files changed, 531 insertions(+) create mode 100644 Mage.Sets/src/mage/sets/fallenempires/MindstabThrull1.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/MindstabThrull2.java create mode 100644 Mage.Sets/src/mage/sets/fallenempires/MindstabThrull3.java create mode 100644 Mage.Sets/src/mage/sets/fifthedition/MindstabThrull.java create mode 100644 Mage.Sets/src/mage/sets/mastersedition/MindstabThrull.java create mode 100644 Mage.Sets/src/mage/sets/stronghold/ThalakosDeceiver.java create mode 100644 Mage.Sets/src/mage/sets/tempest/DauthiMindripper.java create mode 100644 Mage.Sets/src/mage/sets/weatherlight/BoneDancer.java diff --git a/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull1.java b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull1.java new file mode 100644 index 0000000000..aa808c7a34 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull1.java @@ -0,0 +1,52 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MindstabThrull1 extends mage.sets.mastersedition.MindstabThrull { + + public MindstabThrull1(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "FEM"; + } + + public MindstabThrull1(final MindstabThrull1 card) { + super(card); + } + + @Override + public MindstabThrull1 copy() { + return new MindstabThrull1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull2.java b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull2.java new file mode 100644 index 0000000000..73e816795d --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull2.java @@ -0,0 +1,52 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MindstabThrull2 extends mage.sets.mastersedition.MindstabThrull { + + public MindstabThrull2(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "FEM"; + } + + public MindstabThrull2(final MindstabThrull2 card) { + super(card); + } + + @Override + public MindstabThrull2 copy() { + return new MindstabThrull2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull3.java b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull3.java new file mode 100644 index 0000000000..b4e3420b82 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fallenempires/MindstabThrull3.java @@ -0,0 +1,52 @@ +/* + * 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.fallenempires; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class MindstabThrull3 extends mage.sets.mastersedition.MindstabThrull { + + public MindstabThrull3(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "FEM"; + } + + public MindstabThrull3(final MindstabThrull3 card) { + super(card); + } + + @Override + public MindstabThrull3 copy() { + return new MindstabThrull3(this); + } +} diff --git a/Mage.Sets/src/mage/sets/fifthedition/MindstabThrull.java b/Mage.Sets/src/mage/sets/fifthedition/MindstabThrull.java new file mode 100644 index 0000000000..aa8dd71889 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fifthedition/MindstabThrull.java @@ -0,0 +1,52 @@ +/* + * 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 LoneFox + */ +public class MindstabThrull extends mage.sets.mastersedition.MindstabThrull { + + public MindstabThrull(UUID ownerId) { + super(ownerId); + this.cardNumber = 40; + this.expansionSetCode = "5ED"; + } + + public MindstabThrull(final MindstabThrull card) { + super(card); + } + + @Override + public MindstabThrull copy() { + return new MindstabThrull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mastersedition/MindstabThrull.java b/Mage.Sets/src/mage/sets/mastersedition/MindstabThrull.java new file mode 100644 index 0000000000..2d36d067a2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mastersedition/MindstabThrull.java @@ -0,0 +1,68 @@ +/* + * 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.mastersedition; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class MindstabThrull extends CardImpl { + + public MindstabThrull(UUID ownerId) { + super(ownerId, 76, "Mindstab Thrull", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "MED"; + this.subtype.add("Thrull"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Mindstab Thrull attacks and isn't blocked, you may sacrifice it. If you do, defending player discards three cards. + Effect effect = new DiscardTargetEffect(3); + effect.setText("defending player discards three cards"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DoIfCostPaid(effect, new SacrificeSourceCost()), false, true)); + } + + public MindstabThrull(final MindstabThrull card) { + super(card); + } + + @Override + public MindstabThrull copy() { + return new MindstabThrull(this); + } +} diff --git a/Mage.Sets/src/mage/sets/stronghold/ThalakosDeceiver.java b/Mage.Sets/src/mage/sets/stronghold/ThalakosDeceiver.java new file mode 100644 index 0000000000..bc0506ebca --- /dev/null +++ b/Mage.Sets/src/mage/sets/stronghold/ThalakosDeceiver.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.stronghold; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LoneFox + */ +public class ThalakosDeceiver extends CardImpl { + + public ThalakosDeceiver(UUID ownerId) { + super(ownerId, 45, "Thalakos Deceiver", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{U}"); + this.expansionSetCode = "STH"; + this.subtype.add("Thalakos"); + this.subtype.add("Wizard"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // Whenever Thalakos Deceiver attacks and isn't blocked, you may sacrifice it. If you do, gain control of target creature. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new DoIfCostPaid(new GainControlTargetEffect(Duration.EndOfGame), new SacrificeSourceCost())); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ThalakosDeceiver(final ThalakosDeceiver card) { + super(card); + } + + @Override + public ThalakosDeceiver copy() { + return new ThalakosDeceiver(this); + } +} diff --git a/Mage.Sets/src/mage/sets/tempest/DauthiMindripper.java b/Mage.Sets/src/mage/sets/tempest/DauthiMindripper.java new file mode 100644 index 0000000000..f988e67dae --- /dev/null +++ b/Mage.Sets/src/mage/sets/tempest/DauthiMindripper.java @@ -0,0 +1,72 @@ +/* + * 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.tempest; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.keyword.ShadowAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class DauthiMindripper extends CardImpl { + + public DauthiMindripper(UUID ownerId) { + super(ownerId, 19, "Dauthi Mindripper", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "TMP"; + this.subtype.add("Dauthi"); + this.subtype.add("Minion"); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Shadow + this.addAbility(ShadowAbility.getInstance()); + // Whenever Dauthi Mindripper attacks and isn't blocked, you may sacrifice it. If you do, defending player discards three cards. + Effect effect = new DiscardTargetEffect(3); + effect.setText("defending player discards three cards"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new DoIfCostPaid(effect, new SacrificeSourceCost()), false, true)); + } + + public DauthiMindripper(final DauthiMindripper card) { + super(card); + } + + @Override + public DauthiMindripper copy() { + return new DauthiMindripper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/weatherlight/BoneDancer.java b/Mage.Sets/src/mage/sets/weatherlight/BoneDancer.java new file mode 100644 index 0000000000..85d2907131 --- /dev/null +++ b/Mage.Sets/src/mage/sets/weatherlight/BoneDancer.java @@ -0,0 +1,109 @@ +/* + * 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.weatherlight; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class BoneDancer extends CardImpl { + + public BoneDancer(UUID ownerId) { + super(ownerId, 4, "Bone Dancer", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "WTH"; + this.subtype.add("Zombie"); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever Bone Dancer attacks and isn't blocked, you may put the top creature card of defending player's graveyard onto the battlefield under your control. If you do, Bone Dancer assigns no combat damage this turn. + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(new BoneDancerEffect(), true, true); + ability.addEffect(new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn, true)); + this.addAbility(ability); + } + + public BoneDancer(final BoneDancer card) { + super(card); + } + + @Override + public BoneDancer copy() { + return new BoneDancer(this); + } +} + +class BoneDancerEffect extends OneShotEffect { + + public BoneDancerEffect() { + super(Outcome.Benefit); + this.staticText = "put the top creature card of defending player's graveyard onto the battlefield under your control"; + } + + public BoneDancerEffect(final BoneDancerEffect effect) { + super(effect); + } + + @Override + public BoneDancerEffect copy() { + return new BoneDancerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player defendingPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if(controller != null && defendingPlayer != null) { + Card lastCreatureCard = null; + for(Card card : defendingPlayer.getGraveyard().getCards(game)) { + if(card.getCardType().contains(CardType.CREATURE)) { + lastCreatureCard = card; + } + } + if(lastCreatureCard != null) { + return controller.putOntoBattlefieldWithInfo(lastCreatureCard, game, Zone.GRAVEYARD, source.getSourceId()); + } + return true; + } + return false; + } +} From 56a5db497e804bfd290cd8fac1d952277d576afe Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 6 Sep 2015 14:43:12 +0300 Subject: [PATCH 4/5] Fix AddPoisonCounterTargetEffect ignoring setText(). Implement cards: Crypt Cobra, Suq'Ata Assassin, and Swamp Mosquito --- .../mage/sets/alliances/SwampMosquito1.java | 69 ++++++++++++++++++ .../mage/sets/alliances/SwampMosquito2.java | 51 ++++++++++++++ .../src/mage/sets/mirage/CryptCobra.java | 66 +++++++++++++++++ .../mage/sets/timeshifted/SwampMosquito.java | 54 ++++++++++++++ .../src/mage/sets/visions/SuqAtaAssassin.java | 70 +++++++++++++++++++ .../counter/AddPoisonCounterTargetEffect.java | 5 +- 6 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/alliances/SwampMosquito1.java create mode 100644 Mage.Sets/src/mage/sets/alliances/SwampMosquito2.java create mode 100644 Mage.Sets/src/mage/sets/mirage/CryptCobra.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/SwampMosquito.java create mode 100644 Mage.Sets/src/mage/sets/visions/SuqAtaAssassin.java diff --git a/Mage.Sets/src/mage/sets/alliances/SwampMosquito1.java b/Mage.Sets/src/mage/sets/alliances/SwampMosquito1.java new file mode 100644 index 0000000000..de42480ab1 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/SwampMosquito1.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SwampMosquito1 extends CardImpl { + + public SwampMosquito1(UUID ownerId) { + super(ownerId, 30, "Swamp Mosquito", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Insect"); + this.power = new MageInt(0); + this.toughness = new MageInt(1); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + // Whenever Swamp Mosquito attacks and isn't blocked, defending player gets a poison counter. + Effect effect = new AddPoisonCounterTargetEffect(1); + effect.setText("defending player gets a poison counter"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); + } + + public SwampMosquito1(final SwampMosquito1 card) { + super(card); + } + + @Override + public SwampMosquito1 copy() { + return new SwampMosquito1(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/SwampMosquito2.java b/Mage.Sets/src/mage/sets/alliances/SwampMosquito2.java new file mode 100644 index 0000000000..9b44a183cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/SwampMosquito2.java @@ -0,0 +1,51 @@ +/* + * 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.alliances; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class SwampMosquito2 extends SwampMosquito1 { + + public SwampMosquito2(UUID ownerId) { + super(ownerId); + this.cardNumber = 31; + } + + public SwampMosquito2(final SwampMosquito2 card) { + super(card); + } + + @Override + public SwampMosquito2 copy() { + return new SwampMosquito2(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/CryptCobra.java b/Mage.Sets/src/mage/sets/mirage/CryptCobra.java new file mode 100644 index 0000000000..95459bda11 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/CryptCobra.java @@ -0,0 +1,66 @@ +/* + * 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.mirage; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class CryptCobra extends CardImpl { + + public CryptCobra(UUID ownerId) { + super(ownerId, 12, "Crypt Cobra", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.expansionSetCode = "MIR"; + this.subtype.add("Snake"); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever Crypt Cobra attacks and isn't blocked, defending player gets a poison counter. + Effect effect = new AddPoisonCounterTargetEffect(1); + effect.setText("defending player gets a poison counter"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); + } + + public CryptCobra(final CryptCobra card) { + super(card); + } + + @Override + public CryptCobra copy() { + return new CryptCobra(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/SwampMosquito.java b/Mage.Sets/src/mage/sets/timeshifted/SwampMosquito.java new file mode 100644 index 0000000000..93773da760 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/SwampMosquito.java @@ -0,0 +1,54 @@ +/* + * 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 LoneFox + */ +public class SwampMosquito extends mage.sets.alliances.SwampMosquito1 { + + public SwampMosquito(UUID ownerId) { + super(ownerId); + this.cardNumber = 49; + this.expansionSetCode = "TSB"; + this.rarity = Rarity.SPECIAL; + } + + public SwampMosquito(final SwampMosquito card) { + super(card); + } + + @Override + public SwampMosquito copy() { + return new SwampMosquito(this); + } +} diff --git a/Mage.Sets/src/mage/sets/visions/SuqAtaAssassin.java b/Mage.Sets/src/mage/sets/visions/SuqAtaAssassin.java new file mode 100644 index 0000000000..b011b65da7 --- /dev/null +++ b/Mage.Sets/src/mage/sets/visions/SuqAtaAssassin.java @@ -0,0 +1,70 @@ +/* + * 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.visions; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class SuqAtaAssassin extends CardImpl { + + public SuqAtaAssassin(UUID ownerId) { + super(ownerId, 19, "Suq'Ata Assassin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); + this.expansionSetCode = "VIS"; + this.subtype.add("Human"); + this.subtype.add("Assassin"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Fear + this.addAbility(FearAbility.getInstance()); + // Whenever Suq'Ata Assassin attacks and isn't blocked, defending player gets a poison counter. + Effect effect = new AddPoisonCounterTargetEffect(1); + effect.setText("defending player gets a poison counter"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); + } + + public SuqAtaAssassin(final SuqAtaAssassin card) { + super(card); + } + + @Override + public SuqAtaAssassin copy() { + return new SuqAtaAssassin(this); + } +} diff --git a/Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java b/Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java index c8a68acd92..420d8dc449 100644 --- a/Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/counter/AddPoisonCounterTargetEffect.java @@ -74,6 +74,9 @@ public class AddPoisonCounterTargetEffect extends OneShotEffect { @Override public String getText(Mode mode) { + if(staticText != null && !staticText.isEmpty()) { + return staticText; + } return "Target " + mode.getTargets().get(0).getTargetName() + " gets " + Integer.toString(amount) + " poison counter(s)."; } -} \ No newline at end of file +} From 7bf2c48d7883a86e827e99733b67981f2240339b Mon Sep 17 00:00:00 2001 From: LoneFox Date: Sun, 6 Sep 2015 18:46:10 +0300 Subject: [PATCH 5/5] Implement cards: Coral fighters, Guiltfeeder, Keeper of Tresserhorn, and Lim-Dul's Paladin --- .../sets/alliances/KeeperOfTresserhorn.java | 73 +++++++++++ .../mage/sets/alliances/LimDulsPaladin.java | 123 ++++++++++++++++++ .../src/mage/sets/judgment/Guiltfeeder.java | 70 ++++++++++ .../src/mage/sets/mirage/CoralFighters.java | 52 ++++++++ .../mage/sets/venservskoth/CoralFighters.java | 111 ++++++++++++++++ .../CardsInTargetPlayersGraveyardCount.java | 61 +++++++++ .../SacrificeSourceUnlessPaysEffect.java | 35 ++--- 7 files changed, 509 insertions(+), 16 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/alliances/KeeperOfTresserhorn.java create mode 100644 Mage.Sets/src/mage/sets/alliances/LimDulsPaladin.java create mode 100644 Mage.Sets/src/mage/sets/judgment/Guiltfeeder.java create mode 100644 Mage.Sets/src/mage/sets/mirage/CoralFighters.java create mode 100644 Mage.Sets/src/mage/sets/venservskoth/CoralFighters.java create mode 100644 Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java diff --git a/Mage.Sets/src/mage/sets/alliances/KeeperOfTresserhorn.java b/Mage.Sets/src/mage/sets/alliances/KeeperOfTresserhorn.java new file mode 100644 index 0000000000..0b4b039c70 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/KeeperOfTresserhorn.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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class KeeperOfTresserhorn extends CardImpl { + + public KeeperOfTresserhorn(UUID ownerId) { + super(ownerId, 14, "Keeper of Tresserhorn", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{B}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Avatar"); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Whenever Keeper of Tresserhorn attacks and isn't blocked, it assigns no combat damage this turn and defending player loses 2 life. + Effect effect = new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn); + effect.setText("it assigns no combat damage this turn"); + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true); + effect = new LoseLifeTargetEffect(2); + effect.setText("and defending player loses 2 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public KeeperOfTresserhorn(final KeeperOfTresserhorn card) { + super(card); + } + + @Override + public KeeperOfTresserhorn copy() { + return new KeeperOfTresserhorn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/alliances/LimDulsPaladin.java b/Mage.Sets/src/mage/sets/alliances/LimDulsPaladin.java new file mode 100644 index 0000000000..a534ba9793 --- /dev/null +++ b/Mage.Sets/src/mage/sets/alliances/LimDulsPaladin.java @@ -0,0 +1,123 @@ +/* + * 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.alliances; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.common.BecomesBlockedTriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; +import mage.abilities.effects.common.continuous.AssignNoCombatDamageSourceEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCardInHand; + +/** + * + * @author LoneFox + */ +public class LimDulsPaladin extends CardImpl { + + public LimDulsPaladin(UUID ownerId) { + super(ownerId, 191, "Lim-Dul's Paladin", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}{R}"); + this.expansionSetCode = "ALL"; + this.subtype.add("Human"); + this.subtype.add("Knight"); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + // At the beginning of your upkeep, you may discard a card. If you don't, sacrifice Lim-Dul's Paladin and draw a card. + this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new LimDulsPaladinEffect(), TargetController.YOU, false)); + // Whenever Lim-Dul's Paladin becomes blocked, it gets +6/+3 until end of turn. + this.addAbility(new BecomesBlockedTriggeredAbility(new BoostSourceEffect(6, 3, Duration.EndOfTurn), false)); + // Whenever Lim-Dul's Paladin attacks and isn't blocked, it assigns no combat damage to defending player this turn and that player loses 4 life. + Effect effect = new AssignNoCombatDamageSourceEffect(Duration.EndOfTurn); + effect.setText("it assigns no combat damage this turn"); + Ability ability = new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true); + effect = new LoseLifeTargetEffect(4); + effect.setText("and defending player loses 4 life"); + ability.addEffect(effect); + this.addAbility(ability); + } + + public LimDulsPaladin(final LimDulsPaladin card) { + super(card); + } + + @Override + public LimDulsPaladin copy() { + return new LimDulsPaladin(this); + } +} + +class LimDulsPaladinEffect extends SacrificeSourceUnlessPaysEffect { + + public LimDulsPaladinEffect() { + super(new DiscardTargetCost(new TargetCardInHand())); + staticText = "you may discard a card. If you don't, sacrifice {this} and draw a card."; + } + + public LimDulsPaladinEffect(final LimDulsPaladinEffect effect) { + super(effect); + } + + @Override + public LimDulsPaladinEffect copy() { + return new LimDulsPaladinEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if(permanent != null) { + super.apply(game, source); + // Not in play anymore -> was sacrificed, draw a card + if(game.getPermanent(source.getSourceId()) == null) { + return new DrawCardSourceControllerEffect(1).apply(game, source); + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/judgment/Guiltfeeder.java b/Mage.Sets/src/mage/sets/judgment/Guiltfeeder.java new file mode 100644 index 0000000000..eb17e664de --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgment/Guiltfeeder.java @@ -0,0 +1,70 @@ +/* + * 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.judgment; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.dynamicvalue.common.CardsInTargetPlayersGraveyardCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.FearAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; + +/** + * + * @author LoneFox + */ +public class Guiltfeeder extends CardImpl { + + public Guiltfeeder(UUID ownerId) { + super(ownerId, 68, "Guiltfeeder", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); + this.expansionSetCode = "JUD"; + this.subtype.add("Horror"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Fear + this.addAbility(FearAbility.getInstance()); + // Whenever Guiltfeeder attacks and isn't blocked, defending player loses 1 life for each card in his or her graveyard. + Effect effect = new LoseLifeTargetEffect(new CardsInTargetPlayersGraveyardCount()); + effect.setText("defending player loses 1 life for each card in his or her graveyard"); + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(effect, false, true)); + } + + public Guiltfeeder(final Guiltfeeder card) { + super(card); + } + + @Override + public Guiltfeeder copy() { + return new Guiltfeeder(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mirage/CoralFighters.java b/Mage.Sets/src/mage/sets/mirage/CoralFighters.java new file mode 100644 index 0000000000..2d1c89dcf6 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mirage/CoralFighters.java @@ -0,0 +1,52 @@ +/* + * 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.mirage; + +import java.util.UUID; + +/** + * + * @author LoneFox + */ +public class CoralFighters extends mage.sets.venservskoth.CoralFighters { + + public CoralFighters(UUID ownerId) { + super(ownerId); + this.cardNumber = 59; + this.expansionSetCode = "MIR"; + } + + public CoralFighters(final CoralFighters card) { + super(card); + } + + @Override + public CoralFighters copy() { + return new CoralFighters(this); + } +} diff --git a/Mage.Sets/src/mage/sets/venservskoth/CoralFighters.java b/Mage.Sets/src/mage/sets/venservskoth/CoralFighters.java new file mode 100644 index 0000000000..451fe86933 --- /dev/null +++ b/Mage.Sets/src/mage/sets/venservskoth/CoralFighters.java @@ -0,0 +1,111 @@ +/* + * 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.venservskoth; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksAndIsNotBlockedTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class CoralFighters extends CardImpl { + + public CoralFighters(UUID ownerId) { + super(ownerId, 4, "Coral Fighters", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{U}"); + this.expansionSetCode = "DDI"; + this.subtype.add("Merfolk"); + this.subtype.add("Soldier"); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Whenever Coral Fighters attacks and isn't blocked, look at the top card of defending player's library. You may put that card on the bottom of that player's library. + this.addAbility(new AttacksAndIsNotBlockedTriggeredAbility(new CoralFightersEffect(), false, true)); + } + + public CoralFighters(final CoralFighters card) { + super(card); + } + + @Override + public CoralFighters copy() { + return new CoralFighters(this); + } +} + +class CoralFightersEffect extends OneShotEffect { + + public CoralFightersEffect() { + super(Outcome.Detriment); + staticText = "look at the top card of defending player's library. You may put that card on the bottom of that player's library"; + } + + public CoralFightersEffect(final CoralFightersEffect effect) { + super(effect); + } + + @Override + public CoralFightersEffect copy() { + return new CoralFightersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + Player defendingPlayer = game.getPlayer(targetPointer.getFirst(game, source)); + if(controller != null && defendingPlayer != null) { + Card card = defendingPlayer.getLibrary().getFromTop(game); + if(card != null) { + Cards cards = new CardsImpl(); + cards.add(card); + controller.lookAtCards("Coral Fighters", cards, game); + if (controller.chooseUse(outcome, "Do you wish to put card on the bottom of player's library?", source, game)) { + controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, false, false); + } + else { + game.informPlayers(controller.getLogName() + " puts the card back on top of the library."); + } + return true; + } + } + return false; + } +} diff --git a/Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java b/Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java new file mode 100644 index 0000000000..b5f39f1276 --- /dev/null +++ b/Mage/src/mage/abilities/dynamicvalue/common/CardsInTargetPlayersGraveyardCount.java @@ -0,0 +1,61 @@ +/* + * 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.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author LoneFox + */ +public class CardsInTargetPlayersGraveyardCount implements DynamicValue { + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + Player player = game.getPlayer(effect.getTargetPointer().getFirst(game, sourceAbility)); + if (player != null) { + return player.getGraveyard().size(); + } + return 0; + } + + @Override + public CardsInTargetPlayersGraveyardCount copy() { + return new CardsInTargetPlayersGraveyardCount(); + } + + @Override + public String getMessage() { + return "cards in target player's graveyard"; + } + +} diff --git a/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java b/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java index e9f188f41e..b36191ecbc 100644 --- a/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java +++ b/Mage/src/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java @@ -39,7 +39,7 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { StringBuilder sb = new StringBuilder(cost.getText()).append("?"); if (!sb.toString().toLowerCase().startsWith("exile ") && !sb.toString().toLowerCase().startsWith("return ") ) { sb.insert(0, "Pay "); - } + } String message = CardUtil.replaceSourceName(sb.toString(), sourceObject.getLogName()); message = Character.toUpperCase(message.charAt(0)) + message.substring(1); if (player.chooseUse(Outcome.Benefit, message, source, game)) { @@ -59,23 +59,26 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { return new SacrificeSourceUnlessPaysEffect(this); } - @Override + @Override public String getText(Mode mode) { - StringBuilder sb = new StringBuilder("sacrifice {this} unless you "); - String costText = cost.getText(); - if (costText.toLowerCase().startsWith("discard") - || costText.toLowerCase().startsWith("remove") - || costText.toLowerCase().startsWith("return") - || costText.toLowerCase().startsWith("exile") - || costText.toLowerCase().startsWith("sacrifice")) { - sb.append(costText.substring(0, 1).toLowerCase()); - sb.append(costText.substring(1)); - } - else { - sb.append("pay ").append(costText); - } + if(staticText != null && !staticText.isEmpty()) { + return staticText; + } - return sb.toString(); + StringBuilder sb = new StringBuilder("sacrifice {this} unless you "); + String costText = cost.getText(); + if (costText.toLowerCase().startsWith("discard") + || costText.toLowerCase().startsWith("remove") + || costText.toLowerCase().startsWith("return") + || costText.toLowerCase().startsWith("exile") + || costText.toLowerCase().startsWith("sacrifice")) { + sb.append(costText.substring(0, 1).toLowerCase()); + sb.append(costText.substring(1)); + } + else { + sb.append("pay ").append(costText); + } + return sb.toString(); } }