Merge branch 'master' of https://github.com/Anuken/Mindustry into maps

 Conflicts:
	core/assets/bundles/bundle_fi.properties
	core/assets/bundles/bundle_th.properties
This commit is contained in:
Epowerj
2022-07-11 17:14:39 -04:00
102 changed files with 2046 additions and 1465 deletions

View File

@@ -92,7 +92,7 @@ public class Blocks{
//defense - erekir
radar,
buildTower,
regenProjector, barrierProjector,
regenProjector, barrierProjector, shockwaveTower,
//campaign only
shieldProjector,
largeShieldProjector,
@@ -136,7 +136,7 @@ public class Blocks{
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
//turrets - erekir
breach, diffuse, sublimate, titan, disperse, afflict, lustre, scathe, ravage,
breach, diffuse, sublimate, titan, disperse, afflict, lustre, scathe, smite, malign,
//units
groundFactory, airFactory, navalFactory,
@@ -1826,6 +1826,13 @@ public class Blocks{
consumePower(4f);
}};
shockwaveTower = new ShockwaveTower("shockwave-tower"){{
requirements(Category.effect, with(Items.surgeAlloy, 50, Items.silicon, 150, Items.oxide, 30, Items.tungsten, 100));
size = 3;
consumeLiquids(LiquidStack.with(Liquids.cyanogen, 1f / 60f));
consumePower(80f / 60f);
}};
//TODO 5x5??
shieldProjector = new BaseShield("shield-projector"){{
requirements(Category.effect, BuildVisibility.editorOnly, with());
@@ -2241,7 +2248,7 @@ public class Blocks{
requirements(Category.power, with(Items.titanium, 5, Items.lead, 10, Items.silicon, 3));
size = 2;
maxNodes = 15;
laserRange = 9.5f;
laserRange = 15f;
}};
surgeTower = new PowerNode("surge-tower"){{
@@ -2438,8 +2445,11 @@ public class Blocks{
size = 3;
ambientSound = Sounds.hum;
ambientSoundVolume = 0.06f;
spinSpeed = 0.6f;
spinners = true;
drawer = new DrawMulti(new DrawDefault(), new DrawBlurSpin("-rotator", 0.6f * 9f){{
blurThresh = 0.01f;
}});
hasLiquids = true;
outputLiquid = new LiquidStack(Liquids.water, 5f / 60f / 9f);
liquidCapacity = 20f;
@@ -4434,8 +4444,8 @@ public class Blocks{
limitRange();
}};
ravage = new ItemTurret("ravage"){{
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.carbide, 250, Items.phaseFabric, 100));
smite = new ItemTurret("smite"){{
requirements(Category.turret, with(Items.oxide, 200, Items.surgeAlloy, 400, Items.silicon, 800, Items.carbide, 500, Items.phaseFabric, 300));
ammo(
//this is really lazy
@@ -4443,7 +4453,6 @@ public class Blocks{
sprite = "large-orb";
width = 17f;
height = 21f;
hitSize = 7f;
hitSize = 8f;
shootEffect = new MultiEffect(Fx.shootTitan, Fx.colorSparkBig, new WaveEffect(){{
@@ -4453,7 +4462,7 @@ public class Blocks{
strokeFrom = 3f;
strokeTo = 0.3f;
}});
smokeEffect = Fx.shootSmokeRavage;
smokeEffect = Fx.shootSmokeSmite;
ammoMultiplier = 1;
pierceCap = 4;
pierce = true;
@@ -4685,7 +4694,7 @@ public class Blocks{
}
}};
shootWarmupSpeed = 0.05f;
shootWarmupSpeed = 0.04f;
shootY = 15f;
outlineColor = Pal.darkOutline;
size = 5;
@@ -4693,7 +4702,7 @@ public class Blocks{
reload = 100f;
recoil = 2f;
range = 300;
shootCone = 7f;
shootCone = 10f;
scaledHealth = 350;
rotateSpeed = 1.5f;
@@ -4701,7 +4710,333 @@ public class Blocks{
limitRange();
}};
//TODO 1 more turret
malign = new PowerTurret("malign"){{
requirements(Category.turret, with(Items.carbide, 400, Items.beryllium, 2000, Items.silicon, 800, Items.graphite, 800, Items.phaseFabric, 300));
var haloProgress = PartProgress.warmup;
Color haloColor = Color.valueOf("d370d3"), heatCol = Color.purple;
float haloY = -15f, haloRotSpeed = 1.5f;
var circleProgress = PartProgress.warmup.delay(0.9f);
var circleColor = haloColor;
float circleY = 25f, circleRad = 11f, circleRotSpeed = 3.5f, circleStroke = 1.6f;
shootType = new FlakBulletType(8f, 80f){{
sprite = "missile-large";
lifetime = 45f;
width = 12f;
height = 22f;
hitSize = 7f;
shootEffect = Fx.shootSmokeSquareBig;
smokeEffect = Fx.shootSmokeDisperse;
ammoMultiplier = 1;
hitColor = backColor = trailColor = lightningColor = circleColor;
frontColor = Color.white;
trailWidth = 3f;
trailLength = 12;
hitEffect = despawnEffect = Fx.hitBulletColor;
buildingDamageMultiplier = 0.3f;
trailEffect = Fx.colorSpark;
trailRotation = true;
trailInterval = 3f;
lightning = 1;
lightningCone = 15f;
lightningLength = 20;
lightningLengthRand = 30;
lightningDamage = 20f;
homingPower = 0.17f;
homingDelay = 19f;
homingRange = 160f;
explodeRange = 160f;
explodeDelay = 0f;
flakInterval = 20f;
despawnShake = 3f;
fragBullet = new LaserBulletType(90f){{
colors = new Color[]{haloColor.cpy().a(0.4f), haloColor, Color.white};
buildingDamageMultiplier = 0.25f;
width = 19f;
hitEffect = Fx.hitLancer;
sideAngle = 175f;
sideWidth = 1f;
sideLength = 40f;
lifetime = 22f;
drawSize = 400f;
length = 180f;
pierceCap = 2;
}};
fragSpread = fragRandomSpread = 0f;
splashDamage = 0f;
hitEffect = Fx.hitSquaresColor;
collidesGround = true;
}};
size = 5;
drawer = new DrawTurret("reinforced-"){{
parts.addAll(
//summoning circle
new ShapePart(){{
progress = circleProgress;
color = circleColor;
circle = true;
hollow = true;
stroke = 0f;
strokeTo = circleStroke;
radius = circleRad;
layer = Layer.effect;
y = circleY;
}},
new ShapePart(){{
progress = circleProgress;
rotateSpeed = -circleRotSpeed;
color = circleColor;
sides = 4;
hollow = true;
stroke = 0f;
strokeTo = circleStroke;
radius = circleRad - 1f;
layer = Layer.effect;
y = circleY;
}},
//outer squares
new ShapePart(){{
progress = circleProgress;
rotateSpeed = -circleRotSpeed;
color = circleColor;
sides = 4;
hollow = true;
stroke = 0f;
strokeTo = circleStroke;
radius = circleRad - 1f;
layer = Layer.effect;
y = circleY;
}},
//inner square
new ShapePart(){{
progress = circleProgress;
rotateSpeed = -circleRotSpeed/2f;
color = circleColor;
sides = 4;
hollow = true;
stroke = 0f;
strokeTo = 2f;
radius = 3f;
layer = Layer.effect;
y = circleY;
}},
//spikes on circle
new HaloPart(){{
progress = circleProgress;
color = circleColor;
tri = true;
shapes = 3;
triLength = 0f;
triLengthTo = 5f;
radius = 6f;
haloRadius = circleRad;
haloRotateSpeed = haloRotSpeed / 2f;
shapeRotation = 180f;
haloRotation = 180f;
layer = Layer.effect;
y = circleY;
}},
//actual turret
new RegionPart("-mouth"){{
heatColor = heatCol;
heatProgress = PartProgress.warmup;
moveY = -8f;
}},
new RegionPart("-end"){{
moveY = 0f;
}},
new RegionPart("-front"){{
heatColor = heatCol;
heatProgress = PartProgress.warmup;
mirror = true;
moveRot = 33f;
moveY = -4f;
moveX = 10f;
}},
new RegionPart("-back"){{
heatColor = heatCol;
heatProgress = PartProgress.warmup;
mirror = true;
moveRot = 10f;
moveX = 2f;
moveY = 5f;
}},
new RegionPart("-mid"){{
heatColor = heatCol;
heatProgress = PartProgress.recoil;
moveY = -9.5f;
}},
new ShapePart(){{
progress = haloProgress;
color = haloColor;
circle = true;
hollow = true;
stroke = 0f;
strokeTo = 2f;
radius = 10f;
layer = Layer.effect;
y = haloY;
}},
new ShapePart(){{
progress = haloProgress;
color = haloColor;
sides = 3;
rotation = 90f;
hollow = true;
stroke = 0f;
strokeTo = 2f;
radius = 4f;
layer = Layer.effect;
y = haloY;
}},
new HaloPart(){{
progress = haloProgress;
color = haloColor;
sides = 3;
shapes = 3;
hollow = true;
stroke = 0f;
strokeTo = 2f;
radius = 3f;
haloRadius = 10f + radius/2f;
haloRotateSpeed = haloRotSpeed;
layer = Layer.effect;
y = haloY;
}},
new HaloPart(){{
progress = haloProgress;
color = haloColor;
tri = true;
shapes = 3;
triLength = 0f;
triLengthTo = 10f;
radius = 6f;
haloRadius = 16f;
haloRotation = 180f;
layer = Layer.effect;
y = haloY;
}},
new HaloPart(){{
progress = haloProgress;
color = haloColor;
tri = true;
shapes = 3;
triLength = 0f;
triLengthTo = 3f;
radius = 6f;
haloRadius = 16f;
shapeRotation = 180f;
haloRotation = 180f;
layer = Layer.effect;
y = haloY;
}},
new HaloPart(){{
progress = haloProgress;
color = haloColor;
sides = 3;
tri = true;
shapes = 3;
triLength = 0f;
triLengthTo = 10f;
shapeRotation = 180f;
radius = 6f;
haloRadius = 16f;
haloRotateSpeed = -haloRotSpeed;
haloRotation = 180f / 3f;
layer = Layer.effect;
y = haloY;
}},
new HaloPart(){{
progress = haloProgress;
color = haloColor;
sides = 3;
tri = true;
shapes = 3;
triLength = 0f;
triLengthTo = 4f;
radius = 6f;
haloRadius = 16f;
haloRotateSpeed = -haloRotSpeed;
haloRotation = 180f / 3f;
layer = Layer.effect;
y = haloY;
}}
);
Color heatCol2 = heatCol.cpy().add(0.1f, 0.1f, 0.1f).mul(1.2f);
for(int i = 1; i < 4; i++){
int fi = i;
parts.add(new RegionPart("-spine"){{
outline = false;
progress = PartProgress.warmup.delay(fi / 5f);
heatProgress = PartProgress.warmup.add(p -> (Mathf.absin(3f, 0.2f) - 0.2f) * p.warmup);
mirror = true;
under = true;
layerOffset = -0.3f;
turretHeatLayer = Layer.turret - 0.2f;
moveY = 9f;
moveX = 1f + fi * 4f;
moveRot = fi * 60f - 130f;
color = Color.valueOf("bb68c3");
heatColor = heatCol2;
moves.add(new PartMove(PartProgress.recoil.delay(fi / 5f), 1f, 0f, 3f));
}});
}
}};
velocityRnd = 0.15f;
heatRequirement = 90f;
maxHeatEfficiency = 2f;
consumePower(5f);
shoot = new ShootSummon(0f, 0f, circleRad, 48f);
minWarmup = 0.96f;
shootWarmupSpeed = 0.03f;
shootY = circleY - 5f;
outlineColor = Pal.darkOutline;
envEnabled |= Env.space;
reload = 8f;
range = 370;
shootCone = 100f;
scaledHealth = 370;
rotateSpeed = 2f;
recoil = 0.5f;
recoilTime = 30f;
shake = 3f;
}};
//endregion
//region units

View File

@@ -161,7 +161,9 @@ public class ErekirTechTree{
node(regenProjector, () -> {
//TODO more tiers of build tower or "support" structures like overdrive projectors
node(buildTower, Seq.with(new OnSector(four)), () -> {
node(shockwaveTower, () -> {
});
});
});
});

View File

@@ -198,6 +198,14 @@ public class Fx{
rect(block.fullIcon, e.x, e.y);
}).layer(Layer.turret - 5f),
pointShockwave = new Effect(20, e -> {
color(e.color);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) ->
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f));
}),
moveCommand = new Effect(20, e -> {
color(Pal.command);
stroke(e.fout() * 5f);
@@ -1611,7 +1619,7 @@ public class Fx{
}
}),
shootSmokeRavage = new Effect(70f, e -> {
shootSmokeSmite = new Effect(70f, e -> {
rand.setSeed(e.id);
for(int i = 0; i < 13; i++){
float a = e.rotation + rand.range(30f);

View File

@@ -30,7 +30,7 @@ public class Items{
cost = 1.5f;
}};
graphite = new Item("graphite", Color.valueOf("95abd9")){{
graphite = new Item("graphite", Color.valueOf("b2c6d2")){{
cost = 1f;
}};