@leolara It doesn't "always" return this.defaultDeploymentIndex.

Rather, it returns i, "if (randomnumber < depWeight) {"
else, it does "randomnumber = randomnumber - depWeight;"

The default return is,  this.defaultDeploymentIndex;