Skip to content

Commit

Permalink
Change carbonate/reorient chance handling
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueTheKing committed Oct 14, 2023
1 parent 80e165c commit 46bede4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addons/pharma/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ PREP_RECOMPILE_END;
"SLIDER",
LLSTRING(SETTING_reorientationChance),
[CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)],
[0, 100, 100, 0],
[0, 100, 50, 0],
true
] call CBA_Settings_fnc_init;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Mazinski.H
* Author: Mazinski.H, Blue
* Checks for Carbonate Wakeup values to restore consciousness
*
* Arguments:
Expand All @@ -24,6 +24,6 @@ if (_sedated) exitWith {};
private _bloodPressure = GET_BLOOD_PRESSURE(_patient);
_bloodPressureH = _bloodPressure select 1;

if (_bloodPressureH >= 100 && _bloodPressureH <= 140 && (random 100 <= GVAR(carbonateChance)) && {[_patient] call EFUNC(misc,hasStableVitals)} ) then {
if ((floor (random 100) < ((linearConversion [50, 100, _bloodPressureH, 0, GVAR(carbonateChance), true]) min (linearConversion [140, 200, _bloodPressureH, GVAR(carbonateChance), 0, true]))) && {[_patient] call EFUNC(misc,hasStableVitals)}) then {
[_patient, false] call ACEFUNC(medical,setUnconscious);
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/*
* Author: Mazinski.H
* Author: Mazinski.H, Blue
* Checks for Reorientation Wakeup values to restore consciousness
*
* Arguments:
Expand All @@ -20,7 +20,7 @@ params ["_medic", "_patient"];

private _pulse = GET_HEART_RATE(_patient);

if (_pulse >= 70 && _pulse <= 100 && (random 100 <= GVAR(reorientationChance)) && {[_patient] call EFUNC(misc,hasStableVitals)}) then {
if ((floor (random 100) < ((linearConversion [40, 79, _pulse, 0, GVAR(reorientationChance), true]) min (linearConversion [80, 220, _pulse, GVAR(reorientationChance), 0, true]))) && {[_patient] call EFUNC(misc,hasStableVitals)}) then {
[_patient, false] call ACEFUNC(medical,setUnconscious);
_output = LLSTRING(ReorientingSuccess);
[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured);
Expand Down
4 changes: 2 additions & 2 deletions addons/pharma/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@
<Portuguese>Suprime a dor</Portuguese>
</Key>
<Key ID="STR_KAT_Pharma_SETTING_reorientationChance">
<English>Chance for succesful reorientation</English>
<English>Maximum Reorientation Success Chance</English>
<Polish>Szansa na pomyślne ocucenie</Polish>
<Chinesesimp>成功进行恢复体态的几率</Chinesesimp>
<Italian>Possibilità di un riorientamento riuscito</Italian>
Expand All @@ -1621,7 +1621,7 @@
<Portuguese>Chance de reorientação bem-sucedida</Portuguese>
</Key>
<Key ID="STR_KAT_Pharma_SETTING_carbonateChance">
<English>Chance for succesful Carbonate use</English>
<English>Maximum Carbonate Success Chance</English>
<Polish>Szansa na pomyślne użycie soli trzeźwiących</Polish>
<Chinesesimp>成功使用碳酸盐的几率</Chinesesimp>
<Italian>Possibilità di utilizzare con successo il carbonato</Italian>
Expand Down

0 comments on commit 46bede4

Please sign in to comment.