PilotingRollData roll = ae.getBasePilotingRoll(); roll.addModifier( 0, "thrashing at infantry" );
PilotingRollData rollData = ae.getBasePilotingRoll(); rollData.addModifier( 0, "thrashing at infantry" );
    private void resolveThrashAttack( ThrashAttackAction baa,                                        int lastEntityId ) {        final Entity ae = game.getEntity(baa.getEntityId());        // PLEASE NOTE: buildings are *never* the target of a "thrash".        final Entity te = game.getEntity(baa.getTargetId());        if (lastEntityId != baa.getEntityId()) {            phaseReport.append( "\nPhysical attacks for " )                .append( ae.getDisplayName() )                .append( "\n" );        }        phaseReport.append("    Thrash at " )            .append( te.getDisplayName() );        // compute to-hit        ToHitData toHit = baa.toHit(game);        if (toHit.getValue() == ToHitData.IMPOSSIBLE) {            phaseReport.append( ", but the thrash is impossible (" )                .append( toHit.getDesc() )                .append( ")\n" );            return;        }        // Thrash attack may hit automatically        if ( toHit.getValue() == ToHitData.AUTOMATIC_SUCCESS ) {            phaseReport.append( "; hits automatically," );        } else {            phaseReport.append( "; needs " )                .append( toHit.getValue() )                .append( ", " );            // roll            int roll = Compute.d6(2);            phaseReport.append("rolls ").append(roll).append(" : ");            // do we hit?            if (roll < toHit.getValue()) {                phaseReport.append("misses.\n");                return;            }            phaseReport.append( ", hits" );        }        // Standard damage loop in 5 point clusters.        int hits = ThrashAttackAction.getThrashDamageFor(ae);        phaseReport.append( " and deals " )            .append( hits )            .append( " points of damage in 5 point clusters.");        while ( hits > 0 ) {            int damage = Math.min(5, hits);            hits -= damage;            HitData hit = te.rollHitLocation( toHit.getHitTable(),                                              toHit.getSideTable() );            phaseReport.append("\nHits ").append( te.getLocationAbbr(hit) );            phaseReport.append(damageEntity(te, hit, damage));        }        phaseReport.append("\n");        // Thrash attacks cause PSRs.  Failed PSRs cause falling damage.        // This fall damage applies even though the Thrashing Mek is prone.        PilotingRollData roll = ae.getBasePilotingRoll();        roll.addModifier( 0, "thrashing at infantry" );        phaseReport.append( ae.getDisplayName() )            .append( " must make a piloting skill check (" )            .append( "thrashing at infantry).\n");        final int diceRoll = Compute.d6(2);        phaseReport.append("Needs " )            .append( roll.getValueAsString() )            .append( " [" )            .append( roll.getDesc() )            .append( "]" )            .append( ", rolls " )            .append( diceRoll )            .append( " : " );        if (diceRoll < roll.getValue()) {            phaseReport.append("fails.\n");            doEntityFall( ae, roll );        } else {            phaseReport.append("succeeds.\n");        }    }