mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Fixed handling of "Duration.UntilYourNextTurn" in case the player left the game in multiplayer matches.
This commit is contained in:
parent
ddf42c7620
commit
d47dd0bb52
1 changed files with 9 additions and 1 deletions
|
@ -52,6 +52,7 @@ import static mage.constants.Layer.TypeChangingEffects_4;
|
||||||
import mage.constants.Outcome;
|
import mage.constants.Outcome;
|
||||||
import mage.constants.SubLayer;
|
import mage.constants.SubLayer;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -183,8 +184,15 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
||||||
@Override
|
@Override
|
||||||
public boolean isInactive(Ability source, Game game) {
|
public boolean isInactive(Ability source, Game game) {
|
||||||
if (duration.equals(Duration.UntilYourNextTurn)) {
|
if (duration.equals(Duration.UntilYourNextTurn)) {
|
||||||
|
Player player = game.getPlayer(startingControllerId);
|
||||||
|
if (player != null) {
|
||||||
|
if (player.isInGame()) {
|
||||||
return game.getActivePlayerId().equals(startingControllerId) && game.getTurnNum() != startingTurn;
|
return game.getActivePlayerId().equals(startingControllerId) && game.getTurnNum() != startingTurn;
|
||||||
}
|
}
|
||||||
|
return player.hasReachedNextTurnAfterLeaving();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue