Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e90ff8f1e2 | ||
|
|
13a688edb3 |
@@ -310,15 +310,26 @@ function TurretGenerator.generateHiveLauncherTurret(rand, dps, tech, material, r
|
|||||||
weapon.damage = weapon.damage / numWeapons
|
weapon.damage = weapon.damage / numWeapons
|
||||||
|
|
||||||
-- attach weapons to turret
|
-- attach weapons to turret
|
||||||
TurretGenerator.attachWeapons(rand, result, weapon, numWeapons)
|
local positions = {}
|
||||||
|
if rand:getBool() then
|
||||||
|
table.insert(positions, vec3(0, 0.3, 0))
|
||||||
|
else
|
||||||
|
table.insert(positions, vec3(0.4, 0.3, 0))
|
||||||
|
table.insert(positions, vec3(-0.4, 0.3, 0))
|
||||||
|
end
|
||||||
|
|
||||||
local rechargeTime = 4 * rand:getFloat(0.8, 1.2)
|
-- attach
|
||||||
local shootingTime = 2 * rand:getFloat(0.8, 1.2)
|
for _, position in pairs(positions) do
|
||||||
TurretGenerator.createBatteryChargeCooling(result, rechargeTime, shootingTime)
|
weapon.localPosition = position * result.size
|
||||||
|
result:addWeapon(weapon)
|
||||||
|
end
|
||||||
|
|
||||||
|
local shootingTime = 20 * rand:getFloat(0.8, 1.2)
|
||||||
|
local coolingTime = 15 * rand:getFloat(0.8, 1.2)
|
||||||
|
TurretGenerator.createStandardCooling(result, coolingTime, shootingTime)
|
||||||
|
|
||||||
TurretGenerator.scale(rand, result, WeaponType.HiveLauncher, tech, 0.75)
|
TurretGenerator.scale(rand, result, WeaponType.RocketLauncher, tech, 0.6, coaxialAllowed)
|
||||||
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.HiveLauncher)
|
local specialties = TurretGenerator.addSpecialties(rand, result, WeaponType.RocketLauncher)
|
||||||
|
|
||||||
result.slotType = TurretSlotType.Armed
|
result.slotType = TurretSlotType.Armed
|
||||||
result:updateStaticStats()
|
result:updateStaticStats()
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ end
|
|||||||
generatorFunction[WeaponType.SmartCannon] = WeaponGenerator.generateSmartCannon
|
generatorFunction[WeaponType.SmartCannon] = WeaponGenerator.generateSmartCannon
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
|
function WeaponGenerator.generateHeavyCannon(rand, dps, tech, material, rarity)
|
||||||
local weapon = Weapon()
|
local weapon = Weapon()
|
||||||
weapon:setProjectile()
|
weapon:setProjectile()
|
||||||
@@ -91,6 +92,7 @@ end
|
|||||||
generatorFunction[WeaponType.HeavyCannon] = WeaponGenerator.generateHeavyCannon
|
generatorFunction[WeaponType.HeavyCannon] = WeaponGenerator.generateHeavyCannon
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
|
function WeaponGenerator.generateDiffuser(rand, dps, tech, material, rarity)
|
||||||
local weapon = Weapon()
|
local weapon = Weapon()
|
||||||
weapon:setBeam()
|
weapon:setBeam()
|
||||||
@@ -193,52 +195,51 @@ end
|
|||||||
|
|
||||||
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
|
generatorFunction[WeaponType.Hookgun] = WeaponGenerator.generateHookgun
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
function WeaponGenerator.generateHiveLauncher(rand, dps, tech, material, rarity)
|
||||||
local weapon = Weapon()
|
local weapon = Weapon()
|
||||||
weapon:setBeam()
|
weapon:setProjectile()
|
||||||
|
|
||||||
local fireDelay = rand:getFloat(0.2, 0.5)
|
local fireDelay = rand:getFloat(0.5, 1.5)
|
||||||
local reach = rand:getFloat(500, 900)
|
local reach = rand:getFloat(1300, 1800)
|
||||||
local damage = dps * fireDelay
|
local damage = dps * fireDelay
|
||||||
|
local speed = rand:getFloat(150, 200)
|
||||||
|
local existingTime = reach / speed
|
||||||
|
|
||||||
weapon.fireDelay = fireDelay
|
weapon.fireDelay = fireDelay
|
||||||
weapon.appearanceSeed = rand:getInt()
|
|
||||||
weapon.reach = reach
|
weapon.reach = reach
|
||||||
weapon.continuousBeam = true
|
weapon.appearanceSeed = rand:getInt()
|
||||||
weapon.appearance = WeaponAppearance.Cannon
|
weapon.seeker = rand:test(1 / 8)
|
||||||
|
weapon.appearance = WeaponAppearance.RocketLauncher
|
||||||
weapon.name = "HiveLauncher /* Weapon Name*/"%_t
|
weapon.name = "HiveLauncher /* Weapon Name*/"%_t
|
||||||
weapon.prefix = "HiveLauncher /* Weapon Prefix*/"%_t
|
weapon.prefix = "HiveLauncher /* Weapon Prefix*/"%_t
|
||||||
weapon.icon = "data/textures/icons/hivelauncher.png"
|
weapon.icon = "data/textures/icons/hivelauncher.png"
|
||||||
weapon.sound = "cannon"
|
weapon.sound = "cannon"
|
||||||
weapon.accuracy = 0.99 - rand:getFloat(0, 0.02)
|
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.damage = damage
|
||||||
weapon.damageType = DamageType.Physical
|
weapon.damageType = DamageType.Physical
|
||||||
weapon.impactParticles = ImpactParticles.Physical
|
weapon.impactParticles = ImpactParticles.Explosion
|
||||||
weapon.shieldDamageMultiplicator = 0.75
|
|
||||||
weapon.stoneDamageMultiplicator = 1.2
|
|
||||||
weapon.hullDamageMultiplicator = 1
|
|
||||||
weapon.impactSound = 1
|
weapon.impactSound = 1
|
||||||
|
weapon.impactExplosion = true
|
||||||
|
|
||||||
weapon.blength = weapon.reach
|
weapon.psize = rand:getFloat(0.2, 0.4)
|
||||||
weapon.bshape = BeamShape.Swirly
|
weapon.pmaximumTime = existingTime
|
||||||
weapon.bwidth = 0.5
|
weapon.pvelocity = speed
|
||||||
weapon.bauraWidth = 3
|
weapon.pcolor = ColorHSV(rand:getFloat(10, 60), 0.7, 1)
|
||||||
weapon.banimationSpeed = 0
|
weapon.pshape = ProjectileShape.Rocket
|
||||||
weapon.banimationAcceleration = 0
|
|
||||||
weapon.bshapeSize = 13
|
|
||||||
|
|
||||||
-- shades of blue
|
if rand:test(1) then
|
||||||
weapon.bouterColor = ColorHSV(0, 0, rand:getFloat(0.35, 0.65))
|
local shots = {2, 2, 2, 2, 2, 3, 4}
|
||||||
weapon.binnerColor = ColorHSV(1, 1, rand:getFloat(0.35, 0.65))
|
weapon.shotsFired = shots[rand:getInt(1, #shots)]
|
||||||
|
weapon.damage = (weapon.damage * 1.5) / weapon.shotsFired
|
||||||
|
end
|
||||||
|
|
||||||
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
WeaponGenerator.adaptWeapon(rand, weapon, tech, material, rarity)
|
||||||
|
|
||||||
|
weapon.recoil = weapon.damage * 2
|
||||||
|
weapon.explosionRadius = math.sqrt(weapon.damage * 5)
|
||||||
|
|
||||||
return weapon
|
return weapon
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user