Update 2 files
- /data/scripts/lib/turretgenerator.lua - /data/scripts/lib/weapongenerator.lua
This commit is contained in:
@@ -46,6 +46,7 @@ end
|
||||
generatorFunction[WeaponType.SmartCannon] = WeaponGenerator.generateSmartCannon
|
||||
|
||||
|
||||
|
||||
function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
|
||||
local weapon = Weapon()
|
||||
weapon:setProjectile()
|
||||
@@ -91,6 +92,7 @@ end
|
||||
generatorFunction[WeaponType.HeavyCannon] = WeaponGenerator.generateHeavyCannon
|
||||
|
||||
|
||||
|
||||
function WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
|
||||
local weapon = Weapon()
|
||||
weapon:setBeam()
|
||||
@@ -193,52 +195,51 @@ end
|
||||
|
||||
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
|
||||
|
||||
|
||||
|
||||
function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||
local weapon = Weapon()
|
||||
weapon:setBeam()
|
||||
weapon:setProjectile()
|
||||
|
||||
local fireDelay = rand:getFloat(0.2, 0.5)
|
||||
local reach = rand:getFloat(500, 900)
|
||||
local fireDelay = rand:getFloat(0.5, 1.5)
|
||||
local reach = rand:getFloat(1300, 1800)
|
||||
local damage = dps * fireDelay
|
||||
local speed = rand:getFloat(150, 200)
|
||||
local existingTime = reach / speed
|
||||
|
||||
weapon.fireDelay = fireDelay
|
||||
weapon.appearanceSeed = rand:getInt()
|
||||
weapon.reach = reach
|
||||
weapon.continuousBeam = true
|
||||
weapon.appearance = WeaponAppearance.Cannon
|
||||
weapon.appearanceSeed = rand:getInt()
|
||||
weapon.seeker = rand:test(1 / 8)
|
||||
weapon.appearance = WeaponAppearance.RocketLauncher
|
||||
weapon.name = "HiveLauncher /* Weapon Name*/"%_t
|
||||
weapon.prefix = "HiveLauncher /* Weapon Prefix*/"%_t
|
||||
weapon.icon = "data/textures/icons/hivelauncher.png"
|
||||
weapon.sound = "cannon"
|
||||
weapon.accuracy = 0.99 - rand:getFloat(0, 0.02)
|
||||
|
||||
weapon.blockPenetration = rand:getInt(0, rarity.value) + 2
|
||||
|
||||
|
||||
weapon.otherForce = -500 * dps * rarity.value
|
||||
|
||||
weapon.damage = damage
|
||||
weapon.damageType = DamageType.Physical
|
||||
weapon.impactParticles = ImpactParticles.Physical
|
||||
weapon.shieldDamageMultiplicator = 0.75
|
||||
weapon.stoneDamageMultiplicator = 1.2
|
||||
weapon.hullDamageMultiplicator = 1
|
||||
weapon.impactParticles = ImpactParticles.Explosion
|
||||
weapon.impactSound = 1
|
||||
weapon.impactExplosion = true
|
||||
|
||||
weapon.blength = weapon.reach
|
||||
weapon.bshape = BeamShape.Swirly
|
||||
weapon.bwidth = 0.5
|
||||
weapon.bauraWidth = 3
|
||||
weapon.banimationSpeed = 0
|
||||
weapon.banimationAcceleration = 0
|
||||
weapon.bshapeSize = 13
|
||||
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.pshape = ProjectileShape.Rocket
|
||||
|
||||
-- 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))
|
||||
if rand:test(0.05) then
|
||||
local shots = {2, 2, 2, 2, 2, 3, 4}
|
||||
weapon.shotsFired = shots[rand:getInt(1, #shots)]
|
||||
weapon.damage = (weapon.damage * 1.5) / weapon.shotsFired
|
||||
end
|
||||
|
||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||
|
||||
weapon.recoil = weapon.damage * 2
|
||||
weapon.explosionRadius = math.sqrt(weapon.damage * 5)
|
||||
|
||||
return weapon
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user