Scepter secondary sounds

This commit is contained in:
Anuken
2025-12-14 19:36:42 -05:00
parent c0c5360d70
commit 5dc1e290e8
4 changed files with 42 additions and 36 deletions

View File

@@ -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<Vec2> 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();

View File

@@ -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;
}}
);
}};