-
Notifications
You must be signed in to change notification settings - Fork 0
/
fnc_AAFattackScore.sqf
24 lines (20 loc) · 1.13 KB
/
fnc_AAFattackScore.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "macros.hpp"
private _scoreNeededLand = 0;
private _scoreNeededAir = 0;
{
private _analizado = _x;
private _analizadoPos = _x call AS_location_fnc_position;
private _analizadoSize = _x call AS_location_fnc_size;
private _analizadoType = _x call AS_location_fnc_type;
private _analizadoGarrison = _x call AS_location_fnc_garrison;
_scoreNeededLand = _scoreNeededLand + floor ((count _analizadoGarrison)/8);
_scoreNeededAir = _scoreNeededAir + floor (({_x == "AA Specialist"} count _analizadoGarrison)/2);
if (_analizadoType in ["base", "airfield"]) then {
_scoreNeededLand = _scoreNeededLand + 3;
_scoreNeededAir = _scoreNeededAir + 3;
};
private _estaticas = AS_P("vehicles") select {_x distance2D _analizadoPos < _analizadoSize};
_scoreNeededLand = _scoreNeededLand + ({typeOf _x in AS_allMortarStatics} count _estaticas) + (2*({typeOf _x in AS_allATstatics} count _estaticas));
_scoreNeededAir = _scoreNeededAir + ({typeOf _x in AS_allMGstatics} count _estaticas) + (7*({typeOf _x in AS_allAAstatics} count _estaticas));
} forEach _this;
[_scoreNeededLand, _scoreNeededAir]