mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
fixed several cards which use an invalid UUID to find a player
This commit is contained in:
parent
77d792bbaf
commit
ed759d7a63
7 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue