Merge branch 'Anuken:master' into balancing_burst-drill-optional-multiplier

This commit is contained in:
SomeonesShade
2025-02-08 16:28:05 +08:00
committed by GitHub
191 changed files with 10028 additions and 6094 deletions

View File

@@ -163,7 +163,8 @@ public class Blocks{
worldProcessor, worldCell, worldMessage, worldSwitch,
//campaign
launchPad, interplanetaryAccelerator
launchPad, advancedLaunchPad, landingPad,
interplanetaryAccelerator
;
@@ -1006,7 +1007,7 @@ public class Blocks{
outputsLiquid = true;
envEnabled = Env.any;
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(Liquids.water), new DrawLiquidTile(Liquids.cryofluid){{drawLiquidLight = true;}}, new DrawDefault());
liquidCapacity = 24f;
liquidCapacity = 36f;
craftTime = 120;
lightLiquid = Liquids.cryofluid;
@@ -1237,7 +1238,7 @@ public class Blocks{
researchCostMultiplier = 1.1f;
itemCapacity = 0;
liquidCapacity = 40f;
liquidCapacity = 60f;
consumePower(2f);
ambientSound = Sounds.extractLoop;
ambientSoundVolume = 0.06f;
@@ -1295,7 +1296,7 @@ public class Blocks{
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(Liquids.slag), new DrawDefault(), new DrawHeatOutput());
size = 3;
itemCapacity = 0;
liquidCapacity = 40f;
liquidCapacity = 120f;
rotateDraw = false;
regionRotated1 = 1;
ambientSound = Sounds.hum;
@@ -1934,12 +1935,13 @@ public class Blocks{
}};
itemBridge = new BufferedItemBridge("bridge-conveyor"){{
requirements(Category.distribution, with(Items.lead, 6, Items.copper, 6));
requirements(Category.distribution, with(Items.lead, 10, Items.copper, 10));
fadeIn = moveArrows = false;
range = 4;
speed = 74f;
arrowSpacing = 6f;
bufferCapacity = 14;
buildCostMultiplier = 2f;
}};
phaseConveyor = new ItemBridge("phase-conveyor"){{
@@ -2119,13 +2121,14 @@ public class Blocks{
mechanicalPump = new Pump("mechanical-pump"){{
requirements(Category.liquid, with(Items.copper, 15, Items.metaglass, 10));
pumpAmount = 7f / 60f;
liquidCapacity = 20f;
}};
rotaryPump = new Pump("rotary-pump"){{
requirements(Category.liquid, with(Items.copper, 70, Items.metaglass, 50, Items.silicon, 20, Items.titanium, 35));
pumpAmount = 0.2f;
consumePower(0.3f);
liquidCapacity = 30f;
liquidCapacity = 80f;
hasPower = true;
size = 2;
}};
@@ -2134,33 +2137,34 @@ public class Blocks{
requirements(Category.liquid, with(Items.copper, 80, Items.metaglass, 90, Items.silicon, 30, Items.titanium, 40, Items.thorium, 35));
pumpAmount = 0.22f;
consumePower(1.3f);
liquidCapacity = 40f;
liquidCapacity = 200f;
hasPower = true;
size = 3;
}};
conduit = new Conduit("conduit"){{
requirements(Category.liquid, with(Items.metaglass, 1));
liquidCapacity = 20f;
health = 45;
}};
pulseConduit = new Conduit("pulse-conduit"){{
requirements(Category.liquid, with(Items.titanium, 2, Items.metaglass, 1));
liquidCapacity = 16f;
liquidCapacity = 40f;
liquidPressure = 1.025f;
health = 90;
}};
platedConduit = new ArmoredConduit("plated-conduit"){{
requirements(Category.liquid, with(Items.thorium, 2, Items.metaglass, 1, Items.plastanium, 1));
liquidCapacity = 16f;
liquidCapacity = 50f;
liquidPressure = 1.025f;
health = 220;
}};
liquidRouter = new LiquidRouter("liquid-router"){{
requirements(Category.liquid, with(Items.graphite, 4, Items.metaglass, 2));
liquidCapacity = 20f;
liquidCapacity = 120f;
underBullets = true;
solid = false;
}};
@@ -2191,6 +2195,7 @@ public class Blocks{
arrowSpacing = 6f;
range = 4;
hasPower = false;
liquidCapacity = 100f;
}};
phaseConduit = new LiquidBridge("phase-conduit"){{
@@ -2201,6 +2206,7 @@ public class Blocks{
hasPower = true;
canOverdrive = false;
pulse = true;
liquidCapacity = 100f;
consumePower(0.30f);
}};
@@ -2219,19 +2225,17 @@ public class Blocks{
requirements(Category.liquid, with(Items.beryllium, 2));
botColor = Pal.darkestMetal;
leaks = true;
liquidCapacity = 20f;
liquidCapacity = 50f;
liquidPressure = 1.03f;
health = 250;
researchCostMultiplier = 3;
underBullets = true;
}};
//TODO is this necessary? junctions are not good design
//TODO make it leak
reinforcedLiquidJunction = new LiquidJunction("reinforced-liquid-junction"){{
requirements(Category.liquid, with(Items.graphite, 4, Items.beryllium, 8));
buildCostMultiplier = 3f;
health = 260;
health = 250;
((Conduit)reinforcedConduit).junctionReplacement = this;
researchCostMultiplier = 1;
solid = false;
@@ -2242,19 +2246,22 @@ public class Blocks{
requirements(Category.liquid, with(Items.graphite, 8, Items.beryllium, 20));
range = 4;
hasPower = false;
liquidCapacity = 120f;
researchCostMultiplier = 1;
underBullets = true;
health = 250;
((Conduit)reinforcedConduit).rotBridgeReplacement = this;
}};
reinforcedLiquidRouter = new LiquidRouter("reinforced-liquid-router"){{
requirements(Category.liquid, with(Items.graphite, 8, Items.beryllium, 4));
liquidCapacity = 30f;
liquidCapacity = 150f;
liquidPadding = 3f/4f;
researchCostMultiplier = 3;
underBullets = true;
solid = false;
health = 250;
}};
reinforcedLiquidContainer = new LiquidRouter("reinforced-liquid-container"){{
@@ -2264,6 +2271,7 @@ public class Blocks{
liquidPadding = 6f/4f;
researchCostMultiplier = 4;
solid = true;
health = 400;
}};
reinforcedLiquidTank = new LiquidRouter("reinforced-liquid-tank"){{
@@ -2272,15 +2280,17 @@ public class Blocks{
solid = true;
liquidCapacity = 2700f;
liquidPadding = 2f;
health = 900;
}};
//endregion
//region power
powerNode = new PowerNode("power-node"){{
requirements(Category.power, with(Items.copper, 1, Items.lead, 3));
requirements(Category.power, with(Items.copper, 2, Items.lead, 6));
maxNodes = 10;
laserRange = 6;
buildCostMultiplier = 2.5f;
}};
powerNodeLarge = new PowerNode("power-node-large"){{
@@ -2396,17 +2406,18 @@ public class Blocks{
envEnabled = Env.any;
generateEffect = Fx.generatespark;
itemDurationMultipliers.put(Items.phaseFabric, 210f / 14f);
drawer = new DrawMulti(new DrawDefault(), new DrawWarmupRegion());
consume(new ConsumeItemRadioactive());
}};
solarPanel = new SolarGenerator("solar-panel"){{
requirements(Category.power, with(Items.lead, 10, Items.silicon, 15));
powerProduction = 0.1f;
requirements(Category.power, with(Items.lead, 10, Items.silicon, 10));
powerProduction = 0.12f;
}};
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
requirements(Category.power, with(Items.lead, 80, Items.silicon, 110, Items.phaseFabric, 15));
requirements(Category.power, with(Items.lead, 60, Items.silicon, 70, Items.phaseFabric, 15));
size = 3;
powerProduction = 1.6f;
}};
@@ -2433,7 +2444,7 @@ public class Blocks{
itemDuration = 140f;
ambientSound = Sounds.pulse;
ambientSoundVolume = 0.07f;
liquidCapacity = 60f;
liquidCapacity = 80f;
consumePower(25f);
consumeItem(Items.blastCompound);
@@ -2443,12 +2454,13 @@ public class Blocks{
//erekir
beamNode = new BeamNode("beam-node"){{
requirements(Category.power, with(Items.beryllium, 8));
requirements(Category.power, with(Items.beryllium, 10));
consumesPower = outputsPower = true;
health = 90;
range = 10;
fogRadius = 1;
researchCost = with(Items.beryllium, 5);
buildCostMultiplier = 2f;
consumePowerBuffered(1000f);
}};
@@ -2715,7 +2727,7 @@ public class Blocks{
result = Liquids.water;
pumpAmount = 0.11f;
size = 2;
liquidCapacity = 30f;
liquidCapacity = 40f;
rotateSpeed = 1.4f;
attribute = Attribute.water;
envRequired |= Env.groundWater;
@@ -2731,6 +2743,7 @@ public class Blocks{
hasLiquids = true;
hasPower = true;
hasItems = true;
liquidCapacity = 80f;
craftEffect = Fx.none;
envRequired |= Env.spores;
@@ -2757,7 +2770,7 @@ public class Blocks{
updateEffectChance = 0.05f;
pumpAmount = 0.25f;
size = 3;
liquidCapacity = 30f;
liquidCapacity = 40f;
attribute = Attribute.oil;
baseEfficiency = 0f;
itemUseTime = 60f;
@@ -3390,18 +3403,18 @@ public class Blocks{
}};
parallax = new TractorBeamTurret("parallax"){{
requirements(Category.turret, with(Items.silicon, 120, Items.titanium, 90, Items.graphite, 30));
requirements(Category.turret, with(Items.silicon, 160, Items.titanium, 110, Items.graphite, 50));
hasPower = true;
size = 2;
force = 12f;
scaledForce = 6f;
range = 240f;
damage = 0.3f;
force = 16f;
scaledForce = 9f;
range = 300f;
damage = 0.5f;
scaledHealth = 160;
rotateSpeed = 10;
rotateSpeed = 12;
consumePower(3f);
consumePower(3.3f);
}};
swarmer = new ItemTurret("swarmer"){{
@@ -3757,6 +3770,7 @@ public class Blocks{
ammoUseEffect = Fx.casing3Double;
ammoPerShot = 2;
velocityRnd = 0.2f;
scaleLifetimeOffset = 1f / 9f;
recoil = 6f;
shake = 2f;
range = 290f;
@@ -5217,7 +5231,7 @@ public class Blocks{
shake = 6f;
ammoPerShot = 15;
maxAmmo = 30;
maxAmmo = 45;
shootY = -1;
outlineColor = Pal.darkOutline;
size = 4;
@@ -5504,7 +5518,7 @@ public class Blocks{
}};
malign = new PowerTurret("malign"){{
requirements(Category.turret, with(Items.carbide, 400, Items.beryllium, 2000, Items.silicon, 800, Items.graphite, 800, Items.phaseFabric, 300));
requirements(Category.turret, with(Items.carbide, 200, Items.beryllium, 1000, Items.silicon, 500, Items.graphite, 500, Items.phaseFabric, 200));
var haloProgress = PartProgress.warmup;
Color haloColor = Color.valueOf("d370d3"), heatCol = Color.purple;
@@ -5812,26 +5826,26 @@ public class Blocks{
}};
velocityRnd = 0.15f;
heatRequirement = 90f;
heatRequirement = 72f;
maxHeatEfficiency = 2f;
warmupMaintainTime = 120f;
consumePower(10f);
shoot = new ShootSummon(0f, 0f, circleRad, 48f);
consumePower(40f);
unitSort = UnitSorts.strongest;
shoot = new ShootSummon(0f, 0f, circleRad, 20f);
minWarmup = 0.96f;
shootWarmupSpeed = 0.03f;
shootWarmupSpeed = 0.08f;
shootY = circleY - 5f;
outlineColor = Pal.darkOutline;
envEnabled |= Env.space;
reload = 9f;
range = 370;
reload = 7f;
range = 380;
trackingRange = range * 1.4f;
shootCone = 100f;
scaledHealth = 370;
rotateSpeed = 2f;
rotateSpeed = 2.6f;
recoil = 0.5f;
recoilTime = 30f;
shake = 3f;
@@ -6357,17 +6371,42 @@ public class Blocks{
//region campaign
launchPad = new LaunchPad("launch-pad"){{
requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.copper, 350, Items.silicon, 140, Items.lead, 200, Items.titanium, 150));
requirements(Category.effect, BuildVisibility.legacyLaunchPadOnly, with(Items.copper, 350, Items.silicon, 140, Items.lead, 200, Items.titanium, 150));
size = 3;
itemCapacity = 100;
launchTime = 60f * 20;
hasPower = true;
acceptMultipleItems = true;
consumePower(4f);
}};
advancedLaunchPad = new LaunchPad("advanced-launch-pad"){{
requirements(Category.effect, BuildVisibility.notLegacyLaunchPadOnly, with(Items.copper, 350, Items.silicon, 250, Items.lead, 300, Items.titanium, 200));
size = 4;
itemCapacity = 100;
launchTime = 60f * 30;
liquidCapacity = 40f;
hasPower = true;
drawLiquid = Liquids.oil;
consumeLiquid(Liquids.oil, 9f/60f);
consumePower(8f);
}};
landingPad = new LandingPad("landing-pad"){{
requirements(Category.effect, BuildVisibility.notLegacyLaunchPadOnly, with(Items.copper, 200, Items.graphite, 100, Items.titanium, 100));
size = 4;
itemCapacity = 100;
coolingEffect = new RadialEffect(Fx.steamCoolSmoke, 4, 90f, 9.5f, 180f);
liquidCapacity = 3000f;
consumeLiquidAmount = 1500f;
}};
interplanetaryAccelerator = new Accelerator("interplanetary-accelerator"){{
requirements(Category.effect, BuildVisibility.hidden, with(Items.copper, 16000, Items.silicon, 11000, Items.thorium, 13000, Items.titanium, 12000, Items.surgeAlloy, 6000, Items.phaseFabric, 5000));
requirements(Category.effect, BuildVisibility.campaignOnly, with(Items.copper, 16000, Items.silicon, 11000, Items.thorium, 13000, Items.titanium, 12000, Items.surgeAlloy, 6000, Items.phaseFabric, 5000));
researchCostMultiplier = 0.1f;
powerBufferRequirement = 1_000_000f;
size = 7;
hasPower = true;
consumePower(10f);

View File

@@ -1474,6 +1474,12 @@ public class Fx{
Lines.circle(e.x, e.y, e.fin() * (e.rotation + 50f));
}),
podLandShockwave = new Effect(12f, 80f, e -> {
color(Pal.accent);
stroke(e.fout() * 2f + 0.2f);
Lines.circle(e.x, e.y, e.fin() * 26f);
}),
explosion = new Effect(30, e -> {
e.scaled(7, i -> {
stroke(3f * i.fout());
@@ -1624,6 +1630,15 @@ public class Fx{
});
}),
steamCoolSmoke = new Effect(35f, e -> {
color(Pal.water, Color.lightGray, e.fin(Interp.pow2Out));
alpha(e.fout(Interp.pow3Out));
randLenVectors(e.id, 4, e.finpow() * 7f, e.rotation, 30f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, Math.max(e.fout(), Math.min(1f, e.fin() * 8f)) * 2.8f);
});
}),
smokePuff = new Effect(30, e -> {
color(e.color);
@@ -2464,6 +2479,12 @@ public class Fx{
});
}),
launchAccelerator = new Effect(22, e -> {
color(Pal.accent);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 160f);
}),
launch = new Effect(28, e -> {
color(Pal.command);
stroke(e.fout() * 2f);
@@ -2568,6 +2589,13 @@ public class Fx{
Fill.circle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, 8f * rand.random(0.6f, 1f) * e.fout(0.2f));
}).layer(Layer.groundUnit + 1f),
podLandDust = new Effect(70f, e -> {
color(e.color, e.fout(0.1f));
rand.setSeed(e.id);
Tmp.v1.trns(e.rotation, e.finpow() * 35f * rand.random(0.2f, 1f));
Fill.circle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, 5f * rand.random(0.6f, 1f) * e.fout(0.2f));
}).layer(Layer.groundUnit + 1f),
unitShieldBreak = new Effect(35, e -> {
if(!(e.data instanceof Unit unit)) return;

View File

@@ -92,7 +92,7 @@ public class Planets{
}};
//TODO names
gier = makeAsteroid("gier", erekir, Blocks.ferricStoneWall, Blocks.carbonWall, 0.4f, 7, 1f, gen -> {
gier = makeAsteroid("gier", erekir, Blocks.ferricStoneWall, Blocks.carbonWall, -5, 0.4f, 7, 1f, gen -> {
gen.min = 25;
gen.max = 35;
gen.carbonChance = 0.6f;
@@ -100,7 +100,7 @@ public class Planets{
gen.berylChance = 0.1f;
});
notva = makeAsteroid("notva", sun, Blocks.ferricStoneWall, Blocks.beryllicStoneWall, 0.55f, 9, 1.3f, gen -> {
notva = makeAsteroid("notva", sun, Blocks.ferricStoneWall, Blocks.beryllicStoneWall, -4, 0.55f, 9, 1.3f, gen -> {
gen.berylChance = 0.8f;
gen.iceChance = 0f;
gen.carbonChance = 0.01f;
@@ -134,6 +134,7 @@ public class Planets{
launchCapacityMultiplier = 0.5f;
sectorSeed = 2;
allowWaves = true;
allowLegacyLaunchPads = true;
allowWaveSimulation = true;
allowSectorInvasion = true;
allowLaunchSchematics = true;
@@ -153,10 +154,11 @@ public class Planets{
atmosphereRadOut = 0.3f;
startSector = 15;
alwaysUnlocked = true;
allowSelfSectorLaunch = true;
landCloudColor = Pal.spore.cpy().a(0.5f);
}};
verilus = makeAsteroid("verlius", sun, Blocks.stoneWall, Blocks.iceWall, 0.5f, 12, 2f, gen -> {
verilus = makeAsteroid("verlius", sun, Blocks.stoneWall, Blocks.iceWall, -1, 0.5f, 12, 2f, gen -> {
gen.berylChance = 0f;
gen.iceChance = 0.6f;
gen.carbonChance = 0.1f;
@@ -164,7 +166,7 @@ public class Planets{
});
}
private static Planet makeAsteroid(String name, Planet parent, Block base, Block tint, float tintThresh, int pieces, float scale, Cons<AsteroidGenerator> cgen){
private static Planet makeAsteroid(String name, Planet parent, Block base, Block tint, int seed, float tintThresh, int pieces, float scale, Cons<AsteroidGenerator> cgen){
return new Planet(name, parent, 0.12f){{
hasAtmosphere = false;
updateLighting = false;
@@ -187,13 +189,13 @@ public class Planets{
Rand rand = new Rand(id + 2);
meshes.add(new NoiseMesh(
this, 0, 2, radius, 2, 0.55f, 0.45f, 14f,
this, seed, 2, radius, 2, 0.55f, 0.45f, 14f,
color, tinted, 3, 0.6f, 0.38f, tintThresh
));
for(int j = 0; j < pieces; j++){
meshes.add(new MatMesh(
new NoiseMesh(this, j + 1, 1, 0.022f + rand.random(0.039f) * scale, 2, 0.6f, 0.38f, 20f,
new NoiseMesh(this, seed + j + 1, 1, 0.022f + rand.random(0.039f) * scale, 2, 0.6f, 0.38f, 20f,
color, tinted, 3, 0.6f, 0.38f, tintThresh),
new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f) * scale)))
);

View File

@@ -19,11 +19,12 @@ public class SerpuloTechTree{
node(junction, () -> {
node(router, () -> {
node(launchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
//no longer necessary to beat the campaign
//node(interplanetaryAccelerator, Seq.with(new SectorComplete(planetaryTerminal)), () -> {
node(advancedLaunchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
node(landingPad, () -> {
node(interplanetaryAccelerator, Seq.with(new SectorComplete(planetaryTerminal)), () -> {
//});
});
});
});
node(distributor);
@@ -523,7 +524,7 @@ public class SerpuloTechTree{
new Research(sei),
new Research(omura),
new Research(spectre),
new Research(launchPad),
new Research(advancedLaunchPad),
new Research(massDriver),
new Research(impactReactor),
new Research(additiveReconstructor),

View File

@@ -99,6 +99,7 @@ public class TechTree{
public TechNode(@Nullable TechNode parent, UnlockableContent content, ItemStack[] requirements){
if(parent != null){
parent.children.add(this);
planet = parent.planet;
researchCostMultipliers = parent.researchCostMultipliers;
}else if(researchCostMultipliers == null){
researchCostMultipliers = new ObjectFloatMap<>();

View File

@@ -610,7 +610,7 @@ public class UnitTypes{
speed = 1f;
hitSize = 8f;
health = 200;
health = 150;
mechSideSway = 0.25f;
range = 40f;
ammoType = new ItemAmmoType(Items.coal);
@@ -629,12 +629,12 @@ public class UnitTypes{
collides = false;
hitSound = Sounds.explosion;
rangeOverride = 30f;
rangeOverride = 25f;
hitEffect = Fx.pulverize;
speed = 0f;
splashDamageRadius = 55f;
splashDamageRadius = 44f;
instantDisappear = true;
splashDamage = 90f;
splashDamage = 80f;
killShooter = true;
hittable = false;
collidesAir = true;