longturn / freeciv21

Develop your civilization from humble roots to a global empire
GNU General Public License v3.0
223 stars 42 forks source link

Units bombarded down to 0hp should die #2382

Open hugomflavio opened 2 months ago

hugomflavio commented 2 months ago

Describe the bug Extensively bombarded units inside a city. To the point they should have 0hp left - especially since they have 0 defence. But the ground troops who then ended them reported winning without taking out any hp. see screenshot below.

To Reproduce Steps to reproduce the behavior:

  1. Let an idle city produce 10+ raiders so their defence becomes 0 (idk the actual endpoint that makes i t0)
  2. bombard that city with 10 archers, unload them all.
  3. attack the city with your own raiders after.
  4. See error

Expected behavior defenders should have 1hp left? edit: they should die when bombarded down to 0

Screenshots image

Platform and version (please complete the following information):

Additional context noticed during the test game

Edit:

hugomflavio commented 2 months ago

(could be a bug in the message itself, of course)

hugomflavio commented 2 months ago

not related to the 0 defence. But it seems that somehow if one bombards units hard enough, they can accidentally get to 0hp? Need to test with eyes on both sides to understand what's going on.

hugomflavio commented 2 months ago

image

Confirmed units are getting to 0hp from bombarding. Is this expected?

lmoureaux commented 2 months ago

No. I suppose Bombard_Limit_Pct is missing from the ruleset and +Bombard_Limit_Pct is set.

Bombarded units with 0hp should die.

Corbeau-1 commented 2 months ago

I can confirm that this does happen, units do get to 0 HP while surviving. Technically, this is what bombardment does: bombs them to oblivion without physically destroying them. Now, we may discuss if this is the desired behaviour and, if not, what to do and how to do it. I'd be in favour of defining some minimal HP value that units can be bombed to (maybe make it an effect so that it depends on the unit, terrain, veterancy...) but I'll survive if the current condition remains.

lmoureaux commented 2 months ago

Edited the description to include the results of our investigation on Discord. Units bombarded down to 0hp should die, just like units reaching 0hp in combat.