max += ((h1.getElevation() - h.getElevation() == 1 || this.isProne)?2:1)*((enemy_firing_arcs[0]==CEntity.SIDE_FRONT)?.1:.05)*ce.entity.getWeight()*Compute.oddsAbove(3+modifier)/100
max += ((h1.getElevation() - h.getElevation() == 1 || this.isProne)?2:1)*((enemy_firing_arcs[0]==CEntity.SIDE_FRONT)?.2:.05)*ce.entity.getWeight()*Compute.oddsAbove(3+modifier)/100
  public double getMaxModifiedDamage(EntityState enemy, CEntity ce, int modifier, int apc) {    double max = 0;    int distance = curPos.distance(enemy.curPos);    double mod = 1;    // heat effect modifiers    if (enemy.isJumping || (enemy.entity.heat + enemy.entity.heatBuildup > 4)) {      if (ce.overheat == CEntity.OVERHEAT_LOW) {        mod = .75;      } else if (ce.overheat == CEntity.OVERHEAT_HIGH) {        mod = .5;      } else {        mod = .9;      }    }    int self_hit_arc = Compute.getThreatHitArc(this.curPos, this.curFacing, enemy.curPos);    int enemy_firing_arcs[] = new int[3];    for (int i = 0; i < 3; i++) {      enemy_firing_arcs[i] = Compute.getThreatHitArc(enemy.curPos, Compute.getAdjustedFacing(enemy.curFacing, i), this.curPos);    }    max = ce.getModifiedDamage((apc==1)?CEntity.TT:enemy_firing_arcs[0], distance, modifier);        if (enemy_firing_arcs[1] == CEntity.SIDE_FRONT) {      max = Math.max(max, ce.getModifiedDamage(CEntity.TT, distance, modifier));    } else {      max = Math.max(max, ce.getModifiedDamage(enemy_firing_arcs[1], distance, modifier));    }    if (enemy_firing_arcs[2] == CEntity.SIDE_FRONT) {      max = Math.max(max, ce.getModifiedDamage(CEntity.TT, distance, modifier));    } else {      max = Math.max(max, ce.getModifiedDamage(enemy_firing_arcs[2], distance, modifier));    }    //this is not quit right, but good enough for now...    //ideally the pa charaterization should be in centity    max*=mod;    if (!enemy.isProne && distance == 1 && enemy_firing_arcs[0] != CEntity.SIDE_REAR) {      Hex h = game.board.getHex(this.curPos);      Hex h1 = game.board.getHex(enemy.curPos);      if (Math.abs(h.getElevation() - h1.getElevation()) < 2) {        max += ((h1.getElevation() - h.getElevation() == 1 || this.isProne)?2:1)*((enemy_firing_arcs[0]==CEntity.SIDE_FRONT)?.1:.05)*ce.entity.getWeight()*Compute.oddsAbove(3+modifier)/100            + (1 - enemy.centity.base_psr_odds)*enemy.entity.getWeight()/10.0;      }    }    return max;  }