Skip to content

Commit

Permalink
New map: Conflict, and more
Browse files Browse the repository at this point in the history
Somehow updates with more sectors end up being the most influential.
- Sticker remade into an artillery turret, slightly tweaked sticky bullets as well (this may affect Sticker turret and Citadel boss)
- Insect evolution now takes into account time instead of waves, if waves aren't present on a map
- Discord Rich Presence integration
- Purpur biome now more wet in Lumoni!
- Tier 2 units, Particulator and Simple Reconstructor added to the tech tree
  • Loading branch information
Slotterleet committed Apr 16, 2024
1 parent 27a4cf3 commit c3dbab9
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 109 deletions.
2 changes: 2 additions & 0 deletions res/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ sector.fos-citadel.name = Citadel
sector.fos-citadel.description = This ruined fortress holds a technology for mountable shotguns.
sector.fos-tin-mining-site.name = Tin Mining Site
sector.fos-tin-mining-site.description = Sharded have set up a tin mining site here. However, there is not much tin here in the first place...\n\nDestroy this base and discover a technology for efficient tin mining.
sector.fos-conflict.name = Conflict
sector.fos-conflict.description = A small Sharded outpost is found here.\n\nInsect nests are also present as well. Because of this, both you and Sharded will be threatened by them.\n\nYou may choose to attack Sharded after their defenses have been weakened by the insects.

status.fos-hacked.name = Hacked
status.fos-injected.name = Injected
Expand Down
2 changes: 2 additions & 0 deletions res/bundles/bundle_ru.properties
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ sector.fos-citadel.name = Цитадель
sector.fos-citadel.description = Эта разрушенная крепость хранит в себе технологию для переносных дробовиков.
sector.fos-tin-mining-site.name = Оловянный рудник
sector.fos-tin-mining-site.description = Расколотые устроили здесь базу по добыче олова. Однако, здесь не находится так много олова...\n\nУничтожьте эту базу и раскройте технологию эффективной добычи олова.
sector.fos-conflict.name = Конфликт
sector.fos-conflict.description = Здесь был найден небольшой аванпост Расколотых.\n\nГнезда насекомых также присутствуют, поэтому и Вы, и Расколотые будут находиться под угрозой.\n\nВы можете напасть на Расколотых после того, как их оборона будет ослаблена насекомыми.

status.fos-hacked.name = Взлом
status.fos-injected.name = Инъекция
Expand Down
Binary file added res/maps/conflict.msav
Binary file not shown.
6 changes: 4 additions & 2 deletions settings/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"list": [
{ "multi-crafter-lib": "com.github.liplum:MultiCrafterLib:v1.7" },
{ "zelaux-mod-core-anno": "com.github.Zelaux.ZelauxModCore:annotations:74a5591c36b" },
{ "arc-sdl-binds": "com.github.Anuken.Arc:backend-sdl:v146" }
{ "arc-sdl-binds": "com.github.Anuken.Arc:backend-sdl:v146" },
{ "arc-discord": "com.github.Anuken.Arc:discord:v146" }
],

