So, I develop my very first game and I created this big piece of code. I know it's spaghetti. I am a total novice and it took me about a month. The concept of the game is that there are 2 players (everything is treated with sprites) and every turn attacks and defends. Both can hit up, in the middle or down and defend themselves in the same places. Everything works more or less as expected, except that there is this strange bug in which if a defending player successfully defends his opponent or if the attacking player does not support, everything seems to be working normally, but the "person who is attacked" is functioning normally. the Unity console for 2 laps. For the rest of the game, everything works perfectly.
Here is the code:
and the script to move the player, I have 2 for each of them, an attacker and one to parry
the combat script is 700 lines long, although most are copy / paste lines that I understand if it's too complicated for someone to read. But it makes me crazy because I can not know what's wrong, if it's something very obvious that I can not see because I'm new to coding, please let me know.