Medical - Add Alternative Survival Chance (#8192)

Co-authored-by: TyroneMF <TyroneMF@hotmail.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: Kyle Mckay <5459452+kymckay@users.noreply.github.com>
This commit is contained in:
Brett 2021-04-15 03:54:00 -06:00 committed by GitHub
parent 6970bf78e7
commit eeba8a8dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View File

@ -122,8 +122,10 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra
_critialDamage = true; _critialDamage = true;
}; };
if ([_unit, _bodyPartNToAdd, _bodyPartDamage, _woundDamage] call FUNC(determineIfFatal)) then { if ([_unit, _bodyPartNToAdd, _bodyPartDamage, _woundDamage] call FUNC(determineIfFatal)) then {
TRACE_1("determineIfFatal returned true",_woundDamage); if (!isPlayer _unit || {random 1 < EGVAR(medical,deathChance)}) then {
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; TRACE_1("determineIfFatal returned true",_woundDamage);
[QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent;
};
}; };
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL

View File

@ -33,3 +33,12 @@
[0, 1, 0.1, 2, true], [0, 1, 0.1, 2, true],
true true
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[
QEGVAR(medical,deathChance),
"SLIDER",
[LSTRING(deathChance_DisplayName), LSTRING(deathChance_Description)],
ELSTRING(medical,Category),
[0, 1, 1, 2, true],
true
] call CBA_fnc_addSetting;

View File

@ -697,5 +697,11 @@
<Polish>Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń.</Polish> <Polish>Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń.</Polish>
<Japanese>ユニットがダメージを受けた時に痛みが許容しきい値を超えた場合、気絶をする確立を設定します。</Japanese> <Japanese>ユニットがダメージを受けた時に痛みが許容しきい値を超えた場合、気絶をする確立を設定します。</Japanese>
</Key> </Key>
<Key ID="STR_ACE_Medical_Damage_DeathChance_DisplayName">
<English>Fatal Injury Death Chance</English>
</Key>
<Key ID="STR_ACE_Medical_Damage_DeathChance_Description">
<English>The chance of dying to a fatal injury.</English>
</Key>
</Package> </Package>
</Project> </Project>