Regen suppression unit + system

This commit is contained in:
Anuken
2021-12-27 14:46:51 -05:00
parent 19dea507b4
commit dd5ce7e365
11 changed files with 208 additions and 10 deletions

View File

@@ -1447,6 +1447,30 @@ public class Fx{
Fill.square(e.x, e.y, e.fslope() * 1.5f + 0.14f, 45f);
}),
regenSuppressParticle = new Effect(30f, e -> {
color(Pal.sapBullet, e.color, e.fin());
stroke(e.fout() * 1.4f + 0.5f);
randLenVectors(e.id, 4, 17f * e.fin(), (x, y) -> {
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 0.5f);
});
}),
regenSuppressSeek = new Effect(140f, e -> {
e.lifetime = Mathf.randomSeed(e.id, 120f, 200f);
if(!(e.data instanceof Position to)) return;
Tmp.v2.set(to).sub(e.x, e.y).nor().rotate90(1).scl(Mathf.randomSeedRange(e.id, 1f) * 50f);
Tmp.bz2.set(Tmp.v1.set(e.x, e.y), Tmp.v2.add(e.x, e.y), Tmp.v3.set(to));
Tmp.bz2.valueAt(Tmp.v4, e.fout());
color(Pal.sapBullet);
Fill.circle(Tmp.v4.x, Tmp.v4.y, e.fslope() * 2f + 0.1f);
}).followParent(false).rotWithParent(false),
surgeCruciSmoke = new Effect(160f, e -> {
color(Pal.slagOrange);
alpha(0.6f);

View File

@@ -51,7 +51,7 @@ public class UnitTypes{
//air + payload
public static @EntityDef({Unitc.class, Payloadc.class}) UnitType mega,
incite, emanate;
incite, emanate, quell;
//air + payload, legacy
public static @EntityDef(value = {Unitc.class, Payloadc.class}, legacy = true) UnitType quad;
@@ -2502,7 +2502,36 @@ public class UnitTypes{
//endregion
//region erekir - flying
//TODO
//TODO orb, suppress healing
quell = new UnitType("quell"){{
envDisabled = 0;
outlineColor = Pal.darkOutline;
lowAltitude = false;
flying = true;
drag = 0.06f;
speed = 1.1f;
rotateSpeed = 3.5f;
accel = 0.1f;
health = 3000f;
armor = 4f;
hitSize = 36f;
payloadCapacity = Mathf.sqr(3f) * tilePayload;
engineSize = 4.8f;
engineOffset = 61 / 4f;
abilities.add(new SuppressionFieldAbility(){{
orbRadius = 5.3f;
}});
float es = 3.9f;
setEnginesMirror(
new UnitEngine(62 / 4f, -60 / 4f, es, 315f),
new UnitEngine(72 / 4f, -29 / 4f, 3f, 315f)
);
}};
//endregion
//region erekir - neoplasm
@@ -2646,9 +2675,8 @@ public class UnitTypes{
}};
emanate = new UnitType("emanate"){{
//TODO not a real enemy, should not be counted or have flying AI
defaultController = FlyingAI::new;
//isCounted = false;
defaultController = BuilderAI::new;
isCounted = false;
envDisabled = 0;
outlineColor = Pal.darkOutline;