Why "magical"?
An exception might be, for example, counters, such as total = total + 1, where one represents the minimum step. In this case, its role is obvious to everyone, and therefore it is not considered "magical" in this context.
Where? Besides, players outside the game are indicated by 4.
PLAYER_NOT_IN_GAME -- Player is not in the game
PLAYER_ACTIVE -- Player is active
PLAYER_WON -- Player won
PLAYER_LOST -- Player lost
Usually, in such lists of constants, the values range from 0 and above, i.e., the value 4, apparently, does not correspond to any of the constants and, probably, indicates players outside the game (again, due to "magical" numbers, one can only make assumptions). But I haven't checked it in practice.
The number 0 is taken from here:
n = n + (GetPlayerState(i) == 1 or 0)I completely don't understand what it does here, and due to the lack of parentheses, it is not even clear how this construct will be executed, whether the equality check will be performed first, and then OR, or vice versa.