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 zcmeyx`Hypg6T2v%(3uhgkBOcd1{Izzjv*Dd-ppiJ0$mEmie##hk?^njT&~dd-$*(lnfAQ&3K(G-Nu!wAaS5z>h{mf3^pj)aXR|~+fecIzki*L&_2J)*kN{F^!;mV zD`V%cR(D^q+H1=6(7DpDj_uCR)~K|98Gk8&rI>3MP4o_gC2-ssFO;zFFxc6|K|j4P3R^h!huoj*H#$$; zJh5n=OhdV~{nt4SxrK}D!Wk#eHehBt$Ejv^?~}jh+qw_)J$G1^|BCb9H820+8%8Cz^_rP)*kjrj-{{}RmZRDF^-(5W!Yd9KK-^A*A|g9MfF!Z|7)FzilAUy4TXJ$@bW>gU7nLx|*At zZ`TK0sK4;&!O?@PuHM->Id3*kT$ot@ZQuR0_z8?_-u>TmCHQ~>^9rW_w-w#_8yFaD z69h}87>pW}58QvfW)qiA&S)aO7-kD9}`2E*D`|Hk1JMQ2AW+}(p ztvgoqZ(!f^toL7X#gx=eo(Jz3g@PRm*hE|vZ~eN_w$MqEgUul3>DxaH3>*v$4aJfA#3+eRamyPHle0b79%-Yuih+?Ap{K~h#Np07B70}@_dU{oB4gV@rIizk zqTZO@UU*=A-~ao!_E%0;(BYiSHAm&r(ZzB6hI`*__pP6+(s}BWHV-@VL<`Rkj0O+y zuQg*|{wCtxYjLg9D_2i2KYXg#^K8O)k1N&p-WS#j-t?Wf%k{lj;r`3X?a}L`|Jhvf z6e~M&G^)vJ^PSgUUOoG|;icSNDTdOIh5Hw2-dYo~$vEL%S5xP&*WJIrdCN}K>sgjD zdyy!cL+q~CmXjC#dse^oRMGn1IY%AqUF&YmZds5pVV&+b_x9Px1lyvHG}t^XiGP|^ z_A)+1@9~4b3CAB)M{iH8eg1~=O1u}-0lmN9Hn@lV`0Vp{#Vmuby&}(4F5IbRbWQn?WC;yX*M;go1;rvuxDZ})z%)xWb{|6sCy zvWrY^!zz}__jX?I_lk5o$@p4?s3*MMJ7=%&Jq?Xnj2e~=8$vTw_p$#sEmJBo+q6QR z{lVRH{MaZ_jS_CL`Kdq-}FIDbm3`0oq$!|$fv-Wd5m;_pW0`mlsJ z`yKV(-|`pVy!`Vd^L6(7D`yCa&foVu+M>Fl<6yRz)NjV=4>i6mUe6fqmAH4u?Dt=H zZZc2Ucy)fl;R`$8&Gx)GrTcoYrv^jIK1JiS6{n`!s=oX4)wA~RkLINu-d8`qGgSWd z^Z9!J`uU6p+7GU@$&O&Y!N9Qhc-f)mSfy((JLZLQ@hr$r?f;$j{FewDPqnj~@AB#( zoj)#Ts>T1U`xy7Tb`A*?dzNu zM+#$n?`sMk4(C&@dGPaPsodhN>pnM`tq9FO)AeJ6izLIg1)=k2d2Bf>F3G^iz~I2Z zz#zcDfMBpNd_29kpM_yf(fd=33|<0I6* !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);