Commit Graph

50 Commits

Author SHA1 Message Date
whales
74ab9baa98 UNO: Fix crash on DQing player with uno 2018-09-08 00:42:46 -05:00
HoeenHero
61be747557 Uno: Improve Typescript 2018-09-02 13:55:15 -04:00
Kris Johnson
e5dcb1fa48 TypeScript UNO (#4825) 2018-09-01 14:20:18 -04:00
whales
fa7c216da5 UNO: Fix playing +4 as second to last card (#4769) 2018-07-21 00:06:57 +09:00
Bär Halberkamp
32e388dad6 UNO: fix autostart crash 2018-07-05 14:22:41 -04:00
Harman
5bcdea7008 UNO: Make autostart command (#4498)
* Make `/uno autostart` command.

* Add autostart help + specify game ended.

* Update uno.js

* Specify if game is ended or started.

* Remove extra condition from Timeout

* Add const and add another condition.

* make these things one line

* remove extra stuff

* Allow to turn off autostart timer

* Tools.toId -> toId

* Check timer while turning it off

* Fix grammar

* Specify seconds and UNO game
2018-07-04 14:33:25 -04:00
Guangcong Luo
cad1165ad4 Implement Chat.count
Adds some more magic to make Chat.plural more readable when used to
count things.

Overall, it's not _nearly_ as concise as I'd like, but it might be the
best we can get for now.
2018-03-05 20:57:25 +09:00
Charlie Kobayashi
331af4e794 Refactor Modlog Formatting (#3972) 2018-01-08 15:18:24 -06:00
Kris Johnson
a6ce5c9dc1 Refactor chat-plugins and formats to for...of (#4288) 2017-12-28 05:22:28 -06:00
Jeremy Piemonte
e0c08eafba Standardize help commands (#4285) 2017-12-27 19:35:32 -06:00
Charlie Kobayashi
703393642e UNO: colour + UNO interaction, make UNO button easier to press (#4247) 2017-12-13 15:33:59 -06:00
Charlie Kobayashi
6e176a5d17 UNO: fix playing 2 cards during UNO (#3949)
Add a new "uno" state (that does absolutely nothing except define what is going on), so that the previous player can't play their last card during the 750ms grace period for the player to slap the UNO button.

Credits to PS user "Java SE Runtime" for catching this
2017-09-03 09:38:36 +04:00
ZestOfLife
9e66e298f2 UNO: Fix passing when choosing color (#3900)
The issue was players passing after they played a wild card and did not choose a color.
2017-08-19 15:02:15 -07:00
jumbowhales
4e84ab8ced Uno: Fix syntax error (#3841) 2017-07-28 22:26:52 -04:00
Charlie Kobayashi
8a70763a76 UNO: make uno less subtle, allow player to uno before next player plays. (#3822) 2017-07-23 22:24:28 -07:00
jumbowhales
91752efa40 Uno: fix playing 2 +4s in a row (#3714)
should fix #3713, which i broke with an earlier change
2017-07-02 16:16:19 +09:00
jumbowhales
76b56bddb4 Uno: wild cards default to the color of the top card when DQd (#3578) 2017-06-19 10:49:13 -07:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
Charlie Kobayashi
b90703623d Update uno.js (#3513)
- announces the presence of a game when a user joins the room.  Players will immediately see their hand instead.
- wild cards will cause the top card display to inherit the changed colour
2017-05-08 23:05:39 -05:00
Guangcong Luo
6dd58b40d3 Refactor simulator into new sim/ directory
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.

In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
  in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`

In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
2017-05-05 16:48:38 -05:00
Charlie Kobayashi
d447be5525 UNO: give notifications for highlights (#3446)
- only ``|c:|`` notifies, ``|c|`` apparently
2017-04-11 02:43:10 -04:00
Charlie Kobayashi
246ebde9c9 Room-games: dont rename players to their guest accounts (#3425) 2017-04-04 16:56:23 -04:00
Charlie Kobayashi
e4ff94f196 UNO: make pass action subject to suppresing (#3430) 2017-04-04 16:54:11 -04:00
Charlie Kobayashi
86f4f4ceb5 Update uno.js (#3423) 2017-04-03 14:54:18 -04:00
Anubhav Kumar
da3b008050 Add per turn highlighting to UNO (#3420)
This allows for users to be highlighted on their turns (currently a big problem) and also allows users to know if it's their turn in cases of disconnections (the current code does not).
2017-04-01 21:02:42 -04:00
Charlie Kobayashi
b9231b1321 UNO: fix +4 verification (#3407)
- forgot to check for changed colour with the last fix regarding references
2017-03-29 00:28:47 +04:00
Kris Johnson
06631e1e17 UNO: turn snake_case variables into camelCase (#3404) 2017-03-26 22:35:25 -04:00
Charlie Kobayashi
d51a5b7d67 Update uno.js (#3392) 2017-03-23 23:07:06 -04:00
Teremiare
d47aaa6ba7 UNO: Improve colored text readability (#3384) 2017-03-23 22:56:27 -04:00
panpawn
79462da881 UNO: Fix various style issues & improve UI (#3389) 2017-03-22 23:04:53 +04:00
Spandan Punwatkar
ade78bd2c7 Add Join button to UNO declaration (#3383) 2017-03-22 01:11:39 -04:00
Kris Johnson
ce09ebf526 UNO: Add command aliases (#3382) 2017-03-22 00:42:17 -04:00
Charlie Kobayashi
2b4c2cae32 UNO: Fix being stuck in color state (#3385) 2017-03-22 03:38:26 +04:00
Charlie Kobayashi
1fb786e32d "colour" => "color"
- use American spelling of "colour" (aka "color")
(minor: - change two ``let`` => ``const``)
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
2181ab8a25 Colour fix
- made the darker end of the blue card less blue
- made the yellows go to a paler yellow for one end and use a slight orange tinge for the "darker" spectrum of the yellow
2017-03-20 23:38:01 -05:00
Charlie Kobayashi
badd084bae Make yellow more "yellow" 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
4698ce5fc5 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
594a9e0e99 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
74a54b53da Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
e5c0d730f1 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
fbad7c9c84 Update uno.js 2017-03-20 23:38:01 -05:00
Charlie Kobayashi
b21715639e Update uno.js
- gradients to cards for Slayer-senpai
- use the button class for cards
- make pass/draw buttons less hard
- put in Zarel-senpai's recommendations for text shadows

- display updated cards after playing anything
2017-03-20 23:38:01 -05:00
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