mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical AI - Improve Healing Logic (#7255)
* Improve AI healing logic * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Added event for CPR chance being 0 * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com> * Update addons/medical_ai/functions/fnc_healingLogic.sqf Co-Authored-By: PabstMirror <pabstmirror@gmail.com> * Update fnc_healingLogic.sqf Co-Authored-By: commy2 <commy2@users.noreply.github.com>
This commit is contained in:
parent
d073bb5afe
commit
e8fcbcdf4b
@ -54,9 +54,20 @@ switch (true) do {
|
||||
_treatmentTime = 5;
|
||||
_treatmentArgs = [_target, _selection, "FieldDressing"];
|
||||
};
|
||||
case (IN_CRDC_ARRST(_target) && {EGVAR(medical_treatment,cprSuccessChance) > 0}): {
|
||||
_treatmentEvent = QEGVAR(medical_treatment,cprLocal);
|
||||
_treatmentArgs = [_healer, _target];
|
||||
_treatmentTime = 15;
|
||||
};
|
||||
case (_isMedic && {GET_BLOOD_VOLUME(_target) < BLOOD_VOLUME_CLASS_2_HEMORRHAGE}): {
|
||||
private _bloodBags = _target getVariable [QEGVAR(medical,ivBags), []];
|
||||
if ((count _bloodBags) >= 2) exitWith {
|
||||
// Check if patient's blood volume + remaining IV volume is enough to allow the patient to wake up
|
||||
private _totalIvVolume = 0; //in ml
|
||||
{
|
||||
_x params ["_volumeRemaining"];
|
||||
_totalIvVolume = _totalIvVolume + _volumeRemaining;
|
||||
} forEach (_target getVariable [QEGVAR(medical,ivBags), []]);
|
||||
|
||||
if (GET_BLOOD_VOLUME(_target) + (_totalIvVolume / 1000) > BLOOD_VOLUME_CLASS_2_HEMORRHAGE) exitWith {
|
||||
_treatmentEvent = "#waitForBlood";
|
||||
};
|
||||
_treatmentEvent = QEGVAR(medical_treatment,ivBagLocal);
|
||||
|
Loading…
Reference in New Issue
Block a user