Campaign balance / Smarter power node placement
This commit is contained in:
@@ -593,6 +593,11 @@ sector.tarFields.description = The outskirts of an oil production zone, between
|
|||||||
sector.desolateRift.description = An extremely dangerous zone. Plentiful resources, but little space. High risk of destruction. Leave as soon as possible. Do not be fooled by the long spacing between enemy attacks.
|
sector.desolateRift.description = An extremely dangerous zone. Plentiful resources, but little space. High risk of destruction. Leave as soon as possible. Do not be fooled by the long spacing between enemy attacks.
|
||||||
sector.nuclearComplex.description = A former facility for the production and processing of thorium, reduced to ruins.\n[lightgray]Research the thorium and its many uses.\n\nThe enemy is present here in great numbers, constantly scouting for attackers.
|
sector.nuclearComplex.description = A former facility for the production and processing of thorium, reduced to ruins.\n[lightgray]Research the thorium and its many uses.\n\nThe enemy is present here in great numbers, constantly scouting for attackers.
|
||||||
sector.fungalPass.description = A transition area between high mountains and lower, spore-ridden lands. A small enemy reconnaissance base is located here.\nDestroy it.\nUse Dagger and Crawler units. Take out the two cores.
|
sector.fungalPass.description = A transition area between high mountains and lower, spore-ridden lands. A small enemy reconnaissance base is located here.\nDestroy it.\nUse Dagger and Crawler units. Take out the two cores.
|
||||||
|
sector.biomassFacility.description = The origin of spores. This is the facility in which they were researched and initially produced.\nResearch the technology contained within. Cultivate spores for the production of fuel and plastics.\n\n[lightgray]Upon this facility's demise, the spores were released. Nothing in the local ecosystem could compete with such an invasive organism.
|
||||||
|
sector.windsweptIslands.description = Further past the shoreline is this remote chain of islands. Records show they once had [accent]Plastanium[]-producing structures.\n\nFend off the enemy's naval units. Establish a base on the islands. Research these factories.
|
||||||
|
sector.extractionOutpost.description = A remote outpost, constructed by the enemy for the purpose of launching resources to other sectors.\n\nCross-sector transport technology is essential for further conquest. Destroy the base. Research their Launch Pads.
|
||||||
|
sector.impact0078.description = Here lie remnants of the interstellar transport vessel that first entered this system.\n\nSalvage as much as possible from the wreckage. Research any intact technology.
|
||||||
|
sector.planetaryTerminal.description = The final target.\n\nThis coastal base contains a structure capable of launching Cores to local planets. It is extremely well guarded.\n\nProduce naval units. Eliminate the enemy as quickly as possible. Research the launch structure.
|
||||||
|
|
||||||
settings.language = Language
|
settings.language = Language
|
||||||
settings.data = Game Data
|
settings.data = Game Data
|
||||||
|
|||||||
Binary file not shown.
@@ -17,6 +17,7 @@ import mindustry.gen.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.defense.*;
|
import mindustry.world.blocks.defense.*;
|
||||||
|
import mindustry.world.blocks.distribution.*;
|
||||||
import mindustry.world.blocks.production.*;
|
import mindustry.world.blocks.production.*;
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
import mindustry.world.blocks.storage.CoreBlock.*;
|
||||||
@@ -271,6 +272,10 @@ public class BaseAI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tile o = world.tile(tile.x + p.x, tile.y + p.y);
|
Tile o = world.tile(tile.x + p.x, tile.y + p.y);
|
||||||
|
if(o != null && (o.block() instanceof PayloadAcceptor || o.block() instanceof PayloadConveyor)){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(o != null && o.team() == data.team && !(o.block() instanceof Wall)){
|
if(o != null && o.team() == data.team && !(o.block() instanceof Wall)){
|
||||||
any = true;
|
any = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public class TechTree implements ContentList{
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
node(waterExtractor, () -> {
|
node(waterExtractor, Seq.with(new SectorComplete(saltFlats)), () -> {
|
||||||
node(oilExtractor, () -> {
|
node(oilExtractor, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -340,10 +340,10 @@ public class Waves{
|
|||||||
step += (int)(rand.random(15, 30) * Mathf.lerp(1f, 0.5f, difficulty));
|
step += (int)(rand.random(15, 30) * Mathf.lerp(1f, 0.5f, difficulty));
|
||||||
}
|
}
|
||||||
|
|
||||||
int bossWave = (int)(rand.random(50, 70) * Mathf.lerp(1f, 0.5f, difficulty));
|
int bossWave = (int)(rand.random(50, 70) * Mathf.lerp(1f, 0.75f, difficulty));
|
||||||
int bossSpacing = (int)(rand.random(25, 40) * Mathf.lerp(1f, 0.6f, difficulty));
|
int bossSpacing = (int)(rand.random(25, 40) * Mathf.lerp(1f, 0.6f, difficulty));
|
||||||
|
|
||||||
int bossTier = difficulty < 0.5 ? 3 : 4;
|
int bossTier = difficulty < 0.6 ? 3 : 4;
|
||||||
|
|
||||||
//main boss progression
|
//main boss progression
|
||||||
out.add(new SpawnGroup(Structs.random(species)[bossTier]){{
|
out.add(new SpawnGroup(Structs.random(species)[bossTier]){{
|
||||||
@@ -411,7 +411,7 @@ public class Waves{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//shift back waves on higher difficulty for a harder start
|
//shift back waves on higher difficulty for a harder start
|
||||||
int shift = Math.max((int)(difficulty * 15 - 5), 0);
|
int shift = Math.max((int)(difficulty * 14 - 5), 0);
|
||||||
|
|
||||||
for(SpawnGroup group : out){
|
for(SpawnGroup group : out){
|
||||||
group.begin -= shift;
|
group.begin -= shift;
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
/** Maximum line length. */
|
/** Maximum line length. */
|
||||||
final static int maxLength = 100;
|
final static int maxLength = 100;
|
||||||
final static Rect r1 = new Rect(), r2 = new Rect();
|
final static Rect r1 = new Rect(), r2 = new Rect();
|
||||||
|
final static Seq<Point2> tmpPoints = new Seq<>(), tmpPoints2 = new Seq<>();
|
||||||
|
|
||||||
public final OverlayFragment frag = new OverlayFragment();
|
public final OverlayFragment frag = new OverlayFragment();
|
||||||
|
|
||||||
@@ -1164,27 +1165,39 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
points = Placement.normalizeLine(startX, startY, endX, endY);
|
points = Placement.normalizeLine(startX, startY, endX, endY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(block instanceof PowerNode){
|
if(block instanceof PowerNode node){
|
||||||
Seq<Point2> skip = new Seq<>();
|
var base = tmpPoints2;
|
||||||
|
var result = tmpPoints.clear();
|
||||||
|
|
||||||
for(int i = 1; i < points.size; i++){
|
base.selectFrom(points, p -> p == points.first() || p == points.peek() || Build.validPlace(block, player.team(), p.x, p.y, rotation, false));
|
||||||
int overlaps = 0;
|
boolean addedLast = false;
|
||||||
Point2 point = points.get(i);
|
|
||||||
|
|
||||||
//check with how many powernodes the *next* tile will overlap
|
outer:
|
||||||
for(int j = 0; j < i; j++){
|
for(int i = 0; i < base.size;){
|
||||||
if(!skip.contains(points.get(j)) && ((PowerNode)block).overlaps(world.tile(point.x, point.y), world.tile(points.get(j).x, points.get(j).y))){
|
var point = base.get(i);
|
||||||
overlaps++;
|
result.add(point);
|
||||||
|
if(i == base.size - 1) addedLast = true;
|
||||||
|
|
||||||
|
//find the furthest node that overlaps this one
|
||||||
|
for(int j = base.size - 1; j > i; j--){
|
||||||
|
var other = base.get(j);
|
||||||
|
boolean over = node.overlaps(world.tile(point.x, point.y), world.tile(other.x, other.y));
|
||||||
|
|
||||||
|
if(over){
|
||||||
|
//add node to list and start searching for node that overlaps the next one
|
||||||
|
i = j;
|
||||||
|
continue outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if it's more than one, it can bridge the gap
|
//if it got here, that means nothing was found. try to proceed to the next node anyway
|
||||||
if(overlaps > 1){
|
i ++;
|
||||||
skip.add(points.get(i-1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//remove skipped points
|
|
||||||
points.removeAll(skip);
|
if(!addedLast) result.add(base.peek());
|
||||||
|
|
||||||
|
points.clear();
|
||||||
|
points.addAll(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
float angle = Angles.angle(startX, startY, endX, endY);
|
float angle = Angles.angle(startX, startY, endX, endY);
|
||||||
|
|||||||
@@ -241,35 +241,10 @@ public class Placement{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class NormalizeDrawResult{
|
public static class NormalizeDrawResult{
|
||||||
float x, y, x2, y2;
|
public float x, y, x2, y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class NormalizeResult{
|
public static class NormalizeResult{
|
||||||
public int x, y, x2, y2, rotation;
|
public int x, y, x2, y2, rotation;
|
||||||
|
|
||||||
boolean isX(){
|
|
||||||
return Math.abs(x2 - x) > Math.abs(y2 - y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns length of greater edge of the selection.
|
|
||||||
*/
|
|
||||||
int getLength(){
|
|
||||||
return Math.max(x2 - x, y2 - y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the X position of a specific index along this area as a line.
|
|
||||||
*/
|
|
||||||
int getScaledX(int i){
|
|
||||||
return x + (x2 - x > y2 - y ? i : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the Y position of a specific index along this area as a line.
|
|
||||||
*/
|
|
||||||
int getScaledY(int i){
|
|
||||||
return y + (x2 - x > y2 - y ? 0 : i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ public class Planet extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(sector.hasEnemyBase()){
|
if(sector.hasEnemyBase()){
|
||||||
sum += 1f;
|
sum += 0.88f;
|
||||||
}
|
}
|
||||||
|
|
||||||
sector.threat = sector.preset == null ? Math.min(sum / 5f, 1.2f) : Mathf.clamp(sector.preset.difficulty / 10f);
|
sector.threat = sector.preset == null ? Math.min(sum / 5f, 1.2f) : Mathf.clamp(sector.preset.difficulty / 10f);
|
||||||
|
|||||||
Reference in New Issue
Block a user