From 6d613cd4ae02a5c143ef574e235d4b744c5694db Mon Sep 17 00:00:00 2001 From: Alex Henry Date: Wed, 18 Oct 2017 18:29:31 -0200 Subject: [PATCH] Fixing charge bug when enemy doesn't have melee attacks --- javelin/controller/action/Charge.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javelin/controller/action/Charge.java b/javelin/controller/action/Charge.java index 479496e9e..cac6f36ab 100644 --- a/javelin/controller/action/Charge.java +++ b/javelin/controller/action/Charge.java @@ -67,7 +67,8 @@ protected void attack(final Combatant combatant, ArrayList> charge(BattleState state, Combatant me, Combatant target) { final ArrayList> chances = new ArrayList>(); - if (me.hascondition(Fatigued.class) != null) { + if (me.source.melee.isEmpty() + || me.hascondition(Fatigued.class) != null) { return chances; } Point from = new Point(me.location[0], me.location[1]);