Commit Graph

23714 Commits

Author SHA1 Message Date
The Immortal
a5d3b4dd58 Add Battle Spot Special 3 2017-03-22 14:38:53 +04:00
The Immortal
e4c97f61af Add AAA suspect test 2017-03-22 14:28:48 +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
Kris Johnson
701964620e Ban Innards Out from BH (#3376)
http://www.smogon.com/forums/threads/bh7-suspect-vote-2-innards-out.3598631/
2017-03-21 14:24:51 +04:00
asgdf
c7768acf7c Fix adjacent foe-targeted moves in singles (#3381)
The targetLoc validation was causing issues when the target type was
"Adjacent Foes" and the targetLoc was 0, despite the decision being valid.
2017-03-20 23:43:43 -05: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
Marty-D
c955328676 Update Telekinesis 2017-03-20 22:40:04 -04:00
Quinton Lee
519b270b24 Fix /prelockdown 2017-03-20 18:30:36 -05:00
Ben Davies
5adac2bc56 Matchmaking: fix crash on user disconnect/merge
Challenges and searches weren't being cleared properly after moving
them out of GlobalRoom#onLeave.
2017-03-20 17:01:42 -05:00
Ben Davies
9cf06e503b Matchmaker: don't allow battles to start on lockdown again 2017-03-20 03:01:39 -05:00
Guangcong Luo
484db5ce29 Improve Cancel button
Now gives error message in "too late" situations.
2017-03-20 03:37:06 -04:00
Kris Johnson
9b75c6c58b Ban Vulpix from LC (#3374)
http://www.smogon.com/forums/threads/sm-lc-vulpix-voting.3598711/page-3#post-7278691
2017-03-20 08:32:48 +04:00
Guangcong Luo
95dd4809f6 Fix Cancel button 2017-03-20 00:30:08 -04:00
Guangcong Luo
7927b17f10 Choice API: Add new side.choose function
Does the same thing as battle.choose, but without the autocommit.
2017-03-20 00:30:08 -04:00
Guangcong Luo
8199340c9c Fix 1v1 Team Preview in new choice system
The client apparently still sends the full team in these cases.
2017-03-20 00:30:08 -04:00
Guangcong Luo
dd7021a63c Fix lockedMove validation in new choice system 2017-03-20 00:30:07 -04:00
Ben Davies
f295023aeb Matchmaker: fix crash in spawning tournaments 2017-03-19 23:18:11 -05:00
Kris Johnson
7bb7bc9eaa Prevent banned stones from being used in /mnm 2017-03-19 15:31:14 -05:00
Lionyx
38758b022f Fix typo in /globalpromote 2017-03-19 13:57:00 -05:00
The Immortal
6e3d0530f3 Remove LC suspect 2017-03-19 09:15:24 +04:00
Marty-D
145897ff7f Fix Encore 2017-03-18 18:22:19 -04:00
Marty-D
8335212801 Add new event Pokemon 2017-03-18 17:05:47 -04:00
Guangcong Luo
a24fdf8a51 Fix ghost Lobby in servers without Lobby autojoin 2017-03-18 14:15:27 -05:00
Guangcong Luo
b8df1b365a Remove fuzzur dependency
We no longer use it.

Nondeterministic tests are annoying and fuzzers are only useful for
detecting crashes, memory leaks, etc. You can't use them to detect
behavior correctness because that's what your actual code does.

(In other words, fuzzers are useful, but not as part of a regression
test suite.)
2017-03-17 23:14:52 -05:00
Guangcong Luo
698fb2ad9a Refactor choices
PS's choice system has now been majorly rewritten!

Battle#parseChoice has been eliminated, and Battle#choose is now a
very lightweight wrapper around the BattleSide#choose* functions, which
now handle validation.

Partial decisions have been mostly removed. You can manually construct
decisions partially with the side.choose* functions, but there's no
other support for them. Partial undo has been removed completely.

Choice tracking has been renamed from side.choiceData to side.choice.
side.choices has been removed and is now autogenerated from side.choice
when needed.

side.choiceData.decisions has been renamed side.choice.actions. In the
future, "decision" is a deprecated term and should be called "action"
wherever it shows up.

side.choiceData.waiting and side.getDecisionsFinished() have been
merged into side.isChoiceDone().

Other values in side.choiceData have either been rendered unnecessary
or renamed to something clearer.

The "skip" and "pass" choices have been merged together. Passes can
still be filled in automatically (so you can just use `/move 1` in
doubles when you have only one Pokémon left).
2017-03-17 23:14:52 -05:00
Guangcong Luo
4cbc55d70b Move rqids and rename to room-battle
This is a major refactor to start moving extraneous functionality out
of battle-engine.js. In particular, rqid, player leaving/renaming, and
inactive player tracking have been moved out of battle-engine.js and
into room-battle.js
2017-03-17 23:14:52 -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
The Immortal
5bdd4d9088 AAA: Ban Keldeo 2017-03-17 19:34:51 +04:00
jumbowhales
ed7b23e374 Update Dark Void description (#3358) 2017-03-17 09:27:50 -04:00
Ben Davies
213b697d7c Rooms: move matchmaking logic to ladders-matchmaker.js (#3364)
This abstracts matchmaking logic from the global room away to its own
module, allowing the two to be decoupled from each other entirely with
some refactoring.

Related to #3361
2017-03-17 02:42:30 -05:00
Guangcong Luo
df5d8b283e Fix mistakes in tests
So I've been working on a massive refactor to the choice system for,
like, over a week. It's still not done, but it's found some mistakes
in the tests that should be fixed.
2017-03-17 02:22:52 -05:00
Bär Halberkamp
a980132c23 Wifi: fix last commit 2017-03-17 04:26:05 +01:00