mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08: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.IOException;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
|
||||||
public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializable {
|
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();
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.getState().getContinuousEffects().removeInactiveEffects(this);
|
||||||
for (Iterator<StackObject> it = getStack().iterator(); it.hasNext();) {
|
for (Iterator<StackObject> it = getStack().iterator(); it.hasNext();) {
|
||||||
StackObject object = it.next();
|
StackObject object = it.next();
|
||||||
if (object.getControllerId().equals(playerId)) {
|
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);
|
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
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue