Skip to content

Commit

Permalink
Shields Re-Rework Buff Shield Capacity (#4226)
Browse files Browse the repository at this point in the history
Received a report that the re-reworked shields capacity was much, much
lower than the vanilla shields and didn't block as much damage. A quick
test confirmed this. For the rework, this PR buffs the shield capacity
to bring it roughly in line with the vanilla shield's ability to block
lolcannons + a little margin to compensate for the extra damage taken
from "blocking" rather than "deflecting" at less cost the shots hitting
the edges of the shield.
  • Loading branch information
SethDGamre authored Jan 30, 2025
1 parent 75a86df commit 31e137c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gamedata/alldefs_post.lua
Original file line number Diff line number Diff line change
Expand Up @@ -860,11 +860,16 @@ function UnitDef_Post(name, uDef)

-- Shield Rework
if modOptions.shieldsrework == true and uDef.weapondefs then
local shieldPowerMultiplier = 1.9-- To compensate for always taking full damage from projectiles in contrast to bounce-style only taking partial

for _, weapon in pairs(uDef.weapondefs) do
if weapon.shield and weapon.shield.repulser then
uDef.onoffable = true
end
end
if uDef.customparams.shield_power then
uDef.customparams.shield_power = uDef.customparams.shield_power * shieldPowerMultiplier
end
end

--- EMP rework
Expand Down Expand Up @@ -1479,7 +1484,8 @@ function WeaponDef_Post(name, wDef)
--Shields Rework
if modOptions.shieldsrework == true then
-- To compensate for always taking full damage from projectiles in contrast to bounce-style only taking partial
local shieldRechargeRateMultiplier = 2.5
local shieldPowerMultiplier = 1.9
local shieldRegenMultiplier = 2.5
local shieldRechargeCostMultiplier = 1

-- For balance, paralyzers need to do reduced damage to shields, as their raw raw damage is outsized
Expand Down Expand Up @@ -1523,7 +1529,8 @@ function WeaponDef_Post(name, wDef)
if wDef.shield then
wDef.shield.exterior = true
if wDef.shield.repulser == true then --isn't an evocom
wDef.shield.powerregen = wDef.shield.powerregen * shieldRechargeRateMultiplier
wDef.shield.powerregen = wDef.shield.powerregen * shieldRegenMultiplier
wDef.shield.power = wDef.shield.power * shieldPowerMultiplier
wDef.shield.powerregenenergy = wDef.shield.powerregenenergy * shieldRechargeCostMultiplier
end
wDef.shield.repulser = false
Expand Down

0 comments on commit 31e137c

Please sign in to comment.