From 254782c4e8dfdc6057c2ccc772b7e17e9cccd31f Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 16 Oct 2017 17:26:05 -0400 Subject: [PATCH] Minor balance changes (made coal less rare, nerfed blast enemies) --- android/AndroidManifest.xml | 4 +- build.gradle | 4 +- core/assets/maps/tutorial.png | Bin 1274 -> 1278 bytes core/src/io/anuke/mindustry/Control.java | 10 +---- core/src/io/anuke/mindustry/Mindustry.java | 11 +++++- core/src/io/anuke/mindustry/Renderer.java | 1 - core/src/io/anuke/mindustry/Shaders.java | 5 +-- core/src/io/anuke/mindustry/Tutorial.java | 4 +- core/src/io/anuke/mindustry/UI.java | 12 ++---- core/src/io/anuke/mindustry/Vars.java | 36 +---------------- .../entities/enemies/BlastEnemy.java | 2 +- .../mindustry/entities/enemies/Enemy.java | 8 ++-- .../io/anuke/mindustry/ui/LevelDialog.java | 3 +- .../src/io/anuke/mindustry/ui/LoadDialog.java | 1 + .../io/anuke/mindustry/ui/TutorialDialog.java | 37 ------------------ .../io/anuke/mindustry/world/Generator.java | 2 +- .../world/blocks/ProductionBlocks.java | 4 +- .../mindustry/world/blocks/types/Conduit.java | 2 +- 18 files changed, 35 insertions(+), 111 deletions(-) delete mode 100644 core/src/io/anuke/mindustry/ui/TutorialDialog.java diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 9d34efaf8a..8df6360324 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="14" + android:versionName="2.3.1" > diff --git a/build.gradle b/build.gradle index 9c9d09d411..cdecd63644 100644 --- a/build.gradle +++ b/build.gradle @@ -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" } diff --git a/core/assets/maps/tutorial.png b/core/assets/maps/tutorial.png index 0eae472bfab628e54e60224c322d8494f2df8506..8b03ea41128e3b64313e0656f516f0acda8d9a4a 100644 GIT binary patch delta 1098 zcmV-Q1hxD63H}L?LI)KN63lckNRde>FnCEsK~#9!?VKx@+b|G?y*WmLJ;uht#)}FT z2L}hY|Dd4%pvA$9gA0n5*4WtCr;(vyfAYTHW^c#M39VfGYOC9&+>mXfpst zD-3!7t2zw;89=T!d;6%fz6N0b697OP10X2;#RG7?mgRm78DJd$s5AZgHE#s{{<4=M zwAbRIKEfXGnm787;Zc?)GJv}WNK6I68Bi33XzODeh6-gM7{G9qxAOx4AOHY>e`nMl zlJ*cM0FlGcD~u8VxTG%KB&fc{(1Di+pgmO=&-?n#SS!z}GeDbeTi@2Ld0n5YCr7BO zN|cvXog3=LyKVg}29M3CH$4iP=zfwU`DxEKq1#Fc>bT!$Jw*l>28*OZ%4xCNY=;8B zI{tra|L#qKup~?>aFR$Dk9s}CfAqTFHg%FDD$B1h91KL_B*6#3gnzf%9GtRaxvyWS zET^tQ-V7_xB{hTHB2n*ozsLPWWH)*07QI`<{Z5Y^Zne@u${o7XDK zz3#IW2mKZKX>SsOf!$0g;h!y}{&EXsZ#j_M4Ymq>I z5jAOA04i71B?1}1+I!<0e+31eh`IN?f=|AT5plEusuJYA`zXElQY;E_G~rO4fUWm( z_BMH=plAl5qIMo^Rpo0U`#kDQWBn zT!y3AkG=+MDTVdoZob#&%HDv*R)2yGL+840CS_ADUQZ>V01*0y%$T7nSN4>+^VcW! z(;-9bSYdW7@a0sMLm+_F^@VeVTbbEJEnCtC@8s;{@ z_NXw;QpB8^?mZP{*(V7&AJh(cKVZu8r}t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z2us!R?lB|!`RA`sf1d%shry{lYghx=006zmcEW>QBG&1Mo>dAAplfB1`)23*6b1}? zLq<)fdr~a?M9g~^{;u&}{PQ(^P3N-<4uQ1kG9JJ9gW4hQ2TWQ1^qx%9hanj|7f7Pxgc+b~e|pEtS$73o4ErAi1%~yU z=)`ecP2VXI!&eR?eBk-%bsnR&uJeL6s8w&wiukZZ834ARRiBzjw8Iw}00961KmY&$ z5C8xG06+i$01yBG00aQ>%e{{T0IYKF$^igM5CA{`000mGY*YUL>*e-nO !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(); } diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 60557b5db9..facc2b0f80 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -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." - }; } diff --git a/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java b/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java index 2142dbbf23..5b0bcdcf19 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/BlastEnemy.java @@ -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); } } diff --git a/core/src/io/anuke/mindustry/entities/enemies/Enemy.java b/core/src/io/anuke/mindustry/entities/enemies/Enemy.java index e29b905dea..e76d99fe96 100644 --- a/core/src/io/anuke/mindustry/entities/enemies/Enemy.java +++ b/core/src/io/anuke/mindustry/entities/enemies/Enemy.java @@ -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(); diff --git a/core/src/io/anuke/mindustry/ui/LevelDialog.java b/core/src/io/anuke/mindustry/ui/LevelDialog.java index b8ba390f8b..baa62edcd3 100644 --- a/core/src/io/anuke/mindustry/ui/LevelDialog.java +++ b/core/src/io/anuke/mindustry/ui/LevelDialog.java @@ -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()))); } } } diff --git a/core/src/io/anuke/mindustry/ui/LoadDialog.java b/core/src/io/anuke/mindustry/ui/LoadDialog.java index 5a464c9758..3a5aeff2e0 100644 --- a/core/src/io/anuke/mindustry/ui/LoadDialog.java +++ b/core/src/io/anuke/mindustry/ui/LoadDialog.java @@ -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; } diff --git a/core/src/io/anuke/mindustry/ui/TutorialDialog.java b/core/src/io/anuke/mindustry/ui/TutorialDialog.java deleted file mode 100644 index 9892bfbb75..0000000000 --- a/core/src/io/anuke/mindustry/ui/TutorialDialog.java +++ /dev/null @@ -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); - } -} diff --git a/core/src/io/anuke/mindustry/world/Generator.java b/core/src/io/anuke/mindustry/world/Generator.java index 7e52b3fa16..8acb119d7a 100644 --- a/core/src/io/anuke/mindustry/world/Generator.java +++ b/core/src/io/anuke/mindustry/world/Generator.java @@ -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; } diff --git a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java index 4707f4b980..7bc829f0cb 100644 --- a/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/world/blocks/ProductionBlocks.java @@ -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 diff --git a/core/src/io/anuke/mindustry/world/blocks/types/Conduit.java b/core/src/io/anuke/mindustry/world/blocks/types/Conduit.java index b8aa32822b..ee041d71df 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/Conduit.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/Conduit.java @@ -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);