Combat_Rounds effect: to kill or to survive?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Posts: 101
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia

Combat_Rounds effect: to kill or to survive?

Postby Ignatus » Fri Oct 19, 2018 3:19 pm

In FC3.0 the effect Combat_Rounds is introduced which limits how many blows can units exchange in a battle. As a result, now an attack may result in survival of both parts. Even if the defender is very weak, it can have 100% chance to survive if just has more hitpoints then attacker's firepower * max_rounds. See wikia for the maths.

One who have already played 3.0 sandbox where all attackers have 15 rounds limit may have noticed that, since most units are 20hp, both parts surviving is a common case (and thus there is much more Elite units). How can this effect be applied in a real ruleset? First thing I have thought about were turrets, attackers that can damage strong targets and can kill them but usually only in a complex action.

My actual question is what a Combat_Rounds-aware get_defender() function (specifying which unit in a stack defends) should do, I'm trying to code it. Currently, it does not know about this effect and thus sometimes will not send forth a weak unit with many hp even if it actually has better chances to survive. It's crucial for vulnerable stacks, and even safe ones may have difficulcies in receiving reinforcement. On the other hand, we don't want to grant our enemies free vet. statuses and wait a turn or two when they will try again, so sometimes we would like to see defending a unit which less survives but more kills. Should we sort units by P(survive) in vulnerable stack and by P(kill) - P(die) in safe ones, or some better risk estimator can be suggested?