Commit Graph

4903 Commits

Author SHA1 Message Date
Guangcong Luo
c4ea15d1b5 Fix build error 2020-03-15 19:43:28 -07:00
Guangcong Luo
95d3d3a95d Support /debug nw
This opens the desktop client's debugger, which for some reason doesn't
open the way NW.js's documentation says it should.
2020-03-13 22:38:55 -04:00
Guangcong Luo
e452b1b730 Correctly escape names in PMs 2020-03-13 22:38:27 -04:00
Kris Johnson
6ffe19c254 Fix NFE tiers (#1477) 2020-03-13 12:53:54 -04:00
Peach
03f6f5e5b7 Attribute /raw messages, fix /uhtml in chat (#1475) 2020-03-12 10:03:00 -04:00
Guangcong Luo
7fe8ac794b Fix rendering of pokemon gender
Now that `pokemon.gender` matches what it says it does (genderless is
now 'N' and not ''), all the rendering code needs to be updated. I made
them all pixelated while I was at it.
2020-03-12 00:25:25 -04:00
Guangcong Luo
5e3ea5174e Refactor getPokemon
`Battle#getPokemon` has always been a huge mess, due to being designed
to get Pokemon in a variety of situations with different levels of
incomplete information provided by a PO replay.

For context: we haven't supported PO replays in around 9 years.

So today, I finally tracked down all the current uses of `getPokemon`.

They are now four different functions:

1. `getSwitchedPokemon`
   - Get or create a Pokemon when one switches in.
2. `rememberTeamPreviewPokemon`
   - Create a Pokemon because it was revealed during Team Preview.
3. `getPokemon`
   - Get a Pokemon that did something recently
4. `findCorrespondingPokemon`
   - Find a Pokemon to track PP use for a switch-in option tooltip

They share basically zero code and should never have been the same
function in the first place.

Now that `getPokemon` is no longer a mess, `newPokemon` and the
`Pokemon` constructor can be rearranged and more strongly typed. One
fewer `Object.assign`!
2020-03-11 23:32:32 -04:00
Peach
8073ff6765 Don't automatically log back into forcerenamed names (#1474) 2020-03-11 13:30:02 -07:00
The Immortal
367b9a0580 Update text for Darmanitan-Galar and Eiscue 2020-03-11 12:35:25 +04:00
Marty-D
081142f3e8 Icons: Add Alcremie form indices 2020-03-08 17:40:29 -04:00
Kris Johnson
5c8cae263d Add Sinistea and Polteageist minisprite indexes (#1473) 2020-03-08 13:26:42 -07:00
Kirk Scheibelhut
6b3820f523 Backport the Preact testclient's login method (#1471) 2020-03-07 20:45:25 -08:00
Guangcong Luo
7ceb394796 Test pull requests with GitHub Actions 2020-03-07 20:31:09 -08:00
HoeenHero
03f72aae96 Fix Miror B Easter Egg Themes (#1472)
The themes would not play because we were tracking what theme to set
to with BattleSound.bgmNum. When loading a new bgm, BattleSound.setBgm
will simply return if the existing bgm (BattleSound.bgm) is the same
as the one were trying to set the bgm to.
2020-03-07 18:29:31 -08:00
Guangcong Luo
a36e3ab6fb Remove Travis CI
(It's been superseded by GITHUB ACTIONS)
2020-03-07 15:51:54 -08:00
Guangcong Luo
796091b381 Try GitHub Actions again 2020-03-07 14:01:09 -08:00
Guangcong Luo
ba86685a4d Refactor Flower Veil boost blocking message 2020-03-06 11:44:41 -08:00
Guangcong Luo
e85cb9d0a6 Simplify the NFE teambuilder and fix bugs (#1470) 2020-03-05 15:51:47 -08:00
Kirk Scheibelhut
aea517e655 Avoid redundant checks in guessEVs
ensureMinEVs doesn't mutate template.id (template is immutable) so
there's no reason to continue checking it. While this is hardly a
huge efficiency boost the compactness of the previous code is hardly
worth preserving over it (though this whole block could be turned
into a method and then `return` could be used to retain the
compactness).
2020-03-01 14:15:35 -08:00
Kirk Scheibelhut
07d93e0866 Add missing gen 8 support to AltFormPopup 2020-03-01 14:15:31 -08:00
Kris Johnson
7c68a659f8 Add isMax property to moves (#1469) 2020-02-29 18:07:20 -08:00
The Immortal
1fbd603637 Add Octolock text and status 2020-03-01 00:55:05 +04:00
Kirk Scheibelhut
0b4623a389 Add link back to Smogon analysis for sample sets (#1468)
Closes #1357
2020-02-26 00:24:05 -08:00
Ben Davies
e3fcaa492c Properly set the encoding to UTF-8 on all HTML pages (#1467)
This adds the BOM to all HTTP pages as per the HTML5 spec and ensures
all pages use UTF-8 as their meta charset (which is still kept for
compatibility with older browsers).
2020-02-23 00:13:56 -08:00
The Immortal
e4e55fbeb9 Room Service is not a great item 2020-02-21 04:08:36 +04:00
petuuuhhh
326bad861c Add Heavy Duty Boots, Expert Belt, and Room Service to Popular items (#1466) 2020-02-20 16:00:17 -08:00
Kris Johnson
ad5b8abd2e Add teambuilder support for Metronome Battle (#1443) 2020-02-19 16:11:50 -08:00
The Immortal
9d561a987a Teambuilder: Move TRs to bad items 2020-02-18 01:13:35 +04:00
Kris Johnson
4033a75f50 Add teambuilder support for NFE (#1464) 2020-02-15 08:23:20 -08:00
HoeenHero
f1243525e8 Add support for Max Guard and G-Max Moves to tooltips (#1454) 2020-02-13 16:30:53 -08:00
Guangcong Luo
8de78677c5 Add tooltip note for 2 indistinguishable mons
Fixes smogon/pokemon-showdown#6305
2020-02-13 16:29:29 -08:00
Guangcong Luo
87961a7b80 Don't raise Atk for Body Press 2020-02-13 16:28:57 -08:00
Kris Johnson
bf91ff78fd Add (Uber) support (#1465) 2020-02-13 01:55:35 +04:00
The Immortal
78ac95cb06 Make weather messages consistent 2020-02-12 21:52:40 +04:00
Kris Johnson
0cb6463c19 Add Pokemon Home support (client side) (#1462) 2020-02-12 11:00:24 +04:00
Kris Johnson
4e92ebc3b1 Add G-Max Steelsurge hazard sprite (#1461) 2020-02-08 20:31:06 +04:00
Kris Johnson
70254a37c0 Add sprite index for Toxtricity-Low-Key-Gmax (#1460) 2020-02-06 02:56:30 -08:00
Guangcong Luo
c1f3b038e4 Update desktop client (#1459)
Last time we built the desktop client, in 2015, NW.js was called
node-webkit.

Since then:

- NW.js has added NaCl and some other things, ballooning the installer
  from 30 MB to 120 MB. (The NaCl stuff on Windows seems to be
  deletable, helping keep its installed size slightly smaller.)

  (If anyone wants to make a custom build without NaCl, that'd help me
  a lot)

- NW.js also has a lot more files, and NSIS makes adding/removing files
  annoying enough that I wrote a script to automate it for me.

- Apple has made Gatekeeper requirements a lot stricter, requiring
  setting up entitlements, Hardened Runtime, notarization, and
  stapling, (in addition to just signing in 2015). I documented the
  process because there are zero online guides for it right now.

But on the other hand, this update hopefully fixes the crashes that
the old desktop client has. It also fixes:

- the Chrome bold emoji bug is gone

- MP3 is no longer under patent, allowing us to have only MP3 files for
  everything

- honestly I don't think we use any other Chrome feature added in the
  last four years
2020-02-05 14:50:28 -08:00
Guangcong Luo
91f14bd320 Add test/check-filenames script
This script will make sure a directory of sprites (or cries, or
anything else) is in PS `spriteid` format.
2020-02-05 11:30:18 -08:00
Guangcong Luo
9411b927d5 Fix crash in AFD mode 2020-02-04 22:50:18 -08:00
Kris Johnson
bf46c879d0 Fix left-over 'this.isNatDex' (#1458) 2020-02-03 15:18:37 +04:00
Kris Johnson
1290511f67 Fix unreleased hidden abilities in past gens (#1438) 2020-02-01 22:05:29 -08:00
The Immortal
e13a4698df Add No Retreat text 2020-02-01 23:44:09 +04:00
Kris Johnson
993c1eb303 Update OMs teambuilder support (#1457) 2020-01-31 16:38:09 +04:00
The Immortal
50ccf3a72c Add Max Guard status 2020-01-30 11:33:42 +04:00
Kris Johnson
e3e0be8490 Fix teambuilder tiers for previous generations (#1455) 2020-01-29 19:14:28 -08:00
The Immortal
0cd6a71962 Update eatItem text 2020-01-28 13:28:41 +04:00
James Ko
8e12cf90c0 Really maximize Attack IVs if Transform is the sole move (#1456) 2020-01-27 20:14:32 -08:00
Waleed Hassan
e7c645647b Improve App#renameRoom (#1447)
It was missing some features like updating title bar, autojoins, etc.
2020-01-27 14:33:00 -08:00
Guangcong Luo
dcd98ec0b6 Fix boostFromItem message 2020-01-26 15:50:56 -08:00