Incidencia #42699

City minimal regeneration modifier

Abrir Fecha: 2021-08-09 00:30 Última actualización: 2022-04-08 19:15

Informador:
Propietario:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
2

Details

Currently, regeneration for a unit resting in a city (basic+fortified+effect) can't be less than 1/3 of the unit's full hp. Let it be unhardcoded. E.g. add a parameter civstyle.city_min_regen_divisor, if it's positive, the minimal regeneration is undercapped by full_hp / value, if not, then a city may regenerate a unit not better than any other place.

Ticket History (3/11 Histories)

2021-08-09 00:30 Updated by: ihnatus
  • New Ticket "City minimal regeneration modifier" created
2021-09-18 06:01 Updated by: ihnatus
Comentario

Alternatively, there is a suggestion in fc21 to remove non-effect regeneration completely for simplicity. There is though a problem that effect regeneration is rounded down and the standard one up, but for the city it's not so thus we seemingly, to keep current behaviour without special city regeneration, can just set 13% regeneration for fortifying units and 23% for non-fortifying in current rulesets.

2022-01-12 16:08 Updated by: cazfi
Comentario

Reply To ihnatus

Currently, regeneration for a unit resting in a city (basic+fortified+effect) can't be less than 1/3 of the unit's full hp.

I think you can reduce it by a negative Recover effect, but you're right that there should be clean and consistent way to do in a ruleset.

2022-03-27 02:15 Updated by: cazfi
Comentario

Reply To ihnatus

E.g. add a parameter civstyle.city_min_regen_divisor

I've a bit worried that adding all kind of special parameters for handling this makes future generalizations (requiring converting from what we implement here to that future format) harder than necessary.

I hoped that we could handle this with something like an addition of an effect type, but as each step of the equation seems to have different characteristics, I'm not sure it's feasible (it could require like three new effect types, which seems like overkill)

2022-03-27 02:25 Updated by: cazfi
Comentario

I'm going to propose "Min_HP_Pct" effect for this ticket (leaving other steps of hp_gain_coord() to other tickets). It will tell that is the minimum HP (pct from full) unit should have after regen effects, replacing old "at least 1/3 at city" -hardcoding.

2022-03-27 03:20 Updated by: cazfi
Comentario

Reply To cazfi

(it could require like three new effect types, which seems like overkill)

Actually only two, making total number of effect types evaluated in that situation four (Regen, Min_HP, the still unknown one, and Recover). While that sounds like a performance hit (evaluating effect type is not cheap), this only happens once a turn for each unit, so really shouldn't be an issue.

2022-03-27 04:23 Updated by: cazfi
Comentario

Reply To cazfi

(leaving other steps of hp_gain_coord() to other tickets)

Actually, one other ticket is enough -> #44201

I was thinking (for the another ticket) that it would be good to have a distinct way to require ! hp_loss_pct unit in a requirement vector, but that does not seem necessary at this point.

2022-03-27 12:53 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
  • Componente Update from Server to General
2022-04-08 19:15 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Entrar