Playtesting begins: balancing fixes

This commit is contained in:
Anuken
2018-06-21 14:07:20 -04:00
parent 13bb78ffa0
commit a76e99af86
8 changed files with 82 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ public class WaveSpawner {
public void spawnEnemies(){ public void spawnEnemies(){
int spawned = Math.min(state.wave, 6); int spawned = Math.min(state.wave, 6);
int groundGroups = 1 + state.wave / 20; int groundGroups = 1 + state.wave / 20;
int flyGroups = 1 + state.wave / 20; int flyGroups = state.wave / 20;
//add extra groups if necessary //add extra groups if necessary
for (int i = 0; i < groundGroups - groundSpawns.size; i++) { for (int i = 0; i < groundGroups - groundSpawns.size; i++) {

View File

@@ -1,9 +1,7 @@
package io.anuke.mindustry.content; package io.anuke.mindustry.content;
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.content.blocks.DefenseBlocks; import io.anuke.mindustry.content.blocks.*;
import io.anuke.mindustry.content.blocks.DistributionBlocks;
import io.anuke.mindustry.content.blocks.WeaponBlocks;
import io.anuke.mindustry.game.Content; import io.anuke.mindustry.game.Content;
import io.anuke.mindustry.type.ContentList; import io.anuke.mindustry.type.ContentList;
import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.type.ItemStack;
@@ -31,13 +29,35 @@ public class Recipes implements ContentList{
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.iron, 4), new ItemStack(Items.lead, 4)); new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.iron, 4), new ItemStack(Items.lead, 4));
new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4)); new Recipe(distribution, DistributionBlocks.splitter, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 4));
new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.steel, 4)); new Recipe(distribution, DistributionBlocks.overflowgate, new ItemStack(Items.steel, 4));
new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.steel, 8), new ItemStack(Items.iron, 8));
new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.iron, 40), new ItemStack(Items.lead, 30));
new Recipe(crafting, CraftingBlocks.siliconsmelter, new ItemStack(Items.iron, 60), new ItemStack(Items.steel, 60), new ItemStack(Items.lead, 50));
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.iron, 60), new ItemStack(Items.steel, 60), new ItemStack(Items.lead, 50));
new Recipe(power, PowerBlocks.powernode, new ItemStack(Items.iron, 2), new ItemStack(Items.lead, 6));
//new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3));
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.iron, 8), new ItemStack(Items.lead, 30));
//new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.iron, 30), new ItemStack(Items.lead, 30));
//new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.steel, 50)); //new Recipe(distribution, StorageBlocks.vault, new ItemStack(Items.steel, 50));
//new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.steel, 50)); //new Recipe(distribution, StorageBlocks.core, new ItemStack(Items.steel, 50));
//new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.steel, 5)); //new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.steel, 5));
//new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.steel, 5)); //new Recipe(distribution, StorageBlocks.sortedunloader, new ItemStack(Items.steel, 5));
new Recipe(distribution, DistributionBlocks.bridgeconveyor, new ItemStack(Items.steel, 8), new ItemStack(Items.iron, 8)); new Recipe(production, ProductionBlocks.ironDrill, new ItemStack(Items.iron, 15));
new Recipe(production, ProductionBlocks.reinforcedDrill, new ItemStack(Items.iron, 20), new ItemStack(Items.lead, 20));
new Recipe(production, ProductionBlocks.steelDrill, new ItemStack(Items.iron, 40), new ItemStack(Items.lead, 25), new ItemStack(Items.steel, 25));
new Recipe(production, ProductionBlocks.titaniumDrill, new ItemStack(Items.iron, 40), new ItemStack(Items.titanium, 40), new ItemStack(Items.steel, 40));
/*
new Recipe(production, ProductionBlocks.laserdrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.nucleardrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.plasmadrill, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.cultivator, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.waterextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));
new Recipe(production, ProductionBlocks.oilextractor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40));*/
//new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.steel, 5)); //new Recipe(distribution, DistributionBlocks.laserconveyor, new ItemStack(Items.steel, 5));
//new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.steel, 1)); //new Recipe(distribution, DistributionBlocks.massdriver, new ItemStack(Items.steel, 1));
@@ -59,8 +79,6 @@ public class Recipes implements ContentList{
new Recipe(defense, DefenseBlocks.phasewalllarge, new ItemStack(Items.titanium, 1)); new Recipe(defense, DefenseBlocks.phasewalllarge, new ItemStack(Items.titanium, 1));
new Recipe(weapon, WeaponBlocks.wave, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.wave, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.lancer, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.arc, new ItemStack(Items.iron, 1));
@@ -72,9 +90,6 @@ public class Recipes implements ContentList{
new Recipe(weapon, WeaponBlocks.spectre, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.spectre, new ItemStack(Items.iron, 1));
new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.iron, 1)); new Recipe(weapon, WeaponBlocks.meltdown, new ItemStack(Items.iron, 1));
new Recipe(crafting, CraftingBlocks.smelter, new ItemStack(Items.iron, 40));
new Recipe(crafting, CraftingBlocks.arcsmelter, new ItemStack(Items.iron, 40));
new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.steel, 50)); new Recipe(crafting, CraftingBlocks.alloysmelter, new ItemStack(Items.titanium, 50), new ItemStack(Items.steel, 50));
new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30)); new Recipe(crafting, CraftingBlocks.alloyfuser, new ItemStack(Items.steel, 30), new ItemStack(Items.iron, 30));

View File

@@ -18,26 +18,26 @@ public class ProductionBlocks extends BlockList implements ContentList {
public void load() { public void load() {
ironDrill = new Drill("irondrill") {{ ironDrill = new Drill("irondrill") {{
tier = 1; tier = 1;
drillTime = 400; drillTime = 360;
}}; }};
reinforcedDrill = new Drill("reinforceddrill") {{ reinforcedDrill = new Drill("reinforceddrill") {{
tier = 2; tier = 2;
drillTime = 360; drillTime = 320;
}}; }};
steelDrill = new Drill("steeldrill") {{ steelDrill = new Drill("steeldrill") {{
tier = 3; tier = 3;
drillTime = 320; drillTime = 280;
}}; }};
titaniumDrill = new Drill("titaniumdrill") {{ titaniumDrill = new Drill("titaniumdrill") {{
tier = 4; tier = 4;
drillTime = 280; drillTime = 240;
}}; }};
laserdrill = new Drill("laserdrill") {{ laserdrill = new Drill("laserdrill") {{
drillTime = 220; drillTime = 180;
size = 2; size = 2;
powerUse = 0.2f; powerUse = 0.2f;
hasPower = true; hasPower = true;
@@ -47,7 +47,7 @@ public class ProductionBlocks extends BlockList implements ContentList {
}}; }};
nucleardrill = new Drill("nucleardrill") {{ nucleardrill = new Drill("nucleardrill") {{
drillTime = 160; drillTime = 120;
size = 3; size = 3;
powerUse = 0.5f; powerUse = 0.5f;
drawRim = true; drawRim = true;
@@ -62,7 +62,7 @@ public class ProductionBlocks extends BlockList implements ContentList {
plasmadrill = new Drill("plasmadrill") {{ plasmadrill = new Drill("plasmadrill") {{
heatColor = Color.valueOf("ff461b"); heatColor = Color.valueOf("ff461b");
drillTime = 110; drillTime = 90;
size = 4; size = 4;
powerUse = 0.7f; powerUse = 0.7f;
hasLiquids = true; hasLiquids = true;

View File

@@ -57,7 +57,7 @@ public class Logic extends Module {
} }
} }
}else{ }else{
tile.entity.items.addItem(Items.iron, 50); tile.entity.items.addItem(Items.iron, 100);
} }
} }
} }

View File

@@ -252,7 +252,7 @@ public class BlocksFragment implements Fragment{
} }
selectTable.row(); selectTable.row();
selectTable.add(stack).colspan(Category.values().length).padBottom(-5).height((size + 12)*maxrow); selectTable.add(stack).growX().left().top().colspan(Category.values().length).padBottom(-5).height((size + 12)*maxrow);
} }
void toggle(boolean show, float t, Interpolation ip){ void toggle(boolean show, float t, Interpolation ip){

View File

@@ -211,6 +211,13 @@ public class HudFragment implements Fragment{
//if there's currently no unlock notification... //if there's currently no unlock notification...
if(lastUnlockTable == null) { if(lastUnlockTable == null) {
Table table = new Table("button"); Table table = new Table("button");
table.update(() -> {
if(state.is(State.menu)){
table.remove();
lastUnlockLayout = null;
lastUnlockTable = null;
}
});
table.margin(12); table.margin(12);
Table in = new Table(); Table in = new Table();

View File

@@ -23,7 +23,7 @@ public class WorldGenerator {
Array<OreEntry> ores = Array.with( Array<OreEntry> ores = Array.with(
new OreEntry(Blocks.iron, 0.3f, seed), new OreEntry(Blocks.iron, 0.3f, seed),
new OreEntry(Blocks.coal, 0.27f, seed), new OreEntry(Blocks.coal, 0.284f, seed),
new OreEntry(Blocks.lead, 0.28f, seed), new OreEntry(Blocks.lead, 0.28f, seed),
new OreEntry(Blocks.titanium, 0.27f, seed), new OreEntry(Blocks.titanium, 0.27f, seed),
new OreEntry(Blocks.thorium, 0.26f, seed) new OreEntry(Blocks.thorium, 0.26f, seed)

View File

@@ -26,6 +26,10 @@ import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Graphics; import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.graphics.Draw; import io.anuke.ucore.graphics.Draw;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import static io.anuke.mindustry.Vars.threads; import static io.anuke.mindustry.Vars.threads;
public class BuildBlock extends Block { public class BuildBlock extends Block {
@@ -179,6 +183,8 @@ public class BuildBlock extends Block {
//get this as a fraction //get this as a fraction
double fraction = maxUse / (double)required; double fraction = maxUse / (double)required;
accumulator[i] -= recipe.requirements[i].amount*amount*(1-fraction);
//move max progress down if this fraction is less than 1 //move max progress down if this fraction is less than 1
maxProgress = Math.min(maxProgress, maxProgress*fraction); maxProgress = Math.min(maxProgress, maxProgress*fraction);
@@ -203,5 +209,39 @@ public class BuildBlock extends Block {
this.previous = previous; this.previous = previous;
this.accumulator = new double[recipe.requirements.length]; this.accumulator = new double[recipe.requirements.length];
} }
@Override
public void write(DataOutputStream stream) throws IOException {
stream.writeFloat((float)progress);
stream.writeShort(previous == null ? -1 : previous.id);
stream.writeShort(recipe == null ? -1 : recipe.result.id);
if(accumulator == null){
stream.writeByte(-1);
}else{
stream.writeByte(accumulator.length);
for(double d : accumulator){
stream.writeFloat((float)d);
}
}
}
@Override
public void read(DataInputStream stream) throws IOException {
progress = stream.readFloat();
short pid = stream.readShort();
short rid = stream.readShort();
byte acsize = stream.readByte();
if(acsize != -1){
accumulator = new double[acsize];
for (int i = 0; i < acsize; i++) {
accumulator[i] = stream.readFloat();
}
}
if(pid != -1) previous = Block.getByID(pid);
if(rid != -1) recipe = Recipe.getByResult(Block.getByID(rid));
}
} }
} }