Commit Graph

3633 Commits

Author SHA1 Message Date
Guangcong Luo
2788fcaac6 Update replay embed URLs
This forces a recache for the new cry URLs.
2016-12-11 21:08:44 -05:00
Guangcong Luo
a2f3db9c56 Remove unused variable 2016-12-11 21:08:44 -05:00
Guangcong Luo
80dda89c4d Make front sprites 1.5x size in gen 1-4
PS makes back sprites larger than front sprites, which is standard for
Gen 5 (although we do it slightly differently - Gen 5 makes backsprites
2x size; we make backsprites 1.5x size) and onwards (where the games do
a 3D engine with real perspective, and we fake perspective by making
backsprites 1.5x size).

This is, of course, wrong for gens 1-4, where the games fake perspective
by drawing pokemon in backsprites bigger, but making the image sizes the
same. This fixes it so the front sprites are the same size as the back
sprites, using the same fake perspective system.
2016-12-11 21:08:44 -05:00
Guangcong Luo
ae3071f1ef Fix Zygarde forme sprites in replays 2016-12-11 21:08:44 -05:00
Guangcong Luo
c893f37b0a Battles: Make Pokemon cry when fainting
This uses the wrong Pikachu cry, but we'll deal with that later I guess.
2016-12-11 21:08:44 -05:00
Guangcong Luo
b11409bad1 Battles: Make Pokemon cry when megaing 2016-12-11 21:08:44 -05:00
Guangcong Luo
79048f8934 Fix cries in replays
Cry URLs depended on forme capitalization, which isn't available in
replays. This commit changes it to work on formeids.
2016-12-11 21:08:44 -05:00
Ivo Julca
16a6de258c Tooltips: Fix crash when reading slot of a fainted Pokémon 2016-12-11 20:57:30 -05:00
urkerab
c462690b60 Don't display side condition ids in replays (#830)
* Don't display side condition ids in replays

* Pass the effect in directly and use its id and name appropriately
2016-12-11 12:02:55 -08:00
Guangcong Luo
f229736b4d Finish converting session lib to prepared statements 2016-12-11 05:34:52 -05:00
Guangcong Luo
763cfb01f0 Fix background music stuttering
I finally got to reading the SM2 documentation more closely, and saw:

> precision can vary between 20 msec to perhaps 0.5 seconds and the
> sound's position property will reflect this delta when the
> onPosition() callback fires

Emphasis on "this.position will reflect this delta".

Anyway, this new system should have significantly less noticeable
stuttering.
2016-12-11 05:33:41 -05:00
Guangcong Luo
d66779e7e7 Update to new audio format
All audio is now stored as mp3/ogg, and cries now use the same filename
format as sprite IDs.

All cries have been updated to Gen 7, and at much higher quality and
lower filesize, too. They're roughly the same size of the old ones, e.g.
bulbasaur.mp3 is 8KB, same as the old bulbasaur.wav, but with much
better fidelity since the source file is a 159KB wav file.

Music is now also available in mp3/ogg, making it playable in the desktop
client.

I still mildly dislike Vorbis for being more CPU-intensive and not
hardware-accelerated, but we don't seem to have any other choice for the
desktop client.

