diff --git a/core/assets/sounds/shoot/shootScepterSecondary.ogg b/core/assets/sounds/shoot/shootScepterSecondary.ogg new file mode 100644 index 0000000000..2619ad6454 Binary files /dev/null and b/core/assets/sounds/shoot/shootScepterSecondary.ogg differ diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 3b75ab1437..5caaa4b53b 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -164,6 +164,27 @@ public class Fx{ Lines.circle(e.x, e.y, e.fin() * 6f); }), + hitScepterSecondary = new Effect(8, e -> { + rand.setSeed(e.id); + + for(int i : Mathf.signs){ + color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 1.2f); + Drawf.tri(e.x, e.y, e.fout() * 0.2f + 2f, 5f + 30f * e.fout(), e.rotation + 155f * i); + } + + for(int s = 0; s < rand.random(1, 5); s++){ + float stroke = rand.random(0.5f * e.fin(), e.fin()); + float angle = rand.random(e.rotation - 20f, e.rotation + 20f); + Tmp.v1.trns(angle, rand.random(2f, 40f) * e.fin()); + alpha(e.fout() * rand.random(0.4f, 2f)); + + color(Pal.surge, Color.white, e.fin() * 0.8f); + Lines.stroke(stroke * 1.5f * e.fin() + 0.2f); + Lines.lineAngle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, angle,rand.random(3f, 9f) + 1.5f * e.fin()); + } + + }).layer(Layer.bullet - 1f), + lightning = new Effect(10f, 500f, e -> { if(!(e.data instanceof Seq)) return; Seq lines = e.data(); @@ -1846,6 +1867,20 @@ public class Fx{ Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); }), + shootScepterSecondary = new Effect(4, e -> { + float w = 1.2f + 7 * e.fout(); + + for(int i : Mathf.signs){ + color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 1.5f); + Drawf.tri(e.x, e.y, w, 10f + e.fout() * 2f, e.rotation + i * 90f); + } + + color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 0.5f); + Drawf.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); + Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); + + }).layer(Layer.effect + 1f), + shootTitan = new Effect(10, e -> { color(Pal.lightOrange, e.color, e.fin()); float w = 1.3f + 10 * e.fout(); diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index d8c92a7947..8094474f20 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -14,7 +14,6 @@ import mindustry.entities.abilities.*; import mindustry.entities.bullet.*; import mindustry.entities.effect.*; import mindustry.entities.part.*; -import mindustry.entities.part.DrawPart.PartProgress; import mindustry.entities.pattern.*; import mindustry.gen.*; import mindustry.graphics.*; @@ -220,40 +219,8 @@ public class UnitTypes{ trailColor = Pal.bulletYellowBack; trailEffect = Fx.bulletSparkSmokeTrailSmall; trailSpread = 12f; - shootEffect = new Effect(4, e -> { - float w = 1.2f + 7 * e.fout(); - - for(int i : Mathf.signs){ - color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 1.5f); - Drawf.tri(e.x, e.y, w, 10f + e.fout() * 2f, e.rotation + i * 90f); - } - - color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 0.5f); - Drawf.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); - Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); - - }).layer(Layer.effect + 1f); - - hitEffect = new Effect(8, e -> { - Fx.rand.setSeed(e.id); - - for(int i : Mathf.signs){ - color(Pal.bulletYellow, Pal.bulletYellowBack, e.fout() * 1.2f); - Drawf.tri(e.x, e.y, e.fout() * 0.2f + 2f, 5f + 30f * e.fout(), e.rotation + 155f * i); - } - - for(int s = 0; s < Fx.rand.random(1, 5); s++){ - float rand = Fx.rand.random(0.5f * e.fin(), e.fin()); - float angle = Fx.rand.random(e.rotation - 20f, e.rotation + 20f); - Tmp.v1.trns(angle, Fx.rand.random(2f, 40f) * e.fin()); - alpha(e.fout() * Fx.rand.random(0.4f, 2f)); - - color(Pal.surge, Color.white, e.fin() * 0.8f); - Lines.stroke(rand * 1.5f * e.fin() + 0.2f); - Lines.lineAngle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, angle, Fx.rand.random(3f, 9f) + 1.5f * e.fin()); - } - - }).layer(Layer.bullet - 1f); + shootEffect = Fx.shootScepterSecondary; + hitEffect = Fx.hitScepterSecondary; }}; weapons.add( @@ -307,6 +274,8 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootScepterSecondary; + rotateSpeed = 3f; }}, new Weapon("scepter-mount"){{ reload = 15f; @@ -315,6 +284,8 @@ public class UnitTypes{ rotate = true; ejectEffect = Fx.casing1; bullet = smallBullet; + shootSound = Sounds.shootScepterSecondary; + rotateSpeed = 3f; }} ); }}; diff --git a/gradle.properties b/gradle.properties index ec30b14b41..56c98db055 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=bba30e2f12 +archash=46c0956944