Commit Graph

794 Commits

Author SHA1 Message Date
Charlie Kobayashi
8c19124817 Fix display style / mechanics
Display changes:
- done to Zarel's request/suggestions!
- hides the UNO button automatically the turn after

Drawing: 
- refactored regular drawing of a card to be an "event" of its own (onDraw)
- prevents users from drawing a card after playing a colour card (drawing can only happen in during the "play" state now)
- only drawing on your own turn will show you your hand display (you can still view your hand any time using ``/uno`` or ``/uno hand``)

UNO handling:
- handles uno parsing if the next player draws, refactored into it's own function as well (since it occurs at both the draw and the playing part)
- for 2p games, if the user does not say uno before playing their last card (Skip => [last card]), they can draw/play without having to say UNO and be penalized 2 cards (in official rules, iirc you have to beat the next player's actions, and not your own)
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
d18430bdd2 Fix sorting
- also made blue cards have white text...
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
a3a6f62a61 Update uno.js
- used Array#find for checking if the card exists.
- split the html for hand display into several lines (had to use + to join the strings since template strings allow newlines just by pressing enter) - Do we __have to__ do it using client-side css?  I'm pretty sure that hangman and other chat plugins just list the styling stuff in the HTML as well.
- used a simpler sort ``this.hand.sort((a, b) => (a.colour > b.colour) || (a.colour === b.colour && a.value > b.value))``  Sorry Slayer, your method doesnt seem to work since it mixes between sorting by colour and value
- limited timer to max 300 seconds (5 minutes)... PS users already complain that 150 seconds for battles is already too much...
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
fd907e1015 Fix disabling 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
60155e9bad Remove unnecessary code
- remove ``.fill(0)``
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
764da53d1b Change createDeck() to match Zarle's comment 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
c03ab8e604 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
b8bc6d1f14 Create uno.js 2017-03-20 23:38:01 -05:00
Kris Johnson
7bb7bc9eaa Prevent banned stones from being used in /mnm 2017-03-19 15:31:14 -05:00
Ben Davies
fa3136f6f4 Prevent JSON writers from being able to block I/O (#3368)
These are the last place process.nextTick should be used. Also fixes
BattleRoom's unit tests.
2017-03-17 17:42:10 -05:00
Bär Halberkamp
a980132c23 Wifi: fix last commit 2017-03-17 04:26:05 +01:00
Bär Halberkamp
396cf81fdb Wifi: also send winners message in the wifi room 2017-03-17 03:35:08 +01:00
Spandan Punwatkar
79f3a85c65 Add Other Metas Chatplugin (#3292) 2017-03-12 18:07:50 +04:00
Spandan Punwatkar
5b811f02cc Add weight as a parameter for dexsearch (#3352) 2017-03-11 15:52:46 -06:00
Sipanale
d26f76f06d Giveaway Generated Window: Allow TID to be 00000 (#3350) 2017-03-11 10:28:27 +04:00
CheeseMuffin
1ec567ec6e Movesearch: Add Generations (#3337) 2017-03-05 19:18:49 -05:00
panpawn
531765dfce Scavengers: Remove extra space in UI (#3338)
This extra space was introduced in 549c1f89f2 when changing this line to use template strings.
2017-03-05 19:18:32 -05:00
CheeseMuffin
549c1f89f2 Creat official scavengers leaderboard (#3276) 2017-03-05 10:15:14 -05:00
panpawn
211e1a94f1 Roomsettings: Don't hardcode regular user rank (#3315) 2017-03-02 17:55:43 +01:00
Bär Halberkamp
6c19b31dfc Studio: fix spelling mistakes 2017-03-02 02:26:59 +01:00
Bär Halberkamp
9a46872e02 Studio: Improve nominating 2017-03-02 02:00:27 +01:00
Bär Halberkamp
039bf6fa87 Studio: remove period 2017-03-02 02:00:27 +01:00
Bär Halberkamp
30a576df4d Studio: Bump up font sizes 2017-03-02 02:00:27 +01:00
Bär Halberkamp
246f22d76a Wifi: Require FCs for giveaways 2017-03-01 21:59:30 +01:00
panpawn
7c4ed6dd46 Scavengers: Fix crashing help command (#3302) 2017-02-26 22:52:45 -05:00
Charlie Kobayashi
a844906098 Fix HTML and date field check in room-events (#3298) 2017-02-25 22:28:19 -05:00
panpawn
03b2c4763d Roomevents: Check description HTML syntax (#3291) 2017-02-25 02:05:14 -06:00
panpawn
0bdd3e6c19 Roomevents: Correct typo in errorReply (#3288) 2017-02-24 23:26:29 -06:00
panpawn
5e1cfefe64 Implement room events plugin (#3287)
This adds a room-managed room-specific events plugin that allows rooms to keep track of upcoming room events.

This is multipurpose and could be helpful to multiple rooms; may it be tournaments or upcoming sports games, this would be helpful in many use-case scenarios.
2017-02-24 22:45:07 -06:00
Guangcong Luo
8b25a865b9 Support /groups room and /groups global
Closes #3086
2017-02-24 00:53:16 -06:00
PainterEspeon
59a9d8bd8c Change to /scavengerhelp (#3033)
Changed "/scavenge <em>guess</em>" to "/scavenge _______" in the /scavengerhelp command. Especially considering UGM is beginning effective today-ish, helps make the command more clear to new users and get them acclimatized to the room. There has been recurring issue for a long time of new users believing that they need to type "/scavenge guess [their answer]" instead of "/scavenge [their answer]," the latter of which is correct.
2017-02-24 00:33:19 -06:00
Kris Johnson
621b737ca3 info.js: add Ash-Greninja exception (#3282) 2017-02-23 18:25:58 -06:00
Guangcong Luo
313cd36337 Fix display bug in !learn 2017-02-23 14:43:47 -06:00
Guangcong Luo
427ff5061e Support virtual console moves in !learn 2017-02-23 14:41:24 -06:00
panpawn
66c38b7430 Change Player rank from ★ to ☆ (#3240)
There is a client-side counterpart to this.
2017-02-23 05:03:45 -06:00
sparktrain
ee5f31bc71 Fix /caphelp (#3275)
Switch the HTML to unicode so the é displays correctly
2017-02-22 22:37:45 -06:00
Bär Halberkamp
ce2e82adfc FAQs: sort /roomfaq topic list alphabetically 2017-02-21 14:50:19 +01:00
spekss
dded0aa952 Replace <b> with <strong> in /groups (#3237) 2017-02-15 23:38:14 -06:00
spekss
5b1ceae9df Add bold in /punishments (#3236) 2017-02-15 23:37:56 -06:00
Bär Halberkamp
7667542c11 Fix travis build 2017-02-15 22:27:17 -06:00
Bär Halberkamp
af6035ba8b Add 'rfaq' as an alias for 'roomfaq' 2017-02-16 02:03:18 +01:00
Bär Halberkamp
53e18c2384 Add a rewritten Studio plugin
Still a work in progress, but works well enough to gather some feedback from actual use
2017-02-16 02:02:37 +01:00
spekss
38842e957d Add badge faq (#3084)
(http://www.smogon.com/badge_faq)
2017-02-10 16:50:28 -06:00
Guangcong Luo
6e100ee5b7 Add /punishments
This is just a generic punishments list. Feel free to pullreq
improvements.

Closes #3200
2017-02-10 17:11:06 -05:00
Guangcong Luo
81f13a18f1 Add user groups to /whoare
Specifically, user groups are now in /checkpunishment, which has been
renamed /offlinewhois. It doesn't actually function as an offline /whois
since it still requires auth.

Maybe making it not require auth should be a project to put in Ideas.
2017-02-10 17:10:15 -05:00
Bär Halberkamp
cb5c151424 Wifi: Fix giveaways of Nidoran 2017-02-08 16:14:41 +01:00
Bär Halberkamp
e780d71df5 Wifi: edit permission for /giveaway help staff 2017-02-05 11:57:20 +01:00
MacChaeger
5070c45f77 Correct brace alignment (#3206) 2017-02-05 05:15:31 -05:00
Bär Halberkamp
3ce65953be Wifi: fix mistake in guessAnswer 2017-01-28 13:11:38 +01:00
Bär Halberkamp
5514a7cd19 Wifi: Allow 5 char TIDs 2017-01-25 13:53:23 +01:00