KBraid / KBraids_CoW_Mods

my mod projects for CommanderWars
1 stars 0 forks source link

Cyrus bugs: co healing and indiscriminate aid power heal discriminately #1

Open KBraid opened 2 years ago

KBraid commented 2 years ago

on a 1v1 they only heal the enemy, while on a 3+ player match they only heal his own units

KBraid commented 2 years ago

https://github.com/KBraid/KBraids_CoW_Mods/blob/main/cyrus/scripts/cos/co_cyrus.js

FranticFairy commented 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.

KBraid commented 2 years ago

the bits that control this aren't my code so i don't understand it.