This script is what dictates the type of stats the player and enemy will use. It also has other functions, like applying effects and passives. Time to jump into it!

Well. There is a lot here… Yep… There are many different variables… Sick… Um…. So… The variables here are many. For game objects, there is the Level Manager and the various status effect images, as well as the gravestone image.
Then there are the stats of the characters. I am not going to go through every stat, cause that is long. Just read it. It is there.
Then there is the variables that take from different scripts, like powers and guns, and other stats like can attack.
Next is sprite variables, which is different for each character.
Then the types of variables, like guns and passives.
Next is the health bar of each character.
Finally there is the mesh render.

Here is where we call for the different scripts and where the Players Stats script will find it. It also sets the health bar and the current attribute values.

This function is how the health of the characters change. It first checks whether that character is target-able or not.
Once that is checked, it will then decrease the health by getting the current attack damage and reducing it by the current attack damage that is then divided by the defence.
It then checks if there is an effect to apply on the opposing character, and the designated effect number.
It will also set the health bar to current health.

This strip of code just says that if the character has any of the status effects, it will display the status effect image. Simple stuff.

Now. A mad function. Such madness really. So mad.
Checks whether the character is dead.
Woah…

This is function sets the stats the the current attribute values. This is useful so that buffs from the previous round does not follow on to the next.

This just applies the passive. Nothing else really. It gets the passive which is written on the character and applies it.

This function applies the status effects on the effected characters. It checks whether there is a timer still on it. Once that number is gone, it removes the effect and the number.

This function just activates the power. It does this by checking what power is written in the power section, and applies it.

This does the same thing as the power, but with the guns instead. Very simple stuff.