fixed several cards which use an invalid UUID to find a player

This commit is contained in:
Evan Kranzler 2021-04-30 08:39:54 -04:00
parent 77d792bbaf
commit ed759d7a63
7 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -71,7 +71,7 @@ class RuinGrinderEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
List<Player> 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
)) {

View file

@ -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);

View file

@ -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;
}

View file

@ -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;