From 6898313f0fbc4355e25d83380170e8681ef77c0d Mon Sep 17 00:00:00 2001 From: Fr33dan Date: Tue, 27 Sep 2016 18:01:27 -0400 Subject: [PATCH 1/8] Fix Fairgrounds Trumpeter triggering only on controller's end step. --- Mage.Sets/src/mage/sets/kaladesh/FairgroundsTrumpeter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/kaladesh/FairgroundsTrumpeter.java b/Mage.Sets/src/mage/sets/kaladesh/FairgroundsTrumpeter.java index c45e7d8d47..f423a20885 100644 --- a/Mage.Sets/src/mage/sets/kaladesh/FairgroundsTrumpeter.java +++ b/Mage.Sets/src/mage/sets/kaladesh/FairgroundsTrumpeter.java @@ -63,7 +63,7 @@ public class FairgroundsTrumpeter extends CardImpl { // At the beginning of each end step, if a +1/+1 counter was placed on a permanent under your control this turn, put a +1/+1 counter on Fairgrounds Trumpeter. this.addAbility(new ConditionalTriggeredAbility(new BeginningOfEndStepTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance()), - TargetController.YOU, false), FairgroundsTrumpeterCondition.getInstance(), + TargetController.ANY, false), FairgroundsTrumpeterCondition.getInstance(), "At the beginning of each end step, if a +1/+1 counter was placed on a permanent under your control this turn, put a +1/+1 counter on Fairgrounds Trumpeter."), new FairgroundsTrumpeterWatcher()); } From 923f4a1bb5322e0e2d4b841051fbd49a20eeea73 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 28 Sep 2016 00:05:13 +0200 Subject: [PATCH 2/8] [SWS] Fixed Sith Ravager, added missing import to Maintenance Hangar. --- .../mage/sets/starwars/MaintenanceHangar.java | 1 + .../src/mage/sets/starwars/SithRavager.java | 27 ++++++------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/Mage.Sets/src/mage/sets/starwars/MaintenanceHangar.java b/Mage.Sets/src/mage/sets/starwars/MaintenanceHangar.java index 2ac91f688d..5721a37cc0 100644 --- a/Mage.Sets/src/mage/sets/starwars/MaintenanceHangar.java +++ b/Mage.Sets/src/mage/sets/starwars/MaintenanceHangar.java @@ -51,6 +51,7 @@ import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.filter.predicate.permanent.CounterPredicate; import mage.game.Game; import mage.players.Player; diff --git a/Mage.Sets/src/mage/sets/starwars/SithRavager.java b/Mage.Sets/src/mage/sets/starwars/SithRavager.java index 401cea1e3f..7ed8342ac7 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithRavager.java +++ b/Mage.Sets/src/mage/sets/starwars/SithRavager.java @@ -29,17 +29,17 @@ package mage.sets.starwars; import java.util.UUID; import mage.MageInt; -import mage.cards.CardImpl; -import mage.constants.CardType; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.PhaseStep; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; /** @@ -49,7 +49,7 @@ import mage.game.events.GameEvent; public class SithRavager extends CardImpl { public SithRavager(UUID ownerId) { - super(ownerId, 122, "Sith Ravager", Rarity.NA/*COMMON*/, new CardType[]{CardType.CREATURE}, "{3}{R}"); + super(ownerId, 122, "Sith Ravager", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.expansionSetCode = "SWS"; this.subtype.add("Human"); this.subtype.add("Sith"); @@ -87,31 +87,20 @@ public class SithRavager extends CardImpl { @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.LOST_LIFE; + return event.getType() == GameEvent.EventType.LOST_LIFE; } @Override public boolean checkTrigger(GameEvent event, Game game) { - // ON DAMAGE TRIGGER TWICE - if (event.getType() == GameEvent.EventType.LOST_LIFE) { - game.informPlayers("LOST LIFE TRIGGER"); - } - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { - game.informPlayers("DAMAGED PLAYER TRIGGER " + ((DamagedPlayerEvent) event).isCombatDamage()); - } - - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { - return !((DamagedPlayerEvent) event).isCombatDamage() && game.getOpponents(game.getControllerId(sourceId)).contains(event.getPlayerId()); - } else if (event.getType() == GameEvent.EventType.LOST_LIFE) { - return game.getOpponents(game.getControllerId(sourceId)).contains(event.getPlayerId()); + if (!game.getStep().getType().equals(PhaseStep.COMBAT_DAMAGE)) { + return game.getOpponents(game.getControllerId(getSourceId())).contains(event.getPlayerId()); } return false; } @Override public String getRule() { - return "Hate — Whenever an opponent loses life from a source other than combat damage, Sith Ravager gains haste and trample until end of turn"; + return "Hate — Whenever an opponent loses life from a source other than combat damage, {this} gains haste and trample until end of turn."; } } From 68464198dc20c6e08d84d0812b232a5022dc2670 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 28 Sep 2016 00:08:04 +0200 Subject: [PATCH 3/8] Fixed minor problem of Volrath's Laboratory. --- .../src/mage/sets/tempestremastered/VolrathsLaboratory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/tempestremastered/VolrathsLaboratory.java b/Mage.Sets/src/mage/sets/tempestremastered/VolrathsLaboratory.java index b613154510..17fa6d4038 100644 --- a/Mage.Sets/src/mage/sets/tempestremastered/VolrathsLaboratory.java +++ b/Mage.Sets/src/mage/sets/tempestremastered/VolrathsLaboratory.java @@ -59,9 +59,9 @@ public class VolrathsLaboratory extends CardImpl { // As Volrath's Laboratory enters the battlefield, choose a color and a creature type. Ability ability = new EntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral)); - Effect effect = new ChooseColorEffect(Outcome.Neutral); + Effect effect = new ChooseCreatureTypeEffect(Outcome.Neutral); effect.setText("and a creature type"); - ability.addEffect(new ChooseCreatureTypeEffect(Outcome.Neutral)); + ability.addEffect(effect); this.addAbility(ability); // {5}, {T}: Put a 2/2 creature token of the chosen color and type onto the battlefield. From 9676f24752261cb0ac6ea8ebe45da23610e1ab12 Mon Sep 17 00:00:00 2001 From: fireshoes Date: Tue, 27 Sep 2016 21:05:38 -0500 Subject: [PATCH 4/8] Added some promo cards. --- .../sets/fridaynightmagic/FieryTemper.java | 54 +++++++++++++++++++ .../mage/sets/gameday/CultivatorOfBlades.java | 52 ++++++++++++++++++ .../mage/sets/gameday/EssenceExtraction.java | 52 ++++++++++++++++++ .../mage/sets/judgepromo/ZurTheEnchanter.java | 52 ++++++++++++++++++ .../sets/launchparty/SaheelisArtistry.java | 52 ++++++++++++++++++ .../sets/mediainserts/SkyshipStalker.java | 52 ++++++++++++++++++ Utils/mtg-cards-data.txt | 8 ++- 7 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 Mage.Sets/src/mage/sets/fridaynightmagic/FieryTemper.java create mode 100644 Mage.Sets/src/mage/sets/gameday/CultivatorOfBlades.java create mode 100644 Mage.Sets/src/mage/sets/gameday/EssenceExtraction.java create mode 100644 Mage.Sets/src/mage/sets/judgepromo/ZurTheEnchanter.java create mode 100644 Mage.Sets/src/mage/sets/launchparty/SaheelisArtistry.java create mode 100644 Mage.Sets/src/mage/sets/mediainserts/SkyshipStalker.java diff --git a/Mage.Sets/src/mage/sets/fridaynightmagic/FieryTemper.java b/Mage.Sets/src/mage/sets/fridaynightmagic/FieryTemper.java new file mode 100644 index 0000000000..cce4ea7bc9 --- /dev/null +++ b/Mage.Sets/src/mage/sets/fridaynightmagic/FieryTemper.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 fireshoes + */ +public class FieryTemper extends mage.sets.timeshifted.FieryTemper { + + public FieryTemper(UUID ownerId) { + super(ownerId); + this.cardNumber = "198"; + this.expansionSetCode = "FNMP"; + this.rarity = Rarity.UNCOMMON; + } + + public FieryTemper(final FieryTemper card) { + super(card); + } + + @Override + public FieryTemper copy() { + return new FieryTemper(this); + } +} diff --git a/Mage.Sets/src/mage/sets/gameday/CultivatorOfBlades.java b/Mage.Sets/src/mage/sets/gameday/CultivatorOfBlades.java new file mode 100644 index 0000000000..5fef23f00d --- /dev/null +++ b/Mage.Sets/src/mage/sets/gameday/CultivatorOfBlades.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.gameday; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class CultivatorOfBlades extends mage.sets.kaladesh.CultivatorOfBlades { + + public CultivatorOfBlades(UUID ownerId) { + super(ownerId); + this.cardNumber = "56"; + this.expansionSetCode = "MGDC"; + } + + public CultivatorOfBlades(final CultivatorOfBlades card) { + super(card); + } + + @Override + public CultivatorOfBlades copy() { + return new CultivatorOfBlades(this); + } +} diff --git a/Mage.Sets/src/mage/sets/gameday/EssenceExtraction.java b/Mage.Sets/src/mage/sets/gameday/EssenceExtraction.java new file mode 100644 index 0000000000..105fab098a --- /dev/null +++ b/Mage.Sets/src/mage/sets/gameday/EssenceExtraction.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.gameday; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class EssenceExtraction extends mage.sets.kaladesh.EssenceExtraction { + + public EssenceExtraction(UUID ownerId) { + super(ownerId); + this.cardNumber = "55"; + this.expansionSetCode = "MGDC"; + } + + public EssenceExtraction(final EssenceExtraction card) { + super(card); + } + + @Override + public EssenceExtraction copy() { + return new EssenceExtraction(this); + } +} diff --git a/Mage.Sets/src/mage/sets/judgepromo/ZurTheEnchanter.java b/Mage.Sets/src/mage/sets/judgepromo/ZurTheEnchanter.java new file mode 100644 index 0000000000..1bcfebdfc2 --- /dev/null +++ b/Mage.Sets/src/mage/sets/judgepromo/ZurTheEnchanter.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.judgepromo; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class ZurTheEnchanter extends mage.sets.coldsnap.ZurTheEnchanter { + + public ZurTheEnchanter(UUID ownerId) { + super(ownerId); + this.cardNumber = "107"; + this.expansionSetCode = "JR"; + } + + public ZurTheEnchanter(final ZurTheEnchanter card) { + super(card); + } + + @Override + public ZurTheEnchanter copy() { + return new ZurTheEnchanter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/launchparty/SaheelisArtistry.java b/Mage.Sets/src/mage/sets/launchparty/SaheelisArtistry.java new file mode 100644 index 0000000000..2cb1807260 --- /dev/null +++ b/Mage.Sets/src/mage/sets/launchparty/SaheelisArtistry.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.launchparty; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SaheelisArtistry extends mage.sets.kaladesh.SaheelisArtistry { + + public SaheelisArtistry(UUID ownerId) { + super(ownerId); + this.cardNumber = "37"; + this.expansionSetCode = "MLP"; + } + + public SaheelisArtistry(final SaheelisArtistry card) { + super(card); + } + + @Override + public SaheelisArtistry copy() { + return new SaheelisArtistry(this); + } +} diff --git a/Mage.Sets/src/mage/sets/mediainserts/SkyshipStalker.java b/Mage.Sets/src/mage/sets/mediainserts/SkyshipStalker.java new file mode 100644 index 0000000000..9cdcccd372 --- /dev/null +++ b/Mage.Sets/src/mage/sets/mediainserts/SkyshipStalker.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.mediainserts; + +import java.util.UUID; + +/** + * + * @author fireshoes + */ +public class SkyshipStalker extends mage.sets.kaladesh.SkyshipStalker { + + public SkyshipStalker(UUID ownerId) { + super(ownerId); + this.cardNumber = "162"; + this.expansionSetCode = "MBP"; + } + + public SkyshipStalker(final SkyshipStalker card) { + super(card); + } + + @Override + public SkyshipStalker copy() { + return new SkyshipStalker(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index e0cbbbe4a7..5eb212521c 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -1,4 +1,4 @@ -Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| +Ardent Plea|Alara Reborn|1|U|{1}{W}{U}|Enchantment|||Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)$Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)| Aven Mimeomancer|Alara Reborn|2|R|{1}{W}{U}|Creature - Bird Wizard|3|1|Flying$At the beginning of your upkeep, you may put a feather counter on target creature. If you do, that creature is 3/1 and has flying for as long as it has a feather counter on it.| Ethercaste Knight|Alara Reborn|3|C|{W}{U}|Artifact Creature - Human Knight|1|3|Exalted (Whenever a creature you control attacks alone, that creature gets +1/+1 until end of turn.)| Ethersworn Shieldmage|Alara Reborn|4|C|{1}{W}{U}|Artifact Creature - Vedalken Wizard|2|2|Flash$When Ethersworn Shieldmage enters the battlefield, prevent all damage that would be dealt to artifact creatures this turn.| @@ -8086,6 +8086,7 @@ Spatial Contortion|Friday Night Magic|194|U|{1}{C}|Instant|||Target creature get Crumbling Vestige|Friday Night Magic|195|C||Land|||Crumbling Vestige enters the battlefield tapped.$When Crumbling Vestige enters the battlefield, add one mana of any color to your mana pool.${T}: Add {C} to you mana pool. ({C} represents colorless mana.)| Flaying Tendrils|Friday Night Magic|196|U|{1}{B}{B}|Sorcery|||Devoid (This card has no color.)$All creatures get -2/-2 until end of turn. If a creature would die this turn, exile it instead.| Rise from the Tides|Friday Night Magic|197|U|{5}{U}|Sorcery|||Create a tapped 2/2 black Zombie creature token for each instant and sorcery card in your graveyard.| +Fiery Temper|Friday Night Magic|198|U|{1}{R}{R}|Instant|||Fiery Temper deals 3 damage to target creature or player.$Madness {R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)| Akroma, Angel of Fury|From the Vault: Angels|1|M|{5}{R}{R}{R}|Legendary Creature - Angel|6|6|Akroma, Angel of Fury can't be countered.$Flying, trample, protection from white and from blue${R}: Akroma, Angel of Fury gets +1/+0 until end of turn.$Morph {3}{R}{R}{R} You may cast this card face downn as a 2/2 creature for {3}. Turn it face up any time for its morph cost.)| Akroma, Angel of Wrath|From the Vault: Angels|2|M|{5}{W}{W}{W}|Legendary Creature - Angel|6|6|Flying, first strike, vigilance, trample, haste, protection from black and from red| Archangel of Strife|From the Vault: Angels|3|M|{5}{W}{W}|Creature - Angel|6|6|Flying$As Archangel of Strife enters the battlefield, each player chooses war or peace.$Creatures controlled by players who chose war get +3/+0.$Creatures controlled by players who chose peace get +0/+3.| @@ -10275,6 +10276,7 @@ Mana Drain|Judge Promo|103|U|{U}{U}|Instant|||Counter target spell. At the begin Grindstone|Judge Promo|104|R|{1}|Artifact|||{3}, {tap}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process.| Command Beacon|Judge Promo|105|R||Land|||{tap}: Add {C} to your mana pool.${tap}, Sacrifice Command Beacon: Put your commander into your hand from the command zone.| Defense of the Heart|Judge Promo|106|R|{3}{G}|Enchantment|||At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart, search your library for up to two creature cards, and put those cards onto the battlefield. Then shuffle your library.| +Zur the Enchanter|Judge Promo|107|R|{1}{W}{U}{B}|Legendary Creature - Human Wizard|1|4|Flying$Whenever Zur the Enchanter attacks, you may search your library for an enchantment card with converted mana cost 3 or less and put it onto the battlefield. If you do, shuffle your library.| Ancestor's Chosen|Judgment|1|U|{5}{W}{W}|Creature - Human Cleric|4|4|First strike (This creature deals combat damage before creatures without first strike.)$When Ancestor's Chosen enters the battlefield, you gain 1 life for each card in your graveyard.| Funeral Pyre|Judgment|10|C|{W}|Instant|||Exile target card from a graveyard. Its owner puts a 1/1 white Spirit creature token with flying onto the battlefield.| Spellgorger Barbarian|Judgment|100|C|{3}{R}|Creature - Human Nightmare Barbarian|3|1|When Spellgorger Barbarian enters the battlefield, discard a card at random.$When Spellgorger Barbarian leaves the battlefield, draw a card.| @@ -10725,6 +10727,7 @@ Blight Herder|Launch Party|33|R|{5}|Creature - Eldrazi Processor|4|5|When you ca Endbringer|Launch Party|34|R|{5}{C}|Creature - Eldrazi|5|5|Untap Endbringer during each other player's untap step.${T}: Endbringer deals 1 damage to target creature or player.${C}, {T}: Target creature can't attack or block this turn.${C}{C}, {T}: Draw a card.| Angel of Deliverance|Launch Party|35|R|{6}{W}{W}|Creature - Angel|6|6|Flying$Delirium — Whenever Angel of Deliverance deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls.| Identity Thief|Launch Party|36|R|{2}{U}{U}|Creature - Shapeshifter|0|3|Whenever Identity Thief attacks, you may exile another target non-token creature. If you do, Identity Thief becomes a copy of that creature until end of turn. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step.| +Saheeli's Artistry|Launch Party|37|R|{4}{U}{U}|Sorcery|||Choose one or both — Create a token that's a copy of target artifact.; or Create a token that's a copy of target creature, except it's an artifact in addition to its other types.| Abomination|Legends|1|U|{3}{B}{B}|Creature - Horror|2|6|Whenever Abomination blocks or becomes blocked by a green or white creature, destroy that creature at end of combat.| Evil Eye of Orms-by-Gore|Legends|10|U|{4}{B}|Creature - Eye|3|6|Non-Eye creatures you control can't attack.$Evil Eye of Orms-by-Gore can't be blocked except by Walls.| Fire Sprites|Legends|100|C|{1}{G}|Creature - Faerie|1|1|Flying${G}, {tap}: Add {R} to your mana pool.| @@ -28597,6 +28600,8 @@ Incorrigible Youths|Game Day|51|U|{3}{R}{R}|Creature - Vampire|4|3|Haste$Madness Anguished Unmaking|Game Day|52|R|{1}{W}{B}|Instant|||Exile target nonland permanent. You lose 3 life.| Unsubstantiate|Game Day|53|U|{1}{U}|Instant|||Return target spell or creature to its owner's hand.| Heron's Grace Champion|Game Day|54|R|{2}{G}{W}|Creature - Human Knight|3|3|Flash$Lifelink$When Heron's Grace Champion enters the battlefield, other Humans you control get +1/+1 and gain lifelink until end of turn.| +Essence Extraction|Game Day|55|U|{1}{B}{B}|Instant|||Essence Extraction deals 3 damage to target creature and you gain 3 life.| +Cultivator of Blades|Game Day|56|R|{3}{G}{G}|Creature - Elf Artificer|1|1|Fabricate 2$Whenever Cultivator of Blades attacks, you may have other attacking creatures get +X/+X until end of turn, where X is Cultivator of Blades's power.| Garruk Relentless|Innistrad|181a|M|{3}{G}|Planeswalker - Garruk|||When Garruk Relentless has two or fewer loyalty counters on him, transform him.$0: Garruk Relentless deals 3 damage to target creature. That creature deals damage equal to its power to him.$0: Put a 2/2 green Wolf creature token onto the battlefield.| Garruk, the Veil-Cursed|Innistrad|181b|M||Planeswalker - Garruk|||+1: Put a 1/1 black Wolf creature token with deathtouch onto the battlefield.$-1: Sacrifice a creature. If you do, search your library for a creature card, reveal it, put it into your hand, then shuffle your library.$-3: Creatures you control gain trample and get +X/+X until end of turn, where X is the number of creature cards in your graveyard.| Stand|Invasion|292a|U|{W}|Instant|||Prevent the next 2 damage that would be dealt to target creature this turn.$| @@ -28825,6 +28830,7 @@ Niblis of Frost|Media Inserts|158|R|{2}{U}{U}|Creature - Spirit|3|3|Flying$Prowe Noosegraf Mob|Media Inserts|159|R|{4}{B}{B}|Creature - Zombie|0|0|Noosegraf Mob enters the battlefield with five +1/+1 counters on it.$Whenever a player casts a spell, remove a +1/+1 counter from Noosegraf Mob. If you do, put a 2/2 black Zombie creature token onto the battlefield.| Assembled Alphas|Media Inserts|160|R|{5}{R}|Creature - Wolf|5|5|Whenever Assembled Alphas blocks or becomes blocked by a creature, Assembled Alphas deals 3 damage to that creature and 3 damage to that creature's controller.| Ulvenwald Observer|Media Inserts|161|R|{4}{G}{G}|Creature - Treefolk|6|6|Whenever a creature you control with toughness 4 or greater dies, draw a card.| +Skyship Stalker|Media Inserts|162|R|{2}{R}{R}|Creature - Dragon|3|3|Flying${R}: Skyship Stalker gets +1/+0 until end of turn.${R}: Skyship Stalker gains first strike until end of turn.${R}: Skyship Stalker gains haste until end of turn.| Kytheon, Hero of Akros|Media Inserts|994|Special|{W}|Legendary Creature - Human Soldier|2|1|At end of combat, if Kytheon, Hero of Akros and at least two other creatures attacked this combat, exile Kytheon, then return him to the battlefield transformed under his owner's control.${2}{W}: Kytheon gains indestructible until end of turn.| Gideon, Battle-Forged|Media Inserts|994|Special||Planeswalker - Gideon|3|+2: Up to one target creature an opponent controls attacks Gideon, Battle-Forged during its controller's next turn if able.$+1: Until your next turn, target creature gains indestructible. Untap that creature.$0: Until end of turn, Gideon, Battle-Forged becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.| Jace, Vryn's Prodigy|Media Inserts|995|Special|{1}{U}|Legendary Creature - Human Wizard|0|2|{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn''s Prodigy, then return him to the battefield transformed under his owner's control. | From 9cf9d69c55a6a79460094261d581d368d4bc8799 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 28 Sep 2016 08:00:32 +0200 Subject: [PATCH 5/8] Fixed minor problem of Volrath's Laboratory. Added combat flag to LIFE_LOST event. --- .../src/mage/sets/alarareborn/SingeMindOgre.java | 2 +- Mage.Sets/src/mage/sets/apocalypse/LifeDeath.java | 2 +- .../src/mage/sets/avacynrestored/EssenceHarvest.java | 2 +- .../src/mage/sets/avacynrestored/KillingWave.java | 2 +- .../mage/sets/betrayersofkamigawa/ScourgeOfNumai.java | 2 +- .../sets/betrayersofkamigawa/TakenumaBleeder.java | 2 +- Mage.Sets/src/mage/sets/bornofthegods/PainSeer.java | 2 +- .../src/mage/sets/bornofthegods/ServantOfTymaret.java | 2 +- .../mage/sets/championsofkamigawa/DevouringGreed.java | 2 +- .../championsofkamigawa/KokushoTheEveningStar.java | 2 +- .../sets/championsofkamigawa/NezumiShortfang.java | 2 +- .../src/mage/sets/commander2013/LimDulsVault.java | 2 +- .../sets/commander2014/ObNixilisOfTheBlackOath.java | 2 +- Mage.Sets/src/mage/sets/commander2014/RavingDead.java | 2 +- .../src/mage/sets/commander2015/DeadlyTempest.java | 2 +- Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java | 2 +- Mage.Sets/src/mage/sets/conflux/BloodTyrant.java | 2 +- Mage.Sets/src/mage/sets/conflux/InfectiousHorror.java | 2 +- Mage.Sets/src/mage/sets/conflux/SludgeStrider.java | 2 +- .../mage/sets/conspiracy/StrongholdDiscipline.java | 2 +- Mage.Sets/src/mage/sets/conspiracy/TyrantsChoice.java | 2 +- .../conspiracytakethecrown/KayaGhostAssassin.java | 2 +- Mage.Sets/src/mage/sets/dissension/RainOfGore.java | 2 +- .../src/mage/sets/dragonsmaze/BloodScrivener.java | 2 +- .../src/mage/sets/dragonsoftarkir/DamnablePact.java | 2 +- .../mage/sets/dragonsoftarkir/FoulTongueShriek.java | 2 +- .../mage/sets/dragonsoftarkir/SelfInflictedWound.java | 2 +- .../mage/sets/eighthedition/MurderousBetrayal.java | 2 +- .../src/mage/sets/eldritchmoon/CertainDeath.java | 2 +- Mage.Sets/src/mage/sets/eventide/BatwingBrume.java | 2 +- .../src/mage/sets/eventide/SaplingOfColfenor.java | 2 +- Mage.Sets/src/mage/sets/eventide/SootImp.java | 2 +- Mage.Sets/src/mage/sets/eventide/SoulReap.java | 2 +- Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java | 2 +- Mage.Sets/src/mage/sets/fifthedition/Pox.java | 2 +- .../src/mage/sets/fifthedition/SylvanLibrary.java | 2 +- .../src/mage/sets/futuresight/MinionsMurmurs.java | 2 +- Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java | 2 +- Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java | 2 +- .../src/mage/sets/gatecrash/VizkopaConfessor.java | 2 +- .../src/mage/sets/gatecrash/VizkopaGuildmage.java | 2 +- Mage.Sets/src/mage/sets/guildpact/AgentOfMasks.java | 2 +- .../mage/sets/guildpact/GhostCouncilOfOrzhova.java | 2 +- .../src/mage/sets/guildpact/SoulsOfTheFaultless.java | 2 +- Mage.Sets/src/mage/sets/iceage/GameOfChaos.java | 4 ++-- Mage.Sets/src/mage/sets/iceage/ZursWeirding.java | 2 +- Mage.Sets/src/mage/sets/invasion/PhyrexianDelver.java | 2 +- Mage.Sets/src/mage/sets/judgment/DeathWish.java | 2 +- .../mage/sets/kaladesh/ChandraTorchOfDefiance.java | 11 +++++++++-- Mage.Sets/src/mage/sets/lorwyn/HoardersGreed.java | 2 +- Mage.Sets/src/mage/sets/magic2010/XathridDemon.java | 4 ++-- Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java | 2 +- .../src/mage/sets/magic2014/BubblingCauldron.java | 2 +- .../src/mage/sets/magic2015/ObNixilisUnshackled.java | 2 +- .../mage/sets/magicorigins/GravebladeMarauder.java | 2 +- .../src/mage/sets/magicorigins/TaintedRemedy.java | 2 +- .../src/mage/sets/magicorigins/ThornbowArcher.java | 2 +- Mage.Sets/src/mage/sets/mirage/IllicitAuction.java | 2 +- .../src/mage/sets/mirrodin/SpoilsOfTheVault.java | 2 +- .../mage/sets/mirrodinbesieged/PsychosisCrawler.java | 2 +- .../sets/mirrodinbesieged/TezzeretAgentOfBolas.java | 2 +- .../mage/sets/morningtide/MaralenOfTheMornsong.java | 2 +- .../mage/sets/newphyrexia/ChancellorOfTheDross.java | 2 +- .../mage/sets/oathofthegatewatch/DreadDefiler.java | 2 +- .../oathofthegatewatch/RemorselessPunishment.java | 2 +- .../sets/oathofthegatewatch/VisionsOfBrutality.java | 2 +- Mage.Sets/src/mage/sets/odyssey/SkeletalScrying.java | 2 +- Mage.Sets/src/mage/sets/onslaught/Biorhythm.java | 2 +- .../src/mage/sets/onslaught/EbonbladeReaper.java | 2 +- Mage.Sets/src/mage/sets/onslaught/StarlitSanctum.java | 2 +- Mage.Sets/src/mage/sets/planarchaos/ImpsMischief.java | 2 +- .../src/mage/sets/planarchaos/TemporalExtortion.java | 2 +- Mage.Sets/src/mage/sets/planechase2012/LastStand.java | 2 +- Mage.Sets/src/mage/sets/ravnica/DarkConfidant.java | 2 +- .../src/mage/sets/ravnica/NetherbornPhalanx.java | 2 +- .../src/mage/sets/returntoravnica/HavocFestival.java | 2 +- .../sets/returntoravnica/ShriekingAffliction.java | 2 +- .../src/mage/sets/riseoftheeldrazi/BanefulOmen.java | 2 +- .../src/mage/sets/riseoftheeldrazi/SufferThePast.java | 2 +- .../src/mage/sets/riseoftheeldrazi/Vendetta.java | 2 +- .../src/mage/sets/saviorsofkamigawa/BloodClock.java | 2 +- .../sets/saviorsofkamigawa/ChoiceOfDamnations.java | 2 +- .../src/mage/sets/saviorsofkamigawa/PainsReward.java | 2 +- .../mage/sets/saviorsofkamigawa/RavingOniSlave.java | 2 +- .../src/mage/sets/scarsofmirrodin/Exsanguinate.java | 2 +- .../src/mage/sets/scarsofmirrodin/FleshAllergy.java | 2 +- .../mage/sets/scarsofmirrodin/PainfulQuandary.java | 2 +- .../src/mage/sets/shadowmoor/HollowbornBarghest.java | 4 ++-- .../src/mage/sets/shadowmoor/LeechriddenSwamp.java | 2 +- .../src/mage/sets/shadowmoor/PlagueOfVermin.java | 2 +- Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java | 2 +- .../src/mage/sets/shadowmoor/WoundReflection.java | 2 +- .../mage/sets/shadowsoverinnistrad/AsylumVisitor.java | 2 +- .../mage/sets/shadowsoverinnistrad/CreepingDread.java | 2 +- .../shadowsoverinnistrad/LilianasIndignation.java | 2 +- .../sets/shadowsoverinnistrad/SorinGrimNemesis.java | 2 +- .../sets/shadowsoverinnistrad/Triskaidekaphobia.java | 2 +- Mage.Sets/src/mage/sets/shardsofalara/AdNauseam.java | 2 +- .../mage/sets/shardsofalara/BanewaspAffliction.java | 2 +- .../src/mage/sets/shardsofalara/InvincibleHymn.java | 2 +- .../src/mage/sets/shardsofalara/QuietusSpike.java | 2 +- .../src/mage/sets/shardsofalara/SphinxSovereign.java | 2 +- .../src/mage/sets/starwars/PublicArrangement.java | 2 +- Mage.Sets/src/mage/sets/starwars/SithRavager.java | 6 +----- Mage.Sets/src/mage/sets/starwars/TIEInterceptor.java | 2 +- .../src/mage/sets/starwars/TheBattleOfYavin.java | 2 +- .../mage/sets/tenthedition/BeaconOfImmortality.java | 2 +- .../src/mage/sets/theros/GrayMerchantOfAsphodel.java | 2 +- Mage.Sets/src/mage/sets/theros/TormentedHero.java | 2 +- Mage.Sets/src/mage/sets/timespiral/Phthisis.java | 2 +- Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java | 2 +- .../src/mage/sets/urzassaga/PhyrexianProcessor.java | 2 +- Mage.Sets/src/mage/sets/urzassaga/Umbilicus.java | 2 +- Mage.Sets/src/mage/sets/visions/WandOfDenial.java | 2 +- Mage.Sets/src/mage/sets/weatherlight/Doomsday.java | 2 +- Mage.Sets/src/mage/sets/worldwake/PulseTracker.java | 2 +- Mage.Sets/src/mage/sets/zendikar/BloodTribute.java | 2 +- .../src/mage/sets/zendikar/MalakirBloodwitch.java | 2 +- .../test/java/org/mage/test/player/TestPlayer.java | 4 ++-- .../src/test/java/org/mage/test/stub/PlayerStub.java | 2 +- .../java/mage/abilities/costs/common/PayLifeCost.java | 2 +- .../mage/abilities/costs/mana/PhyrexianManaCost.java | 2 +- .../abilities/effects/common/LoseHalfLifeEffect.java | 2 +- .../effects/common/LoseLifeAllPlayersEffect.java | 2 +- .../common/LoseLifeControllerAttachedEffect.java | 2 +- .../effects/common/LoseLifeDefendingPlayerEffect.java | 2 +- .../effects/common/LoseLifeOpponentsEffect.java | 2 +- .../common/LoseLifeSourceControllerEffect.java | 2 +- .../common/LoseLifeTargetControllerEffect.java | 2 +- .../effects/common/LoseLifeTargetEffect.java | 2 +- .../java/mage/abilities/keyword/ExtortAbility.java | 2 +- Mage/src/main/java/mage/game/events/GameEvent.java | 7 +++++++ Mage/src/main/java/mage/players/Player.java | 9 ++++++++- Mage/src/main/java/mage/players/PlayerImpl.java | 10 +++++----- 134 files changed, 163 insertions(+), 146 deletions(-) diff --git a/Mage.Sets/src/mage/sets/alarareborn/SingeMindOgre.java b/Mage.Sets/src/mage/sets/alarareborn/SingeMindOgre.java index f54c93d52b..f186f6bb05 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/SingeMindOgre.java +++ b/Mage.Sets/src/mage/sets/alarareborn/SingeMindOgre.java @@ -99,7 +99,7 @@ class SingeMindOgreEffect extends OneShotEffect { Card card = targetPlayer.getHand().getRandom(game); revealed.add(card); targetPlayer.revealCards("Singe-Mind Ogre", revealed, game); - targetPlayer.loseLife(card.getConvertedManaCost(), game); + targetPlayer.loseLife(card.getConvertedManaCost(), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/apocalypse/LifeDeath.java b/Mage.Sets/src/mage/sets/apocalypse/LifeDeath.java index d14bb1ad56..ee338e5313 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/LifeDeath.java +++ b/Mage.Sets/src/mage/sets/apocalypse/LifeDeath.java @@ -116,7 +116,7 @@ class DeathEffect extends OneShotEffect { if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) { controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game); } - controller.loseLife(creatureCard.getConvertedManaCost(), game); + controller.loseLife(creatureCard.getConvertedManaCost(), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/avacynrestored/EssenceHarvest.java b/Mage.Sets/src/mage/sets/avacynrestored/EssenceHarvest.java index f65f2c8f4c..5f45c98017 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/EssenceHarvest.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/EssenceHarvest.java @@ -98,7 +98,7 @@ class EssenceHarvestEffect extends OneShotEffect { } if (amount > 0) { - targetPlayer.loseLife(amount, game); + targetPlayer.loseLife(amount, game, false); player.gainLife(amount, game); } return true; diff --git a/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java b/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java index 07c12d39bd..85dc17d50d 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/KillingWave.java @@ -122,7 +122,7 @@ class KillingWaveEffect extends OneShotEffect { if (lifePaid > 0) { Player player = game.getPlayer(playerId); if (player != null) { - player.loseLife(lifePaid, game); + player.loseLife(lifePaid, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ScourgeOfNumai.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ScourgeOfNumai.java index 0b3846df14..d3567664d8 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ScourgeOfNumai.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ScourgeOfNumai.java @@ -91,7 +91,7 @@ class ScourgeOfNumaiEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (game.getBattlefield().countAll(new FilterCreaturePermanent("Ogre", "Ogre"), source.getControllerId(), game) < 1) { - controller.loseLife(2, game); + controller.loseLife(2, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/TakenumaBleeder.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/TakenumaBleeder.java index 86c25947fc..c0571c4a71 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/TakenumaBleeder.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/TakenumaBleeder.java @@ -91,7 +91,7 @@ class TakenumaBleederEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (game.getBattlefield().countAll(new FilterCreaturePermanent("Demon", "Demon"), source.getControllerId(), game) < 1) { - controller.loseLife(1, game); + controller.loseLife(1, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/PainSeer.java b/Mage.Sets/src/mage/sets/bornofthegods/PainSeer.java index 06feebb6fd..8234acf8a6 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/PainSeer.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/PainSeer.java @@ -103,7 +103,7 @@ class PainSeerEffect extends OneShotEffect { if (card != null && card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) { - player.loseLife(card.getConvertedManaCost(), game); + player.loseLife(card.getConvertedManaCost(), game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/ServantOfTymaret.java b/Mage.Sets/src/mage/sets/bornofthegods/ServantOfTymaret.java index b0ed08ede1..2bb656fd89 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/ServantOfTymaret.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/ServantOfTymaret.java @@ -88,7 +88,7 @@ class ServantOfTymaretEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int lostAmount = 0; for (UUID opponentId: game.getOpponents(source.getControllerId())) { - lostAmount += game.getPlayer(opponentId).loseLife(1, game); + lostAmount += game.getPlayer(opponentId).loseLife(1, game, false); } game.getPlayer(source.getControllerId()).gainLife(lostAmount, game); return true; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/DevouringGreed.java b/Mage.Sets/src/mage/sets/championsofkamigawa/DevouringGreed.java index 0d0f715f66..6e08a16c52 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/DevouringGreed.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/DevouringGreed.java @@ -108,7 +108,7 @@ class DevouringGreedEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); Player sourcePlayer = game.getPlayer(source.getControllerId()); if (targetPlayer != null && sourcePlayer != null) { - targetPlayer.loseLife(amount, game); + targetPlayer.loseLife(amount, game, false); sourcePlayer.gainLife(amount, game); return true; } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KokushoTheEveningStar.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KokushoTheEveningStar.java index ff26c48570..1f8d2c523b 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KokushoTheEveningStar.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KokushoTheEveningStar.java @@ -84,7 +84,7 @@ class KokushoTheEveningStarEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int loseLife = 0; for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(5, game); + loseLife += game.getPlayer(opponentId).loseLife(5, game, false); } if (loseLife > 0) game.getPlayer(source.getControllerId()).gainLife(loseLife, game); diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiShortfang.java b/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiShortfang.java index bd919aec3a..c25af028c0 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiShortfang.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/NezumiShortfang.java @@ -128,7 +128,7 @@ class StabwhiskerLoseLifeEffect extends OneShotEffect { if (opponent != null) { int lifeLose = 3 - opponent.getHand().size(); if (lifeLose > 0 ) { - opponent.loseLife(lifeLose, game); + opponent.loseLife(lifeLose, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/commander2013/LimDulsVault.java b/Mage.Sets/src/mage/sets/commander2013/LimDulsVault.java index 676110c765..fad47a9d53 100644 --- a/Mage.Sets/src/mage/sets/commander2013/LimDulsVault.java +++ b/Mage.Sets/src/mage/sets/commander2013/LimDulsVault.java @@ -106,7 +106,7 @@ class LimDulsVaultEffect extends OneShotEffect { player.lookAtCards("Lim-Dul's Vault", cards, game); doAgain = player.chooseUse(outcome, "Pay 1 life and look at the next 5 cards?", source, game); if (doAgain) { - player.loseLife(1, game); + player.loseLife(1, game, false); } else { player.shuffleLibrary(source, game); } diff --git a/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java b/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java index 2bfe322e0c..29f2999f9f 100644 --- a/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java +++ b/Mage.Sets/src/mage/sets/commander2014/ObNixilisOfTheBlackOath.java @@ -112,7 +112,7 @@ class ObNixilisOfTheBlackOathEffect1 extends OneShotEffect { for (UUID opponentId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - loseLife += opponent.loseLife(1, game); + loseLife += opponent.loseLife(1, game, false); } } controller.gainLife(loseLife, game); diff --git a/Mage.Sets/src/mage/sets/commander2014/RavingDead.java b/Mage.Sets/src/mage/sets/commander2014/RavingDead.java index b4bcb686eb..4d770dc60e 100644 --- a/Mage.Sets/src/mage/sets/commander2014/RavingDead.java +++ b/Mage.Sets/src/mage/sets/commander2014/RavingDead.java @@ -139,7 +139,7 @@ class RavingDeadDamageEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java b/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java index f9c53c64dd..63913f1db6 100644 --- a/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java +++ b/Mage.Sets/src/mage/sets/commander2015/DeadlyTempest.java @@ -96,7 +96,7 @@ class DeadlyTempestEffect extends OneShotEffect { if (count > 0) { Player player = game.getPlayer(playerId); if (player != null) { - player.loseLife(count, game); + player.loseLife(count, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java b/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java index 33aff6d710..2331557ecd 100644 --- a/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java +++ b/Mage.Sets/src/mage/sets/commander2015/Scytheclaw.java @@ -145,7 +145,7 @@ class ScytheclawEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/conflux/BloodTyrant.java b/Mage.Sets/src/mage/sets/conflux/BloodTyrant.java index 599932bc49..5e10f35e16 100644 --- a/Mage.Sets/src/mage/sets/conflux/BloodTyrant.java +++ b/Mage.Sets/src/mage/sets/conflux/BloodTyrant.java @@ -142,7 +142,7 @@ class BloodTyrantEffect extends OneShotEffect { for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - if (player.loseLife(1, game) > 0) { + if (player.loseLife(1, game, false) > 0) { counters++; } } diff --git a/Mage.Sets/src/mage/sets/conflux/InfectiousHorror.java b/Mage.Sets/src/mage/sets/conflux/InfectiousHorror.java index ba0b3ee859..a3bec6a792 100644 --- a/Mage.Sets/src/mage/sets/conflux/InfectiousHorror.java +++ b/Mage.Sets/src/mage/sets/conflux/InfectiousHorror.java @@ -84,7 +84,7 @@ class InfectiousHorrorEffect extends OneShotEffect { for (UUID opponentId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - opponent.loseLife(2, game); + opponent.loseLife(2, game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/conflux/SludgeStrider.java b/Mage.Sets/src/mage/sets/conflux/SludgeStrider.java index 1f19850be6..4b23c74df7 100644 --- a/Mage.Sets/src/mage/sets/conflux/SludgeStrider.java +++ b/Mage.Sets/src/mage/sets/conflux/SludgeStrider.java @@ -155,7 +155,7 @@ class SludgeStriderEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(source.getFirstTarget()); Player you = game.getPlayer(source.getControllerId()); if (targetPlayer != null) { - targetPlayer.loseLife(1, game); + targetPlayer.loseLife(1, game, false); } if (you != null) { you.gainLife(1, game); diff --git a/Mage.Sets/src/mage/sets/conspiracy/StrongholdDiscipline.java b/Mage.Sets/src/mage/sets/conspiracy/StrongholdDiscipline.java index 19482607b3..20b2d36041 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/StrongholdDiscipline.java +++ b/Mage.Sets/src/mage/sets/conspiracy/StrongholdDiscipline.java @@ -87,7 +87,7 @@ class StrongholdDisciplineEffect extends OneShotEffect { if (count > 0) { Player player = game.getPlayer(playerId); if (player != null) { - player.loseLife(count, game); + player.loseLife(count, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/conspiracy/TyrantsChoice.java b/Mage.Sets/src/mage/sets/conspiracy/TyrantsChoice.java index 9cd9d26e3a..bf44b88a22 100644 --- a/Mage.Sets/src/mage/sets/conspiracy/TyrantsChoice.java +++ b/Mage.Sets/src/mage/sets/conspiracy/TyrantsChoice.java @@ -122,7 +122,7 @@ class TyrantsChoiceLoseLifeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (UUID opponentId : game.getOpponents(source.getControllerId())) { - game.getPlayer(opponentId).loseLife(4, game); + game.getPlayer(opponentId).loseLife(4, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/conspiracytakethecrown/KayaGhostAssassin.java b/Mage.Sets/src/mage/sets/conspiracytakethecrown/KayaGhostAssassin.java index f8993d9c67..0fbe085564 100644 --- a/Mage.Sets/src/mage/sets/conspiracytakethecrown/KayaGhostAssassin.java +++ b/Mage.Sets/src/mage/sets/conspiracytakethecrown/KayaGhostAssassin.java @@ -142,7 +142,7 @@ class KayaGhostAssassinEffect extends OneShotEffect { game.addDelayedTriggeredAbility(delayedAbility, source); } } - controller.loseLife(2, game); + controller.loseLife(2, game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/dissension/RainOfGore.java b/Mage.Sets/src/mage/sets/dissension/RainOfGore.java index 67dfc8b0ec..d2089d9324 100644 --- a/Mage.Sets/src/mage/sets/dissension/RainOfGore.java +++ b/Mage.Sets/src/mage/sets/dissension/RainOfGore.java @@ -89,7 +89,7 @@ class RainOfGoreEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(event.getPlayerId()); if (player != null) { - player.loseLife(event.getAmount(), game); + player.loseLife(event.getAmount(), game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/BloodScrivener.java b/Mage.Sets/src/mage/sets/dragonsmaze/BloodScrivener.java index b9884870f5..d07805083a 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/BloodScrivener.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/BloodScrivener.java @@ -102,7 +102,7 @@ class BloodScrivenerReplacementEffect extends ReplacementEffectImpl { Player player = game.getPlayer(event.getPlayerId()); if (player != null) { player.drawCards(2, game, event.getAppliedEffects()); - player.loseLife(1, game); + player.loseLife(1, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java index 3c6299d4ce..1fc2dd7a60 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DamnablePact.java @@ -80,7 +80,7 @@ class DamnablePactEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); if (targetPlayer != null) { targetPlayer.drawCards(source.getManaCostsToPay().getX(), game); - targetPlayer.loseLife(source.getManaCostsToPay().getX(), game); + targetPlayer.loseLife(source.getManaCostsToPay().getX(), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/FoulTongueShriek.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/FoulTongueShriek.java index 55583ed906..d9d9b6929f 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/FoulTongueShriek.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/FoulTongueShriek.java @@ -96,7 +96,7 @@ class FoulTongueShriekEffect extends OneShotEffect { if (controller != null && targetOpponent != null) { int amount = new AttackingFilterCreatureCount(filter).calculate(game, source, this); if (amount > 0) { - targetOpponent.loseLife(amount, game); + targetOpponent.loseLife(amount, game, false); controller.gainLife(amount, game); } return true; diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SelfInflictedWound.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SelfInflictedWound.java index d1810df81a..9e157541d1 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/SelfInflictedWound.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SelfInflictedWound.java @@ -107,7 +107,7 @@ class SelfInflictedWoundEffect extends OneShotEffect { Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { if (permanent.sacrifice(source.getSourceId(), game)) { - targetOpponent.loseLife(2, game); + targetOpponent.loseLife(2, game, false); } } diff --git a/Mage.Sets/src/mage/sets/eighthedition/MurderousBetrayal.java b/Mage.Sets/src/mage/sets/eighthedition/MurderousBetrayal.java index 5cc70e8b89..08f8dcaf22 100644 --- a/Mage.Sets/src/mage/sets/eighthedition/MurderousBetrayal.java +++ b/Mage.Sets/src/mage/sets/eighthedition/MurderousBetrayal.java @@ -106,7 +106,7 @@ class MurderousBetrayalCost extends CostImpl { if (lifeToPay < 0) { this.paid = true; } else { - this.paid = (controller.loseLife(lifeToPay, game) == lifeToPay); + this.paid = (controller.loseLife(lifeToPay, game, false) == lifeToPay); } return this.paid; } diff --git a/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java b/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java index 639640636f..8c7d77f03d 100644 --- a/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java +++ b/Mage.Sets/src/mage/sets/eldritchmoon/CertainDeath.java @@ -88,7 +88,7 @@ class CertainDeathEffect extends OneShotEffect { permanent.destroy(source.getSourceId(), game, false); Player permController = game.getPlayer(permanent.getControllerId()); if (permController != null) { - permController.loseLife(2, game); + permController.loseLife(2, game, false); you.gainLife(2, game); return true; } diff --git a/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java b/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java index f19dc2b45a..b4ea3b2910 100644 --- a/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java +++ b/Mage.Sets/src/mage/sets/eventide/BatwingBrume.java @@ -102,7 +102,7 @@ class BatwingBrumeEffect extends OneShotEffect { if (amount > 0) { Player player = game.getPlayer(playerId); if (player != null) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java b/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java index 672c14c919..e05d9f4203 100644 --- a/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java +++ b/Mage.Sets/src/mage/sets/eventide/SaplingOfColfenor.java @@ -107,7 +107,7 @@ class SaplingOfColfenorEffect extends OneShotEffect { controller.revealCards(sourceObject.getIdName(), cards, game); if (card.getCardType().contains(CardType.CREATURE)) { controller.gainLife(card.getToughness().getValue(), game); - controller.loseLife(card.getPower().getValue(), game); + controller.loseLife(card.getPower().getValue(), game, false); return controller.moveCards(cards.getCards(game), Zone.HAND, source, game); } } diff --git a/Mage.Sets/src/mage/sets/eventide/SootImp.java b/Mage.Sets/src/mage/sets/eventide/SootImp.java index cf2eca4295..1986317099 100644 --- a/Mage.Sets/src/mage/sets/eventide/SootImp.java +++ b/Mage.Sets/src/mage/sets/eventide/SootImp.java @@ -103,7 +103,7 @@ class SootImpEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player caster = game.getPlayer(targetPointer.getFirst(game, source)); if (caster != null) { - caster.loseLife(1, game); + caster.loseLife(1, game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/eventide/SoulReap.java b/Mage.Sets/src/mage/sets/eventide/SoulReap.java index f2fda13742..11b00c0a38 100644 --- a/Mage.Sets/src/mage/sets/eventide/SoulReap.java +++ b/Mage.Sets/src/mage/sets/eventide/SoulReap.java @@ -168,7 +168,7 @@ class SoulReapEffect extends OneShotEffect { if (creature != null) { Player controller = game.getPlayer(creature.getControllerId()); if (controller != null) { - controller.loseLife(3, game); + controller.loseLife(3, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java b/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java index 9adc25d11d..f128179049 100644 --- a/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java +++ b/Mage.Sets/src/mage/sets/fifthdawn/DevourInShadow.java @@ -90,7 +90,7 @@ class DevourInShadowEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); Permanent target = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (player != null && target != null) { - player.loseLife(target.getToughness().getValue(), game); + player.loseLife(target.getToughness().getValue(), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/fifthedition/Pox.java b/Mage.Sets/src/mage/sets/fifthedition/Pox.java index e5fb118606..ad9b6e9f81 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/Pox.java +++ b/Mage.Sets/src/mage/sets/fifthedition/Pox.java @@ -93,7 +93,7 @@ class PoxEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player != null) { int lifeToLose = (int) Math.ceil(player.getLife() / 3.0); - player.loseLife(lifeToLose, game); + player.loseLife(lifeToLose, game, false); } } // then discards a third of the cards in his or her hand, diff --git a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java index f479557f9e..7dc23bd07e 100644 --- a/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java +++ b/Mage.Sets/src/mage/sets/fifthedition/SylvanLibrary.java @@ -126,7 +126,7 @@ class SylvanLibraryEffect extends OneShotEffect { if (controller.canPayLifeCost() && controller.getLife() >= 4 && controller.chooseUse(outcome, "Pay 4 life for " + card.getLogName() + "? (Otherwise it's put on top of your library)", source, game)) { - controller.loseLife(4, game); + controller.loseLife(4, game, false); game.informPlayers(controller.getLogName() + " pays 4 life to keep a card on hand"); } else { cardsPutBack.add(card); diff --git a/Mage.Sets/src/mage/sets/futuresight/MinionsMurmurs.java b/Mage.Sets/src/mage/sets/futuresight/MinionsMurmurs.java index cc280927c3..ffb449841a 100644 --- a/Mage.Sets/src/mage/sets/futuresight/MinionsMurmurs.java +++ b/Mage.Sets/src/mage/sets/futuresight/MinionsMurmurs.java @@ -83,7 +83,7 @@ public class MinionsMurmurs extends CardImpl { if (controller != null) { int creaturesControlled = game.getBattlefield().countAll(new FilterCreaturePermanent(), controller.getId(), game); controller.drawCards(creaturesControlled, game); - controller.loseLife(creaturesControlled, game); + controller.loseLife(creaturesControlled, game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java b/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java index 59fd04e198..e21629a5c8 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java +++ b/Mage.Sets/src/mage/sets/gatecrash/DuskmantleSeer.java @@ -107,7 +107,7 @@ class DuskmantleSeerEffect extends OneShotEffect { Cards cards = new CardsImpl(); cards.add(card); player.revealCards(sourceCard.getName() + ": Revealed by " + player.getName(), cards, game); - player.loseLife(card.getConvertedManaCost(), game); + player.loseLife(card.getConvertedManaCost(), game, false); card.moveToZone(Zone.HAND, source.getSourceId(), game, true); } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java b/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java index c28725d324..f02786c647 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java +++ b/Mage.Sets/src/mage/sets/gatecrash/OrzhovCharm.java @@ -156,7 +156,7 @@ class OrzhovCharmDestroyAndLoseLifeEffect extends OneShotEffect { int toughness = target.getToughness().getValue(); target.destroy(source.getSourceId(), game, false); if (toughness > 0) { - controller.loseLife(toughness, game); + controller.loseLife(toughness, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java b/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java index 0504c3f701..a12faaca5c 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java +++ b/Mage.Sets/src/mage/sets/gatecrash/VizkopaConfessor.java @@ -107,7 +107,7 @@ class VizkopaConfessorEffect extends OneShotEffect { if (controller != null && targetPlayer != null && sourceCard != null) { int payLife = controller.getAmount(0, controller.getLife(),"Pay how many life?", game); if (payLife > 0) { - controller.loseLife(payLife, game); + controller.loseLife(payLife, game, false); game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()).append(" pays ").append(payLife).append(" life").toString()); Cards cardsInHand = new CardsImpl(); diff --git a/Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java b/Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java index 936a2557b7..5223172a7e 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java +++ b/Mage.Sets/src/mage/sets/gatecrash/VizkopaGuildmage.java @@ -154,7 +154,7 @@ class OpponentsLoseLifeEffect extends OneShotEffect { for (UUID opponentId: game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - opponent.loseLife(amountLifeGained, game); + opponent.loseLife(amountLifeGained, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/guildpact/AgentOfMasks.java b/Mage.Sets/src/mage/sets/guildpact/AgentOfMasks.java index 043c337af6..c54e7b98a1 100644 --- a/Mage.Sets/src/mage/sets/guildpact/AgentOfMasks.java +++ b/Mage.Sets/src/mage/sets/guildpact/AgentOfMasks.java @@ -82,7 +82,7 @@ class AgentOfMasksEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int loseLife = 0; for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(1, game); + loseLife += game.getPlayer(opponentId).loseLife(1, game, false); } if (loseLife > 0) game.getPlayer(source.getControllerId()).gainLife(loseLife, game); diff --git a/Mage.Sets/src/mage/sets/guildpact/GhostCouncilOfOrzhova.java b/Mage.Sets/src/mage/sets/guildpact/GhostCouncilOfOrzhova.java index 7e521f6527..9375709079 100644 --- a/Mage.Sets/src/mage/sets/guildpact/GhostCouncilOfOrzhova.java +++ b/Mage.Sets/src/mage/sets/guildpact/GhostCouncilOfOrzhova.java @@ -99,7 +99,7 @@ class GhostCouncilOfOrzhovaEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(source.getFirstTarget()); Player controllerPlayer = game.getPlayer(source.getControllerId()); if (targetPlayer != null && controllerPlayer != null) { - targetPlayer.loseLife(1, game); + targetPlayer.loseLife(1, game, false); controllerPlayer.gainLife(1, game); } return false; diff --git a/Mage.Sets/src/mage/sets/guildpact/SoulsOfTheFaultless.java b/Mage.Sets/src/mage/sets/guildpact/SoulsOfTheFaultless.java index 698f08914d..de23aa7d7a 100644 --- a/Mage.Sets/src/mage/sets/guildpact/SoulsOfTheFaultless.java +++ b/Mage.Sets/src/mage/sets/guildpact/SoulsOfTheFaultless.java @@ -148,7 +148,7 @@ class SoulsOfTheFaultlessEffect extends OneShotEffect { UUID attackerId = (UUID) this.getValue("attackerId"); Player attacker = game.getPlayer(attackerId); if (attacker != null) { - attacker.loseLife(amount, game); + attacker.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/iceage/GameOfChaos.java b/Mage.Sets/src/mage/sets/iceage/GameOfChaos.java index 55abf17a1b..45420d89d8 100644 --- a/Mage.Sets/src/mage/sets/iceage/GameOfChaos.java +++ b/Mage.Sets/src/mage/sets/iceage/GameOfChaos.java @@ -97,13 +97,13 @@ class GameOfChaosEffect extends OneShotEffect { if (youWinFlip) { // flipper of coin wins, flipper gain 1 and non-flipper loses 1 you.gainLife(lifeAmount, game); - targetOpponent.loseLife(lifeAmount, game); + targetOpponent.loseLife(lifeAmount, game, false); if (targetOpponent.canRespond() && you.canRespond()) { continueFlipping = you.chooseUse(outcome, "Flip again?", source, game); controllerWonLast = true; } } else { // non-flipper wins, flipper lose 1 and non-flipper gains 1 - you.loseLife(lifeAmount, game); + you.loseLife(lifeAmount, game, false); targetOpponent.gainLife(lifeAmount, game); if (targetOpponent.canRespond() && you.canRespond()) { continueFlipping = targetOpponent.chooseUse(outcome, "Flip again?", source, game); diff --git a/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java b/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java index 0c102475bc..aedbb0dc88 100644 --- a/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java +++ b/Mage.Sets/src/mage/sets/iceage/ZursWeirding.java @@ -114,7 +114,7 @@ class ZursWeirdingReplacementEffect extends ReplacementEffectImpl { if (otherPlayer.canPayLifeCost() && otherPlayer.getLife() >= 2 && otherPlayer.chooseUse(Outcome.Benefit, message, source, game)) { - otherPlayer.loseLife(2, game); + otherPlayer.loseLife(2, game, false); player.moveCards(card, Zone.GRAVEYARD, source, game); break; } diff --git a/Mage.Sets/src/mage/sets/invasion/PhyrexianDelver.java b/Mage.Sets/src/mage/sets/invasion/PhyrexianDelver.java index afb061f7cb..db189c6d5b 100644 --- a/Mage.Sets/src/mage/sets/invasion/PhyrexianDelver.java +++ b/Mage.Sets/src/mage/sets/invasion/PhyrexianDelver.java @@ -100,7 +100,7 @@ class PhyrexianDelverEffect extends OneShotEffect { if (game.getState().getZone(creatureCard.getId()).equals(Zone.GRAVEYARD)) { result = controller.moveCards(creatureCard, Zone.BATTLEFIELD, source, game);; } - controller.loseLife(creatureCard.getConvertedManaCost(), game); + controller.loseLife(creatureCard.getConvertedManaCost(), game, false); return result; } return false; diff --git a/Mage.Sets/src/mage/sets/judgment/DeathWish.java b/Mage.Sets/src/mage/sets/judgment/DeathWish.java index 916406c52d..dbb4b11096 100644 --- a/Mage.Sets/src/mage/sets/judgment/DeathWish.java +++ b/Mage.Sets/src/mage/sets/judgment/DeathWish.java @@ -107,7 +107,7 @@ class DeathWishEffect extends OneShotEffect { int amount = (controller.getLife() + 1) / 2; if (amount > 0) { - controller.loseLife(amount, game); + controller.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java index 93decd6b22..a68a044242 100644 --- a/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/sets/kaladesh/ChandraTorchOfDefiance.java @@ -119,10 +119,17 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect { Library library = controller.getLibrary(); Card card = library.removeFromTop(game); if (card != null) { + boolean exiledCardWasCast = false; controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.getCardType().contains(CardType.LAND)) { - controller.cast(card.getSpellAbility(), game, false); - } else { +// LinkedHashMap useableAbilities = controller.getUseableActivatedAbilities(card, Zone.EXILED, game); +// for (ActivatedAbility ability : useableAbilities.values()) { +// +// } +// controller.activateAbility(useableAbilities, game); + exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false); + } + if (!exiledCardWasCast) { new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source); } } diff --git a/Mage.Sets/src/mage/sets/lorwyn/HoardersGreed.java b/Mage.Sets/src/mage/sets/lorwyn/HoardersGreed.java index 5820068814..ad6b8a67ac 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/HoardersGreed.java +++ b/Mage.Sets/src/mage/sets/lorwyn/HoardersGreed.java @@ -84,7 +84,7 @@ class HoardersGreedEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { do { - controller.loseLife(2, game); + controller.loseLife(2, game, false); controller.drawCards(2, game); } while (controller.canRespond() && ClashEffect.getInstance().apply(game, source)); return true; diff --git a/Mage.Sets/src/mage/sets/magic2010/XathridDemon.java b/Mage.Sets/src/mage/sets/magic2010/XathridDemon.java index 5ea35aad29..0f1abd4574 100644 --- a/Mage.Sets/src/mage/sets/magic2010/XathridDemon.java +++ b/Mage.Sets/src/mage/sets/magic2010/XathridDemon.java @@ -122,7 +122,7 @@ class XathridDemonEffect extends OneShotEffect { for (UUID opponentId : opponents) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - opponent.loseLife(amount, game); + opponent.loseLife(amount, game, false); } } } @@ -130,7 +130,7 @@ class XathridDemonEffect extends OneShotEffect { } } else { sourcePermanent.tap(game); - controller.loseLife(7, game); + controller.loseLife(7, game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java index 6b9f08144b..f34ab4caf6 100644 --- a/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java +++ b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java @@ -85,7 +85,7 @@ class DarkTutelageEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); if (card != null) { card.moveToZone(Zone.HAND, source.getSourceId(), game, false); - player.loseLife(card.getConvertedManaCost(), game); + player.loseLife(card.getConvertedManaCost(), game, false); Cards cards = new CardsImpl(); cards.add(card); player.revealCards("Dark Tutelage", cards, game); diff --git a/Mage.Sets/src/mage/sets/magic2014/BubblingCauldron.java b/Mage.Sets/src/mage/sets/magic2014/BubblingCauldron.java index 7f4bba9788..5d1c8086b4 100644 --- a/Mage.Sets/src/mage/sets/magic2014/BubblingCauldron.java +++ b/Mage.Sets/src/mage/sets/magic2014/BubblingCauldron.java @@ -98,7 +98,7 @@ class BubblingCauldronEffect extends OneShotEffect { int damage = 0; for (UUID opponentId: game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); - damage += opponent.loseLife(4, game); + damage += opponent.loseLife(4, game, false); } game.getPlayer(source.getControllerId()).gainLife(damage, game); return true; diff --git a/Mage.Sets/src/mage/sets/magic2015/ObNixilisUnshackled.java b/Mage.Sets/src/mage/sets/magic2015/ObNixilisUnshackled.java index 6c923df949..2042ac835e 100644 --- a/Mage.Sets/src/mage/sets/magic2015/ObNixilisUnshackled.java +++ b/Mage.Sets/src/mage/sets/magic2015/ObNixilisUnshackled.java @@ -146,7 +146,7 @@ class ObNixilisUnshackledEffect extends SacrificeEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source)); if (player != null) { - player.loseLife(10, game); + player.loseLife(10, game, false); } return super.apply(game, source); } diff --git a/Mage.Sets/src/mage/sets/magicorigins/GravebladeMarauder.java b/Mage.Sets/src/mage/sets/magicorigins/GravebladeMarauder.java index 7eee486c81..d075f31634 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/GravebladeMarauder.java +++ b/Mage.Sets/src/mage/sets/magicorigins/GravebladeMarauder.java @@ -93,7 +93,7 @@ class GravebladeMarauderEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); if (targetPlayer != null && controller != null) { - targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game); + targetPlayer.loseLife(controller.getGraveyard().count(new FilterCreatureCard(), game), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magicorigins/TaintedRemedy.java b/Mage.Sets/src/mage/sets/magicorigins/TaintedRemedy.java index bee1ed6a9e..4ff9b94496 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/TaintedRemedy.java +++ b/Mage.Sets/src/mage/sets/magicorigins/TaintedRemedy.java @@ -100,7 +100,7 @@ class TaintedRemedyReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null) { - opponent.loseLife(event.getAmount(), game); + opponent.loseLife(event.getAmount(), game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/magicorigins/ThornbowArcher.java b/Mage.Sets/src/mage/sets/magicorigins/ThornbowArcher.java index 2312bbf9a6..a5709c52ee 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/ThornbowArcher.java +++ b/Mage.Sets/src/mage/sets/magicorigins/ThornbowArcher.java @@ -99,7 +99,7 @@ class ThornbowArcherEffect extends OneShotEffect { Player opponent = game.getPlayer(opponentId); if (opponent != null) { if (game.getBattlefield().countAll(filter, opponentId, game) == 0) { - opponent.loseLife(1, game); + opponent.loseLife(1, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java b/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java index ba8d87b939..6f5b560e43 100644 --- a/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java +++ b/Mage.Sets/src/mage/sets/mirage/IllicitAuction.java @@ -110,7 +110,7 @@ class IllicitAuctionEffect extends GainControlTargetEffect { } game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); - winner.loseLife(highBid, game); + winner.loseLife(highBid, game, false); super.controllingPlayerId = winner.getId(); } super.init(source, game); diff --git a/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java b/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java index e49dd207a3..fb8437a11c 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java +++ b/Mage.Sets/src/mage/sets/mirrodin/SpoilsOfTheVault.java @@ -109,7 +109,7 @@ class SpoilsOfTheVaultEffect extends OneShotEffect { } controller.revealCards(sourceObject.getIdName(), cardsToReveal, game); controller.moveCards(cardsToExile, Zone.EXILED, source, game); - controller.loseLife(cardsToExile.size(), game); + controller.loseLife(cardsToExile.size(), game, false); return true; } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/PsychosisCrawler.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/PsychosisCrawler.java index 882ed749d1..641325813f 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/PsychosisCrawler.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/PsychosisCrawler.java @@ -97,7 +97,7 @@ class LoseLifeOpponentsEffect extends OneShotEffect { for (UUID opponentUUID : opponents) { Player player = game.getPlayer(opponentUUID); if (player != null) { - player.loseLife(1, game); + player.loseLife(1, game, false); applied = true; } } diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java index 90520e0a75..5f8baa5ffd 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/TezzeretAgentOfBolas.java @@ -130,7 +130,7 @@ class TezzeretAgentOfBolasEffect2 extends OneShotEffect { Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { - player.loseLife(count, game); + player.loseLife(count, game, false); } Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { diff --git a/Mage.Sets/src/mage/sets/morningtide/MaralenOfTheMornsong.java b/Mage.Sets/src/mage/sets/morningtide/MaralenOfTheMornsong.java index 284937582f..332851a8cc 100644 --- a/Mage.Sets/src/mage/sets/morningtide/MaralenOfTheMornsong.java +++ b/Mage.Sets/src/mage/sets/morningtide/MaralenOfTheMornsong.java @@ -129,7 +129,7 @@ class MaralenOfTheMornsongEffect2 extends OneShotEffect { UUID activePlayerId = game.getActivePlayerId(); Player player = game.getPlayer(activePlayerId); if (player != null) { - player.loseLife(3, game); + player.loseLife(3, game, false); TargetCardInLibrary target = new TargetCardInLibrary(); if (player.searchLibrary(target, game)) { for (UUID cardId : target.getTargets()) { diff --git a/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheDross.java b/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheDross.java index b5d5cb34d0..636d48ac83 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheDross.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/ChancellorOfTheDross.java @@ -116,7 +116,7 @@ class ChancellorOfTheDrossEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int loseLife = 0; for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(3, game); + loseLife += game.getPlayer(opponentId).loseLife(3, game, false); } if (loseLife > 0) { game.getPlayer(source.getControllerId()).gainLife(loseLife, game); diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/DreadDefiler.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/DreadDefiler.java index 8a9a10510e..0a757b6983 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/DreadDefiler.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/DreadDefiler.java @@ -112,7 +112,7 @@ class DreadDefilerEffect extends OneShotEffect { if (amount > 0) { Player targetOpponent = game.getPlayer(source.getFirstTarget()); if (targetOpponent != null) { - targetOpponent.loseLife(amount, game); + targetOpponent.loseLife(amount, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/RemorselessPunishment.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/RemorselessPunishment.java index e96dafa932..a575f40aae 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/RemorselessPunishment.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/RemorselessPunishment.java @@ -123,6 +123,6 @@ class RemorselessPunishmentEffect extends OneShotEffect { } } - opponent.loseLife(5, game); + opponent.loseLife(5, game, false); } } diff --git a/Mage.Sets/src/mage/sets/oathofthegatewatch/VisionsOfBrutality.java b/Mage.Sets/src/mage/sets/oathofthegatewatch/VisionsOfBrutality.java index 08d1291dc5..57bd96c518 100644 --- a/Mage.Sets/src/mage/sets/oathofthegatewatch/VisionsOfBrutality.java +++ b/Mage.Sets/src/mage/sets/oathofthegatewatch/VisionsOfBrutality.java @@ -113,7 +113,7 @@ class VisionsOfBrutalityEffect extends OneShotEffect { if (controllerEnchanted != null) { int damage = (Integer) getValue("damage"); if (damage > 0) { - controllerEnchanted.loseLife(damage, game); + controllerEnchanted.loseLife(damage, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/odyssey/SkeletalScrying.java b/Mage.Sets/src/mage/sets/odyssey/SkeletalScrying.java index c05825392c..c518afee74 100644 --- a/Mage.Sets/src/mage/sets/odyssey/SkeletalScrying.java +++ b/Mage.Sets/src/mage/sets/odyssey/SkeletalScrying.java @@ -133,7 +133,7 @@ class SkeletalScryingEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if ( controller != null ) { controller.drawCards(amount.calculate(game, source, this), game); - controller.loseLife(amount.calculate(game, source, this), game); + controller.loseLife(amount.calculate(game, source, this), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/onslaught/Biorhythm.java b/Mage.Sets/src/mage/sets/onslaught/Biorhythm.java index d3ddf2be15..827b58741a 100644 --- a/Mage.Sets/src/mage/sets/onslaught/Biorhythm.java +++ b/Mage.Sets/src/mage/sets/onslaught/Biorhythm.java @@ -87,7 +87,7 @@ class BiorhythmEffect extends OneShotEffect { if(player != null) { int diff = player.getLife() - game.getBattlefield().countAll(filter, playerId, game); if(diff > 0) { - player.loseLife(diff, game); + player.loseLife(diff, game, false); } if(diff < 0) { player.gainLife(-diff, game); diff --git a/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java b/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java index 12b22f0ff1..db616469c9 100644 --- a/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java +++ b/Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java @@ -102,7 +102,7 @@ class EbonbladeReaperEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/onslaught/StarlitSanctum.java b/Mage.Sets/src/mage/sets/onslaught/StarlitSanctum.java index 07617ee4b3..520ddad049 100644 --- a/Mage.Sets/src/mage/sets/onslaught/StarlitSanctum.java +++ b/Mage.Sets/src/mage/sets/onslaught/StarlitSanctum.java @@ -141,7 +141,7 @@ class StarlitSanctumBlackEffect extends OneShotEffect { if (amount > 0) { Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/planarchaos/ImpsMischief.java b/Mage.Sets/src/mage/sets/planarchaos/ImpsMischief.java index 8e51593df5..289be462bb 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/ImpsMischief.java +++ b/Mage.Sets/src/mage/sets/planarchaos/ImpsMischief.java @@ -99,7 +99,7 @@ class ImpsMischiefLoseLifeEffect extends OneShotEffect { if (spell != null) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - player.loseLife(spell.getConvertedManaCost(), game); + player.loseLife(spell.getConvertedManaCost(), game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/planarchaos/TemporalExtortion.java b/Mage.Sets/src/mage/sets/planarchaos/TemporalExtortion.java index 529bce3222..d0e31873d9 100644 --- a/Mage.Sets/src/mage/sets/planarchaos/TemporalExtortion.java +++ b/Mage.Sets/src/mage/sets/planarchaos/TemporalExtortion.java @@ -92,7 +92,7 @@ class TemporalExtortionCounterSourceEffect extends OneShotEffect { Player player = game.getPlayer(playerId); if (player.chooseUse(outcome, "Pay half your life, rounded up to counter " + sourceObject.getIdName() + "?", source, game)) { Integer amount = (int) Math.ceil(player.getLife() / 2f); - player.loseLife(amount, game); + player.loseLife(amount, game, false); game.informPlayers(player.getLogName() + " pays half his or her life, rounded up to counter " + sourceObject.getIdName() + "."); Spell spell = game.getStack().getSpell(source.getSourceId()); if (spell != null) { diff --git a/Mage.Sets/src/mage/sets/planechase2012/LastStand.java b/Mage.Sets/src/mage/sets/planechase2012/LastStand.java index 17579324b3..f643612d84 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/LastStand.java +++ b/Mage.Sets/src/mage/sets/planechase2012/LastStand.java @@ -107,7 +107,7 @@ class LastStandEffect extends OneShotEffect { Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); if (opponent != null) { int swamps = game.getBattlefield().count(filterSwamp, source.getSourceId(), source.getControllerId(), game); - opponent.loseLife(swamps * 2, game); + opponent.loseLife(swamps * 2, game, false); } // Last Stand deals damage equal to the number of Mountains you control to target creature. Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/ravnica/DarkConfidant.java b/Mage.Sets/src/mage/sets/ravnica/DarkConfidant.java index ee178e3bec..f8717eced6 100644 --- a/Mage.Sets/src/mage/sets/ravnica/DarkConfidant.java +++ b/Mage.Sets/src/mage/sets/ravnica/DarkConfidant.java @@ -96,7 +96,7 @@ class DarkConfidantEffect extends OneShotEffect { Cards cards = new CardsImpl(card); controller.revealCards(sourcePermanent.getIdName(), cards, game); controller.moveCards(card, Zone.HAND, source, game); - controller.loseLife(card.getConvertedManaCost(), game); + controller.loseLife(card.getConvertedManaCost(), game, false); } return true; diff --git a/Mage.Sets/src/mage/sets/ravnica/NetherbornPhalanx.java b/Mage.Sets/src/mage/sets/ravnica/NetherbornPhalanx.java index 8cd4a85155..c0b0f78cd1 100644 --- a/Mage.Sets/src/mage/sets/ravnica/NetherbornPhalanx.java +++ b/Mage.Sets/src/mage/sets/ravnica/NetherbornPhalanx.java @@ -97,7 +97,7 @@ class NetherbornPhalanxEffect extends OneShotEffect { if (count > 0) { Player opponent = game.getPlayer(playerId); if (opponent != null) { - opponent.loseLife(count, game); + opponent.loseLife(count, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/HavocFestival.java b/Mage.Sets/src/mage/sets/returntoravnica/HavocFestival.java index f2c8f76b54..27b82a9227 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/HavocFestival.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/HavocFestival.java @@ -98,7 +98,7 @@ class HavocFestivalLoseLifeEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java b/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java index 54cb9c968a..f09406cce3 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ShriekingAffliction.java @@ -142,7 +142,7 @@ class ShriekingAfflictionTargetEffect extends OneShotEffect { if (sourcePermanent != null) { game.informPlayers(sourcePermanent.getName() + ": " + player.getLogName() + " loses 3 life"); } - player.loseLife(3, game); + player.loseLife(3, game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java index 225b0fcd9f..8534d9e61d 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/BanefulOmen.java @@ -128,7 +128,7 @@ public class BanefulOmen extends CardImpl { for (UUID opponentUuid : opponents) { Player opponent = game.getPlayer(opponentUuid); if (opponent != null) { - opponent.loseLife(loseLife, game); + opponent.loseLife(loseLife, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SufferThePast.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SufferThePast.java index aa9ae441ab..55bcdaeae7 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SufferThePast.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SufferThePast.java @@ -106,7 +106,7 @@ class SufferThePastEffect extends OneShotEffect { } } you.gainLife(numberExiled, game); - targetPlayer.loseLife(numberExiled, game); + targetPlayer.loseLife(numberExiled, game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vendetta.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vendetta.java index 25fc822520..06131ab16e 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vendetta.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/Vendetta.java @@ -99,7 +99,7 @@ class VendettaEffect extends OneShotEffect { Player player = game.getPlayer(source.getControllerId()); Permanent target = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source)); if (player != null && target != null) { - player.loseLife(target.getToughness().getValue(), game); + player.loseLife(target.getToughness().getValue(), game, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java index 1d3c52c454..487c9ae3a9 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/BloodClock.java @@ -91,7 +91,7 @@ class BloodClockEffect extends OneShotEffect { return false; } if (player.getLife() > 2 && player.chooseUse(Outcome.Neutral, "Pay 2 life? If you don't, return a permanent you control to its owner's hand.", source, game)) { - player.loseLife(2, game); + player.loseLife(2, game, false); game.informPlayers(player.getLogName() + " pays 2 life. He will not return a permanent he or she controls."); return true; } else { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java index 598f991650..79cc598cdc 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/ChoiceOfDamnations.java @@ -93,7 +93,7 @@ class ChoiceOfDamnationsEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (controller.chooseUse(outcome, "Shall " + targetPlayer.getLogName() + " lose " + amount + " life?", source, game)) { - targetPlayer.loseLife(amount, game); + targetPlayer.loseLife(amount, game, false); } else { int numberPermanents = game.getState().getBattlefield().countAll(new FilterPermanent(), targetPlayer.getId(), game); if (numberPermanents > amount) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java index ad12a54979..e2ee5201aa 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/PainsReward.java @@ -106,7 +106,7 @@ class PainsRewardEffect extends OneShotEffect { } game.informPlayers(winner.getLogName() + " won the auction with a bid of " + highBid + " life" + (highBid > 1 ? "s" : "")); - winner.loseLife(highBid, game); + winner.loseLife(highBid, game, false); winner.drawCards(4, game); return true; } diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RavingOniSlave.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RavingOniSlave.java index 5d9c4f0cfa..1c0e6ea055 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/RavingOniSlave.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/RavingOniSlave.java @@ -90,7 +90,7 @@ class RavingOniSlaveEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { if (game.getBattlefield().count(new FilterCreaturePermanent("Demon", "Demon"), source.getSourceId(), source.getControllerId(), game) < 1) { - controller.loseLife(3, game); + controller.loseLife(3, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Exsanguinate.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Exsanguinate.java index 91dbdbc389..69423d002b 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Exsanguinate.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Exsanguinate.java @@ -77,7 +77,7 @@ class ExsanguinateEffect extends OneShotEffect { int loseLife = 0; int damage = source.getManaCostsToPay().getX(); for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(damage, game); + loseLife += game.getPlayer(opponentId).loseLife(damage, game, false); } if (loseLife > 0) game.getPlayer(source.getControllerId()).gainLife(loseLife, game); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java index 010ac2b0b0..14c8969dda 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/FleshAllergy.java @@ -138,7 +138,7 @@ class FleshAllergyEffect extends OneShotEffect { if (player != null) { int amount = watcher.creaturesDiedThisTurn; if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/PainfulQuandary.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/PainfulQuandary.java index f7f5bccc45..11c9571b6f 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/PainfulQuandary.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/PainfulQuandary.java @@ -96,7 +96,7 @@ class PainfulQuandryEffect extends OneShotEffect { paid = cost.pay(source, game, source.getSourceId(), player.getId(), false, null); } if (!paid) { - player.loseLife(5, game); + player.loseLife(5, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/HollowbornBarghest.java b/Mage.Sets/src/mage/sets/shadowmoor/HollowbornBarghest.java index dcb6c8486c..5b0bc01272 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/HollowbornBarghest.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/HollowbornBarghest.java @@ -98,7 +98,7 @@ class HollowbornBarghestEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (UUID opponentId : game.getOpponents(source.getControllerId())) { - game.getPlayer(opponentId).loseLife(2, game); + game.getPlayer(opponentId).loseLife(2, game, false); } return true; } @@ -135,7 +135,7 @@ class HollowbornBarghestTriggeredAbility extends TriggeredAbilityImpl { if (game.getOpponents(controllerId).contains(event.getPlayerId())) { Player opponent = game.getPlayer(event.getPlayerId()); if (opponent != null && opponent.getHand().isEmpty()) { - opponent.loseLife(2, game); + opponent.loseLife(2, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java index cd8202dba1..5ce43198de 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/LeechriddenSwamp.java @@ -110,7 +110,7 @@ class LeechriddenSwampLoseLifeEffect extends OneShotEffect { Players players = game.getPlayers(); for ( Player player : players.values() ) { if ( !player.getId().equals(source.getControllerId()) ) { - player.loseLife(1, game); + player.loseLife(1, game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java b/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java index 8897aaff71..31fe3d325d 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PlagueOfVermin.java @@ -109,7 +109,7 @@ class PlagueOfVerminEffect extends OneShotEffect { if (currentPlayer.chooseUse(Outcome.AIDontUseIt, "Pay life?", source, game)) { totalPaidLife = currentPlayer.getAmount(0, controller.getLife(), "Pay how many life?", game); if (totalPaidLife > 0) { - currentPlayer.loseLife(totalPaidLife, game); + currentPlayer.loseLife(totalPaidLife, game, false); if (payLife.get(currentPlayer.getId()) == null) { payLife.put(currentPlayer.getId(), totalPaidLife); } else { diff --git a/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java b/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java index 239d9d6e09..d0cae12201 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/PollutedBonds.java @@ -99,7 +99,7 @@ class PollutedBondsEffect extends OneShotEffect { if (controller != null) { Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source)); if (opponent != null) { - opponent.loseLife(2, game); + opponent.loseLife(2, game, false); } controller.gainLife(2, game); return true; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/WoundReflection.java b/Mage.Sets/src/mage/sets/shadowmoor/WoundReflection.java index a5ef2b5397..a3c490941f 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/WoundReflection.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/WoundReflection.java @@ -91,7 +91,7 @@ class WoundReflectionEffect extends OneShotEffect { if (opponent != null) { int lifeLost = watcher.getLiveLost(playerId); if (lifeLost > 0) { - opponent.loseLife(lifeLost, game); + opponent.loseLife(lifeLost, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AsylumVisitor.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AsylumVisitor.java index d11a3fdad9..c4b80d4e56 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AsylumVisitor.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/AsylumVisitor.java @@ -100,7 +100,7 @@ class AsylumVisitorTriggeredAbility extends TriggeredAbilityImpl { if (you != null && upkeepPlayer != null && upkeepPlayer.getHand().isEmpty()) { you.drawCards(1, game); - you.loseLife(1, game); + you.loseLife(1, game, false); return true; } diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CreepingDread.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CreepingDread.java index be70020b0a..4354320fe1 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CreepingDread.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/CreepingDread.java @@ -156,7 +156,7 @@ class CreepingDreadEffect extends OneShotEffect { // each opponent who discarded a card of the same type loses 3 life if (!opponentsAffected.isEmpty()) { for(Player opponent : opponentsAffected) { - opponent.loseLife(3, game); + opponent.loseLife(3, game, false); } } diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LilianasIndignation.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LilianasIndignation.java index 956b3c8f2a..893cda8b8d 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LilianasIndignation.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/LilianasIndignation.java @@ -101,7 +101,7 @@ class LilianasIndignationEffect extends OneShotEffect { if (creatures > 0) { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetPlayer != null) { - targetPlayer.loseLife(creatures * 2, game); + targetPlayer.loseLife(creatures * 2, game, false); } } diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SorinGrimNemesis.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SorinGrimNemesis.java index 2236485056..c952e418e8 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SorinGrimNemesis.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/SorinGrimNemesis.java @@ -126,7 +126,7 @@ class SorinGrimNemesisRevealEffect extends OneShotEffect { if (card.getConvertedManaCost() > 0) { Player opponent = game.getPlayer(playerId); if (opponent != null) { - opponent.loseLife(card.getConvertedManaCost(), game); + opponent.loseLife(card.getConvertedManaCost(), game, false); } } } diff --git a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java index defaee5083..39e3423045 100644 --- a/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java +++ b/Mage.Sets/src/mage/sets/shadowsoverinnistrad/Triskaidekaphobia.java @@ -141,7 +141,7 @@ class TriskaidekaphobiaLoseLifeEffect extends OneShotEffect { for (UUID pid : playerList) { Player player = game.getPlayer(pid); if (player != null) { - player.loseLife(1, game); + player.loseLife(1, game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/shardsofalara/AdNauseam.java b/Mage.Sets/src/mage/sets/shardsofalara/AdNauseam.java index 37a4a47bba..c05b4ca049 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/AdNauseam.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/AdNauseam.java @@ -94,7 +94,7 @@ class AdNauseamEffect extends OneShotEffect { controller.moveCards(card, Zone.HAND, source, game); int cmc = card.getConvertedManaCost(); if (cmc > 0) { - controller.loseLife(cmc, game); + controller.loseLife(cmc, game, false); } controller.revealCards(sourceCard.getIdName() + " put into hand", new CardsImpl(card), game); } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BanewaspAffliction.java b/Mage.Sets/src/mage/sets/shardsofalara/BanewaspAffliction.java index e1b24ba5ca..b818b16674 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BanewaspAffliction.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BanewaspAffliction.java @@ -100,7 +100,7 @@ class BanewaspAfflictionLoseLifeEffect extends OneShotEffect { if(creature != null){ Player player = game.getPlayer(creature.getOwnerId()); if (player != null) { - player.loseLife(creature.getToughness().getValue(), game); + player.loseLife(creature.getToughness().getValue(), game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/InvincibleHymn.java b/Mage.Sets/src/mage/sets/shardsofalara/InvincibleHymn.java index aa77f85f80..417b714fb7 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/InvincibleHymn.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/InvincibleHymn.java @@ -89,7 +89,7 @@ class InvincibleHymnEffect extends OneShotEffect { player.gainLife(newValue - oldValue, game); } if (oldValue - newValue > 0) { - player.loseLife(oldValue - newValue, game); + player.loseLife(oldValue - newValue, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/QuietusSpike.java b/Mage.Sets/src/mage/sets/shardsofalara/QuietusSpike.java index 04d803aa24..7829196b2a 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/QuietusSpike.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/QuietusSpike.java @@ -141,7 +141,7 @@ class QuietusSpikeEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } return true; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java b/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java index 6746186220..c1d81678d0 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SphinxSovereign.java @@ -99,7 +99,7 @@ class SphinxSovereignEffect extends OneShotEffect { if (controller.hasOpponent(opponentId, game)) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - opponent.loseLife(3, game); + opponent.loseLife(3, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/starwars/PublicArrangement.java b/Mage.Sets/src/mage/sets/starwars/PublicArrangement.java index 6d14100e4e..bdb694dc55 100644 --- a/Mage.Sets/src/mage/sets/starwars/PublicArrangement.java +++ b/Mage.Sets/src/mage/sets/starwars/PublicArrangement.java @@ -92,7 +92,7 @@ class PublicArrangementEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { UUID controller = game.getControllerId(source.getFirstTarget()); if (controller != null) { - game.getPlayer(controller).loseLife(2, game); + game.getPlayer(controller).loseLife(2, game, false); for (UUID playerId : game.getOpponents(controller)) { Player player = game.getPlayer(playerId); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithRavager.java b/Mage.Sets/src/mage/sets/starwars/SithRavager.java index 7ed8342ac7..45ca0cdb8a 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithRavager.java +++ b/Mage.Sets/src/mage/sets/starwars/SithRavager.java @@ -36,7 +36,6 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.PhaseStep; import mage.constants.Rarity; import mage.constants.Zone; import mage.game.Game; @@ -92,10 +91,7 @@ public class SithRavager extends CardImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (!game.getStep().getType().equals(PhaseStep.COMBAT_DAMAGE)) { - return game.getOpponents(game.getControllerId(getSourceId())).contains(event.getPlayerId()); - } - return false; + return !event.getFlag() && game.getOpponents(game.getControllerId(getSourceId())).contains(event.getPlayerId()); } @Override diff --git a/Mage.Sets/src/mage/sets/starwars/TIEInterceptor.java b/Mage.Sets/src/mage/sets/starwars/TIEInterceptor.java index 78c88f510f..34fa1cd429 100644 --- a/Mage.Sets/src/mage/sets/starwars/TIEInterceptor.java +++ b/Mage.Sets/src/mage/sets/starwars/TIEInterceptor.java @@ -86,7 +86,7 @@ class TIEInterceptorEffect extends OneShotEffect { for (UUID opponentId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(opponentId); if (opponent != null) { - opponent.loseLife(2, game); + opponent.loseLife(2, game, false); } } return true; diff --git a/Mage.Sets/src/mage/sets/starwars/TheBattleOfYavin.java b/Mage.Sets/src/mage/sets/starwars/TheBattleOfYavin.java index cf3f70bb2e..c727289fb4 100644 --- a/Mage.Sets/src/mage/sets/starwars/TheBattleOfYavin.java +++ b/Mage.Sets/src/mage/sets/starwars/TheBattleOfYavin.java @@ -115,7 +115,7 @@ class TheBattleOfYavinEffect extends OneShotEffect { if (lifePaid > 0) { Player player = game.getPlayer(opponent.getId()); if (player != null) { - player.loseLife(lifePaid, game); + player.loseLife(lifePaid, game, false); } } diff --git a/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java b/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java index 139ac9cdff..344ef8aaeb 100644 --- a/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java +++ b/Mage.Sets/src/mage/sets/tenthedition/BeaconOfImmortality.java @@ -89,7 +89,7 @@ class BeaconOfImmortalityEffect extends OneShotEffect { if (player != null) { int amount = player.getLife(); if (amount < 0) { - player.loseLife(-amount, game); + player.loseLife(-amount, game, false); return true; } if (amount > 0) { diff --git a/Mage.Sets/src/mage/sets/theros/GrayMerchantOfAsphodel.java b/Mage.Sets/src/mage/sets/theros/GrayMerchantOfAsphodel.java index 3d19f3adfb..be415a823b 100644 --- a/Mage.Sets/src/mage/sets/theros/GrayMerchantOfAsphodel.java +++ b/Mage.Sets/src/mage/sets/theros/GrayMerchantOfAsphodel.java @@ -95,7 +95,7 @@ class GrayMerchantOfAsphodelEffect extends OneShotEffect { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(playerId); if (opponent != null) { - lifeLost += opponent.loseLife(damage, game); + lifeLost += opponent.loseLife(damage, game, false); } } } diff --git a/Mage.Sets/src/mage/sets/theros/TormentedHero.java b/Mage.Sets/src/mage/sets/theros/TormentedHero.java index db2cc6a4a7..e686a85175 100644 --- a/Mage.Sets/src/mage/sets/theros/TormentedHero.java +++ b/Mage.Sets/src/mage/sets/theros/TormentedHero.java @@ -85,7 +85,7 @@ class EachOpponentLosesYouGainSumLifeEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int lostLife = 0; for (UUID opponentId : game.getOpponents(source.getControllerId())) { - lostLife += game.getPlayer(opponentId).loseLife(1, game); + lostLife += game.getPlayer(opponentId).loseLife(1, game, false); } game.getPlayer(source.getControllerId()).gainLife(lostLife, game); return true; diff --git a/Mage.Sets/src/mage/sets/timespiral/Phthisis.java b/Mage.Sets/src/mage/sets/timespiral/Phthisis.java index fa85b98787..5b50314277 100644 --- a/Mage.Sets/src/mage/sets/timespiral/Phthisis.java +++ b/Mage.Sets/src/mage/sets/timespiral/Phthisis.java @@ -95,7 +95,7 @@ class PhthisisEffect extends OneShotEffect { int lifeLoss = creature.getPower().getValue() + creature.getToughness().getValue(); creature.destroy(source.getSourceId(), game, false); // the life loss happens also if the creature is indestructible or regenerated (legal targets) - controller.loseLife(lifeLoss, game); + controller.loseLife(lifeLoss, game, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java b/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java index 0799d78d41..040bbec404 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java +++ b/Mage.Sets/src/mage/sets/urzassaga/LurkingEvil.java @@ -96,7 +96,7 @@ class LurkingEvilCost extends CostImpl { if (lifeToPay < 0) { this.paid = true; } else { - this.paid = (controller.loseLife(lifeToPay, game) == lifeToPay); + this.paid = (controller.loseLife(lifeToPay, game, false) == lifeToPay); } return this.paid; } diff --git a/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java b/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java index 5f93f9346f..87694ba5d5 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java +++ b/Mage.Sets/src/mage/sets/urzassaga/PhyrexianProcessor.java @@ -95,7 +95,7 @@ class PhyrexianProcessorEffect extends OneShotEffect { if(controller != null) { Card sourceCard = game.getCard(source.getSourceId()); int payAmount = controller.getAmount(0, controller.getLife(), staticText, game); - controller.loseLife(payAmount, game); + controller.loseLife(payAmount, game, false); game.informPlayers(new StringBuilder(sourceCard.getName()).append(": ").append(controller.getLogName()) .append(" pays ").append(payAmount).append(" life.").toString()); String key = CardUtil.getCardZoneString("lifePaid", source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/sets/urzassaga/Umbilicus.java b/Mage.Sets/src/mage/sets/urzassaga/Umbilicus.java index c77aa96e89..79777baf23 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Umbilicus.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Umbilicus.java @@ -91,7 +91,7 @@ class BloodClockEffect extends OneShotEffect { return false; } if (player.getLife() > 2 && player.chooseUse(Outcome.Neutral, "Pay 2 life? If you don't, return a permanent you control to its owner's hand.", source, game)) { - player.loseLife(2, game); + player.loseLife(2, game, false); game.informPlayers(player.getLogName() + " pays 2 life. He will not return a permanent he or she controls."); return true; } else { diff --git a/Mage.Sets/src/mage/sets/visions/WandOfDenial.java b/Mage.Sets/src/mage/sets/visions/WandOfDenial.java index ce9f5c9731..dc05fed213 100644 --- a/Mage.Sets/src/mage/sets/visions/WandOfDenial.java +++ b/Mage.Sets/src/mage/sets/visions/WandOfDenial.java @@ -99,7 +99,7 @@ class WandOfDenialEffect extends OneShotEffect { && controller.canPayLifeCost() && controller.getLife() >= 2 && controller.chooseUse(Outcome.Neutral, "Pay 2 life to put " + card.getLogName() + " into graveyard?", source, game)) { - controller.loseLife(2, game); + controller.loseLife(2, game, false); controller.moveCards(card, Zone.GRAVEYARD, source, game); } return true; diff --git a/Mage.Sets/src/mage/sets/weatherlight/Doomsday.java b/Mage.Sets/src/mage/sets/weatherlight/Doomsday.java index 6a7b317fb5..ecc0d048d9 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/Doomsday.java +++ b/Mage.Sets/src/mage/sets/weatherlight/Doomsday.java @@ -132,7 +132,7 @@ class DoomsdayEffect extends OneShotEffect { //You lose half your life, rounded up int amount = (player.getLife() + 1) / 2; if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); } return true; diff --git a/Mage.Sets/src/mage/sets/worldwake/PulseTracker.java b/Mage.Sets/src/mage/sets/worldwake/PulseTracker.java index 1f1795988d..e509e6c8a7 100644 --- a/Mage.Sets/src/mage/sets/worldwake/PulseTracker.java +++ b/Mage.Sets/src/mage/sets/worldwake/PulseTracker.java @@ -87,7 +87,7 @@ class PulseTrackerLoseLifeEffect extends OneShotEffect { for ( Player player : players.values() ) { if ( !player.getId().equals(source.getControllerId()) ) { - player.loseLife(1, game); + player.loseLife(1, game, false); } } diff --git a/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java b/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java index f82313e1fe..642682154c 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java +++ b/Mage.Sets/src/mage/sets/zendikar/BloodTribute.java @@ -112,7 +112,7 @@ class BloodTributeLoseLifeEffect extends OneShotEffect { if (player != null) { Integer amount = (int) Math.ceil(player.getLife() / 2f); if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); game.getState().setValue(source.getSourceId().toString() + "_BloodTribute", amount); return true; } diff --git a/Mage.Sets/src/mage/sets/zendikar/MalakirBloodwitch.java b/Mage.Sets/src/mage/sets/zendikar/MalakirBloodwitch.java index e5acb1a867..8c5b0f8216 100644 --- a/Mage.Sets/src/mage/sets/zendikar/MalakirBloodwitch.java +++ b/Mage.Sets/src/mage/sets/zendikar/MalakirBloodwitch.java @@ -115,7 +115,7 @@ class MalakirBloodwitchEffect extends OneShotEffect { for (UUID opponentUuid : opponents) { Player opponent = game.getPlayer(opponentUuid); if (opponent != null) { - total += opponent.loseLife(amount, game); + total += opponent.loseLife(amount, game, false); } if (total > 0) { player.gainLife(total, game); diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index a8856084e0..4c7fd6698f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -1439,8 +1439,8 @@ public class TestPlayer implements Player { } @Override - public int loseLife(int amount, Game game) { - return computerPlayer.loseLife(amount, game); + public int loseLife(int amount, Game game, boolean atCombat) { + return computerPlayer.loseLife(amount, game, atCombat); } @Override diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index 0cfc56eb1f..3bd3d4c1d7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -159,7 +159,7 @@ public class PlayerStub implements Player { } @Override - public int loseLife(int amount, Game game) { + public int loseLife(int amount, Game game, boolean at) { return 0; } diff --git a/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java index cb8eb5238b..bdc1a6c45d 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/PayLifeCost.java @@ -76,7 +76,7 @@ public class PayLifeCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { int lifeToPayAmount = amount.calculate(game, ability, null); - this.paid = game.getPlayer(controllerId).loseLife(lifeToPayAmount, game) == lifeToPayAmount; + this.paid = game.getPlayer(controllerId).loseLife(lifeToPayAmount, game, false) == lifeToPayAmount; return paid; } diff --git a/Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java b/Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java index e53099c168..5884716c5b 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/PhyrexianManaCost.java @@ -75,7 +75,7 @@ public class PhyrexianManaCost extends ColoredManaCost { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { - this.paid = game.getPlayer(controllerId).loseLife(2, game) == 2; + this.paid = game.getPlayer(controllerId).loseLife(2, game, false) == 2; return paid; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java index 939b59b90c..90948a5dac 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseHalfLifeEffect.java @@ -31,7 +31,7 @@ public class LoseHalfLifeEffect extends OneShotEffect { if (player != null) { int amount = (player.getLife() + 1) / 2; if (amount > 0) { - player.loseLife(amount, game); + player.loseLife(amount, game, false); return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java index 9183a367c0..cc1a7b0324 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeAllPlayersEffect.java @@ -71,7 +71,7 @@ public class LoseLifeAllPlayersEffect extends OneShotEffect { for (UUID playerId: game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); + player.loseLife(amount.calculate(game, source, this), game, false); } } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java index 089a366ac0..54dea779a5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeControllerAttachedEffect.java @@ -76,7 +76,7 @@ public class LoseLifeControllerAttachedEffect extends OneShotEffect { if (creature != null) { Player player = game.getPlayer(creature.getControllerId()); if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); + player.loseLife(amount.calculate(game, source, this), game, false); return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java index b7d915f818..d5296bb901 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeDefendingPlayerEffect.java @@ -80,7 +80,7 @@ public class LoseLifeDefendingPlayerEffect extends OneShotEffect { defender = game.getPlayer(getTargetPointer().getFirst(game, source)); } if (defender != null) { - defender.loseLife(amount.calculate(game, source, this), game); + defender.loseLife(amount.calculate(game, source, this), game, false); } return true; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java index c988359476..f63c0f5011 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeOpponentsEffect.java @@ -66,7 +66,7 @@ public class LoseLifeOpponentsEffect extends OneShotEffect { for (UUID opponentId: game.getOpponents(source.getControllerId())) { Player player = game.getPlayer(opponentId); if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); + player.loseLife(amount.calculate(game, source, this), game, false); } } return true; diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java index f9239424cd..83b9fa7b7f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeSourceControllerEffect.java @@ -68,7 +68,7 @@ public class LoseLifeSourceControllerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); + player.loseLife(amount.calculate(game, source, this), game, false); return true; } return false; diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java index 83a3c83ccb..277083b890 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetControllerEffect.java @@ -91,7 +91,7 @@ public class LoseLifeTargetControllerEffect extends OneShotEffect { } if ( controller != null ) { - controller.loseLife(amount, game); + controller.loseLife(amount, game, false); return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java index 501f385095..38164b67db 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LoseLifeTargetEffect.java @@ -67,7 +67,7 @@ public class LoseLifeTargetEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { - player.loseLife(amount.calculate(game, source, this), game); + player.loseLife(amount.calculate(game, source, this), game, false); return true; } return false; diff --git a/Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java index 9629ec2387..63e7fda4e6 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ExtortAbility.java @@ -106,7 +106,7 @@ class ExtortEffect extends OneShotEffect { if (cost.pay(source, game, source.getSourceId(), player.getId(), false, null)) { int loseLife = 0; for (UUID opponentId : game.getOpponents(source.getControllerId())) { - loseLife += game.getPlayer(opponentId).loseLife(1, game); + loseLife += game.getPlayer(opponentId).loseLife(1, game, false); } if (loseLife > 0) { game.getPlayer(source.getControllerId()).gainLife(loseLife, game); diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java index f74e35f8cb..f3313ad4fd 100644 --- a/Mage/src/main/java/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -109,6 +109,13 @@ public class GameEvent implements Serializable { PLAYER_LIFE_CHANGE, GAIN_LIFE, GAINED_LIFE, LOSE_LIFE, LOST_LIFE, + /* LOSE_LIFE + LOST_LIFE + targetId the id of the player loosing life + sourceId the id of the player loosing life + playerId the id of the player loosing life + amount amount of life loss + flag true = from comabat damage - other from non combat damage + */ PLAY_LAND, LAND_PLAYED, CREW_VEHICLE, /* CREW_VEHICLE diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index ebadfbe9c8..268dc5d05e 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -111,7 +111,14 @@ public interface Player extends MageItem, Copyable { void setLife(int life, Game game); - int loseLife(int amount, Game game); + /** + * + * @param amount amount of life loss + * @param game + * @param atCombat was the source combat damage + * @return + */ + int loseLife(int amount, Game game, boolean atCombat); int gainLife(int amount, Game game); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 8b5ca4049d..ca78a0ae01 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1699,7 +1699,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (life > this.life) { gainLife(life - this.life, game); } else if (life < this.life) { - loseLife(this.life - life, game); + loseLife(this.life - life, game, false); } } @@ -1730,17 +1730,17 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public int loseLife(int amount, Game game) { + public int loseLife(int amount, Game game, boolean atCombat) { if (!canLoseLife) { return 0; } - GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, false); + GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, atCombat); if (!game.replaceEvent(event)) { this.life -= event.getAmount(); if (!game.isSimulation()) { game.informPlayers(this.getLogName() + " loses " + event.getAmount() + " life"); } - game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount)); + game.fireEvent(new GameEvent(GameEvent.EventType.LOST_LIFE, playerId, playerId, playerId, amount, atCombat)); return amount; } return 0; @@ -1820,7 +1820,7 @@ public abstract class PlayerImpl implements Player, Serializable { } else { GameEvent damageToLifeLossEvent = new GameEvent(EventType.DAMAGE_CAUSES_LIFE_LOSS, playerId, sourceId, playerId, actualDamage, combatDamage); if (!game.replaceEvent(damageToLifeLossEvent)) { - this.loseLife(damageToLifeLossEvent.getAmount(), game); + this.loseLife(damageToLifeLossEvent.getAmount(), game, combatDamage); } } if (sourceAbilities != null && sourceAbilities.containsKey(LifelinkAbility.getInstance().getId())) { From c703ebaa9d651e41690a7b97ff08181c21699e73 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 28 Sep 2016 08:30:31 +0200 Subject: [PATCH 6/8] Reworked Hate condition. --- .../src/mage/sets/starwars/AsajjVentress.java | 4 +-- .../src/mage/sets/starwars/BatheInBacta.java | 4 +-- .../sets/starwars/DarkApprenticeship.java | 4 +-- .../src/mage/sets/starwars/DarthMaul.java | 4 +-- .../src/mage/sets/starwars/ForceDenial.java | 4 +-- .../sets/starwars/IronFistOfTheEmpire.java | 4 +-- .../src/mage/sets/starwars/SithAssassin.java | 4 +-- .../mage/sets/starwars/SithInquisitor.java | 4 +-- .../src/mage/sets/starwars/SithMagic.java | 4 +-- .../mage/sets/starwars/SithManipulator.java | 6 ++-- .../src/mage/sets/starwars/SithMarauder.java | 4 +-- .../src/mage/sets/starwars/SithMindseer.java | 4 +-- .../src/mage/sets/starwars/SithSorcerer.java | 4 +-- .../src/mage/sets/starwars/Terentatek.java | 8 ++--- .../condition/common/HateCondition.java | 6 ++-- ...va => LifeLossOtherFromCombatWatcher.java} | 36 +++++++------------ 16 files changed, 47 insertions(+), 57 deletions(-) rename Mage/src/main/java/mage/watchers/common/{NonCombatDamageWatcher.java => LifeLossOtherFromCombatWatcher.java} (60%) diff --git a/Mage.Sets/src/mage/sets/starwars/AsajjVentress.java b/Mage.Sets/src/mage/sets/starwars/AsajjVentress.java index de6cebd5d1..b76c2c7bd8 100644 --- a/Mage.Sets/src/mage/sets/starwars/AsajjVentress.java +++ b/Mage.Sets/src/mage/sets/starwars/AsajjVentress.java @@ -44,7 +44,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -76,7 +76,7 @@ public class AsajjVentress extends CardImpl { HateCondition.getInstance(), "Hate — Whenever Asajj Ventress attacks, if an opponent lost life from a source other than combat damage this turn, target creature blocks this turn if able"); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public AsajjVentress(final AsajjVentress card) { diff --git a/Mage.Sets/src/mage/sets/starwars/BatheInBacta.java b/Mage.Sets/src/mage/sets/starwars/BatheInBacta.java index 5d515a1bf3..69a8655252 100644 --- a/Mage.Sets/src/mage/sets/starwars/BatheInBacta.java +++ b/Mage.Sets/src/mage/sets/starwars/BatheInBacta.java @@ -35,7 +35,7 @@ import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -59,7 +59,7 @@ public class BatheInBacta extends CardImpl { HateCondition.getInstance(), "If you lost life from a source other than combat damage this turn, you gain 9 life instead")); - this.getSpellAbility().addWatcher(new NonCombatDamageWatcher()); + this.getSpellAbility().addWatcher(new LifeLossOtherFromCombatWatcher()); } public BatheInBacta(final BatheInBacta card) { diff --git a/Mage.Sets/src/mage/sets/starwars/DarkApprenticeship.java b/Mage.Sets/src/mage/sets/starwars/DarkApprenticeship.java index e847285c31..bc8f52b143 100644 --- a/Mage.Sets/src/mage/sets/starwars/DarkApprenticeship.java +++ b/Mage.Sets/src/mage/sets/starwars/DarkApprenticeship.java @@ -38,7 +38,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.TargetController; import mage.target.TargetPlayer; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -56,7 +56,7 @@ public class DarkApprenticeship extends CardImpl { HateCondition.getInstance(), "Hate — At the beggining of each end step, if an opponent lost life from source other than combat damage this turn, Dark Apprenticeship deals 2 damage to target player."); ability.addTarget(new TargetPlayer()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public DarkApprenticeship(final DarkApprenticeship card) { diff --git a/Mage.Sets/src/mage/sets/starwars/DarthMaul.java b/Mage.Sets/src/mage/sets/starwars/DarthMaul.java index 76ee29f6a7..bf6ccd18b2 100644 --- a/Mage.Sets/src/mage/sets/starwars/DarthMaul.java +++ b/Mage.Sets/src/mage/sets/starwars/DarthMaul.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -70,7 +70,7 @@ public class DarthMaul extends CardImpl { HateCondition.getInstance(), "Hate — Whenever Darth Maul attacks, if an opponent loses life from a source other than combat damage this turn, target creature can't block this turn."); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public DarthMaul(final DarthMaul card) { diff --git a/Mage.Sets/src/mage/sets/starwars/ForceDenial.java b/Mage.Sets/src/mage/sets/starwars/ForceDenial.java index 6a6efa4916..d5e4a5f302 100644 --- a/Mage.Sets/src/mage/sets/starwars/ForceDenial.java +++ b/Mage.Sets/src/mage/sets/starwars/ForceDenial.java @@ -39,7 +39,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.target.TargetSpell; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -63,7 +63,7 @@ public class ForceDenial extends CardImpl { HateCondition.getInstance(), "
Hate - If an opponent lost life from a source other than combat damage this turn, counter that spell instead.")); this.getSpellAbility().addTarget(new TargetSpell()); - this.getSpellAbility().addWatcher(new NonCombatDamageWatcher()); + this.getSpellAbility().addWatcher(new LifeLossOtherFromCombatWatcher()); // Scry 1 this.getSpellAbility().addEffect(new ScryEffect(1)); diff --git a/Mage.Sets/src/mage/sets/starwars/IronFistOfTheEmpire.java b/Mage.Sets/src/mage/sets/starwars/IronFistOfTheEmpire.java index 50598afe89..f9743be4fc 100644 --- a/Mage.Sets/src/mage/sets/starwars/IronFistOfTheEmpire.java +++ b/Mage.Sets/src/mage/sets/starwars/IronFistOfTheEmpire.java @@ -41,7 +41,7 @@ import mage.constants.CardType; import mage.constants.Rarity; import mage.constants.TargetController; import mage.game.permanent.token.Token; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -60,7 +60,7 @@ public class IronFistOfTheEmpire extends CardImpl { triggeredAbility, HateCondition.getInstance(), "Hate — At the beggining of each end step, if opponent lost life from a source other than combat damage this turn, you gain 1 life and create a 2/2 red Soldier creature token with first strike named Royal Guard."); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public IronFistOfTheEmpire(final IronFistOfTheEmpire card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithAssassin.java b/Mage.Sets/src/mage/sets/starwars/SithAssassin.java index 402d667975..08d3dfab7e 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithAssassin.java +++ b/Mage.Sets/src/mage/sets/starwars/SithAssassin.java @@ -42,7 +42,7 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -70,7 +70,7 @@ public class SithAssassin extends CardImpl { HateCondition.getInstance(), "Hate - When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, destroy target nonblack creature."); ability.addTarget(new TargetCreaturePermanent(filter)); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public SithAssassin(final SithAssassin card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithInquisitor.java b/Mage.Sets/src/mage/sets/starwars/SithInquisitor.java index ef25ce0676..3b022b5d0c 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithInquisitor.java +++ b/Mage.Sets/src/mage/sets/starwars/SithInquisitor.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.target.common.TargetOpponent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -60,7 +60,7 @@ public class SithInquisitor extends CardImpl { HateCondition.getInstance(), "Hate — When {this} enters the battlefield, if an opponent lost life from a source other then combat damage this turn, target player discard a card at random."); ability.addTarget(new TargetOpponent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public SithInquisitor(final SithInquisitor card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithMagic.java b/Mage.Sets/src/mage/sets/starwars/SithMagic.java index 15271aaf38..50a607f9ce 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithMagic.java +++ b/Mage.Sets/src/mage/sets/starwars/SithMagic.java @@ -58,7 +58,7 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCardInGraveyard; import mage.target.targetpointer.FixedTarget; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -78,7 +78,7 @@ public class SithMagic extends CardImpl { HateCondition.getInstance(), "Hate — At the beggining of each combat, if opponent lost life from a source other than combat damage this turn, you may return target card from a graveyard to the battlefield under your control. It gains lifelink and haste. Exile it at the beginning of the next end step or if it would leave the battlefield."); ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard())); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public SithMagic(final SithMagic card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithManipulator.java b/Mage.Sets/src/mage/sets/starwars/SithManipulator.java index 3d0dc7950a..94dd40ede5 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithManipulator.java +++ b/Mage.Sets/src/mage/sets/starwars/SithManipulator.java @@ -40,7 +40,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -62,7 +62,7 @@ public class SithManipulator extends CardImpl { new InvertCondition(HateCondition.getInstance()), "When Sith Manipulator enters the battlefield, return target creature to its owner's hand"); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); // Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead. ability = new ConditionalTriggeredAbility( @@ -70,7 +70,7 @@ public class SithManipulator extends CardImpl { HateCondition.getInstance(), "Hate — If opponent lost life from source other than combat damage this turn, put that card on top of its owner's library instead"); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } diff --git a/Mage.Sets/src/mage/sets/starwars/SithMarauder.java b/Mage.Sets/src/mage/sets/starwars/SithMarauder.java index fec99e871b..8978497971 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithMarauder.java +++ b/Mage.Sets/src/mage/sets/starwars/SithMarauder.java @@ -38,7 +38,7 @@ import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.target.common.TargetCreatureOrPlayer; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -60,7 +60,7 @@ public class SithMarauder extends CardImpl { HateCondition.getInstance(), "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, {this} deals 3 damage to target creature or player"); ability.addTarget(new TargetCreatureOrPlayer()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public SithMarauder(final SithMarauder card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithMindseer.java b/Mage.Sets/src/mage/sets/starwars/SithMindseer.java index 24ad4377e3..51d9866558 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithMindseer.java +++ b/Mage.Sets/src/mage/sets/starwars/SithMindseer.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Rarity; import mage.target.common.TargetCreaturePermanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -62,7 +62,7 @@ public class SithMindseer extends CardImpl { HateCondition.getInstance(), "Hate — When Sith Mindseer enters the battlefield, if an opponent loses life from a source other than combat damage, gain control of target creature for as long as Sith Mindseer remains on the battlefield."); ability.addTarget(new TargetCreaturePermanent()); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } public SithMindseer(final SithMindseer card) { diff --git a/Mage.Sets/src/mage/sets/starwars/SithSorcerer.java b/Mage.Sets/src/mage/sets/starwars/SithSorcerer.java index 1e36b75d56..79244eb67b 100644 --- a/Mage.Sets/src/mage/sets/starwars/SithSorcerer.java +++ b/Mage.Sets/src/mage/sets/starwars/SithSorcerer.java @@ -38,7 +38,7 @@ import mage.abilities.effects.keyword.ScryEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -62,7 +62,7 @@ public class SithSorcerer extends CardImpl { new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)), HateCondition.getInstance(), "Hate — When {this} enters the battlefield, if an opponent lost life from a source other than combat damage this turn, draw a card."); - this.addAbility(ability, new NonCombatDamageWatcher()); + this.addAbility(ability, new LifeLossOtherFromCombatWatcher()); } diff --git a/Mage.Sets/src/mage/sets/starwars/Terentatek.java b/Mage.Sets/src/mage/sets/starwars/Terentatek.java index f32df0b340..3350f684ca 100644 --- a/Mage.Sets/src/mage/sets/starwars/Terentatek.java +++ b/Mage.Sets/src/mage/sets/starwars/Terentatek.java @@ -41,7 +41,7 @@ import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.Game; import mage.game.permanent.Permanent; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * @@ -60,7 +60,7 @@ public class Terentatek extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new Terentatek1RestrictionEffect())); // Hate — If an opponent lost life from source other than combat damage this turn, Terentatek may attack as though you controlled a Sith. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new Terentatek2RestrictionEffect()), new NonCombatDamageWatcher()); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new Terentatek2RestrictionEffect()), new LifeLossOtherFromCombatWatcher()); } @@ -142,8 +142,8 @@ class Terentatek2RestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { if (permanent.getId().equals(source.getSourceId())) { - NonCombatDamageWatcher watcher = (NonCombatDamageWatcher) game.getState().getWatchers().get("NonCombatDamageWatcher"); - return watcher != null && watcher.opponentsBeenDealtNonCombatDamage(source.getControllerId()); + LifeLossOtherFromCombatWatcher watcher = (LifeLossOtherFromCombatWatcher) game.getState().getWatchers().get("NonCombatDamageWatcher"); + return watcher != null && watcher.opponentLostLifeOtherFromCombat(source.getControllerId()); } return false; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/HateCondition.java b/Mage/src/main/java/mage/abilities/condition/common/HateCondition.java index 3d48784480..1d35e6c3e0 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/HateCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/HateCondition.java @@ -30,7 +30,7 @@ package mage.abilities.condition.common; import mage.abilities.Ability; import mage.abilities.condition.Condition; import mage.game.Game; -import mage.watchers.common.NonCombatDamageWatcher; +import mage.watchers.common.LifeLossOtherFromCombatWatcher; /** * Describes condition when an opponent has been dealt any amount of non-combat @@ -54,8 +54,8 @@ public class HateCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - NonCombatDamageWatcher watcher = (NonCombatDamageWatcher) game.getState().getWatchers().get("NonCombatDamageWatcher"); - return watcher != null && watcher.opponentsBeenDealtNonCombatDamage(source.getControllerId()); + LifeLossOtherFromCombatWatcher watcher = (LifeLossOtherFromCombatWatcher) game.getState().getWatchers().get(LifeLossOtherFromCombatWatcher.class.getName()); + return watcher != null && watcher.opponentLostLifeOtherFromCombat(source.getControllerId()); } @Override diff --git a/Mage/src/main/java/mage/watchers/common/NonCombatDamageWatcher.java b/Mage/src/main/java/mage/watchers/common/LifeLossOtherFromCombatWatcher.java similarity index 60% rename from Mage/src/main/java/mage/watchers/common/NonCombatDamageWatcher.java rename to Mage/src/main/java/mage/watchers/common/LifeLossOtherFromCombatWatcher.java index 2cceb1f54e..39a9b0133d 100644 --- a/Mage/src/main/java/mage/watchers/common/NonCombatDamageWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/LifeLossOtherFromCombatWatcher.java @@ -32,58 +32,48 @@ import java.util.Set; import java.util.UUID; import mage.constants.WatcherScope; import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.watchers.Watcher; /* * * @author Styxo */ -public class NonCombatDamageWatcher extends Watcher { +public class LifeLossOtherFromCombatWatcher extends Watcher { - private final Set playersBeenDealtNonCombatDamage = new HashSet<>(); + private final Set players = new HashSet<>(); - public NonCombatDamageWatcher() { - super("NonCombatDamageWatcher", WatcherScope.GAME); + public LifeLossOtherFromCombatWatcher() { + super(LifeLossOtherFromCombatWatcher.class.getName(), WatcherScope.GAME); } - public NonCombatDamageWatcher(final NonCombatDamageWatcher watcher) { + public LifeLossOtherFromCombatWatcher(final LifeLossOtherFromCombatWatcher watcher) { super(watcher); } @Override public void watch(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.LOST_LIFE) { + if (event.getType() == GameEvent.EventType.LOST_LIFE && !event.getFlag()) { UUID playerId = event.getPlayerId(); if (playerId != null) { - playersBeenDealtNonCombatDamage.add(playerId); + players.add(playerId); } - } else if (event.getType() == EventType.DAMAGED_PLAYER) { - DamagedPlayerEvent dEvent = (DamagedPlayerEvent) event; - if (!dEvent.isCombatDamage()) { - UUID playerId = event.getPlayerId(); - if (playerId != null) { - playersBeenDealtNonCombatDamage.add(playerId); - } - } } } - public boolean opponentsBeenDealtNonCombatDamage(UUID playerId) { - return (!playersBeenDealtNonCombatDamage.contains(playerId) && playersBeenDealtNonCombatDamage.size() > 0) - || (playersBeenDealtNonCombatDamage.contains(playerId) && playersBeenDealtNonCombatDamage.size() > 1); + public boolean opponentLostLifeOtherFromCombat(UUID playerId) { + return (!players.contains(playerId) && players.size() > 0) + || (players.contains(playerId) && players.size() > 1); } @Override public void reset() { super.reset(); - playersBeenDealtNonCombatDamage.clear(); + players.clear(); } @Override - public NonCombatDamageWatcher copy() { - return new NonCombatDamageWatcher(this); + public LifeLossOtherFromCombatWatcher copy() { + return new LifeLossOtherFromCombatWatcher(this); } } From 5b941d4c5e0d6d6aa4f8d79ee69e4beb304d0f72 Mon Sep 17 00:00:00 2001 From: spjspj Date: Wed, 28 Sep 2016 22:58:55 +1000 Subject: [PATCH 7/8] spjspj - Make zero values less noticeable on player panel --- .../java/mage/client/game/PlayerPanelExt.java | 55 +++++++++++-------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index df3525f7c8..dd9bfc4d66 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -176,6 +176,15 @@ public class PlayerPanelExt extends javax.swing.JPanel { } + private void setTextForLabel (JLabel label, int amount, boolean alwaysBlack) { + label.setText(Integer.toString(amount)); + if (amount != 0 || alwaysBlack) { + label.setForeground(Color.BLACK); + } else { + label.setForeground(new Color(100, 100, 100)); + } + } + public void update(PlayerView player) { this.player = player; updateAvatar(); @@ -191,11 +200,11 @@ public class PlayerPanelExt extends javax.swing.JPanel { lifeLabel.setFont(font); changedFontLife = false; } - lifeLabel.setText(Integer.toString(playerLife)); - poisonLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.POISON))); - energyLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.ENERGY))); - experienceLabel.setText(Integer.toString(player.getCounters().getCount(CounterType.EXPERIENCE))); - handLabel.setText(Integer.toString(player.getHandCount())); + setTextForLabel(lifeLabel, playerLife, true); + setTextForLabel(poisonLabel, player.getCounters().getCount(CounterType.POISON), false); + setTextForLabel(energyLabel, player.getCounters().getCount(CounterType.ENERGY), false); + setTextForLabel(experienceLabel, player.getCounters().getCount(CounterType.EXPERIENCE), false); + setTextForLabel(handLabel, player.getHandCount(), true); int libraryCards = player.getLibraryCount(); if (libraryCards > 99) { Font font = libraryLabel.getFont(); @@ -208,7 +217,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { libraryLabel.setFont(font); changedFontLibrary = false; } - libraryLabel.setText(Integer.toString(libraryCards)); + setTextForLabel(libraryLabel, libraryCards, true); int graveCards = player.getGraveyard().size(); if (graveCards > 99) { @@ -224,7 +233,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { graveLabel.setFont(font); changedFontGrave = false; } - graveLabel.setText(Integer.toString(graveCards)); + setTextForLabel(graveLabel, graveCards, false); graveLabel.setToolTipText("Card Types: " + qtyCardTypes(player.getGraveyard())); int exileCards = player.getExile().size(); @@ -241,7 +250,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { exileLabel.setFont(font); changedFontExile = false; } - exileLabel.setText(Integer.toString(exileCards)); + setTextForLabel(exileLabel, exileCards, false); if (!MageFrame.isLite()) { int id = player.getUserData().getAvatarId(); @@ -358,12 +367,12 @@ public class PlayerPanelExt extends javax.swing.JPanel { } protected void update(ManaPoolView pool) { - manaLabels.get("B").setText(Integer.toString(pool.getBlack())); - manaLabels.get("R").setText(Integer.toString(pool.getRed())); - manaLabels.get("W").setText(Integer.toString(pool.getWhite())); - manaLabels.get("G").setText(Integer.toString(pool.getGreen())); - manaLabels.get("U").setText(Integer.toString(pool.getBlue())); - manaLabels.get("X").setText(Integer.toString(pool.getColorless())); + setTextForLabel(manaLabels.get("B"), pool.getBlack(), false); + setTextForLabel(manaLabels.get("R"), pool.getRed(), false); + setTextForLabel(manaLabels.get("W"), pool.getWhite(), false); + setTextForLabel(manaLabels.get("G"), pool.getGreen(), false); + setTextForLabel(manaLabels.get("U"), pool.getBlue(), false); + setTextForLabel(manaLabels.get("X"), pool.getColorless(), false); } /** @@ -433,7 +442,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { hand.setOpaque(false); // Poison count - poisonLabel.setText("0"); + setTextForLabel(poisonLabel, 0, false); r = new Rectangle(18, 18); poisonLabel.setToolTipText("Poison"); Image imagePoison = ImageHelper.getImageFromResources("/info/poison.png"); @@ -535,7 +544,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { energyExperiencePanel.setOpaque(false); // Energy count - energyLabel.setText("0"); + setTextForLabel(energyLabel, 0, false); r = new Rectangle(18, 18); energyLabel.setToolTipText("Energy"); Image imageEnergy = ImageHelper.getImageFromResources("/info/energy.png"); @@ -545,7 +554,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { energy.setOpaque(false); // Experience count - experienceLabel.setText("0"); + setTextForLabel(experienceLabel, 0, false); r = new Rectangle(18, 18); experienceLabel.setToolTipText("Experience"); Image imageExperience = ImageHelper.getImageFromResources("/info/experience.png"); @@ -568,7 +577,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { // Add mana symbols JLabel manaCountLabelW = new JLabel(); manaCountLabelW.setToolTipText("White mana"); - manaCountLabelW.setText("0"); + setTextForLabel(manaCountLabelW, 0, false); manaLabels.put("W", manaCountLabelW); r = new Rectangle(12, 12); BufferedImage imageManaW = ManaSymbols.getSizedManaSymbol("W"); @@ -584,7 +593,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { JLabel manaCountLabelU = new JLabel(); manaCountLabelU.setToolTipText("Blue mana"); - manaCountLabelU.setText("0"); + setTextForLabel(manaCountLabelU, 0, false); manaLabels.put("U", manaCountLabelU); r = new Rectangle(12, 12); BufferedImage imageManaU = ManaSymbols.getSizedManaSymbol("U"); @@ -600,7 +609,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { JLabel manaCountLabelB = new JLabel(); manaCountLabelB.setToolTipText("Black mana"); - manaCountLabelB.setText("0"); + setTextForLabel(manaCountLabelB, 0, false); manaLabels.put("B", manaCountLabelB); r = new Rectangle(12, 12); BufferedImage imageManaB = ManaSymbols.getSizedManaSymbol("B"); @@ -616,7 +625,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { JLabel manaCountLabelR = new JLabel(); manaCountLabelR.setToolTipText("Red mana"); - manaCountLabelR.setText("0"); + setTextForLabel(manaCountLabelR, 0, false); manaLabels.put("R", manaCountLabelR); r = new Rectangle(12, 12); BufferedImage imageManaR = ManaSymbols.getSizedManaSymbol("R"); @@ -632,7 +641,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { JLabel manaCountLabelG = new JLabel(); manaCountLabelG.setToolTipText("Green mana"); - manaCountLabelG.setText("0"); + setTextForLabel(manaCountLabelG, 0, false); manaLabels.put("G", manaCountLabelG); r = new Rectangle(12, 12); BufferedImage imageManaG = ManaSymbols.getSizedManaSymbol("G"); @@ -648,7 +657,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { JLabel manaCountLabelX = new JLabel(); manaCountLabelX.setToolTipText("Colorless mana"); - manaCountLabelX.setText("0"); + setTextForLabel(manaCountLabelX, 0, false); manaLabels.put("X", manaCountLabelX); r = new Rectangle(12, 12); BufferedImage imageManaX = ManaSymbols.getSizedManaSymbol("C"); From 458cbfa71ac89d4501e2921537afcedefaaea527 Mon Sep 17 00:00:00 2001 From: spjspj Date: Wed, 28 Sep 2016 23:27:15 +1000 Subject: [PATCH 8/8] spjspj - Further changes to height of Player Panel. --- Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java | 2 +- .../src/main/java/mage/client/game/PlayerPanelExt.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java index d98059645c..9c11e67c9c 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayAreaPanel.java @@ -82,7 +82,7 @@ public class PlayAreaPanel extends javax.swing.JPanel { private JCheckBoxMenuItem holdPriorityMenuItem; public static final int PANEL_HEIGHT = 263; - public static final int PANEL_HEIGHT_SMALL = 190; + public static final int PANEL_HEIGHT_SMALL = 210; /** * Creates new form PlayAreaPanel diff --git a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java index dd9bfc4d66..5c1b57c108 100644 --- a/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java +++ b/Mage.Client/src/main/java/mage/client/game/PlayerPanelExt.java @@ -107,7 +107,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { private static final int PANEL_WIDTH = 94; private static final int PANEL_HEIGHT = 262; - private static final int PANEL_HEIGHT_SMALL = 232; + private static final int PANEL_HEIGHT_SMALL = 242; private static final int MANA_LABEL_SIZE_HORIZONTAL = 20; private static final Border GREEN_BORDER = new LineBorder(Color.green, 3); @@ -867,7 +867,7 @@ public class PlayerPanelExt extends javax.swing.JPanel { .addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE) ) ) - .addPreferredGap(ComponentPlacement.RELATED) + .addGap(2) .addComponent(zonesPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) ) );