From 91acd6b17134c40a262a207b3bc6b81eeca633a7 Mon Sep 17 00:00:00 2001 From: Stiofan-K <108685389+Stiofan-K@users.noreply.github.com> Date: Sun, 6 Apr 2025 19:21:33 +0200 Subject: [PATCH 1/2] siren_dgun_test --- units/shipassault.lua | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/units/shipassault.lua b/units/shipassault.lua index 7edc0da91e..8f3b3392bd 100644 --- a/units/shipassault.lua +++ b/units/shipassault.lua @@ -7,6 +7,7 @@ return { shipassault = { builder = false, buildPic = [[shipassault.png]], canGuard = true, + canManualFire = true, canMove = true, canPatrol = true, category = [[SHIP]], @@ -30,6 +31,7 @@ return { shipassault = { selectionscalemult = 1.18, selectionwidthscalemult = 1.25, selectioninherit = 1, + manualfire_desc = [[Fire Special Weapon: Fire a rocket salvo.]] }, explodeAs = [[BIG_UNITEX]], @@ -79,6 +81,12 @@ return { shipassault = { badTargetCategory = [[SWIM LAND SHIP HOVER]], onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER]], }, + + { + def = [[MISSILE_SALVO]], + badTargetCategory = [[SWIM LAND SHIP HOVER]], + onlyTargetCategory = [[SWIM LAND SINK TURRET FLOAT SHIP HOVER]], + }, }, @@ -176,6 +184,51 @@ return { shipassault = { weaponType = [[StarburstLauncher]], weaponVelocity = 1800, }, + + MISSILE_SALVO = { + name = [[Destroyer Missiles Salvo]], + areaOfEffect = 48, + avoidFeature = false, + avoidFriendly = false, + avoidNeutral = false, + burst = 4, + burstrate = 0.1, + cegTag = [[missiletrailyellow]], + collideFriendly = false, + commandfire = true, + craterBoost = 1, + craterMult = 2, + customParams = { + combatRange = 265, + }, + damage = { + default = 400.01, + }, + + edgeEffectiveness = 0.5, + fireStarter = 100, + fixedLauncher = true, + flightTime = 4, + impulseBoost = 0, + impulseFactor = 0.4, + interceptedByShieldType = 2, + model = [[wep_m_hailstorm.s3o]], + noSelfDamage = true, + range = 800, + reloadtime = 64, + smokeTrail = true, + soundHit = [[weapon/missile/missile_fire12]], + soundStart = [[weapon/missile/missile_fire10]], + startVelocity = 100, + tolerance = 4000, + turnrate = 30000, + turret = true, + --waterWeapon = true, + weaponAcceleration = 300, + weaponTimer = 1, + weaponType = [[StarburstLauncher]], + weaponVelocity = 1800, + }, }, From 1024368d2f1539f9e1bd94489de9362d212b13eb Mon Sep 17 00:00:00 2001 From: StiofanCEOofObamium Date: Sun, 21 Dec 2025 17:24:08 +0100 Subject: [PATCH 2/2] siren dgun missiles Dgun fires a 4 missile salvo of the standard missile. Puts the standard missile on cooldown until the dgun is recharged Also adjusted combat Range so that sirens facing eachother don't stop too far from eachother to use their sonic blasters --- scripts/shipassault.lua | 8 ++++++-- units/shipassault.lua | 11 +++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/shipassault.lua b/scripts/shipassault.lua index 5a818f9c3d..5e212617fd 100644 --- a/scripts/shipassault.lua +++ b/scripts/shipassault.lua @@ -74,6 +74,10 @@ function script.BlockShot(num, targetID) if num == 2 and GG.OverkillPrevention_CheckBlock(unitID, targetID, 400.1, 90, false, false, true) then return true end + if num == 2 then + local reloadState = Spring.GetUnitWeaponState(unitID, 3, 'reloadState') + return not (reloadState and (reloadState < 0 or reloadState < Spring.GetGameFrame())) + end return false end @@ -95,7 +99,7 @@ function script.AimWeapon(num, heading, pitch) WaitForTurn(sleeves, x_axis) StartThread(RestoreAfterDelay) return true - elseif num == 2 then + elseif num == 2 or num == 3 then return true end end @@ -114,7 +118,7 @@ function script.Shot(num) EmitSfx(gunPieces[gun_1].flare, 1024) Move(gunPieces[gun_1].flare, z_axis, 0) StartThread(Recoil, gunPieces[gun_1].barrel) - elseif num == 2 then + elseif num == 2 or num == 3 then missileNum = missileNum + 1 if missileNum > 4 then missileNum = 1 end EmitSfx(missiles[missileNum], 1025) diff --git a/units/shipassault.lua b/units/shipassault.lua index b07fc3ff99..33d13d184d 100644 --- a/units/shipassault.lua +++ b/units/shipassault.lua @@ -104,6 +104,7 @@ return { shipassault = { craterMult = 0, customParams = { + combatRange = 225, force_ignore_ground = [[1]], slot = [[5]], muzzleEffectFire = [[custom:HEAVY_CANNON_MUZZLE]], @@ -148,15 +149,12 @@ return { shipassault = { }, MISSILE = { - name = [[Destroyer Missiles]], + name = [[Destroyer Missile]], areaOfEffect = 48, cegTag = [[missiletrailyellow]], collideFriendly = false, craterBoost = 1, craterMult = 2, - customParams = { - combatRange = 265, - }, damage = { default = 400.01, }, @@ -187,7 +185,7 @@ return { shipassault = { }, MISSILE_SALVO = { - name = [[Destroyer Missiles Salvo]], + name = [[Destroyer Missile Salvo]], areaOfEffect = 48, avoidFeature = false, avoidFriendly = false, @@ -199,9 +197,6 @@ return { shipassault = { commandfire = true, craterBoost = 1, craterMult = 2, - customParams = { - combatRange = 265, - }, damage = { default = 400.01, },