From 90116082ea74bc875fbfe92a10098b03128e5848 Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 18 Nov 2011 22:04:09 +0400 Subject: [PATCH] more reward cards --- .../src/mage/sets/planarchaos/Damnation.java | 61 ++++++++++++ .../src/mage/sets/planarchaos/Harmonize.java | 60 ++++++++++++ .../src/mage/sets/planarchaos/ManaTithe.java | 63 ++++++++++++ .../src/mage/sets/playerrewards/Condemn.java | 23 +++++ .../mage/sets/playerrewards/CruelEdict.java | 23 +++++ .../mage/sets/playerrewards/Damnation.java | 23 +++++ .../mage/sets/playerrewards/Disenchant.java | 23 +++++ .../mage/sets/playerrewards/GiantGrowth.java | 23 +++++ .../mage/sets/playerrewards/Harmonize.java | 23 +++++ .../mage/sets/playerrewards/Incinerate.java | 23 +++++ .../sets/playerrewards/LightningHelix.java | 23 +++++ .../src/mage/sets/playerrewards/ManaLeak.java | 23 +++++ .../mage/sets/playerrewards/ManaTithe.java | 23 +++++ .../src/mage/sets/playerrewards/Mortify.java | 23 +++++ .../mage/sets/playerrewards/PsionicBlast.java | 23 +++++ .../src/mage/sets/playerrewards/Putrefy.java | 23 +++++ .../mage/sets/playerrewards/Pyroclasm.java | 23 +++++ .../mage/sets/playerrewards/Recollect.java | 23 +++++ .../src/mage/sets/playerrewards/Tidings.java | 23 +++++ .../mage/sets/playerrewards/WrathOfGod.java | 23 +++++ .../src/mage/sets/shardsofalara/Infest.java | 3 +- Mage.Sets/src/mage/sets/tenth/WrathOfGod.java | 61 ++++++++++++ .../mage/sets/timeshifted/PsionicBlast.java | 95 +++++++++++++++++++ .../test/cards/damage/PsionicBlastTest.java | 25 +++++ .../effects/common/DestroyAllEffect.java | 52 +++++----- .../common/continious/BoostAllEffect.java | 2 +- 26 files changed, 789 insertions(+), 24 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/planarchaos/Damnation.java create mode 100644 Mage.Sets/src/mage/sets/planarchaos/Harmonize.java create mode 100644 Mage.Sets/src/mage/sets/planarchaos/ManaTithe.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Condemn.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/CruelEdict.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Damnation.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Disenchant.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/GiantGrowth.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Harmonize.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Incinerate.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/LightningHelix.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/ManaLeak.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/ManaTithe.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Mortify.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/PsionicBlast.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Putrefy.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Pyroclasm.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Recollect.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/Tidings.java create mode 100644 Mage.Sets/src/mage/sets/playerrewards/WrathOfGod.java create mode 100644 Mage.Sets/src/mage/sets/tenth/WrathOfGod.java create mode 100644 Mage.Sets/src/mage/sets/timeshifted/PsionicBlast.java create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/damage/PsionicBlastTest.java diff --git a/Mage.Sets/src/mage/sets/planarchaos/Damnation.java b/Mage.Sets/src/mage/sets/planarchaos/Damnation.java new file mode 100644 index 00000000000..077bc22b37b --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/Damnation.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.sets.planarchaos; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Loki + */ +public class Damnation extends CardImpl { + + public Damnation(UUID ownerId) { + super(ownerId, 85, "Damnation", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + this.expansionSetCode = "PLC"; + + this.color.setBlack(true); + + // Destroy all creatures. They can't be regenerated. + this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true)); + } + + public Damnation(final Damnation card) { + super(card); + } + + @Override + public Damnation copy() { + return new Damnation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/Harmonize.java b/Mage.Sets/src/mage/sets/planarchaos/Harmonize.java new file mode 100644 index 00000000000..71a703a07ea --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/Harmonize.java @@ -0,0 +1,60 @@ +/* + * 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.planarchaos; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DrawCardControllerEffect; +import mage.cards.CardImpl; + +/** + * + * @author Loki + */ +public class Harmonize extends CardImpl { + + public Harmonize(UUID ownerId) { + super(ownerId, 149, "Harmonize", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + this.expansionSetCode = "PLC"; + + this.color.setGreen(true); + + // Draw three cards. + this.getSpellAbility().addEffect(new DrawCardControllerEffect(3)); + } + + public Harmonize(final Harmonize card) { + super(card); + } + + @Override + public Harmonize copy() { + return new Harmonize(this); + } +} diff --git a/Mage.Sets/src/mage/sets/planarchaos/ManaTithe.java b/Mage.Sets/src/mage/sets/planarchaos/ManaTithe.java new file mode 100644 index 00000000000..db5eff69548 --- /dev/null +++ b/Mage.Sets/src/mage/sets/planarchaos/ManaTithe.java @@ -0,0 +1,63 @@ +/* + * 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.planarchaos; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.cards.CardImpl; +import mage.target.TargetSpell; + +/** + * + * @author Loki + */ +public class ManaTithe extends CardImpl { + + public ManaTithe(UUID ownerId) { + super(ownerId, 25, "Mana Tithe", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{W}"); + this.expansionSetCode = "PLC"; + + this.color.setWhite(true); + + // Counter target spell unless its controller pays {1}. + this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new GenericManaCost(1))); + } + + public ManaTithe(final ManaTithe card) { + super(card); + } + + @Override + public ManaTithe copy() { + return new ManaTithe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Condemn.java b/Mage.Sets/src/mage/sets/playerrewards/Condemn.java new file mode 100644 index 00000000000..0c4142222ca --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Condemn.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Condemn extends mage.sets.tenth.Condemn { + public Condemn(UUID ownerId) { + super(ownerId); + this.cardNumber = 18; + this.expansionSetCode = "MPR"; + } + + public Condemn(final Condemn card) { + super(card); + } + + @Override + public Condemn copy() { + return new Condemn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/CruelEdict.java b/Mage.Sets/src/mage/sets/playerrewards/CruelEdict.java new file mode 100644 index 00000000000..1a2dc72cb25 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/CruelEdict.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class CruelEdict extends mage.sets.tenth.CruelEdict { + public CruelEdict(UUID ownerId) { + super(ownerId); + this.cardNumber = 21; + this.expansionSetCode = "MPR"; + } + + public CruelEdict(final CruelEdict card) { + super(card); + } + + @Override + public CruelEdict copy() { + return new CruelEdict(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Damnation.java b/Mage.Sets/src/mage/sets/playerrewards/Damnation.java new file mode 100644 index 00000000000..af727d5422a --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Damnation.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Damnation extends mage.sets.planarchaos.Damnation{ + public Damnation(UUID ownerId) { + super(ownerId); + this.cardNumber = 24; + this.expansionSetCode = "MPR"; + } + + public Damnation(final Damnation card) { + super(card); + } + + @Override + public Damnation copy() { + return new Damnation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Disenchant.java b/Mage.Sets/src/mage/sets/playerrewards/Disenchant.java new file mode 100644 index 00000000000..d8b0e2e4a5e --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Disenchant.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Disenchant extends mage.sets.tempest.Disenchant { + public Disenchant(UUID ownerId) { + super(ownerId); + this.cardNumber = 22; + this.expansionSetCode = "MPR"; + } + + public Disenchant(final Disenchant card) { + super(card); + } + + @Override + public Disenchant copy() { + return new Disenchant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/GiantGrowth.java b/Mage.Sets/src/mage/sets/playerrewards/GiantGrowth.java new file mode 100644 index 00000000000..140526697d8 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/GiantGrowth.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class GiantGrowth extends mage.sets.tenth.GiantGrowth { + public GiantGrowth(UUID ownerId) { + super(ownerId); + this.cardNumber = 13; + this.expansionSetCode = "MPR"; + } + + public GiantGrowth(final GiantGrowth card) { + super(card); + } + + @Override + public GiantGrowth copy() { + return new GiantGrowth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Harmonize.java b/Mage.Sets/src/mage/sets/playerrewards/Harmonize.java new file mode 100644 index 00000000000..658018aa335 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Harmonize.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Harmonize extends mage.sets.planarchaos.Harmonize { + public Harmonize(UUID ownerId) { + super(ownerId); + this.cardNumber = 28; + this.expansionSetCode = "MPR"; + } + + public Harmonize(final Harmonize card) { + super(card); + } + + @Override + public Harmonize copy() { + return new Harmonize(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Incinerate.java b/Mage.Sets/src/mage/sets/playerrewards/Incinerate.java new file mode 100644 index 00000000000..51108cce5a3 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Incinerate.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Incinerate extends mage.sets.tenth.Incinerate { + public Incinerate(UUID ownerId) { + super(ownerId); + this.cardNumber = 26; + this.expansionSetCode = "MPR"; + } + + public Incinerate(final Incinerate card) { + super(card); + } + + @Override + public Incinerate copy() { + return new Incinerate(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/LightningHelix.java b/Mage.Sets/src/mage/sets/playerrewards/LightningHelix.java new file mode 100644 index 00000000000..e815ff4bc0c --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/LightningHelix.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class LightningHelix extends mage.sets.ravnika.LightningHelix { + public LightningHelix(UUID ownerId) { + super(ownerId); + this.cardNumber = 16; + this.expansionSetCode = "MPR"; + } + + public LightningHelix(final LightningHelix card) { + super(card); + } + + @Override + public LightningHelix copy() { + return new LightningHelix(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/ManaLeak.java b/Mage.Sets/src/mage/sets/playerrewards/ManaLeak.java new file mode 100644 index 00000000000..34f9aadf006 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/ManaLeak.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class ManaLeak extends mage.sets.magic2011.ManaLeak { + public ManaLeak(UUID ownerId) { + super(ownerId); + this.cardNumber = 8; + this.expansionSetCode = "MPR"; + } + + public ManaLeak(final ManaLeak card) { + super(card); + } + + @Override + public ManaLeak copy() { + return new ManaLeak(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/ManaTithe.java b/Mage.Sets/src/mage/sets/playerrewards/ManaTithe.java new file mode 100644 index 00000000000..8ebf9b5d7a4 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/ManaTithe.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class ManaTithe extends mage.sets.planarchaos.ManaTithe { + public ManaTithe(UUID ownerId) { + super(ownerId); + this.cardNumber = 27; + this.expansionSetCode = "MPR"; + } + + public ManaTithe(final ManaTithe card) { + super(card); + } + + @Override + public ManaTithe copy() { + return new ManaTithe(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Mortify.java b/Mage.Sets/src/mage/sets/playerrewards/Mortify.java new file mode 100644 index 00000000000..bef507346fa --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Mortify.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Mortify extends mage.sets.guildpact.Mortify{ + public Mortify(UUID ownerId) { + super(ownerId); + this.cardNumber = 19; + this.expansionSetCode = "MPR"; + } + + public Mortify(final Mortify card) { + super(card); + } + + @Override + public Mortify copy() { + return new Mortify(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/PsionicBlast.java b/Mage.Sets/src/mage/sets/playerrewards/PsionicBlast.java new file mode 100644 index 00000000000..a325a3c1bbc --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/PsionicBlast.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class PsionicBlast extends mage.sets.timeshifted.PsionicBlast { + public PsionicBlast(UUID ownerId) { + super(ownerId); + this.cardNumber = 20; + this.expansionSetCode = "MPR"; + } + + public PsionicBlast(final PsionicBlast card) { + super(card); + } + + @Override + public PsionicBlast copy() { + return new PsionicBlast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Putrefy.java b/Mage.Sets/src/mage/sets/playerrewards/Putrefy.java new file mode 100644 index 00000000000..2ecd03b3add --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Putrefy.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Putrefy extends mage.sets.ravnika.Putrefy { + public Putrefy(UUID ownerId) { + super(ownerId); + this.cardNumber = 14; + this.expansionSetCode = "MPR"; + } + + public Putrefy(final Putrefy card) { + super(card); + } + + @Override + public Putrefy copy() { + return new Putrefy(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Pyroclasm.java b/Mage.Sets/src/mage/sets/playerrewards/Pyroclasm.java new file mode 100644 index 00000000000..f2d2f3f00e9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Pyroclasm.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Pyroclasm extends mage.sets.tenth.Pyroclasm { + public Pyroclasm(UUID ownerId) { + super(ownerId); + this.cardNumber = 12; + this.expansionSetCode = "MPR"; + } + + public Pyroclasm(final Pyroclasm card) { + super(card); + } + + @Override + public Pyroclasm copy() { + return new Pyroclasm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Recollect.java b/Mage.Sets/src/mage/sets/playerrewards/Recollect.java new file mode 100644 index 00000000000..6b8436d3860 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Recollect.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Recollect extends mage.sets.tenth.Recollect { + public Recollect(UUID ownerId) { + super(ownerId); + this.cardNumber = 23; + this.expansionSetCode = "MPR"; + } + + public Recollect(final Recollect card) { + super(card); + } + + @Override + public Recollect copy() { + return new Recollect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/Tidings.java b/Mage.Sets/src/mage/sets/playerrewards/Tidings.java new file mode 100644 index 00000000000..36c372ab807 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/Tidings.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class Tidings extends mage.sets.tenth.Tidings { + public Tidings(UUID ownerId) { + super(ownerId); + this.cardNumber = 25; + this.expansionSetCode = "MPR"; + } + + public Tidings(final Tidings card) { + super(card); + } + + @Override + public Tidings copy() { + return new Tidings(this); + } +} diff --git a/Mage.Sets/src/mage/sets/playerrewards/WrathOfGod.java b/Mage.Sets/src/mage/sets/playerrewards/WrathOfGod.java new file mode 100644 index 00000000000..eca7de9d340 --- /dev/null +++ b/Mage.Sets/src/mage/sets/playerrewards/WrathOfGod.java @@ -0,0 +1,23 @@ +package mage.sets.playerrewards; + +import java.util.UUID; + +/** + * @author Loki + */ +public class WrathOfGod extends mage.sets.tenth.WrathOfGod{ + public WrathOfGod(UUID ownerId) { + super(ownerId); + this.cardNumber = 17; + this.expansionSetCode = "MPR"; + } + + public WrathOfGod(final WrathOfGod card) { + super(card); + } + + @Override + public WrathOfGod copy() { + return new WrathOfGod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/shardsofalara/Infest.java b/Mage.Sets/src/mage/sets/shardsofalara/Infest.java index c06e1b3d148..4e45a4dbd93 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/Infest.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/Infest.java @@ -34,6 +34,7 @@ import mage.Constants.CardType; import mage.Constants.Rarity; import mage.abilities.effects.common.continious.BoostAllEffect; import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; /** * @@ -48,7 +49,7 @@ public class Infest extends CardImpl { this.color.setBlack(true); // All creatures get -2/-2 until end of turn. - this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Constants.Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Constants.Duration.EndOfTurn, new FilterCreaturePermanent("All creatures"), false)); } public Infest(final Infest card) { diff --git a/Mage.Sets/src/mage/sets/tenth/WrathOfGod.java b/Mage.Sets/src/mage/sets/tenth/WrathOfGod.java new file mode 100644 index 00000000000..b61c2fb9354 --- /dev/null +++ b/Mage.Sets/src/mage/sets/tenth/WrathOfGod.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.sets.tenth; + +import java.util.UUID; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.cards.CardImpl; +import mage.filter.common.FilterCreaturePermanent; + +/** + * + * @author Loki + */ +public class WrathOfGod extends CardImpl { + + public WrathOfGod(UUID ownerId) { + super(ownerId, 61, "Wrath of God", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{W}{W}"); + this.expansionSetCode = "10E"; + + this.color.setWhite(true); + + // Destroy all creatures. They can't be regenerated. + this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent("creatures"), true)); + } + + public WrathOfGod(final WrathOfGod card) { + super(card); + } + + @Override + public WrathOfGod copy() { + return new WrathOfGod(this); + } +} diff --git a/Mage.Sets/src/mage/sets/timeshifted/PsionicBlast.java b/Mage.Sets/src/mage/sets/timeshifted/PsionicBlast.java new file mode 100644 index 00000000000..b250de51087 --- /dev/null +++ b/Mage.Sets/src/mage/sets/timeshifted/PsionicBlast.java @@ -0,0 +1,95 @@ +/* + * 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; +import mage.Constants.CardType; +import mage.Constants.Rarity; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCreatureOrPlayer; + +/** + * + * @author Loki + */ +public class PsionicBlast extends CardImpl { + + public PsionicBlast(UUID ownerId) { + super(ownerId, 30, "Psionic Blast", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{U}"); + this.expansionSetCode = "TSB"; + + this.color.setBlue(true); + + // Psionic Blast deals 4 damage to target creature or player and 2 damage to you. + this.getSpellAbility().addEffect(new DamageTargetEffect(4)); + this.getSpellAbility().addEffect(new PsionicBlastEffect()); + this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + } + + public PsionicBlast(final PsionicBlast card) { + super(card); + } + + @Override + public PsionicBlast copy() { + return new PsionicBlast(this); + } +} + +class PsionicBlastEffect extends OneShotEffect { + PsionicBlastEffect() { + super(Constants.Outcome.Damage); + staticText = "{this} deals 2 damage to you"; + } + + PsionicBlastEffect(final PsionicBlastEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player != null) { + player.damage(2, source.getSourceId(), game, false, true); + return true; + } + return false; + } + + @Override + public PsionicBlastEffect copy() { + return new PsionicBlastEffect(this); + } +} \ No newline at end of file diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/damage/PsionicBlastTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/damage/PsionicBlastTest.java new file mode 100644 index 00000000000..4ffc91247c8 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/damage/PsionicBlastTest.java @@ -0,0 +1,25 @@ +package org.mage.test.cards.damage; + +import mage.Constants; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestBase; + +/** + * @author Loki + */ +public class PsionicBlastTest extends CardTestBase { + + @Test + public void testDamageInPlayer() { + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island"); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island"); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island"); + addCard(Constants.Zone.HAND, playerA, "Psionic Blast"); + + castSpell(playerA, "Psionic Blast"); + execute(); + + assertLife(playerA, 18); + assertLife(playerB, 16); + } +} diff --git a/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java b/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java index ebe7a7d3a9f..3022b8c386f 100644 --- a/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/DestroyAllEffect.java @@ -36,35 +36,43 @@ import mage.game.Game; import mage.game.permanent.Permanent; /** - * * @author BetaSteward_at_googlemail.com */ public class DestroyAllEffect extends OneShotEffect { - private FilterPermanent filter; + private FilterPermanent filter; + private boolean noRegen; - public DestroyAllEffect(FilterPermanent filter) { - super(Outcome.DestroyPermanent); - this.filter = filter; - staticText = "Destroy all " + filter.getMessage(); - } + public DestroyAllEffect(FilterPermanent filter, boolean noRegen) { + super(Outcome.DestroyPermanent); + this.filter = filter; + this.noRegen = noRegen; + if (noRegen) + staticText = "Destroy all " + filter.getMessage() + ". They can't be regenerated"; + else + staticText = "Destroy all " + filter.getMessage(); + } - public DestroyAllEffect(final DestroyAllEffect effect) { - super(effect); - this.filter = effect.filter.copy(); - } + public DestroyAllEffect(FilterPermanent filter) { + this(filter, false); + } - @Override - public DestroyAllEffect copy() { - return new DestroyAllEffect(this); - } + public DestroyAllEffect(final DestroyAllEffect effect) { + super(effect); + this.filter = effect.filter.copy(); + } - @Override - public boolean apply(Game game, Ability source) { - for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - permanent.destroy(source.getId(), game, false); - } - return true; - } + @Override + public DestroyAllEffect copy() { + return new DestroyAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + permanent.destroy(source.getId(), game, noRegen); + } + return true; + } } diff --git a/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java b/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java index ef74b97a19b..7220773abc7 100644 --- a/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/BoostAllEffect.java @@ -118,7 +118,7 @@ public class BoostAllEffect extends ContinuousEffectImpl { StringBuilder sb = new StringBuilder(); if (excludeSource) sb.append("Other "); - sb.append(filter.getMessage()).append(" get "); + sb.append(filter.getMessage()).append(" gets "); String p = power.toString(); if(!p.startsWith("-")) sb.append("+");