"deps": {
Expand All @@ -20,7 +21,8 @@
],
"compileOnly": [
"list:zelaux-mod-core-anno",
"list:arc-sdl-binds"
"list:arc-sdl-binds",
"list:arc-discord"
],
"annotationProcessor": [
"list:zelaux-mod-core-anno"
Expand Down
31 changes: 17 additions & 14 deletions src/fos/ai/BugAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import mindustry.world.Tile;
import mindustry.world.meta.BlockFlag;

import static mindustry.Vars.tilesize;

public class BugAI extends AIController implements TargetableAI {
private Bugc bug;

Expand All @@ -21,14 +23,14 @@ public void updateUnit() {
}

if (bug.isFollowed()) {
int followers = Units.count(unit.x, unit.y, 240f, u -> u instanceof Bugc b && b.following() == bug);
int followers = Units.count(unit.x, unit.y, 15f * tilesize, u -> u instanceof Bugc b && b.following() == bug);

if (followers >= 5 + evo() * 30) {
bug.invading(true);
}
} else {
//check for bug swarms nearby
bug.following(Units.closest(unit.team, unit.x, unit.y, 400f, u -> u instanceof Bugc b && b.isFollowed()));
bug.following(Units.closest(unit.team, unit.x, unit.y, 15f * tilesize, u -> u instanceof Bugc b && b.isFollowed()));

//become a swarm leader if none exist, or if this bug is a boss
if (bug.following() == null || bug.isBoss()) bug.isFollowed(true);
Expand All @@ -39,14 +41,15 @@ public void updateUnit() {

@Override
public void updateMovement() {
// FIXME: bugs spinning around for no reason
Tile tile = unit.tileOn();
Tile targetTile = tile;

if (bug.invading() && evo() >= 0.05f) {
target = findTarget(unit.x, unit.y, 1600f, false, true);
target = target(unit.x, unit.y, 25f * tilesize, false, true);

if (target != null) {
if (unit.within(target, 32f)) {
if (unit.within(target, bug.hitSize() * 1.5f)) {
vec.set(target).sub(unit);
vec.setLength(unit.speed());
unit.lookAt(vec);
Expand All @@ -64,7 +67,7 @@ public void updateMovement() {
return;
}

if (!bug.idle()) {
if (!bug.invading() && !bug.idle()) {
//find a random point to walk at
boolean foundTile = false;
while (!foundTile) {
Expand All @@ -86,14 +89,7 @@ public void updateMovement() {
}

@Override
public Teamc findTarget(float x, float y, float range, boolean air, boolean ground) {
Teamc result = findMainTarget(x, y, range, air, ground);

return checkTarget(result, x, y, range) ? bug.closestEnemyCore() : result;
}

@Override
public Teamc findMainTarget(float x, float y, float range, boolean air, boolean ground) {
public Teamc target(float x, float y, float range, boolean air, boolean ground) {
for(BlockFlag flag : unit.type.targetFlags) {
Teamc target;
if (flag != null) {
Expand All @@ -105,7 +101,14 @@ public Teamc findMainTarget(float x, float y, float range, boolean air, boolean
if (target != null) return target;
}

return Units.closestTarget(unit.team, x, y, range, u -> false, b -> true);
Teamc result = Units.closestTarget(unit.team, x, y, range, u -> false, b -> true);

return checkTarget(result, x, y, range) ? bug.closestEnemyCore() : result;
}

@Override
public boolean keepState() {
return true;
}

private float evo() {
Expand Down
46 changes: 22 additions & 24 deletions src/fos/content/FOSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,38 +544,36 @@ luminium, new BasicBulletType(){{
sticker = new ItemTurret("sticker"){{
scaledHealth = 480;
size = 2;
range = 150;
targetAir = true;
targetGround = false;
range = 360;
targetAir = false;
targetGround = true;
recoil = 0f;
reload = 45f;
inaccuracy = 4f;
outlineColor = Color.valueOf("302326");
shootSound = Sounds.mud;
consumeLiquid(tokicite, 0.1f);
ammo(
tin, new StickyBulletType(3f, 10, 60){{
lifetime = 50f;
tin, new StickyBulletType(8f, 10, 90){{
lifetime = 45f;
width = height = 10f;
trailColor = FOSPal.tinBack;
backColor = FOSPal.tin;
frontColor = FOSPal.tokicite;
trailWidth = 2f;
trailLength = 8;
ammoMultiplier = 2f;
scaleLife = true;
splashDamage = 40;
splashDamageRadius = 12f;
buildingDamageMultiplier = 0.3f;
}},
diamond, new StickyBulletType(3f, 30, 60){{
lifetime = 50f;
diamond, new StickyBulletType(8f, 30, 90){{
lifetime = 45f;
width = height = 10f;
trailColor = FOSPal.diamondBack;
backColor = FOSPal.diamond;
frontColor = FOSPal.tokicite;
trailWidth = 2f;
trailLength = 8;
ammoMultiplier = 3f;
scaleLife = true;
splashDamage = 50;
splashDamageRadius = 16f;
buildingDamageMultiplier = 0.3f;
Expand Down Expand Up @@ -1166,33 +1164,33 @@ diamond, new MissileBulletType(5f, 5){{
requirements(Category.distribution, with(aluminium, 120, lithium, 75, silver, 100, titanium, 125));
envRequired = envEnabled = Env.space;
}};
tinRouter = new Router("tin-router"){{
researchCost = with(tin, 90);
requirements(Category.distribution, with(tin, 3));
tinBelt = new PipeConveyor("tin-belt"){{
health = 10;
speed = 0.05f;
displayedSpeed = 6.9f;
researchCost = with(tin, 30);
requirements(Category.distribution, with(tin, 1));
}};
tinJunction = new Junction("tin-junction"){{
speed = 16f;
researchCost = with(tin, 60);
((Conveyor)tinBelt).junctionReplacement = this;
requirements(Category.distribution, with(tin, 2));
}};
tinRouter = new Router("tin-router"){{
researchCost = with(tin, 90);
requirements(Category.distribution, with(tin, 3));
}};
tinBridge = new BufferedItemBridge("tin-bridge"){{
fadeIn = moveArrows = false;
range = 4;
speed = 44f;
arrowSpacing = 6f;
bufferCapacity = 14;
researchCost = with(tin, 150);
((Conveyor)tinBelt).bridgeReplacement = this;
requirements(Category.distribution, with(tin, 10));
}};
tinBelt = new PipeConveyor("tin-belt"){{
health = 10;
speed = 0.05f;
displayedSpeed = 6.9f;
researchCost = with(tin, 30);
junctionReplacement = tinJunction;
bridgeReplacement = tinBridge;
requirements(Category.distribution, with(tin, 1));
}};
//endregion
//region liquids
fluidPipe = new Conduit("fluid-pipe"){{
Expand Down Expand Up @@ -1549,7 +1547,7 @@ diamond, new MissileBulletType(5f, 5){{
}};
simpleReconstructor = new Reconstructor("simple-reconstructor"){{
scaledHealth = 160;
size = 3;
size = 4;
consumePower(8f);
consumeItems(with(silicon, 50, diamond, 35));
upgrades.addAll(
Expand Down
6 changes: 5 additions & 1 deletion src/fos/content/FOSSectors.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class FOSSectors {
public static SectorPreset
/* Serpulo */ siloTerminal,
/* Lumoni */ awakening, ruins, intruders, citadel, tinMiningSite;
/* Lumoni */ awakening, ruins, intruders, citadel, tinMiningSite, conflict;

public static void load() {
/*
Expand Down Expand Up @@ -41,5 +41,9 @@ public static void load() {
tinMiningSite = new SectorPreset("tin-mining-site", lumoni, 71){{
difficulty = 5;
}};

conflict = new SectorPreset("conflict", lumoni, 18){{
difficulty = 6;
}};
}
}
29 changes: 19 additions & 10 deletions src/fos/content/LumoniTechTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,28 @@ public static void load() {
// UNIT FACTORIES. TODO
node(destroyerFactory, Seq.with(new Objectives.SectorComplete(intruders)), () -> {
node(assault, ItemStack.with(), Seq.with(new Objectives.Research(destroyerFactory)), () -> {
soontm();
node(abrupt, Seq.with(new Objectives.Research(simpleReconstructor)), () -> {
soontm();
});
});
});
node(eliminatorFactory, ItemStack.with(), Seq.with(new Objectives.Research(destroyerFactory)), () -> {
node(radix, ItemStack.with(), Seq.with(new Objectives.Research(eliminatorFactory)), () -> {
soontm();
node(foetus, Seq.with(new Objectives.Research(simpleReconstructor)), () -> {
soontm();
});
});
});
node(injectorFactory, ItemStack.with(), Seq.with(new Objectives.Research(destroyerFactory)), () -> {
node(sergeant, ItemStack.with(), Seq.with(new Objectives.Research(injectorFactory)), () -> {
soontm();
node(lieutenant, Seq.with(new Objectives.Research(simpleReconstructor)), () -> {
soontm();
});
});
});
soontm(); // reconstructor, maybe?
node(simpleReconstructor, Seq.with(new Objectives.OnSector(conflict)), () -> {
soontm();
});

// DRILLS
node(crudeDrill, () -> {
Expand All @@ -106,11 +114,10 @@ public static void load() {
// TURRETS
node(helix, Seq.with(new Objectives.OnSector(ruins)), () -> {
node(sticker, () -> {
soontm();
/*
node(particulator, () ->
node(cluster));
*/
node(particulator, () -> {
soontm();
//node(cluster)
});
});
node(dot, () -> {
soontm();
Expand Down Expand Up @@ -232,7 +239,9 @@ public static void load() {
node(awakening, () -> {
node(ruins, Seq.with(new Objectives.SectorComplete(awakening)), () -> {
node(intruders, Seq.with(new Objectives.SectorComplete(ruins)), () -> {
soontm();
node(conflict, Seq.with(new Objectives.SectorComplete(intruders)), () -> {
soontm();
});
});
node(FOSSectors.citadel, Seq.with(new Objectives.SectorComplete(ruins)), () -> {
soontm();
Expand Down
3 changes: 2 additions & 1 deletion src/fos/controllers/EvolutionController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import arc.Events;
import arc.struct.ObjectFloatMap;
import arc.util.Time;
import fos.content.*;
import fos.core.FOSVars;
import mindustry.ctype.UnlockableContent;
Expand Down Expand Up @@ -34,7 +35,7 @@ public EvolutionController() {
}

public float getWaveEvo() {
return state.wave * waveCoefficient;
return state.rules.waves ? state.wave * waveCoefficient : (float)state.tick / 2 / Time.toMinutes * waveCoefficient;
}

public float getFactoryEvo() {
Expand Down
Loading

0 comments on commit c3dbab9

Please sign in to comment.