Update 3 files
- /data/scripts/lib/weapongenerator.lua - /data/scripts/lib/turretgenerator.lua - /data/scripts/lib/turretingredients.lua
This commit is contained in:
@@ -112,6 +112,7 @@ else
|
||||
}
|
||||
end
|
||||
|
||||
-- ===========================================================================================================================================================
|
||||
function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, rarity)
|
||||
local result = TurretTemplate()
|
||||
|
||||
@@ -127,14 +128,10 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
||||
local weapon = WeaponGenerator.generateSmartCannon(rand, dps, tech, material, rarity)
|
||||
weapon.fireDelay = weapon.fireDelay * numWeapons
|
||||
|
||||
local name = "Smart-Cannon /* weapon name*/"%_T
|
||||
|
||||
local specType = rand:getInt(0, 2)
|
||||
if specType == 1 then
|
||||
name = "Ionized Smart-Cannon /* weapon name*/"%_T
|
||||
if specType == 1 then
|
||||
weapon.shieldPenetration = 1
|
||||
elseif specType == 2 then
|
||||
name = "Plasmed Smart-Cannon /* weapon name*/"%_T
|
||||
weapon.damageType = DamageType.Plasma
|
||||
weapon.damage = weapon.damage * 0.9
|
||||
end
|
||||
@@ -152,8 +149,14 @@ function TurretGenerator.generateSmartCannonTurret(rand, dps, tech, material, ra
|
||||
result.slotType = TurretSlotType.Armed
|
||||
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)
|
||||
|
||||
return result
|
||||
@@ -162,6 +165,7 @@ end
|
||||
generatorFunction[WeaponType.SmartCannon] = TurretGenerator.generateSmartCannonTurret
|
||||
|
||||
|
||||
-- ===========================================================================================================================================================
|
||||
function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, rarity)
|
||||
local result = TurretTemplate()
|
||||
|
||||
@@ -202,11 +206,15 @@ function TurretGenerator.generateHeavyCannonTurret(rand, dps, tech, material, ra
|
||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||
|
||||
if result.size >= 4 then
|
||||
name = "Mons Meg /* weapon name*/"%_T
|
||||
name = "Mass Driver /* weapon name*/"%_T
|
||||
weapom.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.2
|
||||
end
|
||||
|
||||
if result.size >= 5 then
|
||||
name = "Dulle Griet /* weapon name*/"%_T
|
||||
name = "Mass Warper /* weapon name*/"%_T
|
||||
weapom.speed = weapon.speed * 2
|
||||
weapon.reach = weapon.reach * 1.5
|
||||
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)
|
||||
@@ -217,6 +225,7 @@ end
|
||||
generatorFunction[WeaponType.HeavyCannon] = TurretGenerator.generateHeavyCannonTurret
|
||||
|
||||
|
||||
-- ===========================================================================================================================================================
|
||||
function TurretGenerator.generateDiffuserTurret(rand, dps, tech, material, rarity)
|
||||
local result = TurretTemplate()
|
||||
|
||||
@@ -257,6 +266,7 @@ end
|
||||
generatorFunction[WeaponType.Diffuser] = TurretGenerator.generateDiffuserTurret
|
||||
|
||||
|
||||
-- ===========================================================================================================================================================
|
||||
function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity)
|
||||
local result = TurretTemplate()
|
||||
|
||||
@@ -271,6 +281,13 @@ function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity
|
||||
|
||||
local weapon = WeaponGenerator.generateHookgun(rand, dps, tech, material, rarity)
|
||||
weapon.damage = weapon.damage / numWeapons
|
||||
|
||||
local spec = rand(0.5)
|
||||
|
||||
if spec then
|
||||
weapon.holdingForce = weapon.otherForce * 2
|
||||
weapon.otherForce = 0
|
||||
end
|
||||
|
||||
-- attach weapons to turret
|
||||
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
|
||||
@@ -289,6 +306,11 @@ function TurretGenerator.generateHookgunTurret(rand, dps, tech, material, rarity
|
||||
local name = "Hookgun /* weapon name*/"%_T
|
||||
|
||||
local dmgAdjective, outerAdjective, barrel, multishot, coax, serial = makeTitleParts(rand, specialties, result, DamageType.Physical)
|
||||
|
||||
if spec then
|
||||
outerAdjective = "Stabilizing"%_T
|
||||
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)
|
||||
|
||||
return result
|
||||
@@ -297,7 +319,7 @@ end
|
||||
generatorFunction[WeaponType.Hookgun] = TurretGenerator.generateHookgunTurret
|
||||
|
||||
|
||||
|
||||
-- ===========================================================================================================================================================
|
||||
function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, rarity)
|
||||
local result = TurretTemplate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user