mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Fixed issue #197 effects of players lasted beyond their lost in a free for all game.
This commit is contained in:
parent
b600b03e65
commit
9c90d66d6d
1 changed files with 12 additions and 0 deletions
|
@ -87,6 +87,7 @@ import org.apache.log4j.Logger;
|
|||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
|
||||
public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializable {
|
||||
|
@ -1515,6 +1516,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
it.remove();
|
||||
}
|
||||
}
|
||||
this.getState().getContinuousEffects().removeInactiveEffects(this);
|
||||
for (Iterator<StackObject> it = getStack().iterator(); it.hasNext();) {
|
||||
StackObject object = it.next();
|
||||
if (object.getControllerId().equals(playerId)) {
|
||||
|
@ -1527,6 +1529,16 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
perm.moveToExile(null, "", null, this);
|
||||
}
|
||||
}
|
||||
|
||||
Iterator it = gameCards.entrySet().iterator();
|
||||
while(it.hasNext()) {
|
||||
Entry<UUID,Card> entry = (Entry<UUID,Card>) it.next();
|
||||
Card card = entry.getValue();
|
||||
if (card.getOwnerId().equals(playerId)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue