Difficulty display / More starting resources / Recipe tweaks
This commit is contained in:
@@ -48,7 +48,6 @@ text.loadgame=Load Game
|
|||||||
text.joingame=Join Game
|
text.joingame=Join Game
|
||||||
text.addplayers=Add/Remove Players
|
text.addplayers=Add/Remove Players
|
||||||
text.customgame=Custom Game
|
text.customgame=Custom Game
|
||||||
text.campaign=Campaign
|
|
||||||
text.sectors=Sectors
|
text.sectors=Sectors
|
||||||
text.sector=Sector: [LIGHT_GRAY]{0}
|
text.sector=Sector: [LIGHT_GRAY]{0}
|
||||||
text.sector.time=Time: [LIGHT_GRAY]{0}
|
text.sector.time=Time: [LIGHT_GRAY]{0}
|
||||||
|
|||||||
@@ -132,11 +132,11 @@ public class Recipes implements ContentList{
|
|||||||
//new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
|
//new Recipe(units, UpgradeBlocks.deltaFactory, new ItemStack(Items.tungsten, 30), new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 30));
|
||||||
|
|
||||||
//actual unit related stuff
|
//actual unit related stuff
|
||||||
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 130));
|
new Recipe(units, UnitBlocks.dronePad, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 90));
|
||||||
new Recipe(units, UnitBlocks.fabricatorPad, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 60), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 200));
|
new Recipe(units, UnitBlocks.fabricatorPad, new ItemStack(Items.carbide, 70), new ItemStack(Items.thorium, 60), new ItemStack(Items.lead, 90), new ItemStack(Items.silicon, 200));
|
||||||
|
|
||||||
new Recipe(units, UnitBlocks.daggerPad, new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 70));
|
new Recipe(units, UnitBlocks.daggerPad, new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 70));
|
||||||
new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 180));
|
new Recipe(units, UnitBlocks.titanPad, new ItemStack(Items.thorium, 90), new ItemStack(Items.lead, 140), new ItemStack(Items.silicon, 100));
|
||||||
|
|
||||||
new Recipe(units, UnitBlocks.interceptorPad, new ItemStack(Items.titanium, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90));
|
new Recipe(units, UnitBlocks.interceptorPad, new ItemStack(Items.titanium, 40), new ItemStack(Items.lead, 80), new ItemStack(Items.silicon, 90));
|
||||||
new Recipe(units, UnitBlocks.monsoonPad, new ItemStack(Items.plastanium, 70), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220));
|
new Recipe(units, UnitBlocks.monsoonPad, new ItemStack(Items.plastanium, 70), new ItemStack(Items.titanium, 100), new ItemStack(Items.lead, 130), new ItemStack(Items.silicon, 220));
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ public class World extends Module{
|
|||||||
public void loadSector(Sector sector){
|
public void loadSector(Sector sector){
|
||||||
currentSector = sector;
|
currentSector = sector;
|
||||||
state.mode = sector.missions.peek().getMode();
|
state.mode = sector.missions.peek().getMode();
|
||||||
state.difficulty = sector.missions.peek().getDifficulty(sector);
|
state.difficulty = sector.getDifficulty();
|
||||||
Timers.mark();
|
Timers.mark();
|
||||||
Timers.mark();
|
Timers.mark();
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.maps;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
import io.anuke.mindustry.game.Difficulty;
|
||||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||||
import io.anuke.mindustry.game.SpawnGroup;
|
import io.anuke.mindustry.game.SpawnGroup;
|
||||||
import io.anuke.mindustry.maps.missions.Mission;
|
import io.anuke.mindustry.maps.missions.Mission;
|
||||||
@@ -35,6 +36,19 @@ public class Sector{
|
|||||||
/**Items the player starts with on this sector.*/
|
/**Items the player starts with on this sector.*/
|
||||||
public transient Array<ItemStack> startingItems;
|
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(){
|
public Mission currentMission(){
|
||||||
return missions.get(Math.min(completedMissions, missions.size - 1));
|
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
|
//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);
|
sector.ores.addAll(Items.tungsten, Items.coal, Items.lead, Items.thorium, Items.titanium);
|
||||||
|
|
||||||
|
//set starter items
|
||||||
if(sector.difficulty > 12){ //now with titanium
|
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
|
}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
|
}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
|
}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
|
}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
|
}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.math.GridPoint2;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.game.Difficulty;
|
|
||||||
import io.anuke.mindustry.game.GameMode;
|
import io.anuke.mindustry.game.GameMode;
|
||||||
import io.anuke.mindustry.game.Team;
|
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.FortressGenerator;
|
||||||
import io.anuke.mindustry.maps.generation.Generation;
|
import io.anuke.mindustry.maps.generation.Generation;
|
||||||
import io.anuke.ucore.scene.ui.layout.Table;
|
import io.anuke.ucore.scene.ui.layout.Table;
|
||||||
@@ -14,12 +12,6 @@ import io.anuke.ucore.util.Bundles;
|
|||||||
|
|
||||||
public class BattleMission implements Mission{
|
public class BattleMission implements Mission{
|
||||||
private final static int coreX = 60, coreY = 60;
|
private final static int coreX = 60, coreY = 60;
|
||||||
|
|
||||||
@Override
|
|
||||||
public Difficulty getDifficulty(Sector sector){
|
|
||||||
return Difficulty.normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void display(Table table){
|
public void display(Table table){
|
||||||
table.add("$text.mission.battle");
|
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.math.GridPoint2;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
import io.anuke.mindustry.content.blocks.StorageBlocks;
|
||||||
import io.anuke.mindustry.game.Difficulty;
|
|
||||||
import io.anuke.mindustry.game.GameMode;
|
import io.anuke.mindustry.game.GameMode;
|
||||||
import io.anuke.mindustry.game.SpawnGroup;
|
import io.anuke.mindustry.game.SpawnGroup;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
@@ -15,7 +14,6 @@ public interface Mission{
|
|||||||
boolean isComplete();
|
boolean isComplete();
|
||||||
String displayString();
|
String displayString();
|
||||||
GameMode getMode();
|
GameMode getMode();
|
||||||
Difficulty getDifficulty(Sector sector);
|
|
||||||
void display(Table table);
|
void display(Table table);
|
||||||
|
|
||||||
default Array<SpawnGroup> getWaves(Sector sector){
|
default Array<SpawnGroup> getWaves(Sector sector){
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
package io.anuke.mindustry.maps.missions;
|
package io.anuke.mindustry.maps.missions;
|
||||||
|
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.game.Difficulty;
|
|
||||||
import io.anuke.mindustry.game.GameMode;
|
import io.anuke.mindustry.game.GameMode;
|
||||||
import io.anuke.mindustry.maps.Sector;
|
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.ucore.scene.ui.layout.Table;
|
import io.anuke.ucore.scene.ui.layout.Table;
|
||||||
import io.anuke.ucore.util.Bundles;
|
import io.anuke.ucore.util.Bundles;
|
||||||
@@ -17,11 +15,6 @@ public class ResourceMission implements Mission{
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Difficulty getDifficulty(Sector sector){
|
|
||||||
return Difficulty.normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void display(Table table){
|
public void display(Table table){
|
||||||
|
|
||||||
|
|||||||
@@ -17,19 +17,6 @@ public class WaveMission implements Mission{
|
|||||||
this.target = target;
|
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
|
@Override
|
||||||
public Array<SpawnGroup> getWaves(Sector sector){
|
public Array<SpawnGroup> getWaves(Sector sector){
|
||||||
Array<SpawnGroup> spawns = new Array<>();
|
Array<SpawnGroup> spawns = new Array<>();
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ public class SectorsDialog extends FloatingDialog{
|
|||||||
+ (selected.saveID == -1 ? " " + Bundles.get("text.sector.unexplored") :
|
+ (selected.saveID == -1 ? " " + Bundles.get("text.sector.unexplored") :
|
||||||
(selected.hasSave() ? " [accent]/[white] " + Bundles.format("text.sector.time", selected.getSave().getPlayTime()) : ""))));
|
(selected.hasSave() ? " [accent]/[white] " + Bundles.format("text.sector.time", selected.getSave().getPlayTime()) : ""))));
|
||||||
content().row();
|
content().row();
|
||||||
content().label(() -> Bundles.format("text.mission", selected == null || selected.completedMissions >= selected.missions.size ? Bundles.get("text.none") : selected.missions.get(selected.completedMissions).displayString()));
|
content().label(() -> Bundles.format("text.mission", selected == null || selected.completedMissions >= selected.missions.size ? Bundles.get("text.none") : selected.missions.get(selected.completedMissions).displayString())
|
||||||
|
+ " [WHITE]" + (selected == null ? "" : Bundles.format("text.save.difficulty", "[LIGHT_GRAY]" + selected.getDifficulty().toString())));
|
||||||
content().row();
|
content().row();
|
||||||
content().add(new SectorView()).grow();
|
content().add(new SectorView()).grow();
|
||||||
content().row();
|
content().row();
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class MenuFragment extends Fragment{
|
|||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
dialog.content().defaults().height(66f).width(w).padRight(5f);
|
dialog.content().defaults().height(66f).width(w).padRight(5f);
|
||||||
|
|
||||||
dialog.content().add(new MenuButton("icon-play-2", "$text.campaign", () -> {
|
dialog.content().add(new MenuButton("icon-play-2", "$text.sectors", () -> {
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
ui.sectors.show();
|
ui.sectors.show();
|
||||||
})).width(bw).colspan(2);
|
})).width(bw).colspan(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user