This commit is contained in:
EggleEgg 2025-12-02 21:42:50 +01:00 committed by GitHub
commit 2b01970806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 102 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

View file

@ -938,6 +938,16 @@ public class Fx{
});
}),
hitLancerLow = new Effect(12, e -> {
color(Color.white);
stroke(e.fout() * 1.5f);
randLenVectors(e.id, 4, e.finpow() * 17f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
}),
hitBeam = new Effect(12, e -> {
color(e.color);
stroke(e.fout() * 2f);
@ -1250,6 +1260,33 @@ public class Fx{
Fill.circle(e.x, e.y, e.rotation * e.fout());
}).layer(Layer.bullet - 0.001f),
bulletSparkSmokeTrailSmall = new Effect(28f, e -> {
color(e.color);
rand.setSeed(e.id);
for(int i = 0; i < 3; i++){
float len = rand.random(0.3f, 0.8f);
float angle = rand.random(360f);
Tmp.v1.trns(angle, e.fin() * 10f * len);
float alpha = 0.4f - Math.abs(e.fin() - 0.5f) * 1.5f;
alpha(rand.random(alpha, alpha * 2f));
Fill.circle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, 0.4f + e.fout() * 3.5f);
}
for(int s = 0; s < (int)rand.random(0, 2); s++){
float len = rand.random(0.5f, 1.2f);
float angle = rand.random(360f);
Tmp.v2.trns(angle, e.fin() * 10f * len);
color(Pal.surge, Color.white, e.fin());
alpha(e.fout() * 0.9f);
Lines.stroke(1.5f * e.fout());
Lines.lineAngle(e.x + Tmp.v2.x, e.y + Tmp.v2.y, angle, 2.5f + 3f * e.fout());
}
}),
colorTrail = new Effect(50, e -> {
color(e.color);
Fill.circle(e.x, e.y, e.rotation * e.fout());

View file

@ -14,6 +14,7 @@ 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.*;
@ -203,10 +204,52 @@ public class UnitTypes{
abilities.add(new ShieldRegenFieldAbility(25f, 250f, 60f * 1, 60f));
BulletType smallBullet = new BasicBulletType(3f, 10){{
width = 7f;
height = 9f;
lifetime = 50f;
BulletType smallBullet = new BasicBulletType(12f, 20){{
width = 4.5f;
height = 35f;
lifetime = (26f * tilesize) / 12f;
shrinkX = 0.6f;
shrinkY = 0f;
shrinkInterp = Interp.slope;
trailChance = 10f / 60f;
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);
}};
weapons.add(
@ -226,22 +269,35 @@ public class UnitTypes{
shoot.shots = 3;
shoot.shotDelay = 4f;
bullet = new BasicBulletType(8f, 80){{
bullet = new BasicBulletType(8f, 70){{
width = 11f;
height = 20f;
lifetime = 27f;
shrinkX = 0.4f;
shrinkY = 0f;
shootEffect = Fx.shootBig;
hitEffect = Fx.blastExplosion;
trailParam = 0.5f;
lightning = 2;
lightningLength = 6;
lightningColor = Pal.surge;
//standard bullet damage is far too much for lightning
lightningDamage = 20;
despawnSound = Sounds.sparkBullet;
bulletInterval = 4f;
intervalBullet = new LightningBulletType(){{
damage = 5f;
lightningLength = 3;
lightningLengthRand = 4;
lightningColor = Pal.surge;
hitEffect = Fx.hitLancerLow;
}};
}};
}},
new Weapon("mount-weapon"){{
reload = 13f;
new Weapon("scepter-mount"){{
reload = 12f;
x = 8.5f;
y = 6f;
rotate = true;
@ -249,8 +305,8 @@ public class UnitTypes{
bullet = smallBullet;
shootSound = Sounds.shootDagger;
}},
new Weapon("mount-weapon"){{
reload = 16f;
new Weapon("scepter-mount"){{
reload = 15f;
x = 8.5f;
y = -7f;
rotate = true;