Fixed campaign bases having ridiculous wall tiers

This commit is contained in:
Anuken
2020-11-23 15:41:10 -05:00
parent 4a52392ce9
commit ec19381c4e
7 changed files with 17 additions and 11 deletions

View File

@ -1261,7 +1261,7 @@ hint.schematicSelect = Hold [accent][[F][] and drag to select blocks to copy and
hint.conveyorPathfind = Hold [accent][[L-Ctrl][] while dragging conveyors to automatically generate a path. hint.conveyorPathfind = Hold [accent][[L-Ctrl][] while dragging conveyors to automatically generate a path.
hint.conveyorPathfind.mobile = Enable \ue844 [accent]diagonal mode[] and drag conveyors to automatically generate a path. hint.conveyorPathfind.mobile = Enable \ue844 [accent]diagonal mode[] and drag conveyors to automatically generate a path.
hint.boost = Hold [accent][[L-Shift][] to fly over obstacles with your current unit.\n\nOnly a few ground units have boosters. hint.boost = Hold [accent][[L-Shift][] to fly over obstacles with your current unit.\n\nOnly a few ground units have boosters.
hint.command = Press [accent][[G][] to command nearby units into formation. hint.command = Press [accent][[G][] to command nearby units of [accent]similar type[] into formation.\n\nTo command ground units, you must first control another ground unit.
hint.command.mobile = [accent][[Double-tap][] your unit to command nearby units into formation. hint.command.mobile = [accent][[Double-tap][] your unit to command nearby units into formation.
hint.payloadPickup = Press [accent][[[] to pick up small blocks or units. hint.payloadPickup = Press [accent][[[] to pick up small blocks or units.
hint.payloadPickup.mobile = [accent]Tap and hold[] a small block or unit to pick it up. hint.payloadPickup.mobile = [accent]Tap and hold[] a small block or unit to pick it up.

View File

@ -72,6 +72,7 @@ public class Items implements ContentList{
}}; }};
surgeAlloy = new Item("surge-alloy", Color.valueOf("f3e979")){{ surgeAlloy = new Item("surge-alloy", Color.valueOf("f3e979")){{
cost = 1.2f;
}}; }};
sporePod = new Item("spore-pod", Color.valueOf("7457ce")){{ sporePod = new Item("spore-pod", Color.valueOf("7457ce")){{

View File

@ -233,7 +233,7 @@ public class SectorDamage{
//first, calculate the total health of blocks in the path //first, calculate the total health of blocks in the path
//radius around the path that gets counted //radius around the path that gets counted
int radius = 9; int radius = 8;
IntSet counted = new IntSet(); IntSet counted = new IntSet();
for(Tile t : sparse2){ for(Tile t : sparse2){
@ -335,9 +335,9 @@ public class SectorDamage{
info.waveDpsSlope = reg.slope; info.waveDpsSlope = reg.slope;
//enemy units like to aim for a lot of non-essential things, so increase resulting health slightly //enemy units like to aim for a lot of non-essential things, so increase resulting health slightly
info.sumHealth = sumHealth * 1.3f; info.sumHealth = sumHealth * 1.18f;
//players tend to have longer range units/turrets, so assume DPS is higher //players tend to have longer range units/turrets, so assume DPS is higher
info.sumDps = sumDps * 1.3f; info.sumDps = sumDps * 1.18f;
info.sumRps = sumRps; info.sumRps = sumRps;
info.wavesSurvived = getWavesSurvived(info); info.wavesSurvived = getWavesSurvived(info);

View File

@ -55,7 +55,7 @@ public class BaseGenerator{
BasePart coreschem = bases.cores.getFrac(difficulty); BasePart coreschem = bases.cores.getFrac(difficulty);
int passes = difficulty < 0.4 ? 1 : difficulty < 0.8 ? 2 : 3; int passes = difficulty < 0.4 ? 1 : difficulty < 0.8 ? 2 : 3;
Block wall = wallsSmall.getFrac(difficulty), wallLarge = wallsLarge.getFrac(difficulty); Block wall = wallsSmall.getFrac(difficulty * 0.91f), wallLarge = wallsLarge.getFrac(difficulty * 0.91f);
for(Tile tile : cores){ for(Tile tile : cores){
tile.clearOverlay(); tile.clearOverlay();

View File

@ -182,12 +182,12 @@ public class Planet extends UnlockableContent{
float sum = 1f; float sum = 1f;
for(Sector other : sector.near()){ for(Sector other : sector.near()){
if(other.generateEnemyBase){ if(other.generateEnemyBase){
sum += 1f; sum += 0.9f;
} }
} }
if(sector.hasEnemyBase()){ if(sector.hasEnemyBase()){
sum += 1.9f; sum += 1f;
} }
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);

View File

@ -19,6 +19,7 @@ import mindustry.graphics.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.ui.*; import mindustry.ui.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.consumers.*;
import mindustry.world.meta.*; import mindustry.world.meta.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@ -38,6 +39,7 @@ public class LaunchPad extends Block{
solid = true; solid = true;
update = true; update = true;
configurable = true; configurable = true;
drawDisabled = false;
} }
@Override @Override
@ -61,6 +63,12 @@ public class LaunchPad extends Block{
return !state.isCampaign() || net.client() ? SystemCursor.arrow : super.getCursor(); return !state.isCampaign() || net.client() ? SystemCursor.arrow : super.getCursor();
} }
//cannot be disabled
@Override
public float efficiency(){
return power != null && (block.consumes.has(ConsumeType.power) && !block.consumes.getPower().buffered) ? power.status : 1f;
}
@Override @Override
public void draw(){ public void draw(){
super.draw(); super.draw();

View File

@ -53,15 +53,12 @@ public class UnitFactory extends UnitBlock{
@Override @Override
public void init(){ public void init(){
capacities = new int[Vars.content.items().size]; capacities = new int[Vars.content.items().size];
itemCapacity = 0;
for(UnitPlan plan : plans){ for(UnitPlan plan : plans){
for(ItemStack stack : plan.requirements){ for(ItemStack stack : plan.requirements){
capacities[stack.item.id] = Math.max(capacities[stack.item.id], stack.amount * 2); capacities[stack.item.id] = Math.max(capacities[stack.item.id], stack.amount * 2);
itemCapacity = Math.max(itemCapacity, stack.amount * 2);
} }
} }
for(int i : capacities){
itemCapacity += i;
}
super.init(); super.init();
} }