Difficulty display / More starting resources / Recipe tweaks
This commit is contained in:
@@ -2,6 +2,7 @@ package io.anuke.mindustry.maps;
|
||||
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.game.Difficulty;
|
||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.maps.missions.Mission;
|
||||
@@ -35,6 +36,19 @@ public class Sector{
|
||||
/**Items the player starts with on this sector.*/
|
||||
public transient Array<ItemStack> startingItems;
|
||||
|
||||
/**Returns scaled difficulty. This is not just the difficulty ordinal.*/
|
||||
public Difficulty getDifficulty(){
|
||||
if(difficulty == 0){
|
||||
return Difficulty.easy;
|
||||
}else if(difficulty < 4){
|
||||
return Difficulty.normal;
|
||||
}else if(difficulty < 9){
|
||||
return Difficulty.hard;
|
||||
}else{
|
||||
return Difficulty.insane;
|
||||
}
|
||||
}
|
||||
|
||||
public Mission currentMission(){
|
||||
return missions.get(Math.min(completedMissions, missions.size - 1));
|
||||
}
|
||||
|
||||
@@ -149,18 +149,19 @@ public class Sectors{
|
||||
//add all ores for now since material differences aren't well handled yet
|
||||
sector.ores.addAll(Items.tungsten, Items.coal, Items.lead, Items.thorium, Items.titanium);
|
||||
|
||||
//set starter items
|
||||
if(sector.difficulty > 12){ //now with titanium
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 600), new ItemStack(Items.lead, 450), new ItemStack(Items.carbide, 400), new ItemStack(Items.silicon, 250), new ItemStack(Items.titanium, 150));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 150), new ItemStack(Items.lead, 460), new ItemStack(Items.carbide, 440), new ItemStack(Items.silicon, 440), new ItemStack(Items.titanium, 200));
|
||||
}else if(sector.difficulty > 8){ //just more resources
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 450), new ItemStack(Items.lead, 350), new ItemStack(Items.carbide, 250), new ItemStack(Items.silicon, 160));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 1200), new ItemStack(Items.lead, 360), new ItemStack(Items.carbide, 280), new ItemStack(Items.silicon, 220));
|
||||
}else if(sector.difficulty > 5){ //now with silicon
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 350), new ItemStack(Items.lead, 250), new ItemStack(Items.carbide, 150), new ItemStack(Items.silicon, 80));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 800), new ItemStack(Items.lead, 260), new ItemStack(Items.carbide, 160), new ItemStack(Items.silicon, 110));
|
||||
}else if(sector.difficulty > 3){ //now with carbide
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 220), new ItemStack(Items.lead, 160), new ItemStack(Items.carbide, 70));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 500), new ItemStack(Items.lead, 170), new ItemStack(Items.carbide, 80));
|
||||
}else if(sector.difficulty > 1){ //more starter items for faster start
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 170), new ItemStack(Items.lead, 110));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 300), new ItemStack(Items.lead, 130));
|
||||
}else{ //base starting items to prevent grinding much
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 50));
|
||||
sector.startingItems = Array.with(new ItemStack(Items.tungsten, 100), new ItemStack(Items.lead, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,8 @@ package io.anuke.mindustry.maps.missions;
|
||||
import com.badlogic.gdx.math.GridPoint2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.game.Difficulty;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.mindustry.maps.generation.FortressGenerator;
|
||||
import io.anuke.mindustry.maps.generation.Generation;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
@@ -14,12 +12,6 @@ import io.anuke.ucore.util.Bundles;
|
||||
|
||||
public class BattleMission implements Mission{
|
||||
private final static int coreX = 60, coreY = 60;
|
||||
|
||||
@Override
|
||||
public Difficulty getDifficulty(Sector sector){
|
||||
return Difficulty.normal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void display(Table table){
|
||||
table.add("$text.mission.battle");
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.maps.missions;
|
||||
import com.badlogic.gdx.math.GridPoint2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
||||
import io.anuke.mindustry.game.Difficulty;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.game.SpawnGroup;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
@@ -15,7 +14,6 @@ public interface Mission{
|
||||
boolean isComplete();
|
||||
String displayString();
|
||||
GameMode getMode();
|
||||
Difficulty getDifficulty(Sector sector);
|
||||
void display(Table table);
|
||||
|
||||
default Array<SpawnGroup> getWaves(Sector sector){
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package io.anuke.mindustry.maps.missions;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.game.Difficulty;
|
||||
import io.anuke.mindustry.game.GameMode;
|
||||
import io.anuke.mindustry.maps.Sector;
|
||||
import io.anuke.mindustry.type.Item;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
@@ -17,11 +15,6 @@ public class ResourceMission implements Mission{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Difficulty getDifficulty(Sector sector){
|
||||
return Difficulty.normal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void display(Table table){
|
||||
|
||||
|
||||
@@ -17,19 +17,6 @@ public class WaveMission implements Mission{
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Difficulty getDifficulty(Sector sector){
|
||||
if(sector.difficulty == 0){
|
||||
return Difficulty.easy;
|
||||
}else if(sector.difficulty < 4){
|
||||
return Difficulty.normal;
|
||||
}else if(sector.difficulty < 9){
|
||||
return Difficulty.hard;
|
||||
}else{
|
||||
return Difficulty.insane;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Array<SpawnGroup> getWaves(Sector sector){
|
||||
Array<SpawnGroup> spawns = new Array<>();
|
||||
|
||||
Reference in New Issue
Block a user