public static ToHitData getAttackerMovementModifier(IGame game, int entityId, int movement) { final Entity entity = game.getEntity(entityId); ToHitData toHit = new ToHitData();    if (entity instanceof Infantry) { if (movement == IEntityMovementType.MOVE_VTOL_WALK || movement == IEntityMovementType.MOVE_VTOL_RUN) { toHit.addModifier(3, "attacker flew"); } return toHit; }  if (movement == IEntityMovementType.MOVE_WALK || movement == IEntityMovementType.MOVE_VTOL_WALK) { toHit.addModifier(1, "attacker walked"); } else if (movement == IEntityMovementType.MOVE_RUN || movement == IEntityMovementType.MOVE_VTOL_RUN || movement == IEntityMovementType.MOVE_SKID) { toHit.addModifier(2, "attacker ran"); } else if (movement == IEntityMovementType.MOVE_JUMP) { toHit.addModifier(3, "attacker jumped"); }  return toHit;
public static ToHitData getAttackerMovementModifier(IGame game, int entityId) { return getAttackerMovementModifier(game, entityId, game .getEntity(entityId).moved);
    public static ToHitData getAttackerMovementModifier(IGame game,            int entityId, int movement) {        final Entity entity = game.getEntity(entityId);        ToHitData toHit = new ToHitData();        // infantry aren't affected by their own movement,        // unless it's flying Infantry (like the sylph)        if (entity instanceof Infantry) {            if (movement == IEntityMovementType.MOVE_VTOL_WALK                    || movement == IEntityMovementType.MOVE_VTOL_RUN) {                toHit.addModifier(3, "attacker flew");            }            return toHit;        }        if (movement == IEntityMovementType.MOVE_WALK                || movement == IEntityMovementType.MOVE_VTOL_WALK) {            toHit.addModifier(1, "attacker walked");        } else if (movement == IEntityMovementType.MOVE_RUN                || movement == IEntityMovementType.MOVE_VTOL_RUN                || movement == IEntityMovementType.MOVE_SKID) {            toHit.addModifier(2, "attacker ran");        } else if (movement == IEntityMovementType.MOVE_JUMP) {            toHit.addModifier(3, "attacker jumped");        }        return toHit;    }