From a3a91d4f45b22fd487ecbc954ad979be5d03efdd Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:38:09 +0300 Subject: init --- Client/Module/ISIS/ISIS_Wound.sqf | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Client/Module/ISIS/ISIS_Wound.sqf (limited to 'Client/Module/ISIS/ISIS_Wound.sqf') diff --git a/Client/Module/ISIS/ISIS_Wound.sqf b/Client/Module/ISIS/ISIS_Wound.sqf new file mode 100644 index 0000000..3638718 --- /dev/null +++ b/Client/Module/ISIS/ISIS_Wound.sqf @@ -0,0 +1,62 @@ +Private ["_damage","_damages","_isStuned","_lastWound","_type","_unit"]; + +_unit = _this select 0; +_type = _this select 1; +_damages = _this select 2; + +if (vehicle _unit == _unit) then { + _isStuned = _unit getVariable "stunned"; + _lastWound = _unit getVariable "lastWound"; + if (isNil "_isStuned") then {_isStuned = false}; + if (isNil "_lastWound") then {_lastWound = round(time)}; + if (_isStuned) exitWith { + if (time - _lastWound > 3) then {_damages} else {false} + }; + + _unit setVariable ["lastWound",round time]; + _damage = true; + + switch (_type) do { + case "head_hit": { + if (_damages > 0.4 && _damages < 1) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 5) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "body": { + if (_damages > 0.65 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "hands": { + if (_damages > 0.76 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "legs": { + if (_damages > 0.68 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "": { + _damage = false; + }; + }; + + if (_isStuned) then {[_unit] Spawn ISIS_Wounded}; + + if (_damage) then {_damages} else {false}; +} else { + _damages +}; \ No newline at end of file -- cgit v1.3.1