/**
* Handle a telemissile attack
*/
private void resolveTeleMissileAttack(PhysicalResult pr, int lastEntityId) {
final TeleMissileAttackAction taa = (TeleMissileAttackAction) pr.aaa;
final Entity ae = game.getEntity(taa.getEntityId());
if (!(ae instanceof TeleMissile)) {
return;
}
TeleMissile tm = (TeleMissile) ae;
final Targetable target = game.getTarget(taa.getTargetType(), taa.getTargetId());
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, ae.getPosition(), te);
}
Report r;
if (lastEntityId != taa.getEntityId()) {
// who is making the attack
r = new Report(4005);
r.subject = ae.getId();
r.addDesc(ae);
addReport(r);