protected void addAbilityNode(SimulationNode parent, Ability ability, Game game) { Game sim = game.copy(); sim.getStack().push(new StackAbility(ability, playerId)); ability.activate(sim, false); sim.applyEffects(); SimulationNode newNode = new SimulationNode(parent, sim, playerId); logger.debug( indent(newNode.getDepth()) + "simulating -- node #:" + SimulationNode.getCount() + " triggered ability option"); for (Target target : ability.getTargets()) { for (UUID targetId : target.getTargets()) { newNode.getTargets().add(targetId); } } for (Choice choice : ability.getChoices()) { newNode.getChoices().add(choice.getChoice()); } parent.children.add(newNode); }