TODO: Feature detection for ogg support. Browsers make this ridiculously
hard for some reason. The main problem is that SM2 supports MP3 a whole
lot of different ways, so MP3 should still be playable even without the
corresponding HTML5 support.
2016-12-11 05:33:41 -05:00
Guangcong Luo
b08916e951 Make Gen 7 the default teambuilder tier 2016-12-11 05:33:41 -05:00
Guangcong Luo
7213a56a05 Battle list: Add Elo filter 2016-12-11 05:33:41 -05:00
asgdf
8c6c157054 Refocus on originally focused element on popup close (#837) 2016-12-09 15:06:57 -05:00
Marty-D
72b3f5ebfb Fix Hoopa Unbound's cry 2016-12-09 13:50:58 -05:00
asgdf
b68dc54c52 Allow cycling through tabcomplete candidates in reverse (#834)
Using Shift-Tab.
2016-12-09 00:23:41 -05:00
Marty-D
93985c6534 Stop Z-Baton Pass from clearing volatiles 2016-12-07 10:33:00 -05:00
Guangcong Luo
d06ff1b31a Make sprite IDs consistent
Previously, mega-x and mega-y formes were an exception to the usual
[basespeciesid]-[formeid] format, but this wasn't reflected in the
server's getTemplate function anyway. This consistency just makes
everything easier.
2016-12-07 05:24:26 -05:00
Guangcong Luo
b406ae6eb1 Refactor baseSpeciesChart to array
It doesn't seem to actually benefit from being an Object, and the
Array is more readable and performant.
2016-12-07 05:24:26 -05:00
Guangcong Luo
b6515662c2 Support Z-Move targeting
Z-Move targeting was previously a bad hack but is now a better hack!

Specifically, now it's actually sent from the server, but also in place
is a better hack for backwards compatibility with old servers.
2016-12-07 05:24:26 -05:00
urkerab
a978465dca Show the underlying move name when reviewing a player's choice (#832) 2016-12-05 02:58:26 -06:00
urkerab
4e503c3e0a Allow the server to update psuedo weather backwards compatibly (#828) 2016-12-04 10:22:18 -06:00
Marty-D
23aa0bf3fa Add Comatose message 2016-12-03 20:19:08 -05:00
The Immortal
7ae78ee7bd Fix tooltips for Random Battle (#829)
* Fix tooltips for Random Battle

* Update Random Battle check
2016-12-02 22:06:37 -06:00
Ridaz
0e4693709a Add Anchor Shot move animation 2016-12-03 02:11:10 +00:00
Guangcong Luo
693824a64c Teambuilder: Add support for S abilities 2016-12-01 01:47:19 -05:00
Guangcong Luo
6bdfea8b09 Update format name hack
It now no longer changes "[Gen 6] ..." to "[Gen 6] [Gen 6] ..."
2016-12-01 01:46:30 -05:00
Guangcong Luo
c951a28f4e Update default format to Gen 7 randbat 2016-12-01 01:46:15 -05:00
Guangcong Luo
341a8a07bf Fix ES3 compatibility 2016-11-30 23:36:57 -05:00
The Immortal
2cfd683b7f Display [Gen 6] and hide [Gen 7] (#827) 2016-11-30 17:30:36 -06:00
asgdf
6aef44cb72 Fix gen 7 mons' battle anims not showing (#826) 2016-11-29 23:55:44 -06:00
Bär Halberkamp
9f9769033a New message for users banned from tournaments 2016-11-30 02:36:38 +01:00
Ridaz
91f002ff3a Update Z-move animations
...And Baneful Bunker
2016-11-30 01:08:58 +00:00
Guangcong Luo
d593d5355e Version 0.11.0 2016-11-29 18:46:30 -05:00
Guangcong Luo
23751a93f2 Autogenerate version number
The version number is now generated from package.json instead of needing
to be manually updated in multiple places.
2016-11-29 18:45:43 -05:00
Guangcong Luo
15fc14856d pokedex-mini.js is now autogenerated 2016-11-29 18:44:52 -05:00
Guangcong Luo
abfce85f5c Sync data 2016-11-29 18:22:14 -05:00
Guangcong Luo
563206cadc Update sprite data for gen 7 2016-11-29 18:21:55 -05:00
Guangcong Luo
d1e2f50e65 Add pokedex-mini autoupdate script 2016-11-29 18:21:26 -05:00
asgdf
4f3656d386 Dark mode: Prettify notifying roomtab on hover (#825) 2016-11-29 16:38:22 -06:00
Ridaz
a8905975db Add and update placeholder animations
- Also updated Soft-boiled and Nasty plot animation
- Added Shadow Bone and Kinesis
2016-11-29 02:02:58 +00:00
Ivo Julca
cec3a70571 Properly fix target selection for Z-Moves 2016-11-27 19:57:21 -05:00
urkerab
ab8776c20e Add specific message for when Z-Power boosts more than one stat (#822) 2016-11-27 18:17:36 -05:00
Ivo Julca
e8eded7da3 Remove trailing commas 2016-11-27 00:39:01 -05:00
Ivo Julca
1169b0ba10 Fix target selection for Z-Moves 2016-11-27 00:37:43 -05:00
Ridaz
aada876677 Add Z-Power animation 2016-11-26 01:56:07 +00:00
urkerab
01cd487b8a Add various Z-move messages (#819) 2016-11-25 20:24:37 -05:00
Marty-D
243fc5288e Add Shell Trap messages 2016-11-25 20:01:42 -05:00
Marty-D
19bd4e7e1f Add Shields Down messages and correct a few others 2016-11-25 19:47:00 -05:00