Open KBraid opened 2 years ago
A quick issue I can see comes from this:
for (var i2 = 0; i2 < playerCounter; i2++) { var otherPlayer = map.getPlayer(i2); var units = otherPlayer.getUnits(); } units.randomize();
What happens here is that the code does the following. Grabs the units of player 1. For loop not yet done. Grab the units of player 2 instead. For loop not yet done. Repeat. You need to put the code of what happens to the units in the for loop, otherwise it will only act on the last result.
the bits that control this aren't my code so i don't understand it.
on a 1v1 they only heal the enemy, while on a 3+ player match they only heal his own units