Author Topic: Not sure if bug: Damage calculation for shotgun-like guns / stunning vs. killing  (Read 4638 times)

Offline TomasRiker

  • Squaddie
  • *
  • Posts: 8
    • View Profile
First of all, I didn't report a bug, since I don't know if it's really a bug.

I noticed that shotgun-like weapons often seem to render their victims unconscious rather than killing them.

My theory is the following: Each time one of the many bullets hits a target, damage is calculated and applied to the target. When the target's health falls below some threshold, but is still not zero, the target unit becomes unconscious, and no further bullets have a chance to hit and afflict more damage.

If that's really how it's implemented, then I suggest "collecting" the damage and applying it only after all the bullets have disappeared (or it is certain that no more bullets will hit).
« Last Edit: October 26, 2015, 11:17:59 pm by TomasRiker »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
I think the answer is much more trivial. Each hit that takes HP also inflicts Fatal Wounds. It doesn't take much HP loss to inflict Fatal Wounds; I think 9 damage is the minimum required for 3 Fatal Wounds per hit, and you can't take more than 3 Fatal Wounds per hit, no matter how strong.

Now, Stun damage is, afaik, only inflicted when Fatal Wounds are inflicted (or at leas most of the stun damage is generated that way).

So - shotguns inflict relatively low HP damage, but due to multiple hits, they're prone to inflicting many Fatal Wounds (and, therefore, high Stun damage).

Offline Brian

  • Sergeant
  • **
  • Posts: 18
    • View Profile
According to https://www.ufopaedia.org/index.php?title=Fatal_Wounds, if you take 1 damage, you have a 91% to take no fatal wounds, 3% 1, 3% 2, and 3% 3.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Oh, there you have it, so you can get 3 Fatal Wounds even at 1 damage. My main point was that the chance to get Fatal Wounds doesn't grow past a comparatively low damage threshold - 11 as it turns out -, where you have 33.3% chance to get either 1, 2 or 3. So 2 hits 11 damage each will generate, on average, twice as much Fatal Wounds as a single 30 damage hit, and thus - much more Stun damage.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
I thought OP rather refers to how the pellets are applied one by one : If you blast an enemy at point-blank range and the first pellet is enough to lower health below the target's 'stun level', the target is immediately set unconscious and can't be hit by projectiles anymore : The subsequent pellets pass "harmlessly" through the space that the unit was previously occupying.
IMO, it's not necessarily a bad thing : If two sectoids are aligned and you shoot the front one, what do you prefer, from a gameplay standpoint:
1) Some pellets kill or stun the first one, the additional ones are very likely to hit the second target
2) The front sectoid absorbs the entire blast, and despite being brought down to -150hp, it shields the second one completely.

Offline TomasRiker

  • Squaddie
  • *
  • Posts: 8
    • View Profile
I thought OP rather refers to how the pellets are applied one by one

Yes, that was my point exactly.

Basically, all the pellets hit the target at the same time, or within a tiny time window in the order of milliseconds or less. Yet, the pellets afflict damage one by one, allowing the target to die or fall unconscious between the hits.

This is unrealistic, of course. But the same would apply to auto shots. Real-world weapons fire bullets at a very high rate. It's impossible to fall to the ground after being hit by the first bullet and before being hit by the second.

By the way: Sorry for posting into the wrong forum. Can somebody move the thread to "Open Feedback" or "Suggestions"?

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Oh, now I see. In that case, it should be 'core mechanics change request' (because indeed you can't stop with shotguns, you'd need to include autoshots) :)