Update 2 files

- /data/scripts/lib/turretgenerator.lua
- /data/scripts/lib/weapongenerator.lua
This commit is contained in:
Alex
2023-09-02 20:07:13 +00:00
parent 59c5f2cb36
commit 577378ae36
2 changed files with 19 additions and 10 deletions

View File

@@ -132,9 +132,15 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
local specType = rand:getInt(0, 2)
if specType == 1 then
weapon.shieldPenetration = 1
if rand:getInt(0, 1) then
weapon.pcolor = ColorHSV(rand:getFloat(180, 210), 0.8, 0.8)
else
weapon.pcolor = ColorHSV(rand:getFloat(260, 290), 0.8, 0.8)
end
elseif specType == 2 then
weapon.damageType = DamageType.Plasma
weapon.damage = weapon.damage * 0.9
weapon.pcolor = ColorHSV(rand:getFloat(90, 120), 0.7, 1)
end
-- attach weapons to turret
@@ -151,12 +157,13 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
result:updateStaticStats()
local name = "Smart-Cannon /* weapon name*/"%_T
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
if specType == 1 then
outerAdjective = "Ionized "%_T
elseif specType == 2 then
outerAdjective = "Plasmed "%_T
weapon.damage = weapon.damage * 0.9
end
result.title = Format("%1%%2%%3%%4%%5%%6%%7% /* [outer-adjective][barrel][coax][dmg-adjective][multishot][name][serial] */"%_T, outerAdjective, barrel, coax, dmgAdjective, multishot, name, serial)
@@ -190,13 +197,17 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra
end
if result.size >= 4 then
weapon.psize = weapon.psize * 1.5
weapon.speed = weapon.speed * 2
weapon.reach = weapon.reach * 1.2
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.7)
end
if result.size >= 5 then
weapon.psize = weapon.psize * 1.5
weapon.speed = weapon.speed * 2
weapon.reach = weapon.reach * 1.5
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.9)
end
-- attach weapons to turret