Minor balance changes (made coal less rare, nerfed blast enemies)

This commit is contained in:
Anuken 2017-10-16 17:26:05 -04:00
parent 06299a7a64
commit 254782c4e8
18 changed files with 35 additions and 111 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry"
android:versionCode="12"
android:versionName="2.2" >
android:versionCode="14"
android:versionName="2.3.1" >
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />

View file

@ -50,7 +50,7 @@ project(":html") {
dependencies {
compile project(":core")
compile fileTree(dir: '../core/lib', include: '*.jar')
//compile fileTree(dir: '../core/lib', include: '*.jar')
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
@ -79,7 +79,7 @@ project(":core") {
apply plugin: "java"
dependencies {
compile 'com.github.anuken:ucore:09cc372d6b'
compile 'com.github.anuken:ucore:989f9713fa'
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

@ -37,7 +37,6 @@ import io.anuke.ucore.util.Mathf;
public class Control extends Module{
int targetscale = baseCameraScale;
boolean showedTutorial;
Tutorial tutorial = new Tutorial();
boolean hiscore = false;
@ -53,6 +52,7 @@ public class Control extends Module{
float respawntime;
public Control(){
if(Mindustry.args.contains("-debug", false)){
Vars.debug = true;
}
@ -173,13 +173,7 @@ public class Control extends Module{
//multiplying by 2 so you start with more time in the beginning
wavetime = waveSpacing()*2;
if(showedTutorial || !Settings.getBool("tutorial")){
GameState.set(State.playing);
}else{
GameState.set(State.paused);
ui.showTutorial();
showedTutorial = true;
}
GameState.set(State.playing);
}
public void playMap(Map map){

View file

@ -6,6 +6,9 @@ import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.GameState.State;
import io.anuke.mindustry.io.Formatter;
import io.anuke.mindustry.world.blocks.Blocks;
import io.anuke.mindustry.world.blocks.ProductionBlocks;
import io.anuke.mindustry.world.blocks.WeaponBlocks;
import io.anuke.ucore.core.Inputs;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.modules.ModuleCore;
@ -28,6 +31,12 @@ public class Mindustry extends ModuleCore {
@Override
public void init(){
//always initialize blocks in this order, otherwise there are ID errors
Blocks.dirt.getClass();
ProductionBlocks.coaldrill.getClass();
WeaponBlocks.turret.getClass();
module(Vars.control = new Control());
module(Vars.renderer = new Renderer());
module(Vars.ui = new UI());
@ -44,7 +53,7 @@ public class Mindustry extends ModuleCore {
try{
super.render();
}catch (RuntimeException e){
//TODO
//TODO display error log
//Gdx.app.getClipboard().setContents(e.getMessage());
throw e;
}

View file

@ -41,7 +41,6 @@ public class Renderer extends RendererModule{
pixelate();
Graphics.addSurface("shadow", Core.cameraScale);
Shaders.create();
}
@Override

View file

@ -6,10 +6,7 @@ import io.anuke.ucore.graphics.Shader;
import io.anuke.ucore.util.Tmp;
public class Shaders{
public static void create(){
new Outline();
}
public static final Outline outline = new Outline();
public static class Outline extends Shader{
public Color color = new Color();

View file

@ -349,7 +349,7 @@ public class Tutorial{
turretExplanation{
{
canBack = false;
text = "Turrets will automatically shoot at the nearest enemy in range, as long as they have enough ammo.";
text = "Turrets will automatically shoot at the nearest enemy in range, as long as they have enough ammo.";
}
},
waves{
@ -373,7 +373,7 @@ public class Tutorial{
{
androidOnly = true;
text = "If you ever feel overwhelmed by enemies, you can press the [orange]pause button[] in the top right"
+ "to pause the game. You can still place select and place blocks while paused.";
+ " to pause the game. You can still place select and place blocks while paused.";
}
},
purchaseWeapons{

View file

@ -33,7 +33,7 @@ public class UI extends SceneModule{
Table itemtable, weapontable, tools, loadingtable, desctable, respawntable;
SettingsDialog prefs;
KeybindDialog keys;
Dialog about, menu, restart, tutorial, levels, upgrades, load, settingserror;
Dialog about, menu, restart, levels, upgrades, load, settingserror;
Tooltip tooltip;
VisibilityProvider play = () -> !GameState.is(State.menu);
@ -163,8 +163,6 @@ public class UI extends SceneModule{
for(Cell<?> cell : about.content().getCells())
cell.left();
tutorial = new TutorialDialog();
restart = new Dialog("The core was destroyed.", "dialog");
restart.shown(()->{
@ -383,7 +381,7 @@ public class UI extends SceneModule{
new table(){{
new table("pane"){{
defaults().size(220, 50).pad(3);
defaults().size(220, 48).pad(3);
new button("Play", () -> {
levels.show();
@ -432,7 +430,7 @@ public class UI extends SceneModule{
});
}
get().pad(Unit.dp.inPixels(20));
get().pad(Unit.dp.inPixels(16));
}};
get().setVisible(nplay);
@ -701,10 +699,6 @@ public class UI extends SceneModule{
}
}
public void showTutorial(){
tutorial.show();
}
public void showRestart(){
restart.show();
}

View file

@ -14,7 +14,7 @@ public class Vars{
//respawn time in frames
public static final float respawnduration = 60*4;
//time between waves in frames
public static final float wavespace = 30*60*(android ? 1 : 1);
public static final float wavespace = 35*60*(android ? 1 : 1);
//waves can last no longer than 6 minutes, otherwise the next one spawns
public static final float maxwavespace = 60*60*6;
//how far away from spawn points the player can't place blocks
@ -50,38 +50,4 @@ public class Vars{
"- [RED]freemusicarchive.org[] for music",
"- Music made by [GREEN]RoccoW[]",
};
public static String[] tutorialText = {
"[GREEN]Default Controls:",
"[WHITE][YELLOW][[WASD][] to move, [YELLOW][[R][] to rotate blocks.",
"Hold [YELLOW][[R-MOUSE][] to destroy blocks, click [YELLOW][[L-MOUSE][] to place them.",
"[YELLOW][[L-MOUSE][] to shoot.",
"[yellow][[scrollwheel] to switch weapons.",
"",
"[GOLD]Every "+wavespace/60+" seconds, a new wave will appear.",
"Build turrets to defend the core.",
"If the core is destroyed, you lose the game.",
"",
"[LIME]To collect building resources, move them into the core with conveyors.",
"[LIME]Place [ORANGE]drills[] on the right material,they will automatically mine material",
"and dump it to nearby conveyors or turrets.",
"",
"[SCARLET]To produce steel, feed coal and iron into a smelter."
};
public static String[] androidTutorialText = {
"[GREEN]Default Controls:",
"[WHITE]Use [YELLOW]one finger[] to pan the camera, or two while placing blocks.",
"[YELLOW]Hold and tap[] to destroy blocks.",
"",
"[GOLD]Every "+wavespace/60+" seconds, a new wave will appear.",
"Build turrets to defend the core.",
"If the core is destroyed, you lose the game.",
"",
"[LIME]To collect building resources, move them into the core with conveyors.",
"[LIME]Place [ORANGE]drills[] on the right material,they will automatically mine material",
"and dump it to nearby conveyors or turrets.",
"",
"[SCARLET]To produce steel, feed coal and iron into a smelter."
};
}

View file

@ -19,7 +19,7 @@ public class BlastEnemy extends Enemy{
super.move();
if(target != null && target.distanceTo(this) < 10f){
Bullet b = new Bullet(BulletType.blast, this, x, y, 0).add();
b.damage = BulletType.blast.damage + (tier-1) * 50;
b.damage = BulletType.blast.damage + (tier-1) * 40;
damage(999);
}
}

View file

@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import io.anuke.mindustry.Shaders.Outline;
import io.anuke.mindustry.Shaders;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.ai.Pathfind;
import io.anuke.mindustry.entities.Bullet;
@ -171,10 +171,10 @@ public class Enemy extends DestructibleEntity{
String region = ClassReflection.getSimpleName(getClass()).toLowerCase() + "-t" + Mathf.clamp(tier, 1, 3);
//TODO is this really necessary?
Graphics.getShader(Outline.class).color.set(tierColors[tier-1]);
Graphics.getShader(Outline.class).region = Draw.region(region);
Shaders.outline.color.set(tierColors[tier-1]);
Shaders.outline.region = Draw.region(region);
Graphics.shader(Outline.class);
Graphics.shader(Shaders.outline);
Draw.color();
Draw.rect(region, x, y, direction.angle()-90);
Graphics.shader();

View file

@ -6,6 +6,7 @@ import io.anuke.mindustry.Vars;
import io.anuke.mindustry.world.Map;
import io.anuke.mindustry.world.World;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.function.StringSupplier;
import io.anuke.ucore.scene.ui.ButtonGroup;
import io.anuke.ucore.scene.ui.Dialog;
import io.anuke.ucore.scene.ui.ImageButton;
@ -53,7 +54,7 @@ public class LevelDialog extends Dialog{
for(Map map : Map.values()){
if(!map.visible) continue;
content().add(()->"High Score: [lime]" + Settings.getInt("hiscore" + map.name()));
content().add((StringSupplier)(()->"High Score: [lime]" + Settings.getInt("hiscore" + map.name())));
}
}
}

View file

@ -63,6 +63,7 @@ public class LoadDialog extends Dialog{
try{
SaveIO.loadFromSlot(slot);
}catch(Exception e){
e.printStackTrace();
Vars.ui.showError("[orange]Save file corrupted or invalid!");
return;
}

View file

@ -1,37 +0,0 @@
package io.anuke.mindustry.ui;
import static io.anuke.mindustry.Vars.*;
import io.anuke.mindustry.GameState;
import io.anuke.mindustry.GameState.State;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.scene.ui.TextDialog;
import io.anuke.ucore.scene.ui.layout.Unit;
public class TutorialDialog extends TextDialog{
public TutorialDialog(){
super("Tutorial", android ? androidTutorialText : tutorialText);
setup();
}
void setup(){
setDialog();
hidden(()->{
GameState.set(State.playing);
});
getButtonTable().addButton("OK", ()->{
hide();
}).pad(2).size(180, 44).units(Unit.dp);
content().pad(8);
content().row();
content().addCheck("Don't show again", b->{
Settings.putBool("tutorial", !b);
Settings.save();
}).padTop(4);
}
}

View file

@ -60,7 +60,7 @@ public class Generator{
floor = Blocks.iron;
}
if(Noise.nnoise(x, y, 6, 1) > 0.238){
if(Noise.nnoise(x, y, 6, 1) > 0.237){
floor = Blocks.coal;
}

View file

@ -121,10 +121,10 @@ public class ProductionBlocks{
input = Item.stone;
inputAmount = 5;
inputLiquid = Liquid.water;
liquidAmount = 19.99f;
liquidAmount = 18.99f;
output = Item.coal;
health = 50;
purifyTime = 70;
purifyTime = 60;
}
@Override

View file

@ -13,7 +13,7 @@ import io.anuke.ucore.core.Timers;
public class Conduit extends Block{
protected float liquidCapacity = 10f;
protected float flowfactor = 4f;
protected float flowfactor = 4.9f;
public Conduit(String name) {
super(name);