vPhaseReport.addAll(
addReport(
    private void resolveChargeAttack(PhysicalResult pr, int lastEntityId) {        final ChargeAttackAction caa = (ChargeAttackAction)pr.aaa;        final Entity ae = game.getEntity(caa.getEntityId());        final Targetable target = game.getTarget(caa.getTargetType(), caa.getTargetId());        // get damage, ToHitData and roll from the PhysicalResult        int damage = pr.damage;        final ToHitData toHit = pr.toHit;        int roll = pr.roll;        Entity te = null;        if (target != null && target.getTargetType() == Targetable.TYPE_ENTITY) {            te = (Entity)target;        }        boolean throughFront = true;        if (te!=null) {            throughFront = Compute.isThroughFrontHex(game, caa.getEntityId(), te);        }        final boolean glancing = (game.getOptions().booleanOption("maxtech_glancing_blows") && (roll == toHit.getValue()));        Report r;        // Which building takes the damage?        Building bldg = game.getBoard().getBuildingAt( caa.getTargetPos() );        // is the attacker dead?  because that sure messes up the calculations        if (ae == null) {            return;        }        final int direction = ae.getFacing();        // entity isn't charging any more        ae.setDisplacementAttack(null);        if (lastEntityId != caa.getEntityId()) {            //who is making the attack            r = new Report(4005);            r.subject = ae.getId();            r.addDesc(ae);            vPhaseReport.addElement(r);        }        // should we even bother?        if (target == null || (target.getTargetType() == Targetable.TYPE_ENTITY             && (te.isDestroyed() || te.isDoomed() || te.crew.isDead()))) {            r = new Report(4190);            r.subject = ae.getId();            r.indent();            vPhaseReport.addElement(r);            // doEntityDisplacement(ae, ae.getPosition(), caa.getTargetPos(), null);            // Randall said that if a charge fails because of target destruction,            // the attacker stays in the hex he was in at the end of the movement phase            // See Bug 912094            return;        }        // attacker fell down?        if (ae.isProne()) {            r = new Report(4195);            r.subject = ae.getId();            r.indent();            vPhaseReport.addElement(r);            return;        }        // attacker immobile?        if (ae.isImmobile()) {            r = new Report(4200);            r.subject = ae.getId();            r.indent();            vPhaseReport.addElement(r);            return;        }        if (te.isProne()) {            r = new Report(4205);            r.subject = ae.getId();            r.indent();            vPhaseReport.addElement(r);            return;        }        r = new Report(4210);        r.subject = ae.getId();        r.indent();        r.add(target.getDisplayName());        r.newlines = 0;        vPhaseReport.addElement(r);        // target still in the same position?        if (!target.getPosition().equals(caa.getTargetPos())) {            r = new Report(4215);            r.subject = ae.getId();            vPhaseReport.addElement(r);            doEntityDisplacement(ae, ae.getPosition(), caa.getTargetPos(), null);            return;        }        // if the attacker's prone, fudge the roll        if (toHit.getValue() == ToHitData.IMPOSSIBLE) {            roll = -12;            r = new Report(4220);            r.subject = ae.getId();            r.add(toHit.getDesc());            vPhaseReport.addElement(r);        } else if (toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS) {            roll = Integer.MAX_VALUE;            r = new Report(4225);            r.subject = ae.getId();            r.add(toHit.getDesc());            vPhaseReport.addElement(r);        } else {            // report the roll            r = new Report(4025);            r.subject = ae.getId();            r.add(toHit.getValue());            r.add(roll);            r.newlines = 0;            vPhaseReport.addElement(r);            if (glancing) {                r = new Report(4030);                r.subject = ae.getId();                r.newlines = 0;                vPhaseReport.addElement(r);            }       }        // do we hit?        if (roll < toHit.getValue()) {            Coords src = ae.getPosition();            Coords dest = Compute.getMissedChargeDisplacement(game, ae.getId(), src, direction);            // TODO: handle movement into/out of/through a building.  Do it here?            //miss            r = new Report(4035);            r.subject = ae.getId();            vPhaseReport.addElement(r);            // move attacker to side hex            doEntityDisplacement(ae, src, dest, null);        }        // Targeting a building.        else if ( target.getTargetType() == Targetable.TYPE_BUILDING ) {            // The building takes the full brunt of the attack.            r = new Report(4040);            r.subject = ae.getId();            vPhaseReport.addElement(r);            Report buildingReport = damageBuilding( bldg, damage );            buildingReport.indent();            buildingReport.subject = ae.getId();            vPhaseReport.addElement(buildingReport);            // Damage any infantry in the hex.            this.damageInfantryIn( bldg, damage );            // Apply damage to the attacker.            int toAttacker = ChargeAttackAction.getDamageTakenBy( ae, bldg );            HitData hit = ae.rollHitLocation( ToHitData.HIT_NORMAL,                                              ae.sideTable(target.getPosition())                                                  );            vPhaseReport.addAll(                                  damageEntity( ae, hit, toAttacker, false, 0, false, false, throughFront));            Report.addNewline(vPhaseReport);            entityUpdate( ae.getId() );            // TODO: Does the attacker enter the building?            // TODO: What if the building collapses?        }        else {            // Resolve the damage.            resolveChargeDamage( ae, te, toHit, direction, glancing, throughFront );        }        return;    }