diff --git a/Mage.Sets/src/mage/cards/a/AetherVial.java b/Mage.Sets/src/mage/cards/a/AetherVial.java index 3ccfa3ccf6a..95ffb242c98 100644 --- a/Mage.Sets/src/mage/cards/a/AetherVial.java +++ b/Mage.Sets/src/mage/cards/a/AetherVial.java @@ -67,7 +67,7 @@ class AetherVialEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent == null) { permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); if (permanent == null) { diff --git a/Mage.Sets/src/mage/cards/b/BloodLust.java b/Mage.Sets/src/mage/cards/b/BloodLust.java index 941c4dc4f72..9f9a3745610 100644 --- a/Mage.Sets/src/mage/cards/b/BloodLust.java +++ b/Mage.Sets/src/mage/cards/b/BloodLust.java @@ -66,7 +66,7 @@ class TargetMatchesFilterCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent target = game.getBattlefield().getPermanent(source.getFirstTarget()); + Permanent target = game.getPermanent(source.getFirstTarget()); if (target != null) { if (filter.match(target, source.getControllerId(), source, game)) { return true; diff --git a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java index 60052c675be..bd42ac50fcd 100644 --- a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java +++ b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java @@ -79,7 +79,7 @@ class DaughterOfAutumnPreventDamageTargetEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (filter.match(permanent, permanent.getControllerId(), source, game)) { if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { diff --git a/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java b/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java index 8a7f2053daf..0da27ae8bfb 100644 --- a/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java +++ b/Mage.Sets/src/mage/cards/h/HazduhrTheAbbot.java @@ -87,7 +87,7 @@ class HazduhrTheAbbotRedirectDamageEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (filter.match(permanent, permanent.getControllerId(), source, game)) { if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { diff --git a/Mage.Sets/src/mage/cards/m/Martyrdom.java b/Mage.Sets/src/mage/cards/m/Martyrdom.java index 75909c9da2b..524e3f88b81 100644 --- a/Mage.Sets/src/mage/cards/m/Martyrdom.java +++ b/Mage.Sets/src/mage/cards/m/Martyrdom.java @@ -90,7 +90,7 @@ class MartyrdomActivatedAbility extends ActivatedAbilityImpl { if (!playerId.equals(caster)) { return ActivationStatus.getFalse(); } - Permanent permanent = game.getBattlefield().getPermanent(this.getSourceId()); + Permanent permanent = game.getPermanent(this.getSourceId()); if (permanent == null || !permanent.isCreature(game)) { return ActivationStatus.getFalse(); } @@ -128,7 +128,7 @@ class MartyrdomRedirectDamageTargetEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (filter.match(permanent, permanent.getControllerId(), source, game)) { if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { diff --git a/Mage.Sets/src/mage/cards/m/Merseine.java b/Mage.Sets/src/mage/cards/m/Merseine.java index 4080bee021e..7e91ecb96d5 100644 --- a/Mage.Sets/src/mage/cards/m/Merseine.java +++ b/Mage.Sets/src/mage/cards/m/Merseine.java @@ -78,7 +78,7 @@ class MerseineActivatedAbility extends SimpleActivatedAbility { @Override public ActivationStatus canActivate(UUID playerId, Game game) { - Permanent sourcePermanent = game.getBattlefield().getPermanent(this.getSourceId()); + Permanent sourcePermanent = game.getPermanent(this.getSourceId()); if (sourcePermanent != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); if (attachedTo != null) { @@ -116,7 +116,7 @@ class MerseineCost extends CostImpl { @Override public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) { - Permanent sourcePermanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); if (attachedTo != null) { @@ -128,7 +128,7 @@ class MerseineCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) { - Permanent sourcePermanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent != null) { Permanent attachedTo = game.getPermanent(sourcePermanent.getAttachedTo()); if (attachedTo != null) { diff --git a/Mage.Sets/src/mage/cards/m/MurderousSpoils.java b/Mage.Sets/src/mage/cards/m/MurderousSpoils.java index d8fdcc700d4..e400860f079 100644 --- a/Mage.Sets/src/mage/cards/m/MurderousSpoils.java +++ b/Mage.Sets/src/mage/cards/m/MurderousSpoils.java @@ -61,7 +61,7 @@ class MurderousSpoilsEffect extends OneShotEffect { if (target != null) { List attachments = new ArrayList<>(); for (UUID uuid : target.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached.hasSubtype(SubType.EQUIPMENT, game)) { attachments.add(attached); } diff --git a/Mage.Sets/src/mage/cards/n/NoviceKnight.java b/Mage.Sets/src/mage/cards/n/NoviceKnight.java index f11ae24013c..2144a112ae4 100644 --- a/Mage.Sets/src/mage/cards/n/NoviceKnight.java +++ b/Mage.Sets/src/mage/cards/n/NoviceKnight.java @@ -59,10 +59,10 @@ enum EnchantedOrEquippedSourceCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached != null && (attached.isEnchantment(game) || attached.hasSubtype(SubType.EQUIPMENT, game))) { diff --git a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java index 1d1fc1bdeba..40b82057b97 100644 --- a/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java +++ b/Mage.Sets/src/mage/cards/o/OathkeeperTakenosDaisho.java @@ -98,14 +98,14 @@ enum OathkeeperEquippedSamuraiCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent == null) { permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); } if (permanent != null) { Permanent attachedTo = null; if (permanent.getAttachedTo() != null) { - attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + attachedTo = game.getPermanent(permanent.getAttachedTo()); if (attachedTo == null) { attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); } diff --git a/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java b/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java index 47f5d4bcb91..dd5502b9966 100644 --- a/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java +++ b/Mage.Sets/src/mage/cards/p/PalladiaMorsTheRuiner.java @@ -77,7 +77,7 @@ enum PalladiaMorsTheRuinerCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); PalladiaMorsTheRuinerWatcher watcher = game.getState().getWatcher(PalladiaMorsTheRuinerWatcher.class); return permanent != null && !watcher.getDamagers().contains(new MageObjectReference(permanent, game)); } diff --git a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java index 601dcca45bd..c9a6e15d4f2 100644 --- a/Mage.Sets/src/mage/cards/p/PyromancerAscension.java +++ b/Mage.Sets/src/mage/cards/p/PyromancerAscension.java @@ -122,7 +122,7 @@ class PyromancerAscensionCopyTriggeredAbility extends TriggeredAbilityImpl { if (event.getPlayerId().equals(this.getControllerId())) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (isControlledInstantOrSorcery(spell, game)) { - Permanent permanent = game.getBattlefield().getPermanent(this.getSourceId()); + Permanent permanent = game.getPermanent(this.getSourceId()); if (permanent != null && permanent.getCounters(game).getCount(CounterType.QUEST) >= 2) { this.getEffects().get(0).setTargetPointer(new FixedTarget(spell.getId())); return true; diff --git a/Mage.Sets/src/mage/cards/r/RampagingCyclops.java b/Mage.Sets/src/mage/cards/r/RampagingCyclops.java index 4800df6b941..e74e37ab86c 100644 --- a/Mage.Sets/src/mage/cards/r/RampagingCyclops.java +++ b/Mage.Sets/src/mage/cards/r/RampagingCyclops.java @@ -56,7 +56,7 @@ enum RampagingCyclopsCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent == null || !permanent.isAttacking()) { return false; } diff --git a/Mage.Sets/src/mage/cards/r/RatchetBomb.java b/Mage.Sets/src/mage/cards/r/RatchetBomb.java index 85c8b1a7feb..c6668d48da6 100644 --- a/Mage.Sets/src/mage/cards/r/RatchetBomb.java +++ b/Mage.Sets/src/mage/cards/r/RatchetBomb.java @@ -59,7 +59,7 @@ class RatchetBombEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Permanent p = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent p = game.getPermanent(source.getSourceId()); if (p == null) { p = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); if (p == null) { diff --git a/Mage.Sets/src/mage/cards/s/ShamanEnKor.java b/Mage.Sets/src/mage/cards/s/ShamanEnKor.java index 1d3bfe3eee6..4f69a01c9e5 100644 --- a/Mage.Sets/src/mage/cards/s/ShamanEnKor.java +++ b/Mage.Sets/src/mage/cards/s/ShamanEnKor.java @@ -101,7 +101,7 @@ class ShamanEnKorRedirectFromTargetEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (filter.match(permanent, permanent.getControllerId(), source, game)) { if (sourceObject.equals(new MageObjectReference(event.getSourceId(), game))) { diff --git a/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java index c603ecac004..95671bfe49b 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java +++ b/Mage.Sets/src/mage/cards/s/ShapeOfTheWiitigo.java @@ -69,10 +69,10 @@ class AttachedAttackedOrBlockedSinceYourLastUpkeepCondition implements Condition @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); AttackedOrBlockedSinceYourLastUpkeepWatcher watcher = game.getState().getWatcher(AttackedOrBlockedSinceYourLastUpkeepWatcher.class); if (permanent != null && permanent.getAttachedTo() != null && watcher != null) { - Permanent attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); if (attachedTo == null) { attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); } diff --git a/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java index d5a32d688ce..191a30f90fd 100644 --- a/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java +++ b/Mage.Sets/src/mage/cards/s/ShimianNightStalker.java @@ -77,7 +77,7 @@ class ShimianNightStalkerRedirectDamageEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (filter.match(permanent, permanent.getControllerId(), source, game)) { if (event.getSourceId() != null && event.getTargetId() != null) { diff --git a/Mage.Sets/src/mage/cards/t/TrainingDrone.java b/Mage.Sets/src/mage/cards/t/TrainingDrone.java index ae31ba7c2dc..82564ad57c4 100644 --- a/Mage.Sets/src/mage/cards/t/TrainingDrone.java +++ b/Mage.Sets/src/mage/cards/t/TrainingDrone.java @@ -58,7 +58,7 @@ class TrainingDroneEffect extends RestrictionEffect { if (permanent.getId().equals(source.getSourceId())) { List attachments = permanent.getAttachments(); for (UUID uuid : attachments) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached.hasSubtype(SubType.EQUIPMENT, game)) { return false; } diff --git a/Mage.Sets/src/mage/cards/w/Wiitigo.java b/Mage.Sets/src/mage/cards/w/Wiitigo.java index 76435d35af4..ab94f78f6cb 100644 --- a/Mage.Sets/src/mage/cards/w/Wiitigo.java +++ b/Mage.Sets/src/mage/cards/w/Wiitigo.java @@ -71,7 +71,7 @@ class BlockedOrBeenBlockedSinceYourLastUpkeepCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent wiitigo = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent wiitigo = game.getPermanent(source.getSourceId()); BlockedOrBeenBlockedSinceYourLastUpkeepWatcher watcher = game.getState().getWatcher( BlockedOrBeenBlockedSinceYourLastUpkeepWatcher.class); if (wiitigo != null diff --git a/Mage/src/main/java/mage/abilities/condition/common/AttachedToMatchesFilterCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AttachedToMatchesFilterCondition.java index e0bda40e77c..52262acd47a 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/AttachedToMatchesFilterCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/AttachedToMatchesFilterCondition.java @@ -26,9 +26,9 @@ public class AttachedToMatchesFilterCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && permanent.getAttachedTo() != null) { - Permanent attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); if (attachedTo == null) { attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EnchantedSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EnchantedSourceCondition.java index 06bf00bab25..c4a58e6234c 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EnchantedSourceCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EnchantedSourceCondition.java @@ -36,11 +36,11 @@ public class EnchantedSourceCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); int numberOfFoundEnchantments = 0; if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached != null && attached.isEnchantment(game) && (!aurasOnly || attached.hasSubtype(SubType.AURA, game))) { numberOfFoundEnchantments += 1; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java index 194d50af4d6..e1547b38d9f 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EnchantedTargetCondition.java @@ -22,7 +22,7 @@ public enum EnchantedTargetCondition implements Condition { Permanent targetPermanent = game.getPermanent(target.getFirstTarget()); if (targetPermanent != null) { for (UUID uuid : targetPermanent.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached != null && attached.isEnchantment(game)) { return true; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java index 23c8608d209..0d92722d995 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSubtypeCondition.java @@ -29,11 +29,11 @@ public class EquippedHasSubtypeCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent == null || permanent.getAttachedTo() == null) { return false; } - Permanent attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); if (attachedTo == null) { attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java index 32fc1fe93b3..487d59973c1 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java @@ -31,9 +31,9 @@ public class EquippedHasSupertypeCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null && permanent.getAttachedTo() != null) { - Permanent attachedTo = game.getBattlefield().getPermanent(permanent.getAttachedTo()); + Permanent attachedTo = game.getPermanent(permanent.getAttachedTo()); if (attachedTo == null) { attachedTo = (Permanent) game.getLastKnownInformation(permanent.getAttachedTo(), Zone.BATTLEFIELD); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java index 259b3cff3ac..a72a46718ec 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedMultipleSourceCondition.java @@ -20,11 +20,11 @@ public enum EquippedMultipleSourceCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); int countEquipped = 0; if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { countEquipped++; if (countEquipped >= 2) { @@ -41,4 +41,4 @@ public enum EquippedMultipleSourceCondition implements Condition { return "has multiple Equipments attached"; } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java index 18e0adf0ba1..86128129fe9 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedSourceCondition.java @@ -20,10 +20,10 @@ public enum EquippedSourceCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { for (UUID uuid : permanent.getAttachments()) { - Permanent attached = game.getBattlefield().getPermanent(uuid); + Permanent attached = game.getPermanent(uuid); if (attached != null && attached.hasSubtype(SubType.EQUIPMENT, game)) { return true; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java index 3218173e39d..6b08dff1116 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SourceAttackingCondition.java @@ -17,7 +17,7 @@ public enum SourceAttackingCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { return permanent.isAttacking(); } @@ -30,4 +30,4 @@ public enum SourceAttackingCondition implements Condition { } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceBlockedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceBlockedCondition.java index 67347c2ea23..f2ec298af10 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SourceBlockedCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SourceBlockedCondition.java @@ -17,7 +17,7 @@ public enum SourceBlockedCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { return permanent.isBlocked(game); } @@ -30,4 +30,4 @@ public enum SourceBlockedCondition implements Condition { } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java b/Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java index 85bed5e44c3..4557241b2e2 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/SourceTappedCondition.java @@ -20,7 +20,7 @@ public enum SourceTappedCondition implements Condition { @Override public boolean apply(Game game, Ability source) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); return permanent != null && permanent.isTapped() == tapped; } diff --git a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java index 26b2b0a4d3a..a900eda4437 100644 --- a/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/PlaneswalkerRedirectionEffect.java @@ -80,7 +80,7 @@ public class PlaneswalkerRedirectionEffect extends RedirectionEffect { if (source != null) { return source.getControllerId(); } - Permanent permanent = game.getBattlefield().getPermanent(sourceId); + Permanent permanent = game.getPermanent(sourceId); if (permanent != null) { return permanent.getControllerId(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java index c9feeccd4fc..14770e8635b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/RedirectDamageFromSourceToTargetEffect.java @@ -28,7 +28,7 @@ public class RedirectDamageFromSourceToTargetEffect extends RedirectionEffect { @Override public boolean applies(GameEvent event, Ability source, Game game) { - Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); + Permanent permanent = game.getPermanent(source.getSourceId()); if (permanent != null) { if (event.getTargetId().equals(source.getSourceId())) { if (getTargetPointer().getFirst(game, source) != null) {