* Random Battle: Improve HP evs
This lets Zygarde-10% activate Power Construct in two subs, and also simplifies some unnecessarily complex code.
* Fix formatting (#19)
* Update scripts.js
It can't sub down to exactly half if it's got lefties, so don't give it less HP for no reason.
* Users#mergeConnection - run room.game.onUpdateConneciton for battles
(1) oops, forgot that battles were roomgames as well, so they needed to update for dc's (guest => player) and send the requests accordingly
(2) I'm so bad
* Use PS style conventions
- Style
- Use template strings entirely throughout the file.
- Consistency: always put a space between buttons in roomsettings display
- <b> => <strong> - I know this has been contraversial before in https://github.com/Zarel/Pokemon-Showdown/pull/3247, but for the sake of screen-readers and consistency with the style in the newer files (which discourage the use of <b>, <font>, and <center> elements)
- Additions:
- roomsettings section for UNO and hangman
- Fixes:
- Banwords:
- Fix crash from ``/banword add ,`` - if there's no match don't map
- Remove banwords in ``/banword delete`` only after they've all been verified
- Format the banned words from multiple bans/unbans to be less misleading.
- prevents onConnect from being called twice in onUpdateConnection AND in joinRoom for autojoin.
```
CRASH: Error: onConnect
at ScavengerHunt.onConnect (/home/ubuntu/workspace/suppress/chat-plugins/scavengers.js:137:9)
at ChatRoom.onConnect (/home/ubuntu/workspace/suppress/rooms.js:1369:51)
at User.joinRoom (/home/ubuntu/workspace/suppress/users.js:1181:9)
at User.tryJoinRoom (/home/ubuntu/workspace/suppress/users.js:1143:25)
at CommandContext.autojoin (/home/ubuntu/workspace/suppress/chat-commands.js:1334:13)
at CommandContext.run (/home/ubuntu/workspace/suppress/chat.js:292:28)
at CommandContext.parse (/home/ubuntu/workspace/suppress/chat.js:138:19)
at Object.Chat.parse (/home/ubuntu/workspace/suppress/chat.js:807:17)
at User.processChatQueue (/home/ubuntu/workspace/suppress/users.js:1433:9)
at Timeout.chatQueueTimeout.setTimeout [as _onTimeout] (/home/ubuntu/workspace/suppress/users.js:1413:15)
Additional information:
user = Guest 2
room = global
pmTarget = undefined
message = /autojoin gamecorner,scavengers
CRASH: Error: onConnect
at ScavengerHunt.onConnect (/home/ubuntu/workspace/suppress/chat-plugins/scavengers.js:137:9)
at ScavengerHunt.onUpdateConnection (/home/ubuntu/workspace/suppress/room-game.js:174:28)
at connection.inRooms.forEach.roomid (/home/ubuntu/workspace/suppress/users.js:891:15)
at Set.forEach (native)
at User.mergeConnection (/home/ubuntu/workspace/suppress/users.js:878:22)
at User.merge (/home/ubuntu/workspace/suppress/users.js:833:9)
at User.handleRename (/home/ubuntu/workspace/suppress/users.js:738:9)
at User.validateRename (/home/ubuntu/workspace/suppress/users.js:698:8)
at Verifier.verify.then.success (/home/ubuntu/workspace/suppress/users.js:652:10)
at process._tickCallback (internal/process/next_tick.js:103:7)
```