WIP breach turret

This commit is contained in:
Anuken
2021-10-23 14:35:37 -04:00
parent 553333b656
commit 693e420074
10 changed files with 89 additions and 7 deletions
+38
View File
@@ -89,6 +89,9 @@ public class Blocks implements ContentList{
//turrets
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
//turrets - erekir
breach,
//units
commandCenter,
groundFactory, airFactory, navalFactory,
@@ -2120,6 +2123,41 @@ public class Blocks implements ContentList{
consumes.add(new ConsumeCoolant(0.5f)).update(false);
}};
breach = new ItemTurret("breach"){{
requirements(Category.turret, with(Items.beryllium, 35), true);
ammo(
Items.beryllium, new BasicBulletType(7f, 20){{
width = 8f;
height = 14f;
shootEffect = Fx.berylSpark;
smokeEffect = Fx.shootBigSmoke;
ammoMultiplier = 2;
pierce = true;
pierceBuilding = true;
hitColor = backColor = trailColor = Pal.berylShot;
frontColor = Color.white;
trailWidth = 1.5f;
trailLength = 10;
//TODO different effect?
hitEffect = despawnEffect = Fx.hitBulletColor;
}}
);
shootLength = 0.5f;
outlineColor = Color.valueOf("2d2f39");
size = 2;
envEnabled |= Env.space;
basePrefix = "reinforced";
reloadTime = 40f;
restitution = 0.03f;
range = 180;
shootCone = 3f;
health = 300 * size * size;
rotateSpeed = 2f;
limitRange();
}};
//endregion
//region units
+29 -2
View File
@@ -437,6 +437,24 @@ public class Fx{
Drawf.light(e.x, e.y, 20f, Pal.lightOrange, 0.6f * e.fout());
}),
hitBulletColor = new Effect(14, e -> {
color(Color.white, e.color, e.fin());
e.scaled(7f, s -> {
stroke(0.5f + s.fout());
Lines.circle(e.x, e.y, s.fin() * 5f);
});
stroke(0.5f + e.fout());
randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
Drawf.light(e.x, e.y, 20f, e.color, 0.6f * e.fout());
}),
hitFuse = new Effect(14, e -> {
color(Color.white, Pal.surge, e.fin());
@@ -981,7 +999,7 @@ public class Fx{
}),
muddy = new Effect(80f, e -> {
color(Color.valueOf("432722"));
color(Pal.muddy);
alpha(Mathf.clamp(e.fin() * 2f));
Fill.circle(e.x, e.y, e.fout());
@@ -1300,6 +1318,15 @@ public class Fx{
});
}),
berylSpark = new Effect(21f, e -> {
color(Color.white, Pal.berylShot, e.fin());
stroke(e.fout() * 1.1f + 0.5f);
randLenVectors(e.id, 5, 27f * e.fin(), e.rotation, 9f, (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 5f + 0.5f);
});
}),
shootPayloadDriver = new Effect(30f, e -> {
color(Pal.accent);
Lines.stroke(0.5f + 0.5f*e.fout());
@@ -1620,7 +1647,7 @@ public class Fx{
plasticburn = new Effect(40, e -> {
randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> {
color(Color.valueOf("e9ead3"), Color.gray, e.fin());
color(Pal.plasticBurn, Color.gray, e.fin());
Fill.circle(e.x + x, e.y + y, e.fout());
});
}),