From e5b2b397010223767a3f1519d4665b418eb6df49 Mon Sep 17 00:00:00 2001 From: Quercitron Date: Fri, 18 Jul 2014 02:11:11 +0400 Subject: [PATCH] Make order of parameters the same for methods player.damage and permanent.damage --- .../src/main/java/mage/player/ai/ComputerPlayer.java | 2 +- .../src/mage/player/ai/SimulatedPlayerMCTS.java | 2 +- .../src/mage/player/human/HumanPlayer.java | 2 +- Mage.Sets/src/mage/sets/alarareborn/Lavalanche.java | 2 +- Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java | 2 +- Mage.Sets/src/mage/sets/apocalypse/OrimsThunder.java | 2 +- Mage.Sets/src/mage/sets/avacynrestored/Aggravate.java | 2 +- .../src/mage/sets/avacynrestored/BonfireOfTheDamned.java | 2 +- .../src/mage/sets/avacynrestored/BurnAtTheStake.java | 2 +- .../src/mage/sets/avacynrestored/DivineDeflection.java | 2 +- .../src/mage/sets/betrayersofkamigawa/AuraBarbs.java | 2 +- .../src/mage/sets/betrayersofkamigawa/FirstVolley.java | 2 +- .../sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java | 2 +- .../mage/sets/betrayersofkamigawa/RoninCliffrider.java | 2 +- .../src/mage/sets/betrayersofkamigawa/ShiningShoal.java | 2 +- Mage.Sets/src/mage/sets/betrayersofkamigawa/Shuriken.java | 2 +- Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java | 2 +- .../src/mage/sets/bornofthegods/FallOfTheHammer.java | 2 +- .../src/mage/sets/bornofthegods/SatyrFiredancer.java | 2 +- Mage.Sets/src/mage/sets/championsofkamigawa/Hankyu.java | 2 +- .../mage/sets/championsofkamigawa/KikuNightsFlower.java | 2 +- .../src/mage/sets/championsofkamigawa/KusariGama.java | 2 +- Mage.Sets/src/mage/sets/commander2013/SuddenDemise.java | 2 +- Mage.Sets/src/mage/sets/conflux/Banefire.java | 2 +- Mage.Sets/src/mage/sets/conflux/DarkTemper.java | 2 +- Mage.Sets/src/mage/sets/darkascension/AlphaBrawl.java | 4 ++-- .../src/mage/sets/darkascension/FlayerOfTheHatebound.java | 2 +- .../src/mage/sets/darkascension/HuntmasterOfTheFells.java | 2 +- .../src/mage/sets/darkascension/WrackWithMadness.java | 2 +- Mage.Sets/src/mage/sets/dragonsmaze/BlastOfGenius.java | 2 +- Mage.Sets/src/mage/sets/dragonsmaze/FleshBlood.java | 2 +- Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java | 2 +- Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java | 4 ++-- .../sets/elvesvsgoblins/IbHalfheartGoblinTactician.java | 2 +- Mage.Sets/src/mage/sets/eventide/FieryBombardment.java | 2 +- Mage.Sets/src/mage/sets/eventide/HatchetBully.java | 2 +- Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java | 2 +- Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java | 4 ++-- Mage.Sets/src/mage/sets/gatecrash/HomingLightning.java | 2 +- Mage.Sets/src/mage/sets/iceage/KjeldoranRoyalGuard.java | 2 +- Mage.Sets/src/mage/sets/innistrad/BalefireDragon.java | 2 +- Mage.Sets/src/mage/sets/innistrad/BlasphemousAct.java | 2 +- Mage.Sets/src/mage/sets/innistrad/BrimstoneVolley.java | 2 +- Mage.Sets/src/mage/sets/innistrad/CorpseLunge.java | 2 +- Mage.Sets/src/mage/sets/innistrad/GarrukRelentless.java | 4 ++-- Mage.Sets/src/mage/sets/innistrad/HereticsPunishment.java | 2 +- Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java | 2 +- Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java | 4 ++-- .../mage/sets/journeyintonyx/DictateOfTheTwinGods.java | 2 +- .../src/mage/sets/journeyintonyx/RiddleOfLightning.java | 2 +- Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java | 2 +- Mage.Sets/src/mage/sets/knightsvsdragons/ConeOfFlame.java | 2 +- Mage.Sets/src/mage/sets/legends/ChainLightning.java | 2 +- Mage.Sets/src/mage/sets/limitedalpha/DrainLife.java | 2 +- Mage.Sets/src/mage/sets/magic2010/ConsumeSpirit.java | 2 +- Mage.Sets/src/mage/sets/magic2010/Earthquake.java | 2 +- Mage.Sets/src/mage/sets/magic2010/Fireball.java | 2 +- Mage.Sets/src/mage/sets/magic2010/HarmsWay.java | 2 +- .../src/mage/sets/magic2010/MasterOfTheWildHunt.java | 2 +- Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java | 2 +- Mage.Sets/src/mage/sets/magic2011/Corrupt.java | 2 +- Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java | 4 ++-- Mage.Sets/src/mage/sets/magic2011/Fling.java | 2 +- Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java | 4 ++-- Mage.Sets/src/mage/sets/magic2012/WarstormSurge.java | 2 +- Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java | 2 +- Mage.Sets/src/mage/sets/magic2015/GoblinKaboomist.java | 2 +- Mage.Sets/src/mage/sets/magic2015/SiegeDragon.java | 2 +- Mage.Sets/src/mage/sets/magic2015/SoulOfShandalar.java | 2 +- Mage.Sets/src/mage/sets/mirage/AbyssalHunter.java | 2 +- Mage.Sets/src/mage/sets/mirrodin/FieryGambit.java | 2 +- Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java | 2 +- Mage.Sets/src/mage/sets/mirrodin/SpikeshotGoblin.java | 2 +- .../src/mage/sets/mirrodinbesieged/BurntheImpure.java | 2 +- Mage.Sets/src/mage/sets/modernmasters/CrushUnderfoot.java | 2 +- Mage.Sets/src/mage/sets/modernmasters/MoltenDisaster.java | 2 +- Mage.Sets/src/mage/sets/nemesis/OraclesAttendants.java | 2 +- .../src/mage/sets/newphyrexia/CathedralMembrane.java | 2 +- Mage.Sets/src/mage/sets/odyssey/BlazingSalvo.java | 2 +- Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java | 2 +- Mage.Sets/src/mage/sets/planechase/BoshIronGolem.java | 2 +- .../src/mage/sets/planechase/RaziaBorosArchangel.java | 2 +- Mage.Sets/src/mage/sets/planechase2012/LastStand.java | 2 +- Mage.Sets/src/mage/sets/planechase2012/RivalsDuel.java | 4 ++-- Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java | 4 ++-- .../src/mage/sets/returntoravnica/IzzetStaticaster.java | 2 +- .../src/mage/sets/returntoravnica/PalisadeGiant.java | 2 +- Mage.Sets/src/mage/sets/returntoravnica/VolatileRig.java | 2 +- .../mage/sets/riseoftheeldrazi/ExplosiveRevelation.java | 2 +- Mage.Sets/src/mage/sets/riseoftheeldrazi/ForkedBolt.java | 2 +- .../sets/riseoftheeldrazi/LordOfShatterskullPass.java | 2 +- .../src/mage/sets/riseoftheeldrazi/PestilenceDemon.java | 2 +- .../src/mage/sets/riseoftheeldrazi/SphinxBoneWand.java | 2 +- .../src/mage/sets/saviorsofkamigawa/UndyingFlames.java | 2 +- Mage.Sets/src/mage/sets/scarsofmirrodin/ArcTrail.java | 4 ++-- .../src/mage/sets/scarsofmirrodin/CerebralEruption.java | 2 +- Mage.Sets/src/mage/sets/scarsofmirrodin/Embersmith.java | 2 +- .../src/mage/sets/scarsofmirrodin/SpikeshotElder.java | 2 +- Mage.Sets/src/mage/sets/scarsofmirrodin/WingPuncture.java | 2 +- Mage.Sets/src/mage/sets/shadowmoor/EmberGale.java | 2 +- Mage.Sets/src/mage/sets/shadowmoor/MurderousRedcap.java | 2 +- Mage.Sets/src/mage/sets/shardsofalara/BranchingBolt.java | 4 ++-- .../src/mage/sets/shardsofalara/EmpyrialArchangel.java | 2 +- .../src/mage/sets/shardsofalara/FlameblastDragon.java | 2 +- Mage.Sets/src/mage/sets/shardsofalara/SoulsFire.java | 2 +- Mage.Sets/src/mage/sets/shardsofalara/VeinDrinker.java | 4 ++-- Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java | 4 ++-- Mage.Sets/src/mage/sets/tempest/CursedScroll.java | 2 +- Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java | 2 +- Mage.Sets/src/mage/sets/tempest/TortureChamber.java | 2 +- Mage.Sets/src/mage/sets/tenth/Soulblast.java | 2 +- Mage.Sets/src/mage/sets/theros/PolukranosWorldEater.java | 4 ++-- .../src/mage/sets/timespiral/KaervekTheMerciless.java | 2 +- .../src/mage/sets/urzasdestiny/BloodshotCyclops.java | 2 +- Mage.Sets/src/mage/sets/urzassaga/CraterHellion.java | 2 +- Mage.Sets/src/mage/sets/urzassaga/Pariah.java | 2 +- Mage.Sets/src/mage/sets/weatherlight/Firestorm.java | 2 +- Mage.Sets/src/mage/sets/worldwake/CometStorm.java | 2 +- Mage.Sets/src/mage/sets/worldwake/MordantDragon.java | 2 +- Mage.Sets/src/mage/sets/worldwake/RazorBoomerang.java | 2 +- Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java | 2 +- .../src/mage/sets/worldwake/RumblingAftershocks.java | 2 +- Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java | 4 ++-- Mage.Sets/src/mage/sets/zendikar/BlazingTorch.java | 2 +- Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java | 2 +- Mage.Sets/src/mage/sets/zendikar/Electropotence.java | 2 +- Mage.Sets/src/mage/sets/zendikar/PredatoryUrge.java | 4 ++-- .../src/test/java/org/mage/test/player/RandomPlayer.java | 2 +- Mage/src/mage/abilities/effects/RedirectionEffect.java | 2 +- .../effects/common/DamageAllControlledTargetEffect.java | 2 +- .../mage/abilities/effects/common/DamageAllEffect.java | 2 +- .../abilities/effects/common/DamageEverythingEffect.java | 2 +- .../mage/abilities/effects/common/DamageMultiEffect.java | 2 +- .../mage/abilities/effects/common/DamageSelfEffect.java | 2 +- .../mage/abilities/effects/common/DamageTargetEffect.java | 4 ++-- .../abilities/effects/common/FightTargetSourceEffect.java | 4 ++-- .../mage/abilities/effects/common/FightTargetsEffect.java | 4 ++-- Mage/src/mage/game/permanent/Permanent.java | 4 ++-- Mage/src/mage/game/permanent/PermanentImpl.java | 8 ++++---- 139 files changed, 162 insertions(+), 162 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 43dbb55564..e543e8ec74 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -1337,7 +1337,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { public void assignDamage(int damage, List targets, String singleTargetName, UUID sourceId, Game game) { log.debug("assignDamage"); //TODO: improve this - game.getPermanent(targets.get(0)).damage(damage, sourceId, game, true, false); + game.getPermanent(targets.get(0)).damage(damage, sourceId, game, false, true); } @Override diff --git a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java index 97fe05bced..ab2a4bf131 100644 --- a/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java +++ b/Mage.Server.Plugins/Mage.Player.AIMCTS/src/mage/player/ai/SimulatedPlayerMCTS.java @@ -429,7 +429,7 @@ public class SimulatedPlayerMCTS extends MCTSPlayer { } Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(amount, sourceId, game, true, false); + permanent.damage(amount, sourceId, game, false, true); remainingDamage -= amount; } else { diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 08e62dc841..e16a1dbdd5 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -803,7 +803,7 @@ public class HumanPlayer extends PlayerImpl { int damageAmount = getAmount(0, remainingDamage, "Select amount", game); Permanent permanent = game.getPermanent(target.getFirstTarget()); if (permanent != null) { - permanent.damage(damageAmount, sourceId, game, true, false); + permanent.damage(damageAmount, sourceId, game, false, true); remainingDamage -= damageAmount; } else { diff --git a/Mage.Sets/src/mage/sets/alarareborn/Lavalanche.java b/Mage.Sets/src/mage/sets/alarareborn/Lavalanche.java index 93303d69af..7d4cbc3829 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/Lavalanche.java +++ b/Mage.Sets/src/mage/sets/alarareborn/Lavalanche.java @@ -107,7 +107,7 @@ class LavalancheEffect extends OneShotEffect { filter.add(new ControllerIdPredicate(targetPlayer.getId())); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game); for (Permanent permanent: permanents) { - permanent.damage(amount.calculate(game, source), source.getSourceId(), game, true, false); + permanent.damage(amount.calculate(game, source), source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java b/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java index 7c3b6f6a2a..3f729184a7 100644 --- a/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java +++ b/Mage.Sets/src/mage/sets/alarareborn/VengefulRebirth.java @@ -102,7 +102,7 @@ class VengefulRebirthEffect extends OneShotEffect { int damage = card.getManaCost().convertedManaCost(); Permanent permanent = game.getPermanent(source.getTargets().get(1).getTargets().get(0)); if (permanent != null) { - permanent.damage(damage, source.getSourceId(), game, true, false); + permanent.damage(damage, source.getSourceId(), game, false, true); } Player targetPlayer = game.getPlayer(source.getTargets().get(1).getTargets().get(0)); if (targetPlayer != null) { diff --git a/Mage.Sets/src/mage/sets/apocalypse/OrimsThunder.java b/Mage.Sets/src/mage/sets/apocalypse/OrimsThunder.java index cff3adad59..f62a7062ea 100644 --- a/Mage.Sets/src/mage/sets/apocalypse/OrimsThunder.java +++ b/Mage.Sets/src/mage/sets/apocalypse/OrimsThunder.java @@ -121,7 +121,7 @@ class OrimsThunderEffect2 extends OneShotEffect { } boolean kicked = KickedCondition.getInstance().apply(game, source); if (kicked && secondTarget != null) { - secondTarget.damage(damage, source.getId(), game, true, false); + secondTarget.damage(damage, source.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/avacynrestored/Aggravate.java b/Mage.Sets/src/mage/sets/avacynrestored/Aggravate.java index c811cfd514..a74ee28303 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/Aggravate.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/Aggravate.java @@ -99,7 +99,7 @@ class AggraveteEffect extends OneShotEffect { filter.add(new ControllerIdPredicate(player.getId())); List creatures = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game); for (Permanent creature : creatures) { - creature.damage(1, source.getSourceId(), game, true, false); + creature.damage(1, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/BonfireOfTheDamned.java b/Mage.Sets/src/mage/sets/avacynrestored/BonfireOfTheDamned.java index 6f7ac127e7..dfb1f7eb5f 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/BonfireOfTheDamned.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/BonfireOfTheDamned.java @@ -95,7 +95,7 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { if (damage > 0) { player.damage(damage, source.getId(), game, false, true); for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { - perm.damage(damage, source.getId(), game, true, false); + perm.damage(damage, source.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/BurnAtTheStake.java b/Mage.Sets/src/mage/sets/avacynrestored/BurnAtTheStake.java index eca5bb0cf1..e2842cbe33 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/BurnAtTheStake.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/BurnAtTheStake.java @@ -101,7 +101,7 @@ class BurnAtTheStakeEffect extends OneShotEffect { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java b/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java index a864044833..edc6cb0555 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/DivineDeflection.java @@ -124,7 +124,7 @@ class DivineDeflectionPreventDamageTargetEffect extends PreventionEffectImpl { if (permanent != null) { game.informPlayers("Dealing " + prevented + " to " + permanent.getName() + " instead"); // keep the original source id as it is redirecting - permanent.damage(prevented, event.getSourceId(), game, true, false); + permanent.damage(prevented, event.getSourceId(), game, false, true); } Player player = game.getPlayer(redirectTo); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java index ad21f1cb7a..896531a272 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/AuraBarbs.java @@ -97,7 +97,7 @@ public class AuraBarbs extends CardImpl { if (auraEnchantment.getAttachedTo() != null) { Permanent attachedToCreature = game.getPermanent(auraEnchantment.getAttachedTo()); if (attachedToCreature != null && attachedToCreature.getCardType().contains(CardType.CREATURE)) { - attachedToCreature.damage(2, auraEnchantment.getId(), game, true, false); + attachedToCreature.damage(2, auraEnchantment.getId(), game, false, true); game.informPlayers("2 damage assigned to " + attachedToCreature.getName() + " from " + auraEnchantment.getName()); } } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/FirstVolley.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/FirstVolley.java index cdb8124923..55633da156 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/FirstVolley.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/FirstVolley.java @@ -89,7 +89,7 @@ class FirstVolleyEffect extends OneShotEffect { if (permanent != null) { Player controller = game.getPlayer(permanent.getControllerId()); if (controller != null) { - permanent.damage(1, source.getSourceId(), game, true, false); + permanent.damage(1, source.getSourceId(), game, false, true); controller.damage(1, source.getSourceId(), game, false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java index 85fe21acf4..a28f2d4e71 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/OpalEyeKondasYojimbo.java @@ -149,7 +149,7 @@ class OpalEyeKondasYojimboRedirectionEffect extends ReplacementEffectImpl { game.informPlayers(message.toString()); // redirect damage this.used = true; - sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/RoninCliffrider.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/RoninCliffrider.java index 599231d803..4c6161c864 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/RoninCliffrider.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/RoninCliffrider.java @@ -99,7 +99,7 @@ class RoninCliffriderEffect extends OneShotEffect { filter.add(new ControllerIdPredicate(defenderId)); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); for (Permanent permanent : permanents) { - permanent.damage(1, source.getSourceId(), game, true, false); + permanent.damage(1, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java index d5ec5264f3..3050010c1d 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/ShiningShoal.java @@ -145,7 +145,7 @@ class ShiningShoalPreventDamageTargetEffect extends PreventionEffectImpl { if (permanent != null) { game.informPlayers("Dealing " + prevented + " to " + permanent.getName() + " instead"); // keep the original source id as it is redirecting - permanent.damage(prevented, event.getSourceId(), game, true, false, event.getAppliedEffects()); + permanent.damage(prevented, event.getSourceId(), game, false, true, event.getAppliedEffects()); } Player player = game.getPlayer(redirectTo); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Shuriken.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Shuriken.java index beaab6578c..b3f62d0b88 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/Shuriken.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/Shuriken.java @@ -115,7 +115,7 @@ class ShurikenDamageEffect extends OneShotEffect { if (equipment != null) { Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(2, equipment.getId(), game, true, false); + creature.damage(2, equipment.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java index 8000ce46c0..aa89bbce6f 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/AcolytesReward.java @@ -137,7 +137,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl { } else { Permanent targetDamageCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (targetDamageCreature != null) { - targetDamageCreature.damage(toPrevent, source.getSourceId(), game, true, false); + targetDamageCreature.damage(toPrevent, source.getSourceId(), game, false, true); game.informPlayers(new StringBuilder("Acolyte's Reward ").append("deals ").append(toPrevent).append(" damage to ").append(targetDamageCreature.getName()).toString()); } } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/FallOfTheHammer.java b/Mage.Sets/src/mage/sets/bornofthegods/FallOfTheHammer.java index afc0596e95..af5f659bf8 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/FallOfTheHammer.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/FallOfTheHammer.java @@ -106,7 +106,7 @@ class FallOfTheHammerDamageEffect extends OneShotEffect { int damage = ownCreature.getPower().getValue(); Permanent targetCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (targetCreature != null) { - targetCreature.damage(damage, ownCreature.getId(), game, true, false); + targetCreature.damage(damage, ownCreature.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java b/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java index 5d6d4c046c..96671fc94a 100644 --- a/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java +++ b/Mage.Sets/src/mage/sets/bornofthegods/SatyrFiredancer.java @@ -167,7 +167,7 @@ class SatyrFiredancerDamageEffect extends OneShotEffect { if (targetCreature != null && controller != null) { int damage = (Integer) this.getValue("damage"); if (damage > 0) { - targetCreature.damage(damage, source.getSourceId(), game, true, false); + targetCreature.damage(damage, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/Hankyu.java b/Mage.Sets/src/mage/sets/championsofkamigawa/Hankyu.java index a6610f1d2c..4a4a938cd2 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/Hankyu.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/Hankyu.java @@ -146,7 +146,7 @@ class HankyuDealsDamageEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(damageAmount, source.getSourceId(), game, true, false); + permanent.damage(damageAmount, source.getSourceId(), game, false, true); } Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KikuNightsFlower.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KikuNightsFlower.java index 697909ba31..d3fc992d82 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KikuNightsFlower.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KikuNightsFlower.java @@ -103,7 +103,7 @@ class KikuNightsFlowerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(permanent.getPower().getValue(), permanent.getId(), game, true, false); + permanent.damage(permanent.getPower().getValue(), permanent.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KusariGama.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KusariGama.java index e96c17912a..8f2709b4d0 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KusariGama.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KusariGama.java @@ -152,7 +152,7 @@ class KusariGamaDamageEffect extends OneShotEffect { if (!blockerId.equals(damagedCreatureId)) { Permanent blockingCreature = game.getPermanent(blockerId); if (blockingCreature != null && blockingCreature.getControllerId().equals(creature.getControllerId())) { - blockingCreature.damage(damage, source.getSourceId(), game, true, false); + blockingCreature.damage(damage, source.getSourceId(), game, false, true); } } } diff --git a/Mage.Sets/src/mage/sets/commander2013/SuddenDemise.java b/Mage.Sets/src/mage/sets/commander2013/SuddenDemise.java index d803d94ab4..e69921bcf5 100644 --- a/Mage.Sets/src/mage/sets/commander2013/SuddenDemise.java +++ b/Mage.Sets/src/mage/sets/commander2013/SuddenDemise.java @@ -96,7 +96,7 @@ class SuddenDemiseDamageEffect extends OneShotEffect { FilterPermanent filter = new FilterCreaturePermanent(); filter.add(new ColorPredicate(choice.getColor())); for (Permanent permanent:game.getBattlefield().getActivePermanents(filter, source.getControllerId(), id, game)) { - permanent.damage(damage, source.getSourceId(), game, true, false); + permanent.damage(damage, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/conflux/Banefire.java b/Mage.Sets/src/mage/sets/conflux/Banefire.java index dc8aea74d1..52d11829a0 100644 --- a/Mage.Sets/src/mage/sets/conflux/Banefire.java +++ b/Mage.Sets/src/mage/sets/conflux/Banefire.java @@ -128,7 +128,7 @@ class BaneFireEffect extends OneShotEffect { return true; } if (targetCreature != null) { - targetCreature.damage(damage, source.getSourceId(), game, false, preventable); + targetCreature.damage(damage, source.getSourceId(), game, preventable, false); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/conflux/DarkTemper.java b/Mage.Sets/src/mage/sets/conflux/DarkTemper.java index 10d2c3b8bb..8546a23e4d 100644 --- a/Mage.Sets/src/mage/sets/conflux/DarkTemper.java +++ b/Mage.Sets/src/mage/sets/conflux/DarkTemper.java @@ -96,7 +96,7 @@ class DarkTemperEffect extends OneShotEffect { filter.add(new ColorPredicate(ObjectColor.BLACK)); if (game.getBattlefield().countAll(filter, source.getControllerId(), game) == 0) { - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); } else { permanent.destroy(source.getId(), game, false); } diff --git a/Mage.Sets/src/mage/sets/darkascension/AlphaBrawl.java b/Mage.Sets/src/mage/sets/darkascension/AlphaBrawl.java index 76b2512213..33dec4af08 100644 --- a/Mage.Sets/src/mage/sets/darkascension/AlphaBrawl.java +++ b/Mage.Sets/src/mage/sets/darkascension/AlphaBrawl.java @@ -98,10 +98,10 @@ class AlphaBrawlEffect extends OneShotEffect { if (player != null) { int power = creature.getPower().getValue(); for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { - perm.damage(power, creature.getId(), game, true, false); + perm.damage(power, creature.getId(), game, false, true); } for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { - creature.damage(perm.getPower().getValue(), perm.getId(), game, true, false); + creature.damage(perm.getPower().getValue(), perm.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/darkascension/FlayerOfTheHatebound.java b/Mage.Sets/src/mage/sets/darkascension/FlayerOfTheHatebound.java index 20c6d450fd..fc51e6d79b 100644 --- a/Mage.Sets/src/mage/sets/darkascension/FlayerOfTheHatebound.java +++ b/Mage.Sets/src/mage/sets/darkascension/FlayerOfTheHatebound.java @@ -144,7 +144,7 @@ class FlayerEffect extends OneShotEffect { UUID target = source.getTargets().getFirstTarget(); Permanent targetCreature = game.getPermanent(target); if (targetCreature != null) { - targetCreature.damage(amount, creature.getId(), game, true, false); + targetCreature.damage(amount, creature.getId(), game, false, true); return true; } Player player = game.getPlayer(target); diff --git a/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java b/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java index b57340a82f..028bf8c5a6 100644 --- a/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java +++ b/Mage.Sets/src/mage/sets/darkascension/HuntmasterOfTheFells.java @@ -198,7 +198,7 @@ class RavagerOfTheFellsEffect extends OneShotEffect { } Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { - creature.damage(2, source.getSourceId(), game, true, false); + creature.damage(2, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java b/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java index f9c92f10c8..9c4f29bbe9 100644 --- a/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java +++ b/Mage.Sets/src/mage/sets/darkascension/WrackWithMadness.java @@ -85,7 +85,7 @@ class WrackWithMadnessEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(permanent.getPower().getValue(), permanent.getId(), game, true, false); + permanent.damage(permanent.getPower().getValue(), permanent.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/BlastOfGenius.java b/Mage.Sets/src/mage/sets/dragonsmaze/BlastOfGenius.java index 9e12bb699c..ab755f3188 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/BlastOfGenius.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/BlastOfGenius.java @@ -103,7 +103,7 @@ class BlastOfGeniusEffect extends OneShotEffect { int damage = card.getManaCost().convertedManaCost(); Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(damage, source.getSourceId(), game, true, false); + creature.damage(damage, source.getSourceId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/FleshBlood.java b/Mage.Sets/src/mage/sets/dragonsmaze/FleshBlood.java index 7a3fa19bbc..daf7132e91 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/FleshBlood.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/FleshBlood.java @@ -148,7 +148,7 @@ class BloodEffect extends OneShotEffect { Permanent targetCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (sourcePermanent != null && targetCreature != null) { - targetCreature.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, true, false); + targetCreature.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(source.getTargets().get(1).getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java b/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java index 9619c2b03a..1881f02f20 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/MorgueBurst.java @@ -99,7 +99,7 @@ class MorgueBurstEffect extends OneShotEffect { int damage = card.getPower().getValue(); Permanent creature = game.getPermanent(source.getTargets().get(1).getTargets().get(0)); if (creature != null) { - creature.damage(damage, source.getSourceId(), game, true, false); + creature.damage(damage, source.getSourceId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(source.getTargets().get(1).getTargets().get(0)); diff --git a/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java b/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java index 6ab662db80..51ee138fd7 100644 --- a/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java +++ b/Mage.Sets/src/mage/sets/dragonsmaze/ScabClanGiant.java @@ -108,8 +108,8 @@ class ScabClanGiantEffect extends OneShotEffect { // 20110930 - 701.10 if (creature1 != null && creature2 != null) { if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { - creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, true, false); - creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, true, false); + creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); + creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/elvesvsgoblins/IbHalfheartGoblinTactician.java b/Mage.Sets/src/mage/sets/elvesvsgoblins/IbHalfheartGoblinTactician.java index e222bb7775..1da0935f02 100644 --- a/Mage.Sets/src/mage/sets/elvesvsgoblins/IbHalfheartGoblinTactician.java +++ b/Mage.Sets/src/mage/sets/elvesvsgoblins/IbHalfheartGoblinTactician.java @@ -135,7 +135,7 @@ class IbHalfheartGoblinTacticianEffect extends OneShotEffect { for (UUID blockerId : blockingCreatures) { Permanent blockingCreature = game.getPermanent(blockerId); if (blockingCreature != null) { - blockingCreature.damage(4, blockedCreature.getId(), game, true, false); + blockingCreature.damage(4, blockedCreature.getId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/eventide/FieryBombardment.java b/Mage.Sets/src/mage/sets/eventide/FieryBombardment.java index e59fb80065..1aa34f7880 100644 --- a/Mage.Sets/src/mage/sets/eventide/FieryBombardment.java +++ b/Mage.Sets/src/mage/sets/eventide/FieryBombardment.java @@ -117,7 +117,7 @@ class FieryBombardmentEffect extends OneShotEffect { } else { Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(damage, source.getSourceId(), game, true, false); + creature.damage(damage, source.getSourceId(), game, false, true); } } } diff --git a/Mage.Sets/src/mage/sets/eventide/HatchetBully.java b/Mage.Sets/src/mage/sets/eventide/HatchetBully.java index 5f91cab9aa..68c19384b4 100644 --- a/Mage.Sets/src/mage/sets/eventide/HatchetBully.java +++ b/Mage.Sets/src/mage/sets/eventide/HatchetBully.java @@ -137,7 +137,7 @@ class HatchetBullyEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); } Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java b/Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java index a2ee492354..c96f1d082f 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java +++ b/Mage.Sets/src/mage/sets/gatecrash/BorosReckoner.java @@ -111,7 +111,7 @@ class BorosReckonerDealDamageEffect extends OneShotEffect { } Permanent creature = game.getPermanent(targetPointer.getFirst(game, source)); if (creature != null) { - creature.damage(amount, source.getSourceId(), game, true, false); + creature.damage(amount, source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java b/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java index 046b018d2b..d836ce1415 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java +++ b/Mage.Sets/src/mage/sets/gatecrash/GruulRagebeast.java @@ -144,8 +144,8 @@ class GruulRagebeastEffect extends OneShotEffect { && target != null && triggeredCreature.getCardType().contains(CardType.CREATURE) && target.getCardType().contains(CardType.CREATURE)) { - triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, true, false); - target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, true, false); + triggeredCreature.damage(target.getPower().getValue(), target.getId(), game, false, true); + target.damage(triggeredCreature.getPower().getValue(), triggeredCreature.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/gatecrash/HomingLightning.java b/Mage.Sets/src/mage/sets/gatecrash/HomingLightning.java index 536f36b2b6..419eb75844 100644 --- a/Mage.Sets/src/mage/sets/gatecrash/HomingLightning.java +++ b/Mage.Sets/src/mage/sets/gatecrash/HomingLightning.java @@ -92,7 +92,7 @@ class HomingLightningEffect extends OneShotEffect { if (target != null) { for (Permanent creature : creatures) { if (creature != null) { - creature.damage(4, id, game, true, false); + creature.damage(4, id, game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/iceage/KjeldoranRoyalGuard.java b/Mage.Sets/src/mage/sets/iceage/KjeldoranRoyalGuard.java index 5536c839f2..1bf34e7e4e 100644 --- a/Mage.Sets/src/mage/sets/iceage/KjeldoranRoyalGuard.java +++ b/Mage.Sets/src/mage/sets/iceage/KjeldoranRoyalGuard.java @@ -99,7 +99,7 @@ class KjeldoranRoyalGuardEffect extends ReplacementEffectImpl { DamagePlayerEvent damageEvent = (DamagePlayerEvent) event; Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { - p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage()); + p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable()); return true; } return true; diff --git a/Mage.Sets/src/mage/sets/innistrad/BalefireDragon.java b/Mage.Sets/src/mage/sets/innistrad/BalefireDragon.java index 9a21465c23..aa8f46347f 100644 --- a/Mage.Sets/src/mage/sets/innistrad/BalefireDragon.java +++ b/Mage.Sets/src/mage/sets/innistrad/BalefireDragon.java @@ -91,7 +91,7 @@ class BalefireDragonEffect extends OneShotEffect { int amount = (Integer)getValue("damage"); if (amount > 0) { for (Permanent creature: game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), player.getId(), game)) { - creature.damage(amount, source.getSourceId(), game, true, false); + creature.damage(amount, source.getSourceId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/innistrad/BlasphemousAct.java b/Mage.Sets/src/mage/sets/innistrad/BlasphemousAct.java index 43a148d50f..b18a1458a3 100644 --- a/Mage.Sets/src/mage/sets/innistrad/BlasphemousAct.java +++ b/Mage.Sets/src/mage/sets/innistrad/BlasphemousAct.java @@ -95,7 +95,7 @@ class BlasphemousActEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { List permanents = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game); for (Permanent permanent : permanents) { - permanent.damage(13, source.getId(), game, true, false); + permanent.damage(13, source.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/innistrad/BrimstoneVolley.java b/Mage.Sets/src/mage/sets/innistrad/BrimstoneVolley.java index 72e3945053..07dbdfc23a 100644 --- a/Mage.Sets/src/mage/sets/innistrad/BrimstoneVolley.java +++ b/Mage.Sets/src/mage/sets/innistrad/BrimstoneVolley.java @@ -88,7 +88,7 @@ class BrimstoneVolleyEffect extends OneShotEffect { } Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(damage, source.getSourceId(), game, true, false); + permanent.damage(damage, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(targetPointer.getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/innistrad/CorpseLunge.java b/Mage.Sets/src/mage/sets/innistrad/CorpseLunge.java index 83c876cd00..10999fe7f6 100644 --- a/Mage.Sets/src/mage/sets/innistrad/CorpseLunge.java +++ b/Mage.Sets/src/mage/sets/innistrad/CorpseLunge.java @@ -104,7 +104,7 @@ class CorpseLungeEffect extends OneShotEffect { if (amount > 0) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/innistrad/GarrukRelentless.java b/Mage.Sets/src/mage/sets/innistrad/GarrukRelentless.java index b315eceb63..07f24fc503 100644 --- a/Mage.Sets/src/mage/sets/innistrad/GarrukRelentless.java +++ b/Mage.Sets/src/mage/sets/innistrad/GarrukRelentless.java @@ -139,11 +139,11 @@ class GarrukRelentlessDamageEffect extends OneShotEffect { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { int damage = permanent.getPower().getValue(); - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); if (damage > 0) { Permanent garruk = game.getPermanent(source.getSourceId()); if (garruk != null) { - garruk.damage(damage, permanent.getId(), game, true, false); + garruk.damage(damage, permanent.getId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/innistrad/HereticsPunishment.java b/Mage.Sets/src/mage/sets/innistrad/HereticsPunishment.java index 54333f42a5..5cd18d05ec 100644 --- a/Mage.Sets/src/mage/sets/innistrad/HereticsPunishment.java +++ b/Mage.Sets/src/mage/sets/innistrad/HereticsPunishment.java @@ -98,7 +98,7 @@ class HereticsPunishmentEffect extends OneShotEffect { } Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(maxCost, source.getSourceId(), game, true, false); + permanent.damage(maxCost, source.getSourceId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java b/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java index 84cd5f5fef..2d3bc8c546 100644 --- a/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java +++ b/Mage.Sets/src/mage/sets/innistrad/IntoTheMawOfHell.java @@ -89,7 +89,7 @@ class IntoTheMawOfHellEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (permanent != null) { - permanent.damage(13, source.getSourceId(), game, true, false); + permanent.damage(13, source.getSourceId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java b/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java index 3ef0564799..d44c9856cf 100644 --- a/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java +++ b/Mage.Sets/src/mage/sets/innistrad/NightfallPredator.java @@ -112,8 +112,8 @@ class NightfallPredatorEffect extends OneShotEffect { // 20110930 - 701.10 if (creature1 != null && creature2 != null) { if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { - creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, true, false); - creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, true, false); + creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); + creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java index cc54450468..86a938d6b9 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/DictateOfTheTwinGods.java @@ -120,7 +120,7 @@ class DictateOfTheTwinGodsEffect extends ReplacementEffectImpl { } else { Permanent targetPermanent = game.getPermanent(event.getTargetId()); if (targetPermanent != null) { - targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/RiddleOfLightning.java b/Mage.Sets/src/mage/sets/journeyintonyx/RiddleOfLightning.java index 2b58714d09..a0417d02bf 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/RiddleOfLightning.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/RiddleOfLightning.java @@ -99,7 +99,7 @@ class RiddleOfLightningEffect extends OneShotEffect { controller.revealCards(sourceCard.getName(), new CardsImpl(card), game); Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (targetCreature != null) { - targetCreature.damage(card.getManaCost().convertedManaCost(), source.getSourceId(), game, true, false); + targetCreature.damage(card.getManaCost().convertedManaCost(), source.getSourceId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java b/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java index 3968b9f66d..9af9fd4a2e 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/Starfall.java @@ -88,7 +88,7 @@ class StarfallEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); if (permanent.getCardType().contains(CardType.ENCHANTMENT)) { Player targetController = game.getPlayer(permanent.getControllerId()); if (targetController != null) { diff --git a/Mage.Sets/src/mage/sets/knightsvsdragons/ConeOfFlame.java b/Mage.Sets/src/mage/sets/knightsvsdragons/ConeOfFlame.java index e0cca23b7d..6b20aa6cb2 100644 --- a/Mage.Sets/src/mage/sets/knightsvsdragons/ConeOfFlame.java +++ b/Mage.Sets/src/mage/sets/knightsvsdragons/ConeOfFlame.java @@ -89,7 +89,7 @@ class ConeOfFlameEffect extends OneShotEffect { for (UUID targetId : targetPointer.getTargets(game, source)) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - applied |= (permanent.damage(damage, source.getSourceId(), game, true, false) > 0); + applied |= (permanent.damage(damage, source.getSourceId(), game, false, true) > 0); } Player player = game.getPlayer(targetId); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/legends/ChainLightning.java b/Mage.Sets/src/mage/sets/legends/ChainLightning.java index 5a309ddd1e..ed2d755256 100644 --- a/Mage.Sets/src/mage/sets/legends/ChainLightning.java +++ b/Mage.Sets/src/mage/sets/legends/ChainLightning.java @@ -99,7 +99,7 @@ class ChainLightningEffect extends OneShotEffect { else { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); affectedPlayer = game.getPlayer(permanent.getControllerId()); } } diff --git a/Mage.Sets/src/mage/sets/limitedalpha/DrainLife.java b/Mage.Sets/src/mage/sets/limitedalpha/DrainLife.java index 3dc4bdf3a4..7cddea645a 100644 --- a/Mage.Sets/src/mage/sets/limitedalpha/DrainLife.java +++ b/Mage.Sets/src/mage/sets/limitedalpha/DrainLife.java @@ -104,7 +104,7 @@ class DrainLifeEffect extends OneShotEffect { if (permanent.getToughness().getValue() < amount) { lifetogain = permanent.getToughness().getValue(); } - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/magic2010/ConsumeSpirit.java b/Mage.Sets/src/mage/sets/magic2010/ConsumeSpirit.java index 987e172ae3..7adedde0fb 100644 --- a/Mage.Sets/src/mage/sets/magic2010/ConsumeSpirit.java +++ b/Mage.Sets/src/mage/sets/magic2010/ConsumeSpirit.java @@ -98,7 +98,7 @@ class ConsumeSpiritEffect extends OneShotEffect { if (amount > 0) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java index 844dcea225..505b796c67 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Earthquake.java +++ b/Mage.Sets/src/mage/sets/magic2010/Earthquake.java @@ -92,7 +92,7 @@ class EarthquakeEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = source.getManaCostsToPay().getX(); for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - permanent.damage(amount, source.getId(), game, true, false); + permanent.damage(amount, source.getId(), game, false, true); } for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { Player player = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/sets/magic2010/Fireball.java b/Mage.Sets/src/mage/sets/magic2010/Fireball.java index 13d291bc10..f8a232897f 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Fireball.java +++ b/Mage.Sets/src/mage/sets/magic2010/Fireball.java @@ -98,7 +98,7 @@ class FireballEffect extends OneShotEffect { for (UUID targetId: targetPointer.getTargets(game, source)) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(damagePer, source.getSourceId(), game, true, false); + permanent.damage(damagePer, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(targetId); diff --git a/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java b/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java index 1dee8513c2..6f81bb49ec 100644 --- a/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java +++ b/Mage.Sets/src/mage/sets/magic2010/HarmsWay.java @@ -102,7 +102,7 @@ class HarmsWayPreventDamageTargetEffect extends PreventionEffectImpl { if (permanent != null) { game.informPlayers("Dealing " + preventionData.getPreventedDamage() + " to " + permanent.getName() + " instead"); // keep the original source id as it is redirecting - permanent.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, true, false); + permanent.damage(preventionData.getPreventedDamage(), event.getSourceId(), game, false, true); } Player player = game.getPlayer(redirectTo); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java b/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java index 03e3ae9420..2019f7c8b6 100644 --- a/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java +++ b/Mage.Sets/src/mage/sets/magic2010/MasterOfTheWildHunt.java @@ -118,7 +118,7 @@ class MasterOfTheWildHuntEffect extends OneShotEffect { if (target != null && game.getBattlefield().countAll(filter, source.getControllerId(), game) > 0) { for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { permanent.tap(game); - target.damage(permanent.getToughness().getValue(), permanent.getId(), game, true, false); + target.damage(permanent.getToughness().getValue(), permanent.getId(), game, false, true); wolves.add(permanent.getId()); } Player player = game.getPlayer(target.getControllerId()); diff --git a/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java b/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java index 39adfe3712..090c1eaa92 100644 --- a/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java +++ b/Mage.Sets/src/mage/sets/magic2011/ChandrasOutrage.java @@ -82,7 +82,7 @@ class ChandrasOutrageEffect extends OneShotEffect { if (permanent != null) { Player player = game.getPlayer(permanent.getControllerId()); if (player != null) { - permanent.damage(4, source.getSourceId(), game, true, false); + permanent.damage(4, source.getSourceId(), game, false, true); player.damage(2, source.getSourceId(), game, false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/magic2011/Corrupt.java b/Mage.Sets/src/mage/sets/magic2011/Corrupt.java index 90f22ca18c..33053739ea 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Corrupt.java +++ b/Mage.Sets/src/mage/sets/magic2011/Corrupt.java @@ -94,7 +94,7 @@ class CorruptEffect extends OneShotEffect { int damageDealt = amount; Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - damageDealt = permanent.damage(amount, source.getSourceId(), game, true, false); + damageDealt = permanent.damage(amount, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java b/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java index d585d7ce8b..c1ba9c23ed 100644 --- a/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java +++ b/Mage.Sets/src/mage/sets/magic2011/CyclopsGladiator.java @@ -98,8 +98,8 @@ class CyclopsGladiatorEffect extends OneShotEffect { Permanent permanent = game.getPermanent(target.getFirstTarget()); Permanent cyclops = game.getPermanent(source.getSourceId()); if (permanent != null && cyclops != null) { - permanent.damage(cyclops.getPower().getValue(), cyclops.getId(), game, true, false); - cyclops.damage(permanent.getPower().getValue(), permanent.getId(), game, true, false); + permanent.damage(cyclops.getPower().getValue(), cyclops.getId(), game, false, true); + cyclops.damage(permanent.getPower().getValue(), permanent.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/magic2011/Fling.java b/Mage.Sets/src/mage/sets/magic2011/Fling.java index 5a14b67702..37e092ca50 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Fling.java +++ b/Mage.Sets/src/mage/sets/magic2011/Fling.java @@ -91,7 +91,7 @@ class FlingEffect extends OneShotEffect { if (amount > 0) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java b/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java index 406d1f557f..4cf91cea73 100644 --- a/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java +++ b/Mage.Sets/src/mage/sets/magic2012/GoblinBangchuckers.java @@ -94,7 +94,7 @@ class GoblinBangchuckersEffect extends OneShotEffect { if (controller.flipCoin(game)) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(targetPointer.getFirst(game, source)); @@ -105,7 +105,7 @@ class GoblinBangchuckersEffect extends OneShotEffect { } else { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/magic2012/WarstormSurge.java b/Mage.Sets/src/mage/sets/magic2012/WarstormSurge.java index 199b64d885..6c363132b0 100644 --- a/Mage.Sets/src/mage/sets/magic2012/WarstormSurge.java +++ b/Mage.Sets/src/mage/sets/magic2012/WarstormSurge.java @@ -134,7 +134,7 @@ class WarstormSurgeEffect extends OneShotEffect { UUID target = source.getTargets().getFirstTarget(); Permanent targetCreature = game.getPermanent(target); if (targetCreature != null) { - targetCreature.damage(amount, creature.getId(), game, true, false); + targetCreature.damage(amount, creature.getId(), game, false, true); return true; } Player player = game.getPlayer(target); diff --git a/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java b/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java index 3f99b62806..7fabf56f56 100644 --- a/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/sets/magic2014/ChandraPyromaster.java @@ -130,7 +130,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { } Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { - creature.damage(1, source.getSourceId(), game, true, false); + creature.damage(1, source.getSourceId(), game, false, true); ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn); effect.setTargetPointer(new FixedTarget(creature.getId())); game.addEffect(effect, source); diff --git a/Mage.Sets/src/mage/sets/magic2015/GoblinKaboomist.java b/Mage.Sets/src/mage/sets/magic2015/GoblinKaboomist.java index efca03dcd8..4fbec70089 100644 --- a/Mage.Sets/src/mage/sets/magic2015/GoblinKaboomist.java +++ b/Mage.Sets/src/mage/sets/magic2015/GoblinKaboomist.java @@ -111,7 +111,7 @@ class GoblinKaboomistFlipCoinEffect extends OneShotEffect { if (!player.flipCoin(game)) { String message = new StringBuilder(permanent.getLogName()).append(" deals 2 damage to itself").toString(); game.informPlayers(message); - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2015/SiegeDragon.java b/Mage.Sets/src/mage/sets/magic2015/SiegeDragon.java index 8720cf21b0..e9f865ac39 100644 --- a/Mage.Sets/src/mage/sets/magic2015/SiegeDragon.java +++ b/Mage.Sets/src/mage/sets/magic2015/SiegeDragon.java @@ -156,7 +156,7 @@ class SiegeDragonDamageEffect extends OneShotEffect { filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class))); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); for (Permanent permanent : permanents) { - permanent.damage(2, source.getSourceId(), game, true, false); + permanent.damage(2, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/magic2015/SoulOfShandalar.java b/Mage.Sets/src/mage/sets/magic2015/SoulOfShandalar.java index 5048d2fa88..b48d5aea6a 100644 --- a/Mage.Sets/src/mage/sets/magic2015/SoulOfShandalar.java +++ b/Mage.Sets/src/mage/sets/magic2015/SoulOfShandalar.java @@ -117,7 +117,7 @@ class SoulOfShandalarEffect extends OneShotEffect { } Permanent creature = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (creature != null) { - creature.damage(3, source.getSourceId(), game, true, false); + creature.damage(3, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/mirage/AbyssalHunter.java b/Mage.Sets/src/mage/sets/mirage/AbyssalHunter.java index 3aa0387e69..c50f397935 100644 --- a/Mage.Sets/src/mage/sets/mirage/AbyssalHunter.java +++ b/Mage.Sets/src/mage/sets/mirage/AbyssalHunter.java @@ -97,7 +97,7 @@ class AbyssalHunterEffect extends OneShotEffect { if (targetCreature != null) { targetCreature.tap(game); if (hunter != null) { - targetCreature.damage(hunter.getPower().getValue(), hunter.getId(), game, true, false); + targetCreature.damage(hunter.getPower().getValue(), hunter.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/mirrodin/FieryGambit.java b/Mage.Sets/src/mage/sets/mirrodin/FieryGambit.java index 187f6e7e61..0d44115836 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/FieryGambit.java +++ b/Mage.Sets/src/mage/sets/mirrodin/FieryGambit.java @@ -104,7 +104,7 @@ class FieryGambitEffect extends OneShotEffect { if (controllerStopped) { Permanent creature = game.getPermanent(getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(3, source.getSourceId(), game, true, false); + creature.damage(3, source.getSourceId(), game, false, true); } if (flipsWon > 1) { new DamagePlayersEffect(6, TargetController.OPPONENT).apply(game, source); diff --git a/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java b/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java index 0c42ad93ba..70fac52a14 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java +++ b/Mage.Sets/src/mage/sets/mirrodin/GoblinCharbelcher.java @@ -125,7 +125,7 @@ class GoblinCharbelcherEffect extends OneShotEffect { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(damage, source.getSourceId(), game, true, false); + permanent.damage(damage, source.getSourceId(), game, false, true); } else{ Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/mirrodin/SpikeshotGoblin.java b/Mage.Sets/src/mage/sets/mirrodin/SpikeshotGoblin.java index 55de5c9b1d..389aec2e08 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/SpikeshotGoblin.java +++ b/Mage.Sets/src/mage/sets/mirrodin/SpikeshotGoblin.java @@ -99,7 +99,7 @@ class SpikeshotGoblinEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(damage, sourcePermanent.getId(), game, true, false); + permanent.damage(damage, sourcePermanent.getId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java b/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java index 4b067caa1b..9ae1425e05 100644 --- a/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java +++ b/Mage.Sets/src/mage/sets/mirrodinbesieged/BurntheImpure.java @@ -85,7 +85,7 @@ class BurntheImpureEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (permanent != null) { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); if (permanent.getAbilities().contains(InfectAbility.getInstance())) { Player controller = game.getPlayer(permanent.getControllerId()); if (controller != null) { diff --git a/Mage.Sets/src/mage/sets/modernmasters/CrushUnderfoot.java b/Mage.Sets/src/mage/sets/modernmasters/CrushUnderfoot.java index a28c29db47..7d669bae2f 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/CrushUnderfoot.java +++ b/Mage.Sets/src/mage/sets/modernmasters/CrushUnderfoot.java @@ -107,7 +107,7 @@ class CrushUnderfootEffect extends OneShotEffect { game.informPlayers(new StringBuilder("Crush Underfoot: Choosen Giant is").append(giant.getName()).toString()); Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (targetCreature != null) { - targetCreature.damage(giant.getPower().getValue(), source.getSourceId(), game, true, false); + targetCreature.damage(giant.getPower().getValue(), source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/modernmasters/MoltenDisaster.java b/Mage.Sets/src/mage/sets/modernmasters/MoltenDisaster.java index 1e2d63c139..090a9ece4a 100644 --- a/Mage.Sets/src/mage/sets/modernmasters/MoltenDisaster.java +++ b/Mage.Sets/src/mage/sets/modernmasters/MoltenDisaster.java @@ -138,7 +138,7 @@ class MoltenDisasterEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int amount = source.getManaCostsToPay().getX(); for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { - permanent.damage(amount, source.getId(), game, true, false); + permanent.damage(amount, source.getId(), game, false, true); } for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { Player player = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/sets/nemesis/OraclesAttendants.java b/Mage.Sets/src/mage/sets/nemesis/OraclesAttendants.java index 80f06e9939..378b9fbad3 100644 --- a/Mage.Sets/src/mage/sets/nemesis/OraclesAttendants.java +++ b/Mage.Sets/src/mage/sets/nemesis/OraclesAttendants.java @@ -113,7 +113,7 @@ class OraclesAttendantsReplacementEffect extends ReplacementEffectImpl { Permanent permanent = game.getPermanent(source.getSourceId()); DamageCreatureEvent damageEvent = (DamageCreatureEvent) event; if (permanent != null) { - permanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage()); + permanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java b/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java index c716cb7233..f0adc7beb3 100644 --- a/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java +++ b/Mage.Sets/src/mage/sets/newphyrexia/CathedralMembrane.java @@ -127,7 +127,7 @@ class CathedralMembraneEffect extends OneShotEffect { for (UUID uuid : watcher.blockedCreatures) { Permanent permanent = game.getPermanent(uuid); if (permanent != null) { - permanent.damage(6, source.getSourceId(), game, true, false); + permanent.damage(6, source.getSourceId(), game, false, true); } } } diff --git a/Mage.Sets/src/mage/sets/odyssey/BlazingSalvo.java b/Mage.Sets/src/mage/sets/odyssey/BlazingSalvo.java index 6f26020daf..d0e7f18375 100644 --- a/Mage.Sets/src/mage/sets/odyssey/BlazingSalvo.java +++ b/Mage.Sets/src/mage/sets/odyssey/BlazingSalvo.java @@ -92,7 +92,7 @@ class BlazingSalvoEffect extends OneShotEffect { if (player.chooseUse(Outcome.Damage, message, game)){ player.damage(5, source.getSourceId(), game, true, false); } else { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java index 9d49fdff6b..bb7f2368c6 100644 --- a/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java +++ b/Mage.Sets/src/mage/sets/odyssey/Whipkeeper.java @@ -93,7 +93,7 @@ class WhipkeeperEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent creature = game.getPermanent(source.getFirstTarget()); if (creature != null) { - creature.damage(creature.getDamage(), source.getSourceId(), game, true, false); + creature.damage(creature.getDamage(), source.getSourceId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/planechase/BoshIronGolem.java b/Mage.Sets/src/mage/sets/planechase/BoshIronGolem.java index 85bcb536d6..769221d7eb 100644 --- a/Mage.Sets/src/mage/sets/planechase/BoshIronGolem.java +++ b/Mage.Sets/src/mage/sets/planechase/BoshIronGolem.java @@ -114,7 +114,7 @@ class BoshIronGolemEffect extends OneShotEffect { if (amount > 0) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/planechase/RaziaBorosArchangel.java b/Mage.Sets/src/mage/sets/planechase/RaziaBorosArchangel.java index c4cf9e0774..4df70cf9c3 100644 --- a/Mage.Sets/src/mage/sets/planechase/RaziaBorosArchangel.java +++ b/Mage.Sets/src/mage/sets/planechase/RaziaBorosArchangel.java @@ -144,7 +144,7 @@ class RaziaBorosArchangelEffect extends PreventionEffectImpl { if (permanent != null) { game.informPlayers("Dealing " + prevented + " to " + permanent.getName() + " instead"); // keep the original source id as it is redirecting - permanent.damage(prevented, event.getSourceId(), game, true, false); + permanent.damage(prevented, event.getSourceId(), game, false, true); } } } diff --git a/Mage.Sets/src/mage/sets/planechase2012/LastStand.java b/Mage.Sets/src/mage/sets/planechase2012/LastStand.java index a4bff0ba0d..47ae4f17f7 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/LastStand.java +++ b/Mage.Sets/src/mage/sets/planechase2012/LastStand.java @@ -120,7 +120,7 @@ class LastStandEffect extends OneShotEffect { if (creature != null) { int mountains = game.getBattlefield().count(filterMountain, source.getSourceId(), source.getControllerId(), game); if (mountains > 0) { - creature.damage(mountains, source.getSourceId(), game, true, false); + creature.damage(mountains, source.getSourceId(), game, false, true); } } // Put a 1/1 green Saproling creature token onto the battlefield for each Forest you control. diff --git a/Mage.Sets/src/mage/sets/planechase2012/RivalsDuel.java b/Mage.Sets/src/mage/sets/planechase2012/RivalsDuel.java index 97b2ac7bd5..90fcfcf87f 100644 --- a/Mage.Sets/src/mage/sets/planechase2012/RivalsDuel.java +++ b/Mage.Sets/src/mage/sets/planechase2012/RivalsDuel.java @@ -119,8 +119,8 @@ class RivalsDuelFightTargetsEffect extends OneShotEffect { // 20110930 - 701.10 if (creature1 != null && creature2 != null) { if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { - creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, true, false); - creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, true, false); + creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); + creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java b/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java index e91817adb0..2c30a39eb8 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/GuildFeud.java @@ -148,8 +148,8 @@ class GuildFeudEffect extends OneShotEffect { // If two creatures are put onto the battlefield this way, those creatures fight each other if (opponentCreature != null && controllerCreature != null) { int power = opponentCreature.getPower().getValue(); - opponentCreature.damage(controllerCreature.getPower().getValue(), source.getSourceId(), game, true, false); - controllerCreature.damage(power, source.getSourceId(), game, true, false); + opponentCreature.damage(controllerCreature.getPower().getValue(), source.getSourceId(), game, false, true); + controllerCreature.damage(power, source.getSourceId(), game, false, true); } } return false; diff --git a/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java index f1a9637b6c..5246abf2be 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/IzzetStaticaster.java @@ -110,7 +110,7 @@ class IzzetStaticasterDamageEffect extends OneShotEffect { filter.add(new NamePredicate(targetPermanent.getName())); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game); for (Permanent permanent : permanents) { - permanent.damage(1, source.getSourceId(), game, true, false); + permanent.damage(1, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java b/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java index ab7887aefa..a74d08fdff 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/PalisadeGiant.java @@ -148,7 +148,7 @@ class PalisadeGiantReplacementEffect extends ReplacementEffectImpl { } game.informPlayers(message.toString()); // redirect damage - sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/returntoravnica/VolatileRig.java b/Mage.Sets/src/mage/sets/returntoravnica/VolatileRig.java index 9553d6c222..eb073666c2 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/VolatileRig.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/VolatileRig.java @@ -188,7 +188,7 @@ class VolatileRigEffect2 extends OneShotEffect { List permanents = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game); for (Permanent permanent: permanents) { - permanent.damage(4, source.getId(), game, true, false); + permanent.damage(4, source.getId(), game, false, true); } for (UUID playerId: player.getInRange()) { Player damageToPlayer = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ExplosiveRevelation.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ExplosiveRevelation.java index f09add4d9d..dde6a4b8de 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ExplosiveRevelation.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ExplosiveRevelation.java @@ -110,7 +110,7 @@ class ExplosiveRevelationEffect extends OneShotEffect { for (UUID targetId: targetPointer.getTargets(game, source)) { Permanent targetedCreature = game.getPermanent(targetId); if (targetedCreature != null) { - targetedCreature.damage(damage, source.getSourceId(), game, true, false); + targetedCreature.damage(damage, source.getSourceId(), game, false, true); } else { Player targetedPlayer = game.getPlayer(targetId); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ForkedBolt.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ForkedBolt.java index beb0d851e5..5758c79c15 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/ForkedBolt.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/ForkedBolt.java @@ -88,7 +88,7 @@ class ForkedBoltEffect extends OneShotEffect { for (UUID targetId: targetPointer.getTargets(game, source)) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(damagePer, source.getSourceId(), game, true, false); + permanent.damage(damagePer, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(targetId); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LordOfShatterskullPass.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LordOfShatterskullPass.java index e3e50eb392..95dd1b6ec6 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/LordOfShatterskullPass.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/LordOfShatterskullPass.java @@ -113,7 +113,7 @@ class LordOfShatterskullPassEffect extends OneShotEffect { filter.add(new ControllerIdPredicate(defenderId)); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); for (Permanent permanent : permanents) { - permanent.damage(6, source.getSourceId(), game, true, false); + permanent.damage(6, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/PestilenceDemon.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/PestilenceDemon.java index db1a797e66..99bdeb20c7 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/PestilenceDemon.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/PestilenceDemon.java @@ -88,7 +88,7 @@ class PestilenceDemonEffect extends OneShotEffect { for (UUID permanentId : game.getBattlefield().getAllPermanentIds()) { Permanent p = game.getPermanent(permanentId); if (p != null && p.getCardType().contains(CardType.CREATURE)) { - p.damage(1, source.getSourceId(), game, true, false); + p.damage(1, source.getSourceId(), game, false, true); } } for (UUID playerId : game.getPlayerList()) { diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SphinxBoneWand.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SphinxBoneWand.java index 074703b418..a584e5255f 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SphinxBoneWand.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SphinxBoneWand.java @@ -103,7 +103,7 @@ class SphinxBoneWandEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); } Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java b/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java index 1af3b2fe27..c8a6029f20 100644 --- a/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java +++ b/Mage.Sets/src/mage/sets/saviorsofkamigawa/UndyingFlames.java @@ -101,7 +101,7 @@ class UndyingFlamesEffect extends OneShotEffect { if (damage > 0) { Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(damage, source.getSourceId(), game, true, false); + creature.damage(damage, source.getSourceId(), game, false, true); game.informPlayers(new StringBuilder(sourceCard.getName()).append(" deals ").append(damage).append(" damage to ").append(creature.getName()).toString()); applied = true; break; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArcTrail.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArcTrail.java index c90ad82cb6..6dc62788ac 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/ArcTrail.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/ArcTrail.java @@ -103,11 +103,11 @@ class ArcTrailEffect extends OneShotEffect { } if (permanent != null) { - applied |= (permanent.damage( damage, source.getSourceId(), game, true, false ) > 0); + applied |= (permanent.damage( damage, source.getSourceId(), game, false, true ) > 0); } Player player = game.getPlayer(target); if (player != null) { - applied |= (player.damage( damage, source.getSourceId(), game, true, false ) > 0); + applied |= (player.damage( damage, source.getSourceId(), game, false, true ) > 0); } twoDamageDone = true; diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/CerebralEruption.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/CerebralEruption.java index c8b34542e5..ca81a2fc62 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/CerebralEruption.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/CerebralEruption.java @@ -98,7 +98,7 @@ class CerebralEruptionEffect1 extends OneShotEffect { int damage = card.getManaCost().convertedManaCost(); player.damage(damage, source.getId(), game, false, true); for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) { - perm.damage(damage, source.getId(), game, true, false); + perm.damage(damage, source.getId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/Embersmith.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/Embersmith.java index d6148fec04..6f79a9ab2a 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/Embersmith.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/Embersmith.java @@ -100,7 +100,7 @@ class EmbersmithEffect extends OneShotEffect { if (cost.pay(source, game, source.getId(), source.getControllerId(), false)) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(1, source.getId(), game, true, false); + permanent.damage(1, source.getId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/SpikeshotElder.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/SpikeshotElder.java index 5db0a0032d..d61f0cac74 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/SpikeshotElder.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/SpikeshotElder.java @@ -98,7 +98,7 @@ class SpikeshotElderEffect extends OneShotEffect { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(damage, sourcePermanent.getId(), game, true, false); + permanent.damage(damage, sourcePermanent.getId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/WingPuncture.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/WingPuncture.java index 4a0654614b..63ee480624 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/WingPuncture.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/WingPuncture.java @@ -96,7 +96,7 @@ class WingPunctureEffect extends OneShotEffect { Permanent targetPermanent = (Permanent) game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (sourcePermanent != null && targetPermanent != null) { - targetPermanent.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, true, false); + targetPermanent.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/shadowmoor/EmberGale.java b/Mage.Sets/src/mage/sets/shadowmoor/EmberGale.java index 8dff834f78..db7264b0dc 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/EmberGale.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/EmberGale.java @@ -107,7 +107,7 @@ class EmberGaleEffect extends OneShotEffect { new ColorPredicate(ObjectColor.BLUE))); filter2.add(new CardTypePredicate(CardType.CREATURE)); for (Permanent creature : game.getBattlefield().getAllActivePermanents(filter2, targetPlayer.getId(), game)) { - creature.damage(1, source.getSourceId(), game, true, false); + creature.damage(1, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/shadowmoor/MurderousRedcap.java b/Mage.Sets/src/mage/sets/shadowmoor/MurderousRedcap.java index 64a6961565..df9c061a86 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/MurderousRedcap.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/MurderousRedcap.java @@ -98,7 +98,7 @@ class MurderousRedcapEffect extends OneShotEffect { sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); } if (sourcePermanent != null && permanent != null) { - permanent.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, true, false); + permanent.damage(sourcePermanent.getPower().getValue(), sourcePermanent.getId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/BranchingBolt.java b/Mage.Sets/src/mage/sets/shardsofalara/BranchingBolt.java index da11048884..f6774e77d7 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/BranchingBolt.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/BranchingBolt.java @@ -108,12 +108,12 @@ class BranchingBoltEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); } permanent = game.getPermanent(source.getTargets().get(1).getFirstTarget()); if (permanent != null) { - permanent.damage(3, source.getSourceId(), game, true, false); + permanent.damage(3, source.getSourceId(), game, false, true); } return true; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/EmpyrialArchangel.java b/Mage.Sets/src/mage/sets/shardsofalara/EmpyrialArchangel.java index 1aa5fba627..52de6db95d 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/EmpyrialArchangel.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/EmpyrialArchangel.java @@ -90,7 +90,7 @@ class EmpyrialArchangelEffect extends ReplacementEffectImpl { DamagePlayerEvent damageEvent = (DamagePlayerEvent) event; Permanent p = game.getPermanent(source.getSourceId()); if (p != null) { - p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage()); + p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable()); return true; } return true; diff --git a/Mage.Sets/src/mage/sets/shardsofalara/FlameblastDragon.java b/Mage.Sets/src/mage/sets/shardsofalara/FlameblastDragon.java index a262cb2be4..f8de4118de 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/FlameblastDragon.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/FlameblastDragon.java @@ -98,7 +98,7 @@ class FlameblastDragonEffect extends OneShotEffect { if (cost.pay(source, game, source.getId(), source.getControllerId(), false)) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(costX, source.getId(), game, true, false); + permanent.damage(costX, source.getId(), game, false, true); return true; } Player targetPlayer = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/shardsofalara/SoulsFire.java b/Mage.Sets/src/mage/sets/shardsofalara/SoulsFire.java index 4d79f60919..3f45bbe108 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/SoulsFire.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/SoulsFire.java @@ -101,7 +101,7 @@ class SoulsFireEffect extends OneShotEffect { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(damage, sourcePermanent.getId(), game, true, false); + permanent.damage(damage, sourcePermanent.getId(), game, false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/shardsofalara/VeinDrinker.java b/Mage.Sets/src/mage/sets/shardsofalara/VeinDrinker.java index 7d7fbc3015..2aeb43846a 100644 --- a/Mage.Sets/src/mage/sets/shardsofalara/VeinDrinker.java +++ b/Mage.Sets/src/mage/sets/shardsofalara/VeinDrinker.java @@ -101,8 +101,8 @@ class VeinDrinkerEffect extends OneShotEffect { Permanent creatureTarget = game.getPermanent(source.getTargets().get(0).getFirstTarget()); if (creatureSource != null && creatureTarget != null) { if (creatureSource.getCardType().contains(CardType.CREATURE) && creatureTarget.getCardType().contains(CardType.CREATURE)) { - creatureSource.damage(creatureTarget.getPower().getValue(), creatureTarget.getId(), game, true, false); - creatureTarget.damage(creatureSource.getPower().getValue(), creatureSource.getId(), game, true, false); + creatureSource.damage(creatureTarget.getPower().getValue(), creatureTarget.getId(), game, false, true); + creatureTarget.damage(creatureSource.getPower().getValue(), creatureSource.getId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java b/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java index 8a94c56216..541cf6892e 100644 --- a/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java +++ b/Mage.Sets/src/mage/sets/stronghold/ShamanEnKor.java @@ -114,7 +114,7 @@ class ShamanEnKorPreventionEffect extends PreventionEffectImpl { if (redirectTo != null) { game.informPlayers("Dealing " + preventionResult.getPreventedDamage() + " to " + redirectTo.getName() + " instead."); DamageEvent damageEvent = (DamageEvent) event; - redirectTo.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + redirectTo.damage(preventionResult.getPreventedDamage(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); } } return false; @@ -206,7 +206,7 @@ class ShamanEnKorReplacementEffect extends ReplacementEffectImpl { game.informPlayers(message.toString()); // redirect damage this.used = true; - sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + sourcePermanent.damage(damageEvent.getAmount(), damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/tempest/CursedScroll.java b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java index 4b96b48a39..b0c238e661 100644 --- a/Mage.Sets/src/mage/sets/tempest/CursedScroll.java +++ b/Mage.Sets/src/mage/sets/tempest/CursedScroll.java @@ -114,7 +114,7 @@ class CursedScrollEffect extends OneShotEffect { if (you.chooseTarget(Outcome.Damage, target, source, game)) { Permanent creature = game.getPermanent(target.getFirstTarget()); if (creature != null) { - creature.damage(2, source.getSourceId(), game, true, false); + creature.damage(2, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java b/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java index 3b4f688f99..ec5f49607e 100644 --- a/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java +++ b/Mage.Sets/src/mage/sets/tempest/FurnaceOfRath.java @@ -112,7 +112,7 @@ class FurnaceOfRathEffect extends ReplacementEffectImpl { } else { Permanent targetPermanent = game.getPermanent(event.getTargetId()); if (targetPermanent != null) { - targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + targetPermanent.damage(damageEvent.getAmount()*2, damageEvent.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } } diff --git a/Mage.Sets/src/mage/sets/tempest/TortureChamber.java b/Mage.Sets/src/mage/sets/tempest/TortureChamber.java index 47f6118b85..e78e079fb3 100644 --- a/Mage.Sets/src/mage/sets/tempest/TortureChamber.java +++ b/Mage.Sets/src/mage/sets/tempest/TortureChamber.java @@ -180,7 +180,7 @@ class TortureChamberEffect2 extends OneShotEffect { } Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(countersRemoved, source.getSourceId(), game, true, false); + permanent.damage(countersRemoved, source.getSourceId(), game, false, true); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/tenth/Soulblast.java b/Mage.Sets/src/mage/sets/tenth/Soulblast.java index 4ba3877e33..3d308603cc 100644 --- a/Mage.Sets/src/mage/sets/tenth/Soulblast.java +++ b/Mage.Sets/src/mage/sets/tenth/Soulblast.java @@ -106,7 +106,7 @@ class SoulblastEffect extends OneShotEffect { } else { Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source)); if (creature != null) { - creature.damage(power, source.getSourceId(), game, true, false); + creature.damage(power, source.getSourceId(), game, false, true); } } } diff --git a/Mage.Sets/src/mage/sets/theros/PolukranosWorldEater.java b/Mage.Sets/src/mage/sets/theros/PolukranosWorldEater.java index 131346e879..1c7ddf1434 100644 --- a/Mage.Sets/src/mage/sets/theros/PolukranosWorldEater.java +++ b/Mage.Sets/src/mage/sets/theros/PolukranosWorldEater.java @@ -138,14 +138,14 @@ class PolukranosWorldEaterEffect extends OneShotEffect { Permanent permanent = game.getPermanent(target); if (permanent != null) { permanents.add(permanent); - permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, true, false); + permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true); } } // Each of those creatures deals damage equal to its power to Polukranos Permanent sourceCreature = game.getPermanent(source.getSourceId()); if (sourceCreature != null) { for (Permanent permanent :permanents) { - sourceCreature.damage(permanent.getPower().getValue(), permanent.getId(), game, true, false); + sourceCreature.damage(permanent.getPower().getValue(), permanent.getId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/timespiral/KaervekTheMerciless.java b/Mage.Sets/src/mage/sets/timespiral/KaervekTheMerciless.java index 771a90c1ce..653aed83ee 100644 --- a/Mage.Sets/src/mage/sets/timespiral/KaervekTheMerciless.java +++ b/Mage.Sets/src/mage/sets/timespiral/KaervekTheMerciless.java @@ -109,7 +109,7 @@ class KaervekTheMercilessEffect extends OneShotEffect { } Permanent targetCreature = game.getPermanent(source.getFirstTarget()); if (targetCreature != null) { - targetCreature.damage(cost, source.getSourceId(), game, false, true); + targetCreature.damage(cost, source.getSourceId(), game, true, false); return true; } } diff --git a/Mage.Sets/src/mage/sets/urzasdestiny/BloodshotCyclops.java b/Mage.Sets/src/mage/sets/urzasdestiny/BloodshotCyclops.java index 779ea3f176..13d9d7330c 100644 --- a/Mage.Sets/src/mage/sets/urzasdestiny/BloodshotCyclops.java +++ b/Mage.Sets/src/mage/sets/urzasdestiny/BloodshotCyclops.java @@ -100,7 +100,7 @@ class BloodshotCyclopsEffect extends OneShotEffect { if (amount > 0) { Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { - permanent.damage(amount, source.getSourceId(), game, true, false); + permanent.damage(amount, source.getSourceId(), game, false, true); return true; } Player player = game.getPlayer(source.getFirstTarget()); diff --git a/Mage.Sets/src/mage/sets/urzassaga/CraterHellion.java b/Mage.Sets/src/mage/sets/urzassaga/CraterHellion.java index 8e1da652d2..fc56f38b00 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/CraterHellion.java +++ b/Mage.Sets/src/mage/sets/urzassaga/CraterHellion.java @@ -96,7 +96,7 @@ class CraterHellionEffect extends OneShotEffect { List permanents = game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), source.getControllerId(), game); for (Permanent permanent: permanents) { if(!permanent.getId().equals(source.getSourceId())) { - permanent.damage(4, source.getSourceId(), game, true, false); + permanent.damage(4, source.getSourceId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/urzassaga/Pariah.java b/Mage.Sets/src/mage/sets/urzassaga/Pariah.java index f5ac3d9fdd..66abaa4098 100644 --- a/Mage.Sets/src/mage/sets/urzassaga/Pariah.java +++ b/Mage.Sets/src/mage/sets/urzassaga/Pariah.java @@ -94,7 +94,7 @@ class PariahEffect extends ReplacementEffectImpl { if(equipment != null){ Permanent p = game.getPermanent(equipment.getAttachedTo()); if (p != null) { - p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage()); + p.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable()); return true; } } diff --git a/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java b/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java index 63dc4a7e38..3dd89dac0d 100644 --- a/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java +++ b/Mage.Sets/src/mage/sets/weatherlight/Firestorm.java @@ -100,7 +100,7 @@ class FirestormEffect extends OneShotEffect { for (UUID targetId : this.getTargetPointer().getTargets(game, source)) { Permanent creature = game.getPermanent(targetId); if (creature != null) { - creature.damage(amount, source.getSourceId(), game, true, false); + creature.damage(amount, source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(targetId); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/worldwake/CometStorm.java b/Mage.Sets/src/mage/sets/worldwake/CometStorm.java index 0217054c5b..4445cb579b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/CometStorm.java +++ b/Mage.Sets/src/mage/sets/worldwake/CometStorm.java @@ -101,7 +101,7 @@ class CometStormEffect extends OneShotEffect { Permanent permanent = game.getPermanent(uuid); Player player = game.getPlayer(uuid); if (permanent != null) { - permanent.damage(damage, source.getId(), game, true, false); + permanent.damage(damage, source.getId(), game, false, true); } if (player != null) { player.damage(damage, source.getId(), game, true, false); diff --git a/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java b/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java index c857cfd12e..b7bf04b874 100644 --- a/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java +++ b/Mage.Sets/src/mage/sets/worldwake/MordantDragon.java @@ -103,7 +103,7 @@ class MordantDragonEffect extends OneShotEffect { if (target.canChoose(source.getControllerId(), game) && target.choose(Outcome.Damage, source.getControllerId(), source.getId(), game)) { UUID creature = target.getFirstTarget(); if (creature != null) { - game.getPermanent(creature).damage(amount, source.getSourceId(), game, true, false); + game.getPermanent(creature).damage(amount, source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/worldwake/RazorBoomerang.java b/Mage.Sets/src/mage/sets/worldwake/RazorBoomerang.java index 4e7ed4b83f..80600ce8c6 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RazorBoomerang.java +++ b/Mage.Sets/src/mage/sets/worldwake/RazorBoomerang.java @@ -142,7 +142,7 @@ class RazorBoomerangEffect extends OneShotEffect { for (UUID target : targetPointer.getTargets(game, source)) { Permanent creature = game.getPermanent(target); if (creature != null) { - creature.damage(1, attachmentid, game, true, false); + creature.damage(1, attachmentid, game, false, true); } Player player = game.getPlayer(target); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java index 9ff6f89b69..9cb40b6ed6 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java +++ b/Mage.Sets/src/mage/sets/worldwake/RefractionTrap.java @@ -204,7 +204,7 @@ class RefractionTrapPreventDamageEffect extends PreventionEffectImpl { Permanent target = game.getPermanent(damageTarget); if (target != null) { game.informPlayers("Dealing " + prevented + " to " + target.getName()); - target.damage(prevented, source.getSourceId(), game, true, false); + target.damage(prevented, source.getSourceId(), game, false, true); } Player player = game.getPlayer(damageTarget); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java b/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java index 59fa5f8ea7..cec515478b 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java +++ b/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java @@ -153,7 +153,7 @@ class RumblingAftershocksDealDamageEffect extends OneShotEffect { } Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(damageAmount.intValue(), source.getSourceId(), game, true, false); + permanent.damage(damageAmount.intValue(), source.getSourceId(), game, false, true); return true; } } diff --git a/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java b/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java index 5bea919842..c0bf9c2667 100644 --- a/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java +++ b/Mage.Sets/src/mage/sets/worldwake/SearingBlaze.java @@ -105,7 +105,7 @@ class SearingBlazeEffect extends OneShotEffect { player.damage(3, source.getSourceId(), game, false, true); } if (creature != null) { - creature.damage(3, source.getSourceId(), game, true, false); + creature.damage(3, source.getSourceId(), game, false, true); } } else { @@ -113,7 +113,7 @@ class SearingBlazeEffect extends OneShotEffect { player.damage(1, source.getSourceId(), game, false, true); } if (creature != null) { - creature.damage(1, source.getSourceId(), game, true, false); + creature.damage(1, source.getSourceId(), game, false, true); } } return true; diff --git a/Mage.Sets/src/mage/sets/zendikar/BlazingTorch.java b/Mage.Sets/src/mage/sets/zendikar/BlazingTorch.java index dc05e9165a..54989efe19 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BlazingTorch.java +++ b/Mage.Sets/src/mage/sets/zendikar/BlazingTorch.java @@ -175,7 +175,7 @@ class BlazingTorchDamageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null && sourceId != null) { - permanent.damage(2, sourceId, game, true, false); + permanent.damage(2, sourceId, game, false, true); return true; } Player player = game.getPlayer(targetPointer.getFirst(game, source)); diff --git a/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java b/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java index 2ce476e7fd..b6d2080d92 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java +++ b/Mage.Sets/src/mage/sets/zendikar/ChandraAblaze.java @@ -149,7 +149,7 @@ class ChandraAblazeEffect2 extends OneShotEffect { if (card != null && card.getColor().isRed()) { Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); if (permanent != null) { - permanent.damage(4, source.getSourceId(), game, true, false); + permanent.damage(4, source.getSourceId(), game, false, true); return true; } diff --git a/Mage.Sets/src/mage/sets/zendikar/Electropotence.java b/Mage.Sets/src/mage/sets/zendikar/Electropotence.java index 2852679281..2b908f37f5 100644 --- a/Mage.Sets/src/mage/sets/zendikar/Electropotence.java +++ b/Mage.Sets/src/mage/sets/zendikar/Electropotence.java @@ -135,7 +135,7 @@ class ElectropotenceEffect extends OneShotEffect { UUID target = source.getTargets().getFirstTarget(); Permanent targetCreature = game.getPermanent(target); if (targetCreature != null) { - targetCreature.damage(amount, creature.getId(), game, true, false); + targetCreature.damage(amount, creature.getId(), game, false, true); } else { Player player = game.getPlayer(target); if (player != null) { diff --git a/Mage.Sets/src/mage/sets/zendikar/PredatoryUrge.java b/Mage.Sets/src/mage/sets/zendikar/PredatoryUrge.java index 2bcb75b8d0..2316bead12 100644 --- a/Mage.Sets/src/mage/sets/zendikar/PredatoryUrge.java +++ b/Mage.Sets/src/mage/sets/zendikar/PredatoryUrge.java @@ -112,9 +112,9 @@ class PredatoryUrgeEffect extends OneShotEffect { if (sourceCreature != null && targetCreature != null && sourceCreature.getCardType().contains(CardType.CREATURE) && targetCreature.getCardType().contains(CardType.CREATURE)) { - targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, true, false); + targetCreature.damage(sourceCreature.getPower().getValue(), sourceCreature.getId(), game, false, true); if (sourceOnBattlefield) { - sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, true, false); + sourceCreature.damage(targetCreature.getPower().getValue(), targetCreature.getId(), game, false, true); } return true; } diff --git a/Mage.Tests/src/test/java/org/mage/test/player/RandomPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/RandomPlayer.java index a9b2187dc7..f2539b6676 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/RandomPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/RandomPlayer.java @@ -404,7 +404,7 @@ public class RandomPlayer extends ComputerPlayer { } Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(amount, sourceId, game, true, false); + permanent.damage(amount, sourceId, game, false, true); remainingDamage -= amount; } else { diff --git a/Mage/src/mage/abilities/effects/RedirectionEffect.java b/Mage/src/mage/abilities/effects/RedirectionEffect.java index c05160cc48..51cde3a74c 100644 --- a/Mage/src/mage/abilities/effects/RedirectionEffect.java +++ b/Mage/src/mage/abilities/effects/RedirectionEffect.java @@ -67,7 +67,7 @@ public abstract class RedirectionEffect extends ReplacementEffectImpl { DamageEvent damageEvent = (DamageEvent)event; Permanent permanent = game.getPermanent(redirectTarget.getFirstTarget()); if (permanent != null) { - permanent.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isPreventable(), damageEvent.isCombatDamage(), event.getAppliedEffects()); + permanent.damage(damageEvent.getAmount(), event.getSourceId(), game, damageEvent.isCombatDamage(), damageEvent.isPreventable(), event.getAppliedEffects()); return true; } Player player = game.getPlayer(redirectTarget.getFirstTarget()); diff --git a/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java index a873fc2423..164b13a83b 100644 --- a/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageAllControlledTargetEffect.java @@ -65,7 +65,7 @@ public class DamageAllControlledTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) { - permanent.damage(amount, source.getId(), game, true, false); + permanent.damage(amount, source.getId(), game, false, true); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/DamageAllEffect.java b/Mage/src/mage/abilities/effects/common/DamageAllEffect.java index b3643c6bd9..a9fa7dfaa5 100644 --- a/Mage/src/mage/abilities/effects/common/DamageAllEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageAllEffect.java @@ -72,7 +72,7 @@ public class DamageAllEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getId(), game); for (Permanent permanent: permanents) { - permanent.damage(amount.calculate(game, source), source.getSourceId(), game, true, false); + permanent.damage(amount.calculate(game, source), source.getSourceId(), game, false, true); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java b/Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java index 2bbe4b2f8d..81b67d09d7 100644 --- a/Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageEverythingEffect.java @@ -80,7 +80,7 @@ public class DamageEverythingEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game); for (Permanent permanent: permanents) { - permanent.damage(amount.calculate(game, source), source.getSourceId(), game, true, false); + permanent.damage(amount.calculate(game, source), source.getSourceId(), game, false, true); } for (UUID playerId: game.getPlayer(source.getControllerId()).getInRange()) { Player player = game.getPlayer(playerId); diff --git a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java index b23136b405..0ee8bdf727 100644 --- a/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageMultiEffect.java @@ -74,7 +74,7 @@ public class DamageMultiEffect extends OneShotEffect { for (UUID target: multiTarget.getTargets()) { Permanent permanent = game.getPermanent(target); if (permanent != null) { - permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, true, false); + permanent.damage(multiTarget.getTargetAmount(target), source.getSourceId(), game, false, true); } else { Player player = game.getPlayer(target); diff --git a/Mage/src/mage/abilities/effects/common/DamageSelfEffect.java b/Mage/src/mage/abilities/effects/common/DamageSelfEffect.java index c12983d50a..860af343cb 100644 --- a/Mage/src/mage/abilities/effects/common/DamageSelfEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageSelfEffect.java @@ -61,7 +61,7 @@ public class DamageSelfEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { - permanent.damage(amount, source.getId(), game, true, false); + permanent.damage(amount, source.getId(), game, false, true); return true; } return false; diff --git a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java index 3a5974244f..4935b7734f 100644 --- a/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DamageTargetEffect.java @@ -108,7 +108,7 @@ public class DamageTargetEffect extends OneShotEffect { for (UUID targetId : target.getTargets()) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(amount.calculate(game, source), source.getSourceId(), game, preventable, false); + permanent.damage(amount.calculate(game, source), source.getSourceId(), game, false, preventable); } Player player = game.getPlayer(targetId); if (player != null) { @@ -121,7 +121,7 @@ public class DamageTargetEffect extends OneShotEffect { for (UUID targetId :this.getTargetPointer().getTargets(game, source)) { Permanent permanent = game.getPermanent(targetId); if (permanent != null) { - permanent.damage(amount.calculate(game, source), source.getSourceId(), game, preventable, false); + permanent.damage(amount.calculate(game, source), source.getSourceId(), game, false, preventable); } else { Player player = game.getPlayer(targetId); if (player != null) { diff --git a/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java b/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java index 7f39974997..9069306f15 100644 --- a/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/FightTargetSourceEffect.java @@ -61,8 +61,8 @@ public class FightTargetSourceEffect extends OneShotEffect { // 20110930 - 701.10 if (creature1 != null && creature2 != null) { if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { - creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, true, false); - creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, true, false); + creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); + creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; } } diff --git a/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java b/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java index ee49a1fce2..42386c8f28 100644 --- a/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java +++ b/Mage/src/mage/abilities/effects/common/FightTargetsEffect.java @@ -61,8 +61,8 @@ public class FightTargetsEffect extends OneShotEffect { // 20110930 - 701.10 if (creature1 != null && creature2 != null) { if (creature1.getCardType().contains(CardType.CREATURE) && creature2.getCardType().contains(CardType.CREATURE)) { - creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, true, false); - creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, true, false); + creature1.damage(creature2.getPower().getValue(), creature2.getId(), game, false, true); + creature2.damage(creature1.getPower().getValue(), creature1.getId(), game, false, true); return true; } } diff --git a/Mage/src/mage/game/permanent/Permanent.java b/Mage/src/mage/game/permanent/Permanent.java index 38f234c723..df78f27956 100644 --- a/Mage/src/mage/game/permanent/Permanent.java +++ b/Mage/src/mage/game/permanent/Permanent.java @@ -81,9 +81,9 @@ public interface Permanent extends Card, Controllable { boolean cantBeEnchantedBy(MageObject source, Game game); boolean hasSummoningSickness(); int getDamage(); - int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat); + int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable); - int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList appliedEffects); + int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable, ArrayList appliedEffects); /** * used in combat only to deal damage at the same time diff --git a/Mage/src/mage/game/permanent/PermanentImpl.java b/Mage/src/mage/game/permanent/PermanentImpl.java index 193bc352b7..68fb5875f2 100644 --- a/Mage/src/mage/game/permanent/PermanentImpl.java +++ b/Mage/src/mage/game/permanent/PermanentImpl.java @@ -586,13 +586,13 @@ public abstract class PermanentImpl extends CardImpl implements Permanent { } @Override - public int damage(int damageAmount, UUID sourceId, Game game, boolean preventable, boolean combat) { - return damage(damageAmount, sourceId, game, preventable, combat, false, null); + public int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable) { + return damage(damage, sourceId, game, preventable, combat, false, null); } @Override - public int damage(int damageAmount, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList appliedEffects) { - return damage(damageAmount, sourceId, game, preventable, combat, false, appliedEffects); + public int damage(int damage, UUID sourceId, Game game, boolean combat, boolean preventable, ArrayList appliedEffects) { + return damage(damage, sourceId, game, preventable, combat, false, appliedEffects); } /** * @param damageAmount