From ed759d7a63af333b6cad897c7d14effd80b64528 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 30 Apr 2021 08:39:54 -0400 Subject: [PATCH] fixed several cards which use an invalid UUID to find a player --- Mage.Sets/src/mage/cards/c/CouncilsJudgment.java | 2 +- Mage.Sets/src/mage/cards/g/GruesomeEncore.java | 2 +- Mage.Sets/src/mage/cards/r/RowanScholarOfSparks.java | 2 +- Mage.Sets/src/mage/cards/r/RuinGrinder.java | 2 +- Mage.Sets/src/mage/cards/s/SternJudge.java | 2 +- Mage.Sets/src/mage/cards/w/WizardMentor.java | 2 +- .../abilities/effects/common/ReturnToHandAttachedEffect.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CouncilsJudgment.java b/Mage.Sets/src/mage/cards/c/CouncilsJudgment.java index 0c233f6d81..1c72244576 100644 --- a/Mage.Sets/src/mage/cards/c/CouncilsJudgment.java +++ b/Mage.Sets/src/mage/cards/c/CouncilsJudgment.java @@ -65,7 +65,7 @@ class CouncilsJudgmentEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } diff --git a/Mage.Sets/src/mage/cards/g/GruesomeEncore.java b/Mage.Sets/src/mage/cards/g/GruesomeEncore.java index 121c55b108..6fd19e1284 100644 --- a/Mage.Sets/src/mage/cards/g/GruesomeEncore.java +++ b/Mage.Sets/src/mage/cards/g/GruesomeEncore.java @@ -115,7 +115,7 @@ class GruesomeEncoreReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); Card card = game.getCard(source.getFirstTarget()); return player != null && card != null && player.moveCards(card, Zone.EXILED, source, game); } diff --git a/Mage.Sets/src/mage/cards/r/RowanScholarOfSparks.java b/Mage.Sets/src/mage/cards/r/RowanScholarOfSparks.java index 4e412594c9..3fe3c63832 100644 --- a/Mage.Sets/src/mage/cards/r/RowanScholarOfSparks.java +++ b/Mage.Sets/src/mage/cards/r/RowanScholarOfSparks.java @@ -157,7 +157,7 @@ class WillScholarOfFrostEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } diff --git a/Mage.Sets/src/mage/cards/r/RuinGrinder.java b/Mage.Sets/src/mage/cards/r/RuinGrinder.java index 7b77d64814..71b53c1ee6 100644 --- a/Mage.Sets/src/mage/cards/r/RuinGrinder.java +++ b/Mage.Sets/src/mage/cards/r/RuinGrinder.java @@ -71,7 +71,7 @@ class RuinGrinderEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { List wheelers = new ArrayList<>(); for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(playerId); if (player != null && player.chooseUse( Outcome.DrawCard, "Discard your hand and draw seven?", source, game )) { diff --git a/Mage.Sets/src/mage/cards/s/SternJudge.java b/Mage.Sets/src/mage/cards/s/SternJudge.java index 2ed19a8f1f..11cd7d885f 100644 --- a/Mage.Sets/src/mage/cards/s/SternJudge.java +++ b/Mage.Sets/src/mage/cards/s/SternJudge.java @@ -69,7 +69,7 @@ class SternJudgeEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { for (UUID playerId : game.getState().getPlayersInRange(source.getSourceId(), game)) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(playerId); if (player != null) { int lifeToLose = game.getBattlefield().getAllActivePermanents(filter, playerId, game).size(); player.loseLife(lifeToLose, game, source, false); diff --git a/Mage.Sets/src/mage/cards/w/WizardMentor.java b/Mage.Sets/src/mage/cards/w/WizardMentor.java index 78c15081ed..d9d375aa80 100644 --- a/Mage.Sets/src/mage/cards/w/WizardMentor.java +++ b/Mage.Sets/src/mage/cards/w/WizardMentor.java @@ -65,7 +65,7 @@ class WizardMentorEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java index 610f3a05cf..423fa44b68 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ReturnToHandAttachedEffect.java @@ -30,7 +30,7 @@ public class ReturnToHandAttachedEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getSourceId()); + Player player = game.getPlayer(source.getControllerId()); Permanent permanent = (Permanent) getValue("attachedTo"); if (player == null || permanent == null) { return false;