Package mage.game

Examples of mage.game.Game.fireEvent()


            for (CombatGroup group: engagement.getGroups()) {
                for (UUID attackId: group.getAttackers()) {
                    sim.getPlayer(attackerId).declareAttacker(attackId, defenderId, sim, false);
                }
            }
            sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_ATTACKERS, attackerId, attackerId));
            SimulationNode2 newNode = new SimulationNode2(node, sim, depth, attackerId);
            if (logger.isDebugEnabled()) {
                logger.debug("Sim attack for player:" + game.getPlayer(attackerId).getName());
            }
            sim.checkStateAndTriggered();
View Full Code Here


            while (!sim.getStack().isEmpty()) {
                sim.getStack().resolve(sim);
                logger.debug("Sim attack: resolving triggered abilities");
                sim.applyEffects();
            }
            sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_ATTACKERS_STEP_POST, sim.getActivePlayerId(), sim.getActivePlayerId()));
            Combat simCombat = sim.getCombat().copy();
            sim.getPhase().setStep(new DeclareBlockersStep());
            val = simulateCombat(sim, newNode, depth-1, alpha, beta, counter);
            if (!attackerId.equals(playerId)) {
                if (val < beta) {
View Full Code Here

                        for (UUID blockerId: group.getBlockers()) {
                            sim.getPlayer(defenderId).declareBlocker(defenderId, blockerId, attackerId, sim);
                        }
                    }
                }
                sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, defenderId, defenderId));
                SimulationNode2 newNode = new SimulationNode2(node, sim, depth, defenderId);
                if (logger.isDebugEnabled()) {
                    logger.debug("Sim block for player:" + game.getPlayer(defenderId).getName());
                }
                sim.checkStateAndTriggered();
View Full Code Here

                while (!sim.getStack().isEmpty()) {
                    sim.getStack().resolve(sim);
                    logger.debug("Sim blockers: resolving triggered abilities");
                    sim.applyEffects();
                }
                sim.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKERS_STEP_POST, sim.getActivePlayerId(), sim.getActivePlayerId()));
                Combat simCombat = sim.getCombat().copy();
                finishCombat(sim);
                if (sim.gameOver(null)) {
                    val = GameStateEvaluator2.evaluate(playerId, sim);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.