Commit Graph

178 Commits

Author SHA1 Message Date
Leonard Craft III
576e0c7d0f
Add forme-exclusive move validator tests (#6709) 2020-05-16 18:27:50 -07:00
Leonard Craft III
4e4261267c
Add a few G-Max Chi Strike tests (#6631) 2020-05-14 11:34:09 -07:00
Marty-D
c8c048a645 Update Curse targeting 2020-05-14 13:23:37 -04:00
Kris Johnson
56fbb0201a
Pikachu-Gmax is now available from raids (#6679)
* Pikachu-Gmax is now available from raids

* Volt Tackle is legal on Gmax Pikachu now
2020-05-12 06:14:57 +04:00
Kris Johnson
9f5d1bc681
Fix Dynamax Clause validation (#6674) 2020-05-10 14:42:53 -07:00
Kirk Scheibelhut
fa65ed4979
Add alt form index data to dex (#6669)
AltForm index info obtained from kwsch/PKHeX's FormConverter.cs (thanks Kurt).
Thanks to @Lusamine (Anubis) for help with the peculiarities.
2020-05-10 12:20:40 -07:00
Guangcong Luo
291f891309 Fix mod loader test 2020-05-08 07:25:09 -07:00
Leonard Craft III
1dbb1a280b
Unskip passing tests (#6662) 2020-05-07 16:53:10 -07:00
Marty-D
339f516a2b Gen II: Fix residual damage when opponent is KOed 2020-05-06 15:41:18 -04:00
Guangcong Luo
5aa5f53089 Fix Shields Down for cosmetic formes 2020-05-01 23:30:04 -07:00
Guangcong Luo
6d5ea45adf Fix misc bugs preventing build 2020-05-01 12:48:54 -07:00
Guangcong Luo
c4dd88ac96 Update Effect type signatures
- `affectsFainted` is a `PureEffect` property

- `infiltrates` shouldn't exist on moves outside of OMs
2020-05-01 11:56:54 -07:00
Kirk Scheibelhut
b05e1941e2 Ensure explosion halves defense in Gen 3&4 2020-05-01 11:03:54 -07:00
Guangcong Luo
7aa42b1212 Remove Dex.getOutOfBattleSpecies
Literally every current use is a bug.
2020-04-30 23:29:20 -07:00
Guangcong Luo
e0f6453b60 Refactor data definitions
- `Modded[Effect]Data` are now correctly defined: they must either have
  `inherit: true` and be partial, or not have `inherit: true` and be a
	complete `[Effect]Data` entry

- `id` is no longer allowed; instead, it's calculated directly from
  `toID(name)`. The one exception, Hidden Power, gets a `realMove`
	property to track this (it's still used to set `.id`, though;
	TODO: really fix it properly).

- `num` is still required in `data/pokedex.ts` (dex number),
  `data/moves.ts` (move index number, for Metronome), and
	`data/items.ts` (minisprite sprite-sheet location). It's still not
	required for mod-only items and moves.

- `num` is no longer allowed for PureEffects (in `statuses.ts`) where
  it's always been meaningless.

- `color` and `heightm`, being completely flavor, are still not
  required for `pokedex.ts` in mods. They're still required in the base
	pokedex.
2020-04-30 21:39:29 -07:00
Guangcong Luo
9209201f1c Improve pokedex changesFrom/battleOnly validation 2020-04-29 14:15:04 -07:00
Guangcong Luo
800d8bd8f3 Remove Dex.getForme etc
The server now uses the same approach as the client of treating
cosmetic formes as real formes, as documented in `FORMES.md`.

This eliminates the need for the `.forme` and `.speciesid` properties
of `Pokemon`.

`pokemon.id` has also been removed: useful, since it turns out half
of its uses were bugs that should have used `pokemon.species.id`.
2020-04-28 17:38:54 -07:00
Kris Johnson
1bb842e099
Convert evos/prevo/etc from IDs to names (#6625) 2020-04-28 16:02:50 -07:00
urkerab
1ede5508aa
Moxie and Beast Boost should have one combined boost for all fainted Pokémon. (#6557)
In addition, they should not activate for a spread move that ends the game.
(This contrasts with Soul-Heart, which will activate until the last target.)
2020-04-27 15:44:33 -07:00
urkerab
8476a24318
Shell Trap should not power up if hit by a Z- or Max move (#6622) 2020-04-27 08:04:49 -07:00
Guangcong Luo
5d57aaaedf Fix Imprison test
I'm pretty sure the old Imprison test was straight-up wrong, and based
on the old bugged behavior.
2020-04-26 18:21:02 -07:00
Guangcong Luo
e8e3493c40 Fix Struggle activation conditions
PS wasn't correctly detecting `disabled: 'hidden'` moves as disabled
for the purposes of detecting Struggle activation. This has been fixed.

Thanks to DaWoblefet for unit tests!

Fixes #6620
2020-04-26 17:52:06 -07:00
Kirk Scheibelhut
30defec706
Validate that SpA and SpD EVs match in Gen 2 (#6615)
Pointed out by FOMG in https://www.smogon.com/forums/threads/gen-2-ps-development-post-bugs-here.3524926/post-8439815
2020-04-25 13:01:02 -07:00
urkerab
554cb570a7
Dancer should not activate if the holder fainted (#6613) 2020-04-25 09:55:13 -04:00
Guangcong Luo
f6f4467265 Turn on prefer-const for .js files
Not having prefer-const on the JS side makes JS -> TS refactors really
unreadable. This commit just auto-fixes it so we're using
`prefer-const` everywhere.
2020-04-23 11:37:47 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00
Luc Moussiegt
be4ff58260
Fix Sky Drop Wonder Guard interaction (#6593) 2020-04-20 12:14:37 -04:00
Marty-D
d9d345d8df Correct power modifier priorities
Thanks @dawoblefet!
2020-04-18 20:33:13 -04:00
Luc Moussiegt
4a749aff3e
Fix Technician interaction with Battery/Auras/PowerSpot (#6587) 2020-04-18 12:46:19 -04:00
Guangcong Luo
80634c6918 Fix Dazzling
I don't like using Bulbapedia as a source, but our researchers are all
asleep and TI said this was high-priority.
2020-04-16 03:12:40 -07:00
Leonard Craft III
6792b82a21
Add Teatime tests (#6582) 2020-04-15 21:27:45 -07:00
Leonard Craft III
2a07102281
Add G-Max move validator illegality test (#6580) 2020-04-15 21:27:16 -07:00
Kirk Scheibelhut
79ea998a93 Skip failing dazzling test 2020-04-15 16:17:37 -07:00
Kirk Scheibelhut
ea601caf6c Add tests for Dex edgecases 2020-04-15 16:15:13 -07:00
The Immortal
01aac3b491 Add Dazzling tests 2020-04-15 22:22:56 +04:00
Leonard Craft III
3842e03d60
Fix residual order for G-Max Volcalith / Wildfire (#6565) 2020-04-15 12:20:27 -04:00
Guangcong Luo
900ad5a8c8
Prioritize -All Pokemon above +Past etc (#6574)
Previously, format bans/unbans were processed in order of "most specific
to least specific".

So `+Giratina-Origin` trumps `-Giratina` trumps `+Uber` trumps
`-All Pokemon`.

And nonstandard reasons (`Unobtainable`, `Past`, `CAP`, etc) were
slotted between `Uber` and `All Pokemon`.

This has the unfortunate effect that if a base ruleset allows a certain
normally-banned category of Pokémon, you can't use `-All Pokemon` to
whitelist a list of Pokémon.

Moving nonstandard reasons to lowest precedence once again allows
`-All Pokemon` to be used as intended.
2020-04-14 15:27:59 -07:00
urkerab
19be262793
Fix Pastel Veil mechanics (#6571)
Makes Pastel Veil pass the tests from #6568
2020-04-13 15:18:14 -07:00
urkerab
9c8c1e1468
Fix Fell Stinger after redirection (#6572) 2020-04-13 14:20:37 -07:00
Leonard Craft III
be3a396bf7
Add Pastel Veil, Emergency Exit, and Fell Stinger tests (#6568) 2020-04-12 23:06:36 -07:00
Kirk Scheibelhut
ca69c8e6e3
Fix Minior-Meteor forme not being allowed in Gen 7 (#6563) 2020-04-12 16:25:13 +04:00
Kirk Scheibelhut
2b8c03fe04 Increase test timeout in test/sim/misc/state.js
This is already marked as '(slow)' so could be timeout(0), but this
shouldn't be *that* slow, so increasing it from 2000 to 5000 seems
sufficient.
2020-04-11 12:04:17 -07:00
Guangcong Luo
091f764681 Fix rule inheritance 2020-04-08 13:25:11 -07:00
Guangcong Luo
40783b7dc6 Fix spread moves vs Unaware 2020-04-07 10:56:20 -07:00
Guangcong Luo
ff0b80f297 Fix triples shift priority 2020-04-07 10:56:20 -07:00
Guangcong Luo
33fa9d56ef Fix mega evolving into self
A hacked-in Megazard X can mega evolve into Megazard Y, but not into
Megazard X.
2020-04-07 10:56:19 -07:00
Marty-D
ff3ca6783a Fix Imposter activation 2020-04-05 14:56:42 -04:00
Leonard Craft III
d8cf01bee1
Add Primal weather phazing test (#6525) 2020-04-05 08:50:17 +04:00
Kirk Scheibelhut
d17a48cc47 Fix Dex#getForme for Flabebe 2020-04-04 21:36:58 -07:00
Waleed Hassan
855899b330
Fix Battle#switchIn (#6521)
Regression caused by: 47b55f96bc

`Battle#dragIn` used to run the `SwitchOut` event among other functions
but were accidentally left off in the refactor. This commit adds them back.

The main bug caused by this is Natural Cure not curing status aliments when
phased out by Roar.
2020-04-03 09:22:55 -07:00