lundi 17 juin 2019

Understanding If condition in a Squirrel language

I'm trying to understand the if condition but I'm having a problem with the last part if someone could explain to me in plain English what does it checking for or write it in a more human-friendly language that is easier to understand thanks.

I see it the first part pick a random number from 1-100 the second part is picking either 0, 1 or 10 and add? or concatenate with the -_minimossify variable but the third part I'm completely blank what is trying to do

         this.World.getTime().Days = is a constant value that keeps incrementing              
         _minibossify = 0;
         troop.Variant = can be 0, 1 ,10

        if (this.Math.rand(1, 100) > troop.Variant + _minibossify + (this.World.getTime().Days > 100 ? 0 : -1))
        {
            troop.Variant = 0;
        }

Aucun commentaire:

Enregistrer un commentaire