From 0ab0312e84eb6f619b6d003529fe10837e0a394d Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Fri, 31 Aug 2018 13:28:13 +0900 Subject: [PATCH] Work In Progress - TBM_Config.xml updated The config file should hold info on all vanilla mobs by now --- .../TurnBasedMinecraft/common/Battle.java | 2 +- .../networking/PacketBattleDecision.java | 2 +- src/main/resources/TBM_Config.xml | 107 ++++++++++++++++++ 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/seodisparate/TurnBasedMinecraft/common/Battle.java b/src/main/java/com/seodisparate/TurnBasedMinecraft/common/Battle.java index d41da57..2395d7c 100644 --- a/src/main/java/com/seodisparate/TurnBasedMinecraft/common/Battle.java +++ b/src/main/java/com/seodisparate/TurnBasedMinecraft/common/Battle.java @@ -264,7 +264,7 @@ public class Battle { case DECISION: timer = timer.minus(dt); - if(timer.isNegative() || timer.isZero()) + if(timer.isNegative() || timer.isZero() || undecidedCount <= 0) { state = State.ATTACK; timer = TurnBasedMinecraftMod.BattleDecisionTime; diff --git a/src/main/java/com/seodisparate/TurnBasedMinecraft/common/networking/PacketBattleDecision.java b/src/main/java/com/seodisparate/TurnBasedMinecraft/common/networking/PacketBattleDecision.java index a3f0bcf..71ca925 100644 --- a/src/main/java/com/seodisparate/TurnBasedMinecraft/common/networking/PacketBattleDecision.java +++ b/src/main/java/com/seodisparate/TurnBasedMinecraft/common/networking/PacketBattleDecision.java @@ -43,7 +43,7 @@ public class PacketBattleDecision implements IMessage public IMessage onMessage(PacketBattleDecision message, MessageContext ctx) { Battle b = TurnBasedMinecraftMod.getBattleManager().getBattleByID(message.battleID); - if(b != null && b.getState() == Battle.State.DECISION) + if(b != null) { EntityPlayerMP player = ctx.getServerHandler().player; b.setDecision(player.getEntityId(), message.decision); diff --git a/src/main/resources/TBM_Config.xml b/src/main/resources/TBM_Config.xml index 521b40b..a897bd9 100644 --- a/src/main/resources/TBM_Config.xml +++ b/src/main/resources/TBM_Config.xml @@ -1,5 +1,9 @@ 1 + + + + 5 @@ -130,5 +134,108 @@ 3 5 + + 0 + 35 + + + 0 + 10 + + + 0 + 1 + + + + + + 0 + 10 + + + 0 + 10 + + + 1 + 10 + + + 0 + 1 + + + 0 + 10 + + + 1 + 10 + + + 0 + 35 + + + 0 + 10 + + + 0 + 40 + + + 0 + 5 + + + 0 + 5 + + + 0 + 15 + + + 0 + 5 + + + 4 + 20 + + + 0 + 8 + + + 10 + 27 + + + 8 + 20 + wither + \ No newline at end of file