SUMMARIZING THE JINX ABILITY - A NEOXIAN CITY GAME

in #hive-1769812 years ago

jinx_city.png

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.

jinx_1.jpg

As the name implies, this List stores the guess numbers of all the attackers, as it is shown in the code snippet below.

jinx_2.jpg

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.

jinx_3.jpg

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.

jinx_4.jpg

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,

animator.jpg

The animation basically declares the winner as shown below, the animation was constructed in UNITY ofcourse...

gif_jinx_win.gif

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.

jinx_5.jpg

From the code snippet above, the metajinx attackers are counted and stored in a counter variable.

jinx_6.jpg

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.

jinx_7.jpg

Basically, the power levels is like...

meta_jinx.jpg

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 :-)

neoxian_giffy.gif

Posted using Neoxian City

Sort:  

Incredible stuff here, can't wait for you to finish.

!1UP

Don-1UP-Cheers-Cartel-250px.png

You have received a 1UP from @b0s!

The following @oneup-cartel family members will soon upvote your post:
@pimp-curator, @neoxag-curator
And they will bring !PIZZA 🍕

Learn more about our delegation service to earn daily rewards. Join the family on Discord.