mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +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.SubLayer;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -183,7 +184,14 @@ public abstract class ContinuousEffectImpl extends EffectImpl implements Continu
|
|||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (duration.equals(Duration.UntilYourNextTurn)) {
|
||||
return game.getActivePlayerId().equals(startingControllerId) && game.getTurnNum() != startingTurn;
|
||||
Player player = game.getPlayer(startingControllerId);
|
||||
if (player != null) {
|
||||
if (player.isInGame()) {
|
||||
return game.getActivePlayerId().equals(startingControllerId) && game.getTurnNum() != startingTurn;
|
||||
}
|
||||
return player.hasReachedNextTurnAfterLeaving();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue