From 3b82e3c2bf976ce59afaac53b98ddfdc08769116 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 15:31:06 -0500 Subject: [PATCH 1/6] Generated card template using pearl script --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 56 ++++++++++++++++++++++ Mage.Sets/src/mage/sets/Weatherlight.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HeatStroke.java diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java new file mode 100644 index 00000000000..5e96b8db9a9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -0,0 +1,56 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.h; + +import java.util.UUID; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author dustinroepsch + */ +public class HeatStroke extends CardImpl { + + public HeatStroke(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); + + + // At end of combat, destroy each creature that blocked or was blocked this turn. + } + + public HeatStroke(final HeatStroke card) { + super(card); + } + + @Override + public HeatStroke copy() { + return new HeatStroke(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index 065500d14f4..a34539fa608 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -120,6 +120,7 @@ public class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Guided Strike", 132, Rarity.COMMON, mage.cards.g.GuidedStrike.class)); cards.add(new SetCardInfo("Harvest Wurm", 72, Rarity.COMMON, mage.cards.h.HarvestWurm.class)); cards.add(new SetCardInfo("Haunting Misery", 13, Rarity.COMMON, mage.cards.h.HauntingMisery.class)); + cards.add(new SetCardInfo("Heat Stroke", 107, Rarity.RARE, mage.cards.h.HeatStroke.class)); cards.add(new SetCardInfo("Heavy Ballista", 133, Rarity.COMMON, mage.cards.h.HeavyBallista.class)); cards.add(new SetCardInfo("Hidden Horror", 14, Rarity.UNCOMMON, mage.cards.h.HiddenHorror.class)); cards.add(new SetCardInfo("Hurloon Shaman", 108, Rarity.UNCOMMON, mage.cards.h.HurloonShaman.class)); From 8aee5d795cfd258f0bb35f903039418e2337feb7 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 16:14:39 -0500 Subject: [PATCH 2/6] Implemented Heat Stroke --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java index 5e96b8db9a9..5d2106ac00f 100644 --- a/Mage.Sets/src/mage/cards/h/HeatStroke.java +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -28,21 +28,45 @@ package mage.cards.h; import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.common.EndOfCombatTriggeredAbility; +import mage.abilities.effects.common.DestroyAllEffect; +import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.filter.Filter; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.BlockedPredicate; +import mage.filter.predicate.permanent.BlockingPredicate; +import mage.watchers.common.BlockedThisTurnWatcher; /** - * * @author dustinroepsch */ public class HeatStroke extends CardImpl { + private static final FilterPermanent filter = new FilterCreaturePermanent(); + + static { + filter.add(Predicates.or( + new BlockedPredicate(), new BlockingPredicate() + )); + } public HeatStroke(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); - + // At end of combat, destroy each creature that blocked or was blocked this turn. + this.addAbility( + new EndOfCombatTriggeredAbility( + new DestroyAllEffect(filter), + false + ) + ); } public HeatStroke(final HeatStroke card) { From db608dc35d0ecf8c40c4b293879fcb56d8a4d5e4 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 16:15:24 -0500 Subject: [PATCH 3/6] optimized imports --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java index 5d2106ac00f..d261d2fae23 100644 --- a/Mage.Sets/src/mage/cards/h/HeatStroke.java +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -27,22 +27,18 @@ */ package mage.cards.h; -import java.util.UUID; - -import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; import mage.abilities.effects.common.DestroyAllEffect; -import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.Filter; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.BlockedPredicate; import mage.filter.predicate.permanent.BlockingPredicate; -import mage.watchers.common.BlockedThisTurnWatcher; + +import java.util.UUID; /** * @author dustinroepsch From c6f4332f2efbca2173ac39def26cb0c100ce2ea5 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 17:29:39 -0500 Subject: [PATCH 4/6] fixed static text --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java index d261d2fae23..207ab4ff360 100644 --- a/Mage.Sets/src/mage/cards/h/HeatStroke.java +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -27,7 +27,10 @@ */ package mage.cards.h; +import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -37,6 +40,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.BlockedPredicate; import mage.filter.predicate.permanent.BlockingPredicate; +import mage.game.Game; import java.util.UUID; @@ -59,7 +63,7 @@ public class HeatStroke extends CardImpl { // At end of combat, destroy each creature that blocked or was blocked this turn. this.addAbility( new EndOfCombatTriggeredAbility( - new DestroyAllEffect(filter), + new DestroyAllEffect(filter).setText("destroy each creature that blocked or was blocked this turn."), false ) ); @@ -74,3 +78,4 @@ public class HeatStroke extends CardImpl { return new HeatStroke(this); } } + From 640f1bea5bcea57f18f77ba9ef56027adea4c9a7 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 17:53:12 -0500 Subject: [PATCH 5/6] Fixed card text --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java index 207ab4ff360..37fef0f81d1 100644 --- a/Mage.Sets/src/mage/cards/h/HeatStroke.java +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -27,10 +27,7 @@ */ package mage.cards.h; -import mage.abilities.Ability; import mage.abilities.common.EndOfCombatTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -40,7 +37,6 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.permanent.BlockedPredicate; import mage.filter.predicate.permanent.BlockingPredicate; -import mage.game.Game; import java.util.UUID; From 4c7ab8babe41e092d876984c528ccbf13f8ad651 Mon Sep 17 00:00:00 2001 From: Dustin Ryan - Roepsch Date: Sun, 30 Apr 2017 17:56:08 -0500 Subject: [PATCH 6/6] removed extra line --- Mage.Sets/src/mage/cards/h/HeatStroke.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/h/HeatStroke.java b/Mage.Sets/src/mage/cards/h/HeatStroke.java index 37fef0f81d1..0a85d9fabb8 100644 --- a/Mage.Sets/src/mage/cards/h/HeatStroke.java +++ b/Mage.Sets/src/mage/cards/h/HeatStroke.java @@ -55,7 +55,6 @@ public class HeatStroke extends CardImpl { public HeatStroke(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}"); - // At end of combat, destroy each creature that blocked or was blocked this turn. this.addAbility( new EndOfCombatTriggeredAbility(