Commit Graph

460 Commits

Author SHA1 Message Date
urkerab
2f1002edde Restore missing Grudge activation message (#1214) 2019-01-16 15:51:11 -06:00
urkerab
00346db803 Fix crash damage message after server PR 5042 (#1210) 2019-01-13 13:28:47 -06:00
urkerab
320711ae6f Fix Fairy Lock for replays (#1212) 2019-01-13 13:22:16 -06:00
Guangcong Luo
adccb29971 Add Berry weaken message 2019-01-12 07:44:05 -06:00
Guangcong Luo
3c39a968c2 Fix Flash Fire message 2019-01-11 07:57:33 -05:00
Guangcong Luo
a05f23fd37 Use data/text.js for stats in text parser
We previously used BattleStats, but using `data/text.js` allows stat
names to be translated.
2019-01-05 05:36:50 -06:00
Guangcong Luo
c1f372b3a7 Add a default item activation message 2019-01-05 04:00:29 -05:00
urkerab
246a235a59 Fix message for Jaboca and Rowap Berry (#1200) 2018-12-31 00:37:07 -08:00
urkerab
cc9b346dfd Fix some messages for abilities blocking effects (#1192) 2018-12-05 19:21:51 -06:00
urkerab
c74c61ac7f Add Mind Blown recoil message (#1188) 2018-12-03 19:37:58 -06:00
urkerab
2494aca33b Fix Gen 1 partial trapping message (#1178) 2018-11-25 21:52:01 -06:00
urkerab
ddfb162b8a Fix magnitude activation (#1179) 2018-11-25 21:51:30 -06:00
Guangcong Luo
331b35de53 Sync data
This will probably be our last data sync, until I work out a new solution
for rebuilding learnsets-g6 without needing an old copy, so learnsets-g6
can be gitignored.

The reason an old copy is currently needed is because it was written back
when learnsets-g6 contained data on the order same-level moves were learned
(most pokemon have a lot of L1 moves, and the order is relevant for which
moves are kept and which moves are replaced if you catch the pokemon at
medium-low level.)

This information isn't present in learnsets.js, so learnsets-g6.js needs to
preserve that information from older copies of learnsets-g6.js.

This has of course been entirely irrelevant for years, because we never
encoded learnset order data in gen 7 in the first place. But the code for
doing so stayed around...
2018-11-24 02:12:50 -05:00
Guangcong Luo
84e76c4bba Stop tracking minidex in Git
These files are now autogenerated by the build scripts, and depend
on files not even present on GitHub anyway.

(The minidex is a database of height/width for PS's animated GIF
sprites, for use by the animation engine. It also contains dex numbers
for use by pokemon icon spritesheets.)
2018-11-22 21:54:46 -06:00
Guangcong Luo
1e25db3224 Split 'activate' and 'upkeep' message types
Weather uses both 'activate':

    The mysterious strong winds weakened the attack!

and 'upkeep':

    The sandstorm is raging.

So keeping them on the same message type is complicated. PS already
uses `|upkeep|` to mark the beginning of the residual phase, so this is
a good name for this message type.

For now, only upkeep messages happening during the residual step are
here - Hail, Sandstorm, and Uproar. Messages that happen at other
times, such as Attract's "[POKEMON] is in love with [TARGET]!" remain
as "activate".
2018-11-22 21:46:26 -06:00
Guangcong Luo
8efa0048e7 Fix Magician/Pickpocket activation message 2018-11-22 17:16:50 -05:00
Guangcong Luo
e01c181307 Fix misc bugs in text-parser
- Magic Room
- Wide Guard
- Perish Song
- Leppa Berry
- Gen 1 Special boosting
2018-11-22 06:05:12 -05:00
Guangcong Luo
69aa657e1a Fix Mega evolution message in Let's Go 2018-11-20 15:02:46 -06:00
Guangcong Luo
27633540a1 Fix bugs in BattleTextParser update 2018-11-19 20:46:28 -05:00
Guangcong Luo
38b66272f2 Fix issues identified by LGTM
Out of 12 issues found:

3 bugs:

- duplicate property - caught a bug in Gen 1 Light Screen
- duplicate property - caught a bug in Gen 1 Reflect
- unused variable - caught a bug in type animations

7 harmless but good for code quality:

- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- duplicate case - harmless but important for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but important for code quality

2 not-bugs that had to be worked around:

- unused variable - used for an `eval` trick, had to use a workaround
- unused variable - used for readable destructuring

I think on balance, LGTM does more good than bad. Catching bugs early
is worth some amount of hassle.

(Also like half these problems are problems tslint could catch if I
actually bothered to set it up...)
2018-11-15 18:52:53 -06:00
Guangcong Luo
3bd4ff0eb0 Add default start messages
Default start messages do two things:

1. Remind us that we don't have a real message coded for an effect.

2. Support showing any kind of start message by default for custom
modded games. (It's of course still an option to pass `[silent]` and
then add a custom message with `|-message|`.)
2018-11-15 18:52:53 -06:00
Guangcong Luo
7d619fb8ea Remove weather ability-start messages
These _are_ real messages from Gen 3, but since it's not like we
otherwise accurately simulate Gen 3 messages, it's a bit weird to
keep these around.
2018-11-15 18:52:53 -06:00
Guangcong Luo
f6c03e0370 Implement new battle-text-parser
All battle text messages have been moved out of `src/battle.ts` and
into its own file `data/text.js`.

Code for handling this is in the new files `src/battle-log.ts` and
`src/battle-text-parser.ts`.

`data/text.js` is now extremely self-contained, and nearly ready for
translation support!

This is a significant modernization of battle.ts. In addition to moving
messages out:

Functions for getting names (`pokemon.getLowerName()` etc) have been
removed.

`battle.minorQueue` has been removed. Minor lines are now processed
directly on the main queue, with a new `battle.waitForAnimations`
flag to decide whether or not the main queue should wait for animations
to finish before moving on to the next line.

`battle.waitForResult()` and `battle.endPrevAction()` have been
removed. These confusingly-named functions closed the messagebar (and
flush the minor queue). They've been replaced with
`scene.maybeCloseMessagebar()`.

`pokemon.markMove()` and `pokemon.markAbility()` have been renamed
`pokemon.rememberMove()` and `pokemon.rememberAbility()`.
2018-11-15 18:52:53 -06:00
Guangcong Luo
4e7f998afa TypeScript data/graphics.js 2018-05-18 17:10:58 -05:00
Guangcong Luo
d247364027 Migrate js/battle.js to TypeScript
This is only a first step and doesn't pass strictNullChecks.

I'm committing now because skipping straight to refactoring will be
easier than trying to make it pass strictNullChecks as-is.

TypeScript found at least a few bugs here, which is nice.
2018-05-16 19:49:25 -05:00
Ridaz
76618605af Fix build 2018-04-01 09:22:37 +01:00
Ridaz
af903221e7 Update move animations 2018-04-01 09:11:28 +01:00
Ridaz
482249f48a Update move animations
Added a new particle so it can be used by some moves like Haze and Smokescreen
2018-01-27 22:45:18 +00:00
Guangcong Luo
5f33456468 Sync data 2018-01-26 18:15:03 -05:00
Ridaz
91fc604eec Update Teleport animation 2018-01-11 09:02:48 +00:00
Ridaz
013399cbdd Add Let's Snuggle Forever move animation 2018-01-09 20:30:43 +00:00
Ridaz
2bbde1eadf Update Fake Out & Photon Geyser animations 2018-01-06 17:34:54 +00:00
Ridaz
d868019313 Update Spite & Throat Chop animations
Also removed the redundant Brick Break animation
2018-01-04 00:23:31 +00:00
Ridaz
bef58119a4 Update Aura Sphere animation 2018-01-01 15:39:05 +00:00
Ridaz
97c40a4143 Update Extreme Speed & Teleport animations
... And Earthquake. Slightly.
2017-12-11 20:21:15 +00:00
Guangcong Luo
3d977d3026 Fix style error 2017-12-08 11:27:35 -06:00
Ridaz
b82f125a1c Update background shaking animations 2017-12-06 23:46:13 +00:00
Ridaz
b472cf6946 Update Bulldoze and Earth Power animations
Stomping Tantrum uses Bulldoze's animation
2017-12-04 17:55:25 +00:00
Ridaz
400bfa5b59 Update Earthquake move animation
Hopefully this will decrease the motion sickness
2017-12-03 14:42:30 +00:00
Ridaz
1c2089b75e Add confused self hit animation 2017-12-02 06:31:35 +00:00
Ridaz
f444d6b8f4 Properly update Earthquake animation (#1056) 2017-12-01 19:40:58 -06:00
Guangcong Luo
60d707ef6d Revert "Update Earthquake and Confusion animations"
Bugged commit

This reverts commit 3c5498591d.
2017-11-27 11:34:06 -05:00
Ridaz
3c5498591d Update Earthquake and Confusion animations 2017-11-26 12:04:21 +00:00
Guangcong Luo
45264383e8 Fix relative URLs in graphics.js
They were breaking replays.
2017-11-21 20:28:53 -05:00
Ridaz
45fa8cfaf3 Alias USUM move animations
It's temporary
2017-11-17 00:07:22 +00:00
Ridaz
5a632d951d Add USUM animations 2017-11-16 23:26:03 +00:00
urkerab
c14cd19648 Remove unexpected trailing commas (#1044) 2017-11-09 18:29:28 -05:00
Ridaz
c41d2b288c
Remove spook from battles (#1039)
Halloween is over
2017-11-01 22:45:29 +00:00
Ridaz
c6771d71b8 Update Shadow Sneak move animation 2017-10-31 06:20:57 +00:00
Ridaz
41d70b24ff
Add cursed effect animation (#1037)
... And a few extras
2017-10-30 17:28:40 +00:00