Commit Graph

4261 Commits

Author SHA1 Message Date
Guangcong Luo
9bf108dad8
Clarify README Warning 2018-09-02 01:12:40 -05:00
urkerab
9bf48c904f Avoid floating point error in health parse (#1140) 2018-08-27 19:58:04 -05:00
Guangcong Luo
28aa6e8b91 Support team backups in packed format
Team backup/restore was previously always unpacked, which is good for
readability but bad for memory usage. At high team counts, this can be a
serious problem, so with this change, if you have more than 350 teams,
your teams will be backed up in packed format.
2018-08-27 20:28:09 -04:00
Guangcong Luo
9d17e2bdd5 Fix S/M rival music
Due to a bug, it wasn't in the rotation of possible BGM at all.
2018-08-26 16:22:28 -04:00
Guangcong Luo
8562b2f090 Fix misc bugs 2018-08-26 16:18:06 -04:00
The Immortal
687be9a2ac
Teambuilder: Fix default validation format 2018-08-26 04:20:57 +04:00
Guangcong Luo
d8ad11e355 Add Miror B music easter egg
Also refactor scene.teamPreview into two functions, scene.teamPreview
and scene.teamPreviewEnd.
2018-08-21 15:34:52 -04:00
Guangcong Luo
91b1f2d833 Add Gen 3 Pressure warning
It is possible, in most cases, to correctly track Pressure PP in Gen 3.
It is, however, a fuckton of work, and I'm way too busy to do that work
right now.

So instead, have a warning about how PP tracking might be wrong in the
event of Pressure.

TODO: Send silent still Pressure activations using |split|
2018-08-21 15:34:52 -04:00
Guangcong Luo
ead9b27557 Fix cries for Necrozma formes 2018-08-21 15:34:52 -04:00
Guangcong Luo
add113dd6e Support global command console PM window
This is a companion to

6ed64cf0c2

and makes it so that a PM window without a specified userid will be a
global command console.
2018-08-21 15:34:52 -04:00
Guangcong Luo
f5e5ed1aa8 Fix bug when more pokemon than in Team Preview
Zoroark is now a case in which an opponent might have more apparent
pokemon than we were told from Team Preview.

TODO: Fancier tracking so people don't report bugs about pokemon count
with Zoroark in randbat
2018-08-20 17:17:00 -04:00
whales
f4ea4f3772 Use either command character for clientside commands (#1134) 2018-08-06 10:24:17 +09:00
Guangcong Luo
4f2d776c1e Refactor fix for in-battle auto-scroll 2018-08-02 14:16:29 -04:00
Guangcong Luo
184c1e29a8 Fix move popups after Gastro Acid
(This is a bit of a hack; will need to be moved during the refactor.)

Fixes #1135
2018-08-02 14:15:05 -04:00
asgdf
fe51dd1216 Stop battles from scrolling to the bottom constantly (#1136) 2018-08-02 05:20:09 +09:00
Guangcong Luo
bc7fc9f46f Correctly handle suppressed Abilities
Abilities suppressed by Gastro Acid or Core Enforcer now show up as
"(suppressed)" in tooltips, and will no longer show as taking effect
in move tooltips.

Fixes #1132
2018-07-20 14:40:42 +09:00
The Immortal
4ab9b86183
Teambuilder: Default to PU for ZU 2018-07-14 14:05:32 +08:00
The Immortal
c5d34374ae
Add Zeraora to mythicals 2018-07-14 13:46:55 +08:00
urkerab
350e5d2921 Fix Transform of female Smeargle into Rotom (#1131) 2018-07-10 22:08:42 -05:00
urkerab
a000b7fab3 Copy HP bar colour when Illusion wears off (#1130) 2018-07-08 11:53:28 -04:00
HoeenHero
ec7cbef2e0 Update PSPL link (#1129) 2018-07-05 19:59:56 +08:00
Nixola
b2d60b51a6 Fix message when changing to invalid nick (#1128)
Usernames must contain at least one letter or the auth server will reject them; a number isn't enough.
2018-07-03 13:22:35 -07:00
The Immortal
39f7deefaa
Teambuilder: Battle Spot Special isn't always level 50 2018-07-03 21:44:52 +08:00
The Immortal
4866bd50c3
Teambuilder: Battle Spot Special doesn't always require pentagon 2018-07-03 21:42:54 +08:00
Ridaz
5bb7326b43 Add fade in & out to terrain animations 2018-06-22 00:20:02 +01:00
whales
7f79014914 Set cryurl properly (#1127) 2018-06-19 13:12:37 -07:00
Ridaz
3de0a4237b Re-adjust timing of contact animations 2018-06-16 00:16:07 +01:00
Guangcong Luo
2c011765e9 Fix pause button when clicking "Switch sides" 2018-06-11 23:11:46 -07:00
Guangcong Luo
8bdd31853b Improve phazing statbar/sub animation 2018-06-11 23:11:46 -07:00
Ridaz
c3c5c1c423 Adjust timing of some contact animations 2018-06-11 23:11:46 -07:00
Guangcong Luo
e681022817 Improve Substitute phaze animation 2018-06-11 14:49:33 -07:00
Guangcong Luo
40c7e814dc Fix waiting in the animation engine 2018-06-11 14:33:56 -07:00
Guangcong Luo
4dfebdcb53 Improve SubPass animation 2018-06-11 05:23:38 -07:00
Guangcong Luo
92263b0da2 Fix crashes from incomplete resets
`side.lastPokemon` could retain a destroyed Pokemon, leading to
crashes.
2018-06-11 05:04:23 -07:00
Guangcong Luo
7d12639c77 Fix Substitute crash 2018-06-11 04:56:17 -07:00
Guangcong Luo
051901dcd2 Don't permanently remove sprites on faint
Permanently removing sprites is really brittle, and can cause
unnecessary crashes in situations like Illusion.
2018-06-11 04:30:15 -07:00
Guangcong Luo
6d80607312 Fix Play/Resume button location 2018-06-11 03:24:32 -07:00
Guangcong Luo
ebad1cf3c2 Fix Protean 2018-06-11 01:36:35 -07:00
Guangcong Luo
da40e0c41a Fix screens reanimating on skip 2018-06-11 01:20:52 -07:00
Guangcong Luo
466b9247bd Fix sprites disappearing after Team Preview
Also a few other minor issues
2018-06-11 01:02:32 -07:00
Guangcong Luo
42e9175edf Fix side condition tracking
Weather and side condition timings weren't updating like they should
2018-06-11 00:08:07 -07:00
Guangcong Luo
5084540275 Remove waits from partial animations
This is a stopgap until some better timing can be figured out for
them.
2018-06-10 23:45:11 -07:00
Guangcong Luo
090ba89a09 Fix Substitute animation 2018-06-10 20:35:01 -07:00
Ridaz
5aa3486911 Remove wait usage in irrelevant places 2018-06-10 11:26:44 +01:00
Guangcong Luo
b40149e6f7 Rename battle -> scene where appropriate 2018-06-09 23:34:25 -07:00
Guangcong Luo
45ec4f9f50 Fix wait usage in move animations
scene.wait(...) now affects `showEffect`, which makes some old move
animations incorrect. This commit makes them do what they're intended
to do.
2018-06-09 23:21:26 -07:00
Guangcong Luo
714e254ef3 Fix weather/terrain animation 2018-06-07 12:12:10 -07:00
Guangcong Luo
c431b044ea Support pausing battles/replays as spectator
This makes the replay experience in-sim more like the replay experience
in the replay viewer.
2018-06-07 02:22:36 -07:00
Guangcong Luo
c590a0c370 Add new BattleScene animation engine
battle.js is probably PS's oldest code. It's received minor touch-ups:
a refactor to prototypes early on, and then a refactor to TypeScript
and classes recently, but otherwise it's had basically zero maintenance
until now.

That's probably why this refactor took me over a week.

The biggest change is that the animation engine strewn around
Pokemon, Side, and Battle has been broken out into a new class named
BattleScene.

Pokemon, Side, and Battle now only track state; all animation is now
done in BattleScene and PokemonSprite.

The fates of major classes:

battle.ts:Pokemon - animation has been moved, mostly to PokemonSprite
battle.ts:Side - animation has been moved, to PokemonSprite/BattleScene
battle.ts:Battle - animation has been moved, mostly to BattleScene

Major changes:

- Many many variables have been renamed to be much clearer about what
  they mean. For instance, `animationDelay` is now `timeOffset`, and
  `activityDelay` is now `minWait`. A few bugs relating to me mixing
  up these two variables have also been fixed. jQuery variables named
  like `fooElem` have been renamed like `$foo`.

- The unnecessarily complicated queue1/queue2/activeQueue system,
  previously used for telling the animation engine to stop after Pause
  was pressed, has been replaced with a simple `interruptionCount`
  counter.

- The entire scene can now be reconstructed from scratch, which means
  that the `fastForward` system no longer needs to touch the DOM
  outside of the battle log. "Prev turn" and "Skip to turn" should be
  faster in 1000-turn battles now.

- The animation engine now supports displaying weather and terrain
  simultaneously.

- During a replay, Team Preview is shown for a second (instead of
  immediately skipping to the battle).

- Various aspects of the animation engine should be much less brittle
  now.

- Many bugs were fixed (and new ones were introduced).
2018-06-07 02:22:36 -07:00
The Immortal
e957f953c2
Move custom ranks below % 2018-06-07 05:11:28 +08:00