Skip to content

Commit

Permalink
Vehicle discounts with no seaports (#3137)
Browse files Browse the repository at this point in the history
* Update fn_vehiclePrice.sqf

added additional conditions for vehicle pricing

* add additional war level tiers to calc
  • Loading branch information
Tiny-DM authored Feb 10, 2024
1 parent a0c1714 commit 5d5c821
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions A3A/addons/core/functions/REINF/fn_vehiclePrice.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@ if (isNil "_costs") then
}
else
{
private _numFriendlySeaports = ({sidesX getVariable [_x,sideUnknown] == teamPlayer} count seaports) min 6;
_costs = round (_costs - (_costs * 0.05 * _numFriendlySeaports));
if (count seaports > 3) then {
private _numFriendlySeaports = ({sidesX getVariable [_x,sideUnknown] == teamPlayer} count seaports) min 6;
_costs = round (_costs - (_costs * 0.05 * _numFriendlySeaports));
} else {
_discount = switch (true) do {
case (tierWar in [1,2]): { 0 };
case (tierWar in [3,4]): { 0 };
case (tierWar in [5,6]): { 1 };
case (tierWar in [7,8]): { 2 };
case (tierWar in [9,10]): { 3 };
default { 0 };
};
_costs = round (_costs - (_costs * 0.1 * _discount));
};
};

_costs

0 comments on commit 5d5c821

Please sign in to comment.