Skip to content

Commit

Permalink
Fixing charge bug when enemy doesn't have melee attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
tukkek committed Oct 18, 2017
1 parent 50f7107 commit 6d613cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion javelin/controller/action/Charge.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ protected void attack(final Combatant combatant,
ArrayList<List<ChanceNode>> charge(BattleState state, Combatant me,
Combatant target) {
final ArrayList<List<ChanceNode>> chances = new ArrayList<List<ChanceNode>>();
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]);
Expand Down

0 comments on commit 6d613cd

Please sign in to comment.