more resistant planetary defenses
Posted: Wed Mar 25, 2020 9:04 pm
revisiting my old shield_damage_negation and poking around ship_damage.lua again, got me thinking
I know we reference MoO and its sequels quite a lot, hope it doesn't bother devs too much, MoO II had planetary shields that had increased shield_damage_negation compared to ship shields
this change can accomplish that (I top shield_damage_negation at 10 for Aegis (MoO II Class X Shields), Planetary Barrier Shields were negating 20 damage), so SiS planetary Aegis is 20 damage negation
also any beam (direct?) weapon damage to planet was reduced to 50% (if I remember correctly) ... I am not sure about missiles and torpedoes
this will apply 30% reduction of weapon damage to planetary defenses for any weapon (I want to reduce damage after damage negation, just to make sure damage reduction is not too much)
this can swings things little too much towards planetary defenses advantage, needs to be tested for balance (we don't have planetary bombs MoO II had), we may need to change that damage reduction to only weapons that are (is_beam,is_kinetic,is_direct, ...) only, i.e.
I know we reference MoO and its sequels quite a lot, hope it doesn't bother devs too much, MoO II had planetary shields that had increased shield_damage_negation compared to ship shields
this change can accomplish that (I top shield_damage_negation at 10 for Aegis (MoO II Class X Shields), Planetary Barrier Shields were negating 20 damage), so SiS planetary Aegis is 20 damage negation
Code: Select all
-- *** Shield damage negation ***
function ShipProperty.shield_damage_negation(ship)
local max_negation = 0
for s in systems(ship)
if (s.health > s.damage) and s.shield_damage_negation
max_negation=max(max_negation, s.shield_damage_negation)
end
end
if ship.is_planet then max_negation=max_negation*2 end
return max_negation
end
Code: Select all
function deal_damage(weapon, damage, ship, shield)
damage = damage - ship.shield_damage_negation
this will apply 30% reduction of weapon damage to planetary defenses for any weapon (I want to reduce damage after damage negation, just to make sure damage reduction is not too much)
Code: Select all
function deal_damage(weapon, damage, ship, shield)
damage = damage - ship.shield_damage_negation
if ship.is_planet then damage=damage*.7 end
Code: Select all
if ship.is_planet and weapon.is_direct then damage=damage*.7 end