diff --git a/core/src/mindustry/entities/comp/WeaponsComp.java b/core/src/mindustry/entities/comp/WeaponsComp.java index d826ba555f..08d87081f6 100644 --- a/core/src/mindustry/entities/comp/WeaponsComp.java +++ b/core/src/mindustry/entities/comp/WeaponsComp.java @@ -166,14 +166,15 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ Weapon weapon = mount.weapon; float baseX = this.x, baseY = this.y; + boolean delay = weapon.firstShotDelay > 0f; - weapon.shootSound.at(x, y, Mathf.random(0.8f, 1.0f)); + (delay ? weapon.chargeSound : weapon.shootSound).at(x, y, Mathf.random(0.8f, 1.0f)); BulletType ammo = weapon.bullet; float lifeScl = ammo.scaleVelocity ? Mathf.clamp(Mathf.dst(x, y, aimX, aimY) / ammo.range()) : 1f; sequenceNum = 0; - if(weapon.shotDelay + weapon.firstShotDelay > 0.01f){ + if(delay){ Angles.shotgun(weapon.shots, weapon.spacing, rotation, f -> { Time.run(sequenceNum * weapon.shotDelay + weapon.firstShotDelay, () -> { if(!isAdded()) return; @@ -187,13 +188,14 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc, Statusc{ boolean parentize = ammo.keepVelocity; - if(weapon.firstShotDelay > 0){ + if(delay){ Time.run(weapon.firstShotDelay, () -> { if(!isAdded()) return; vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil)); Effect.shake(weapon.shake, weapon.shake, x, y); mount.heat = 1f; + weapon.shootSound.at(x, y, Mathf.random(0.8f, 1.0f)); }); }else{ vel.add(Tmp.v1.trns(rotation + 180f, ammo.recoil)); diff --git a/core/src/mindustry/game/DefaultWaves.java b/core/src/mindustry/game/DefaultWaves.java index a889f9d4ba..b5f31a940b 100644 --- a/core/src/mindustry/game/DefaultWaves.java +++ b/core/src/mindustry/game/DefaultWaves.java @@ -266,7 +266,30 @@ public class DefaultWaves{ } } + int bossWave = Mathf.random(30, 60); + int bossSpacing = Mathf.random(30, 50); + //main boss progression + out.add(new SpawnGroup(Structs.random(species)[4]){{ + unitAmount = 1; + begin = bossWave; + spacing = bossSpacing; + end = never; + max = 16; + unitScaling = bossSpacing; + shieldScaling = shieldsPerWave; + }}); + + //alt boss progression + out.add(new SpawnGroup(Structs.random(species)[4]){{ + unitAmount = 1; + begin = bossWave + Mathf.random(4, 6) * bossSpacing; + spacing = bossSpacing; + end = never; + max = 16; + unitScaling = bossSpacing; + shieldScaling = shieldsPerWave; + }}); return out; } diff --git a/core/src/mindustry/type/Weapon.java b/core/src/mindustry/type/Weapon.java index 63a6c33ce7..2038374ad5 100644 --- a/core/src/mindustry/type/Weapon.java +++ b/core/src/mindustry/type/Weapon.java @@ -70,6 +70,8 @@ public class Weapon{ public int otherSide = -1; /** sound used for shooting */ public Sound shootSound = Sounds.pew; + /** sound used for weapons that have a delay */ + public Sound chargeSound = Sounds.none; /** sound played when there is nothing to shoot */ public Sound noAmmoSound = Sounds.click; /** displayed region (autoloaded) */