mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
player stats changes
logic to select low or high criticalAttributes forced blood drop if player is hypothermic. force blood pressure rise if toxicity or radiation is over 55 removed Radiation reduction in master loop so you can only reduce radiation with treatments players blood pressure must stay within 11-179 range or be killed.
This commit is contained in:
parent
f39a79a7d2
commit
17f396b51b
@ -1,5 +1,6 @@
|
|||||||
// init
|
// init
|
||||||
_forceBloodRise = false;
|
_forceBloodRise = false;
|
||||||
|
_forceBloodDrop = false;
|
||||||
_forceFatigue = false;
|
_forceFatigue = false;
|
||||||
_allowBloodDrop = false;
|
_allowBloodDrop = false;
|
||||||
_forceStaminaDrop = false;
|
_forceStaminaDrop = false;
|
||||||
@ -88,9 +89,13 @@ EPOCH_currentTargetMode = _currentTargetMode;
|
|||||||
_curCtrl ctrlSetText _ctrlText;
|
_curCtrl ctrlSetText _ctrlText;
|
||||||
_critical = (_criticalHigh || _criticalLow);
|
_critical = (_criticalHigh || _criticalLow);
|
||||||
if (_critical) then {
|
if (_critical) then {
|
||||||
|
if ((_criticalAttributes param [0,""]) isEqualType []) then {
|
||||||
|
_criticalAttributes = _criticalAttributes select _criticalLow;
|
||||||
|
};
|
||||||
_forceUpdate = "forceUpdate" in _criticalAttributes;
|
_forceUpdate = "forceUpdate" in _criticalAttributes;
|
||||||
_forceFatigue = "forceFatigue" in _criticalAttributes;
|
_forceFatigue = "forceFatigue" in _criticalAttributes;
|
||||||
_forceBloodRise = "forceBloodRise" in _criticalAttributes;
|
_forceBloodRise = "forceBloodRise" in _criticalAttributes;
|
||||||
|
_forceBloodDrop = "forceBloodDrop" in _criticalAttributes;
|
||||||
[_curCtrl,0.55] call epoch_2DCtrlHeartbeat;
|
[_curCtrl,0.55] call epoch_2DCtrlHeartbeat;
|
||||||
};
|
};
|
||||||
// todo make this reversable or even limited to a color range.
|
// todo make this reversable or even limited to a color range.
|
||||||
@ -124,9 +129,9 @@ if (_forceFatigue) then {
|
|||||||
if (_forceBloodRise) then {
|
if (_forceBloodRise) then {
|
||||||
_playerBloodP = [_playerBloodPKey, 0.05, _playerBloodPMax , _playerBloodPMin] call EPOCH_fnc_setVariableLimited;
|
_playerBloodP = [_playerBloodPKey, 0.05, _playerBloodPMax , _playerBloodPMin] call EPOCH_fnc_setVariableLimited;
|
||||||
} else {
|
} else {
|
||||||
if (_allowBloodDrop) then {
|
if (_allowBloodDrop || _forceBloodDrop) then {
|
||||||
// allow player to bleed out
|
// allow player to bleed out or die from hypothermia
|
||||||
_lowerBPlimit = [100,0] select (isBleeding player);
|
_lowerBPlimit = [100,0] select (isBleeding player || _forceBloodDrop);
|
||||||
_playerBloodP = [_playerBloodPKey, -1, _playerBloodPMax , _lowerBPlimit] call EPOCH_fnc_setVariableLimited;
|
_playerBloodP = [_playerBloodPKey, -1, _playerBloodPMax , _lowerBPlimit] call EPOCH_fnc_setVariableLimited;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -387,7 +392,7 @@ if(getNumber(('CfgEpochClient' call EPOCH_returnConfig) >> 'mapOnZoomSetMarkerSi
|
|||||||
private "_markerString";
|
private "_markerString";
|
||||||
_markerString = toArray _zoomMarker;
|
_markerString = toArray _zoomMarker;
|
||||||
_markerString resize 6;
|
_markerString resize 6;
|
||||||
if (toString _markerString == "EPOCH_") then {
|
if (toString _markerString == "EPOCH_") then {
|
||||||
switch(true)do{
|
switch(true)do{
|
||||||
case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): {
|
case ( (_mapScale >= 0.95) && (_mapScale <= 1) ): {
|
||||||
_zoomMarker setMarkerSizeLocal [0.666,0.666];
|
_zoomMarker setMarkerSizeLocal [0.666,0.666];
|
||||||
|
@ -140,8 +140,6 @@ if ((getFatigue player) >= 0.7 && _airTemp > 100) then {
|
|||||||
_maxTemp = _airTemp;
|
_maxTemp = _airTemp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// toxic fever and immunity increase
|
// toxic fever and immunity increase
|
||||||
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
|
_playerToxicity = missionNamespace getVariable [_playerToxicityKey, _playerToxicityDefault];
|
||||||
// _playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
|
// _playerImmunity = missionNamespace getVariable [_playerImmunityKey, _playerImmunityDefault];
|
||||||
@ -202,11 +200,8 @@ _playerThirst = [_playerThirstKey,-_thirstlossRate,_playerThirstMax,_playerThirs
|
|||||||
_playerNuisance = [_playerNuisanceKey,-1,_playerNuisanceMax,_playerNuisanceMin] call EPOCH_fnc_setVariableLimited;
|
_playerNuisance = [_playerNuisanceKey,-1,_playerNuisanceMax,_playerNuisanceMin] call EPOCH_fnc_setVariableLimited;
|
||||||
|
|
||||||
// Radiation Handler
|
// Radiation Handler
|
||||||
if (_radsLevel == 0) then {
|
if (_radsLevel > 0) then {
|
||||||
// only lower rads if player has taken medicine and it no longer in a radiation zone.
|
// increase rads based on radiation levels
|
||||||
_playerRadiation = [_playerRadiationKey,-0.01,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
|
||||||
} else {
|
|
||||||
// allow increase rads based on radiation levels and consumed rads
|
|
||||||
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
_playerRadiation = [_playerRadiationKey,_radsLevel,_playerRadiationMax,_playerRadiationMin] call EPOCH_fnc_setVariableLimited;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,11 +125,11 @@ class CfgEpochClient
|
|||||||
{{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},
|
{{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},
|
||||||
{"Hunger","topRight","x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",{"forceBloodRise"}},
|
{"Hunger","topRight","x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",{"forceBloodRise"}},
|
||||||
{"Thirst","topRight","x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",{"forceBloodRise"}},
|
{"Thirst","topRight","x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",{"forceBloodRise"}},
|
||||||
{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{"forceFatigue"}},
|
{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{{"forceFatigue","forceBloodRise"},{"forceFatigue","forceBloodDrop"}}},
|
||||||
{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"},
|
{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa",{"forceBloodRise"}},
|
||||||
{"Alcohol","topRight","x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"},
|
{"Alcohol","topRight","x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"},
|
||||||
{"Soiled","topRight","x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"},
|
{"Soiled","topRight","x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"},
|
||||||
{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa"},
|
{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa",{"forceBloodRise"}},
|
||||||
{{"HitPoints","getPlayerHitPointDamage","HitLegs"},"topRight","x\addons\a3_epoch_code\Data\UI\broken_ca.paa"}
|
{{"HitPoints","getPlayerHitPointDamage","HitLegs"},"topRight","x\addons\a3_epoch_code\Data\UI\broken_ca.paa"}
|
||||||
};
|
};
|
||||||
defineCommunityStats[] = {
|
defineCommunityStats[] = {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_player/EPOCH_server_savePlayer.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_Svars","_allowSave","_appearance","_cIndex","_dmg","_extraLoadoutInfo","_group","_hitpoints","_loadout","_medical","_playerUID","_pos","_return","_return2","_revive","_schemaVersion","_server_vars","_stats","_vehiclePlyr"];
|
private ["_Svars","_allowSave","_appearance","_bloodPIndex","_bloodPressure","_group","_hitpoints","_loadout","_medical","_playerUID","_pos","_return","_return2","_revive","_schemaVersion","_server_vars","_stats","_vehiclePlyr"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params [["_player",objNull], ["_vars",[]] ];
|
params [["_player",objNull], ["_vars",[]] ];
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ if (_allowSave) then{
|
|||||||
private _serverOnly = ["Crypto"];
|
private _serverOnly = ["Crypto"];
|
||||||
_Svars = _player getVariable["VARS", call EPOCH_defaultVars_SEPXVar];
|
_Svars = _player getVariable["VARS", call EPOCH_defaultVars_SEPXVar];
|
||||||
{
|
{
|
||||||
_cIndex = EPOCH_customVars find _x;
|
private _cIndex = EPOCH_customVars find _x;
|
||||||
if (_cIndex != -1) then{
|
if (_cIndex != -1) then{
|
||||||
_vars set[_cIndex, (_Svars select _cIndex)];
|
_vars set[_cIndex, (_Svars select _cIndex)];
|
||||||
};
|
};
|
||||||
@ -102,8 +102,10 @@ if (_allowSave) then{
|
|||||||
_stats = _player getVariable["COMMUNITY_STATS", EPOCH_defaultStatVars];
|
_stats = _player getVariable["COMMUNITY_STATS", EPOCH_defaultStatVars];
|
||||||
_return2 = ["CommunityStats", _playerUID, EPOCH_expiresCommunityStats, [_stats]] call EPOCH_fnc_server_hiveSETEX;
|
_return2 = ["CommunityStats", _playerUID, EPOCH_expiresCommunityStats, [_stats]] call EPOCH_fnc_server_hiveSETEX;
|
||||||
|
|
||||||
// kill player if blood pressure >= 180
|
// blood pressure must stay within 11-179 range
|
||||||
if (_vars select 12 >= 180) then {
|
_bloodPIndex = EPOCH_customVars find "BloodP";
|
||||||
|
_bloodPressure = _vars param [_bloodPIndex,100];
|
||||||
|
if (_bloodPressure >= 180 || _bloodPressure <= 10) then {
|
||||||
_player setDamage 1;
|
_player setDamage 1;
|
||||||
} else {
|
} else {
|
||||||
// set player alive bit
|
// set player alive bit
|
||||||
|
Loading…
Reference in New Issue
Block a user