- added fix by JayDi for gameState().value and Lists.

This commit is contained in:
jeffwadsworth 2021-07-31 18:16:09 -05:00
parent 73db223ca7
commit df07ad4418
2 changed files with 2 additions and 3 deletions

View file

@ -94,9 +94,6 @@ public class AttackingCreaturePutIntoGraveyardTriggeredAbility extends Triggered
}
case REMOVED_FROM_COMBAT:
// a card removed from combat is no longer an attacker or blocker so remove it from the list
if (game.isSimulation()) { // a simulated game will always choose to apply any triggered effect IE: Gustcloak Savior
return false;
}
List<UUID> attackersList = (List<UUID>) game.getState().getValue(this.getSourceId() + "Attackers");
if (attackersList != null
&& attackersList.contains(event.getTargetId())) {

View file

@ -172,6 +172,8 @@ public class GameState implements Serializable, Copyable<GameState> {
this.values.put(entry.getKey(), ((EnumSet) entry.getValue()).clone());
} else if (entry.getValue() instanceof HashMap) {
this.values.put(entry.getKey(), ((HashMap) entry.getValue()).clone());
} else if (entry.getValue() instanceof List) {
this.values.put(entry.getKey(), ((List) entry.getValue()).stream().collect(Collectors.toList()));
} else {
this.values.put(entry.getKey(), entry.getValue());
}