Examples of rollHitLocation()


Examples of megamek.common.Entity.rollHitLocation()

                    server.creditKill(fighter, ae);
                }
            } else
                ToHitData toHit = new ToHitData();
                toHit.setHitTable(ToHitData.HIT_NORMAL);
                HitData hit = entity.rollHitLocation(toHit.getHitTable(), ToHitData.SIDE_FRONT);
                hit.setCapital(false);
                vPhaseReport.addAll( server.damageEntity(entity, hit, attackValue));
                server.creditKill(entity, ae);
            }
        }
View Full Code Here

Examples of megamek.common.Entity.rollHitLocation()

                r = new Report(6615);
                r.subject = t.getId();
                vDesc.add(r);
                Vector<Entity> passengers = t.getLoadedUnits();
                Entity target = passengers.get(Compute.randomInt(passengers.size()));
                hit = target.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT);
                // FIXME should be original weapon damage
                vDesc.addAll(damageEntity(target, hit, 5));
                break;
            case Tank.CRIT_COMMANDER:
                if (en.crew.getOptions().booleanOption("vdni") || en.crew.getOptions().booleanOption("bvdni")) {
View Full Code Here

Examples of megamek.common.Entity.rollHitLocation()

                    // ASSUMPTION : damage should not be doubled.
                    r = new Report(2335);
                    r.subject = swarmer.getId();
                    r.addDesc(swarmer);
                    vDesc.add(r);
                    vDesc.addAll(damageEntity(swarmer, swarmer.rollHitLocation(ToHitData.HIT_NORMAL, ToHitData.SIDE_FRONT), Compute.d6(2)));
                    Report.addNewline(vPhaseReport);
                }

                entityUpdate(swarmerId);
            }
View Full Code Here

Examples of megamek.common.Entity.rollHitLocation()

            }
            int spikeDamage = 0;

            while (damage > 0) {
                int cluster = Math.min(5, damage);
                HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable());
                hit.setGeneralDamageType(HitData.DAMAGE_PHYSICAL);
                if (directBlow) {
                    hit.makeDirectBlow(toHit.getMoS() / 3);
                }
View Full Code Here

Examples of megamek.common.Entity.rollHitLocation()

                        continue; // don't splash the target unless missile
                    // missed
                    }
                }
                toHit.setSideTable(entity.sideTable(aaa.getCoords()));
                HitData hit = entity.rollHitLocation(toHit.getHitTable(), toHit
                        .getSideTable(), waa.getAimedLocation(), waa
                        .getAimingMode());
                vPhaseReport.addAll(server.damageEntity(entity, hit,
                        ratedDamage, false, DamageType.NONE, false, true,
                        throughFront, underWater));
View Full Code Here

Examples of megamek.common.Mech.rollHitLocation()

                        r.subject = mech.getId();
                        r.add(mech.getLevelsFallen());
                    }
                    vPhaseReport.add(r);
                    vPhaseReport.addAll(criticalEntity(mech,
                            mech.rollHitLocation(ToHitData.HIT_NORMAL,
                            ToHitData.SIDE_FRONT).getLocation(),
                            mech.getLevelsFallen()));
                }
            }
        }
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.