roundReport.append( "*** " + entity.getDisplayName() + " PILOT BAKES TO DEATH! ***" );
roundReport.append( "*** " ) .append( entity.getDisplayName() ) .append( " PILOT BAKES TO DEATH! ***" );
    private void resolveHeat() {        roundReport.append("\nHeat Phase\n----------\n");        for (Enumeration i = game.getEntities(); i.hasMoreElements();) {            Entity entity = (Entity)i.nextElement();            if ( null == entity.getPosition() ) {                continue;            }            Hex entityHex = game.getBoard().getHex(entity.getPosition());                        // heat doesn't matter for non-mechs            if (!(entity instanceof Mech)) {                entity.heatBuildup = 0;                continue;            }            // should we even bother?            if (entity.isDestroyed() || entity.isDoomed() || entity.crew.isDead()) {                continue;            }            // engine hits add a lot of heat, provided the engine is on            if (!entity.isShutDown()) {                entity.heatBuildup += 5 * entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_CT);                entity.heatBuildup += 5 * entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_LT);                entity.heatBuildup += 5 * entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_RT);            }            // If a Mek had an active Stealth suite, add 10 heat.            if ( entity instanceof Mech && entity.isStealthActive() ) {                entity.heatBuildup += 10;                roundReport.append("Added 10 heat from Stealth Armor...\n");            }            // add +5 Heat if the hex you're in is on fire and was on fire for the full round            if (entityHex.levelOf(Terrain.FIRE) == 2) {                entity.heatBuildup += 5;                roundReport.append("Added 5 heat from a fire...\n");            }                        // add the heat we've built up so far.            roundReport.append(entity.getDisplayName() + " gains " + entity.heatBuildup + " heat,");            entity.heat += entity.heatBuildup;            entity.heatBuildup = 0;            // how much heat can we sink?            int tosink = Math.min(entity.getHeatCapacityWithWater(), entity.heat);                        entity.heat -= tosink;            roundReport.append(" sinks " + tosink + " heat and is now at " + entity.heat + " heat.\n");            // heat effects: start up            if (entity.heat < 30 && entity.isShutDown()) {                if (entity.heat < 14) {                    entity.setShutDown(false);                    roundReport.append(entity.getDisplayName() + " automatically starts up.\n");                } else {                    int startup = 4 + (((entity.heat - 14) / 4) * 2);                    int suroll = Compute.d6(2);                    roundReport.append(entity.getDisplayName() + " needs a " + startup + "+ to start up, rolls " + suroll + " : ");                    if (suroll >= startup) {                        entity.setShutDown(false);                        roundReport.append("successful!\n");                    } else {                        roundReport.append("fails.\n");                    }                }            }            // heat effects: shutdown!            if (entity.heat >= 14 && !entity.isShutDown()) {                if (entity.heat >= 30) {                    roundReport.append(entity.getDisplayName() + " automatically shuts down.\n");                    // add a piloting roll and resolve immediately                    pilotRolls.addElement(new PilotingRollData(entity.getId(), 3, "reactor shutdown"));                    resolvePilotingRolls();                    // okay, now mark shut down                    entity.setShutDown(true);                } else if (entity.heat >= 14) {                    int shutdown = 4 + (((entity.heat - 14) / 4) * 2);                    int sdroll = Compute.d6(2);                    roundReport.append(entity.getDisplayName() + " needs a " + shutdown + "+ to avoid shutdown, rolls " + sdroll + " : ");                    if (sdroll >= shutdown) {                        roundReport.append("avoids successfully!\n");                    } else {                        roundReport.append("shuts down.\n");                        // add a piloting roll and resolve immediately                        pilotRolls.addElement(new PilotingRollData(entity.getId(), 3, "reactor shutdown"));                        resolvePilotingRolls();                        // okay, now mark shut down                        entity.setShutDown(true);                    }                }            }                        // heat effects: ammo explosion!            if (entity.heat >= 19) {                int boom = 4 + (entity.heat >= 23 ? 2 : 0) + (entity.heat >= 28 ? 2 : 0);                int boomroll = Compute.d6(2);                roundReport.append(entity.getDisplayName() + " needs a " + boom + "+ to avoid ammo explosion, rolls " + boomroll + " : ");                if (boomroll >= boom) {                    roundReport.append("avoids successfully!\n");                } else {                    roundReport.append("fails to avoid explosion.\n");                    roundReport.append(explodeAmmoFromHeat(entity));                }            }                        // heat effects: mechwarrior damage            if (entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_LIFE_SUPPORT, Mech.LOC_HEAD) > 0            && entity.heat >= 15) {                if (entity.heat >= 25) {                    // mechwarrior takes 2 damage                    roundReport.append(entity.getDisplayName() + " has 25 or higher heat and damaged life support.  Mechwarrior takes 2 damage.\n");                    damageCrew(entity, 2);                } else {                    // mechwarrior takes 1 damage                    roundReport.append(entity.getDisplayName() + " has 15 or higher heat and damaged life support.  Mechwarrior takes 1 damage.\n");                    damageCrew(entity, 1);                }                // The pilot may have just expired.                if ( entity.crew.isDead() ) {                    roundReport.append( "*** " + entity.getDisplayName() +                                        " PILOT BAKES TO DEATH! ***" );                }            }        }    }