Hello folks and welcome to another Episode of the Jinx-Game development, In the previous Episode I talked about how the first round of elimination is calculated but what happens next after that, this win can be debuffed or snatched by other players.
The player class consists of important parameters. One of the parameters that stores the Jinx attackers is a list of integers called Jinx_attacker_guess nums.
As the name implies, this List stores the guess numbers of all the attackers, as it is shown in the code snippet below.
but It doesn't store the guess numbers per se, it stores the closest guess array values which I talked about before, the closest guess was calculated from the original guess.
The closest guess array with the closest difference is the most important parameter, which will come into play when there are two or more Jinx attackers, the closest out of them will take the win.
Then the next step is to find out if this player had any jinx attackers, this could be easily done by using a bool checker to see if "the Jinx_attacker_nums" list is empty or not.
If the player has no Jinx attackers(If the list is empty) It runs the code which triggers some pop-up animation I designed earlier,
The animation basically declares the winner as shown below, the animation was constructed in UNITY ofcourse...
But what if this player has a jinxer, well, then the win_position_index variable is transferred to the jinxer with the closest guess. Then that Jinxer is scanned if it has a meta-jinx attacker. According to the rule, meta-jinx ranks above the jinx, so that has to be accounted for.
From the code snippet above, the metajinx attackers are counted and stored in a counter variable.
The meta jinx counter is used as a barometer to catch cases in case there are two or more duplicate meta jinxes. If there are more than one, the counter is used to calculate a win by updating the win_position_index variable through a random coin flip method.
Basically, the power levels is like...
Join me next time when I talk about other abilities like Juke, Meta-Juke, etc and the logic behind their calculations, thanks for passing by :-)
Posted using Neoxian City