- Experimental fix for a single creature being declared as an Attacker twice

This commit is contained in:
Sol
2014-03-12 02:24:10 +00:00
parent 89afe46f92
commit 7bdfeefb1d

View File

@@ -124,6 +124,12 @@ public class Combat {
return;
}
// This is trying to fix the issue of an attacker existing in two bands at once
AttackingBand existingBand = getBandOfAttacker(c);
if (existingBand != null) {
existingBand.removeAttacker(c);
}
if (band == null || !attackersOfDefender.contains(band)) {
band = new AttackingBand(c, defender);
attackersOfDefender.add(band);