Follow-up Comment #5, bug #14037 (project freeciv):

so the rehoming of units would look like the following (return code says if
the unit survives):

foreach unit of the city {
  if the city is disbanded (case 3. and 4.) {
    if unit can not survive at the old city tile {
      check in dist 1 for a field there the unit can survive (no enemy units;
ocean for boots)

      if such a tile is found {
        move unit there
      } else {
        disband unit
        return FALSE
      }
    }
  }

  search own city nearest (max dist?) to the unit! there the unit can survive
(i.e. coastal cities for boots)

  if a city is found {
    rehome unit
    return TRUE
  } else {
    disband unit
    return FALSE
  }
}


the gameless unit wouldn't be a special case. I think both cases there this
unit would be disbanded are valid reasons to lose the game:

* no tile in radius 1 around the disbanded city there the gameloss unit can
survive
* no city (in max dist) there the gameloss unit can survive


the maximal distance could be a game / ruleset option

special case 5. has to be checked in the code for bribing a city


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?14037>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to