Seperated /privateroom command into /privateroom and /hiddenroom. In
hidden rooms, mostly set by battle players, global staff maintain their
ranks within the room, but the rank is not kept in secret/private rooms
(only set by users who can create chat rooms).
Created command /whoare to allow global staff to see the hidden rooms a
user is in.
Attack is calculated with burn upon switch in and stored.
Attack drop is thus not restored with Rest.
Attack drop is restored with an attack debuff, removed with attack buff.
If the confused Pokemon has a Substitute up, damage will be dealt to the opponent's Substitute instead.
If the opponent doesn't have a Substitute up, no damage will be dealt.
Also call clampIntRange from Battle, not from BattlePokemon.
Also remove the damage message from confusion, only the message from Substitute must appear.
Burn attack drop is not negated the same way as speed.
It's just halving the attack stat and a boost with Swords Dance exactly negates it.
Use the same calculation as the cartridge for the probabilities for statuses and status damage:
The attack in burn is halved and floored, then if 0 put to 1.
The speed in paralyse is quartered, floored and then if 0 put to 1.
The chance to get fully paralyzed is if random 0-255 < 64.
The chance for confusion self hit is if random 0-255 >= 128.
If the Pokémon is fully paralysed or self-hits in confusion, most move volatiles are removed.
This changes also add the invulnerable bug for two-turn moves.
A mismatch between the key in `room.users` and the userid arised due to the fact that users had their `userid` property updated before getting disconnected from the server.
With the existing damage check, the damage was re-calculated upon switch-in, but afterwards the old damage was applied.
The removed check is not necessary as the hit will return the previous partial trap damage if existing, thus always assigning that damage again until switch or faint.
All Gen 1 moves are edited to be either target normal or target self.
It is thus unnecessary to comment the different types of hitting when this is already available on the main code.
Also it is not relevant to have code that's never going to be used.
- `user.locked` would be equal to the id the user had when the rename has performed, rather than the autolocked userid.
- `lockedIps`'s property values would be sometimes wrong in a similar way due to a missing change in 47e90226.
Both of these issues are hereby fixed.