Update medical functions

This updates the medical functions for the new player_humanityChange call and updates the code where it was needed.
This commit is contained in:
A Man
2020-04-03 12:45:37 +02:00
parent 57e9fff9e8
commit 76ac4addc5
12 changed files with 234 additions and 237 deletions

View File

@@ -17,27 +17,26 @@ _randRh = random 100;
_randType = random 100;
_bt_val = nil;
_rh_val = nil;
switch true do {
case (_randType >= 61) : {
call {
if (_randType >= 61) exitwith {
_bt_val = "O";
_rh_val = if (_randRh >= 89) then { false } else { true };
_rh_val = [true,false] select (_randRh >= 89);
};
case (_randType >= 29) : {
if (_randType >= 29) exitwith {
_bt_val = "A";
_rh_val = if (_randRh >= 89) then { false } else { true };
_rh_val = [true,false] select (_randRh >= 89);
};
case (_randType >= 6) : {
if (_randType >= 6) exitwith {
_bt_val = "B";
_rh_val = if (_randRh >= 94) then { false } else { true };
};
default {
_bt_val = "AB";
_rh_val = if (_randRh >= 91) then { false } else { true };
_rh_val = [true,false] select (_randRh >= 94);
};
_bt_val = "AB";
_rh_val = [true,false] select (_randRh >= 91);
};
//diag_log ["_playerObj BLOOD CALC: Blood Type,Rh Type=", _bt_val, _rh_val];
//RH type
_playerObj setVariable ["rh_factor", _rh_val, true];
//blood type
_playerObj setVariable ["blood_type", _bt_val, true];
_playerObj setVariable ["blood_type", _bt_val, true];