Update 2 files
- /data/scripts/lib/turretgenerator.lua - /data/scripts/lib/weapongenerator.lua
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@ function WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
|
||||
weapon.psize = rand:getFloat(0.2, 0.5)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(20, 45), 0.7, 1)
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
@@ -75,10 +75,10 @@ function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
|
||||
weapon.otherForce = dps*math.max(1, rarity.value)*89*5
|
||||
|
||||
|
||||
weapon.psize = rand:getFloat(0.2, 0.5)
|
||||
weapon.psize = rand:getFloat(1.2, 1.5)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 45), 0.7, 0.4)
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
@@ -183,13 +183,11 @@ function WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
|
||||
weapon.banimationAcceleration = 0
|
||||
weapon.bshapeSize = 13
|
||||
|
||||
-- shades of blue
|
||||
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65))
|
||||
weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65))
|
||||
weapon.bouterColor = ColorHSV(rand:getInt(255, 260), 0,75, rand:getFloat(0.2, 0.25))
|
||||
weapon.binnerColor = ColorHSV(rand:getInt(255, 260), 0,75, rand:getFloat(0.2, 0.25)) -- TODO
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
|
||||
return weapon
|
||||
end
|
||||
|
||||
@@ -204,7 +202,7 @@ function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||
local fireDelay = rand:getFloat(2.2, 3)
|
||||
local reach = rand:getFloat(1300, 1800)
|
||||
local damage = dps * fireDelay
|
||||
local speed = rand:getFloat(150, 200)
|
||||
local speed = rand:getFloat(200, 250)
|
||||
local existingTime = reach / speed
|
||||
|
||||
weapon.fireDelay = fireDelay
|
||||
@@ -227,7 +225,7 @@ function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||
weapon.psize = rand:getFloat(0.2, 0.4)
|
||||
weapon.pmaximumTime = existingTime
|
||||
weapon.pvelocity = speed
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||
weapon.pcolor = ColorHSV(rand:getFloat(20, 40), 0.8, rand:getFloat(0.25, 0.75))
|
||||
weapon.pshape = ProjectileShape.Rocket
|
||||
|
||||
if rand:test(1) then
|
||||
|
||||
Reference in New Issue
Block a user