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

@@ -72,6 +72,7 @@ public class Items implements ContentList{
}};
surgeAlloy = new Item("surge-alloy", Color.valueOf("f3e979")){{
cost = 1.2f;
}};
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
//radius around the path that gets counted
int radius = 9;
int radius = 8;
IntSet counted = new IntSet();
for(Tile t : sparse2){
@@ -335,9 +335,9 @@ public class SectorDamage{
info.waveDpsSlope = reg.slope;
//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
info.sumDps = sumDps * 1.3f;
info.sumDps = sumDps * 1.18f;
info.sumRps = sumRps;
info.wavesSurvived = getWavesSurvived(info);

View File

@@ -55,7 +55,7 @@ public class BaseGenerator{
BasePart coreschem = bases.cores.getFrac(difficulty);
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){
tile.clearOverlay();

View File

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

View File

@@ -19,6 +19,7 @@ import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.ui.*;
import mindustry.world.*;
import mindustry.world.consumers.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
@@ -38,6 +39,7 @@ public class LaunchPad extends Block{
solid = true;
update = true;
configurable = true;
drawDisabled = false;
}
@Override
@@ -61,6 +63,12 @@ public class LaunchPad extends Block{
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
public void draw(){
super.draw();

View File

@@ -53,15 +53,12 @@ public class UnitFactory extends UnitBlock{
@Override
public void init(){
capacities = new int[Vars.content.items().size];
itemCapacity = 0;
for(UnitPlan plan : plans){
for(ItemStack stack : plan.requirements){
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();
}