mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
We need to pass it as a list to update correctly
This commit is contained in:
@@ -2,14 +2,14 @@ package forge.game.event;
|
||||
|
||||
import forge.game.card.Card;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class GameEventTokenStateUpdate extends GameEvent {
|
||||
|
||||
public final Collection<Card> cards;
|
||||
public GameEventTokenStateUpdate(Card affected) {
|
||||
cards = Arrays.asList(affected);
|
||||
public GameEventTokenStateUpdate(List<Card> affected) {
|
||||
cards = affected;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -177,14 +177,16 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
|
||||
// Tokens starting game in play should suffer from Sum. Sickness
|
||||
final CardCollectionView list = playerTurn.getCardsIncludePhasingIn(ZoneType.Battlefield);
|
||||
final List<Card> toupdate = new ArrayList<>();
|
||||
for (final Card c : list) {
|
||||
if (playerTurn.getTurn() > 0 || !c.isStartsGameInPlay()) {
|
||||
if (c.isToken()) //update token stacking on battlefield
|
||||
game.fireEvent(new GameEventTokenStateUpdate(c));
|
||||
toupdate.add(c);
|
||||
|
||||
c.setSickness(false);
|
||||
}
|
||||
}
|
||||
game.fireEvent(new GameEventTokenStateUpdate(toupdate));
|
||||
playerTurn.incrementTurn();
|
||||
|
||||
game.getAction().resetActivationsPerTurn();
|
||||
|
||||
Reference in New Issue
Block a user