Commit Graph

119 Commits

Author SHA1 Message Date
Leonard Craft III
9d207ee288 Mark some Berries as unobtainable 2022-11-27 12:20:46 -06:00
Marty
225ea55638 Fix more crashes with Opportunist/Mirror Herb 2022-11-26 10:49:55 -05:00
Marty
39d6fca334 Fix Opportunist/Mirror Herb 2022-11-25 19:06:41 -05:00
pyuk-bot
341d5146aa
Make Mirror Herb/Opportunist only ignore each other (#9065) 2022-11-25 17:15:13 -05:00
Karthik
3c862682be
Fix Moody stat drops being blocked by Clear Amulet (#9048) 2022-11-24 13:15:14 -06:00
pyuk-bot
9f0f9d6672
Mirror Herb and Opportunist only copy move boosts (#9012) 2022-11-18 22:06:49 -05:00
Kris Johnson
d50c8c249b
Add Gen 9 (#8997) 2022-11-17 20:46:29 -05:00
Leonard Craft III
ff4e51f728
Correct Room Service event timing (#8959) 2022-10-30 17:42:03 -05:00
Leonard Craft III
05faddbc93 Correct super Sitrus Berry HP restoration amount 2022-10-08 14:50:35 -05:00
Alexander B
56f8c3144d
Proc hazards in the order they were set (#8730) 2022-05-19 19:05:32 -05:00
Karthik
49149ea8fb
Properly handle Zacian/Zamazenta Crowned forms (#8753) 2022-05-09 14:23:15 -05:00
mdebackr
7018db450b
Fix Red Card interaction with Life Orb and Shell Bell (#8726) 2022-04-25 16:24:35 -04:00
Leonard Craft III
f033714eda
Implement held Poke Ball legality (#8722) 2022-04-18 12:16:58 -04:00
urkerab
3e3f7f95ce
Fix some ability interactions with OMs (#8695) 2022-03-20 14:04:12 -04:00
pyuk-bot
0f3d37ab87
Don't activate Jaboca/Rowap Berries vs Magic Guard (#8670) 2022-02-17 17:49:19 -06:00
Marty-D
f9416f9310
Items: Renumber duplicates 2021-12-21 11:09:36 -05:00
Marty-D
14b3eb1065 Dex: Tweak CAP 30 number 2021-12-18 14:50:32 -05:00
Kris Johnson
f7e9f7a0ff Add CAP 30 2021-12-04 11:38:35 -07:00
pacmanboss256
23b35498f6
Rename the "mystery" and "authentic" move flags (#8445)
* mystery -> allyanim
* authentic -> bypasssub
2021-08-30 23:07:50 -07:00
Karthik
91ff372e00
Include more forms in exclusive item lists (#8434) 2021-08-17 20:32:05 -05:00
Leonard Craft III
3c7fc87b6b Simplify Eject Button Sky Drop interaction
Thanks urkerab!
2021-08-11 17:57:35 -05:00
Jacob McLemore
65ca586d81
Fix Metronome (Item) and two-turn moves interaction (#8430) 2021-08-10 10:59:17 -04:00
Jacob McLemore
9979d3e66b
Fix Sky Drop + Eject Button interaction (#8429) 2021-08-09 19:03:52 -05:00
TheSupervillain
d8d2b80fa5
Refactor Berserk Gene to use useItem (#8423) 2021-08-06 18:21:58 -04:00
Leonard Craft III
606576f453
Add various mechanics tests (#8313)
* Standardize Photon Geyser tests
* Add Gulp Missile tests
* Add Berserk Dragon Darts test
* Add Ring Target tests
* Add and improve Metronome tests
* Add Sparkling Aria tests
* Add additional Fling tests
* Standardize Mummy tests
* Add Rollout submove targeting test
* Improve Flower Veil tests
* Add Acupressure tests
* Improve Sky Drop tests
* Add Future Sight tests
* Improve Wandering Spirit tests
* Improve Rapid Spin tests
* Add Rocky Helmet victory test
* Improve Focus Punch tests
* Add a skipped Stomping Tantrum test
2021-05-20 08:43:08 -04:00
Leonard Craft III
d946308900
Fix the order of many end-turn resolution effects (#8307)
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
2021-05-17 11:53:52 -04:00
Karthik
b6d5fff24b
Unfix interaction between Gluttony and Neutralizing Gas ending (#8273)
Reverts #8250, but will keep gluttony test file and add more tests to it. This is being done because indirect sources of damages are not causing gluttony to trigger (such as belly drum).
2021-05-05 13:44:59 -04:00
Karthik
f453d37817
Fix interaction between Gluttony and Neutralizing Gas ending (#8250) 2021-05-03 11:25:47 -04:00
pacmanboss256
9de563f839
Fix Adrenaline Orb's interaction with max stat stages (#8154) 2021-05-01 14:01:32 -04:00
pyuk-bot
fa974427ef
Migrate terrains from onTerrain to onResidual (#8232) 2021-04-25 13:00:37 -07:00
Guangcong Luo
f9fdc73133
Support per-pokemon Residual handlers in Side/Field conditions (#8222)
For side conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onSideStart`/`onSideRestart`/`onSideResidual`/`onSideEnd`,
with the `onResidualOrder` properties renamed `onSideResidualOrder`.

For field conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onFieldStart`/`onFieldRestart`/`onFieldResidual`/`onFieldEnd`,
with the `onResidualOrder` properties renamed `onFieldResidualOrder`.

(The `onField` and `onSide` part helps make it clear to the type system
that the first argument is a Field or Side, not a Pokemon.)

Side and field conditions can now use `onResidual` to tick separately
on each pokemon in Speed order. `onResidualOrder` (the per-pokemon
tick) can be timed separate from `onSideResidualOrder` (the
per-condition tick), allowing conditions to end at a different priority
than they tick per-pokemon.

Relatedly, `onTeamPreview` and `onStart` in formats now need to be
`onFieldTeamPreview` and `onFieldStart`.

Unrelatedly, `effectData` has been renamed `effectState`, and the
corresponding state containers (`pokemon.statusData`,
`pokemon.speciesData`, `pokemon.itemData`, `pokemon.abilityData`,
`field.weatherData`, `field.terrainData`) have been similarly renamed. I
renamed the types a while ago, but I was holding off renaming the fields
because it would be a breaking change. But this is a breaking change
anyway, so we might as well do it now.

Note: `onResidual` will tick even on `onSideEnd` turns, although
`onSideResidual` won't. When refactoring weather, remember to
check `this.state.duration` so you don't deal weather damage on the
ending turn.

Intended as a better fix for #8216
2021-04-25 10:55:54 -07:00
pyuk-bot
3639079d1f
Protective Pads should not apply to Gulp Missile (#8207)
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
2021-04-19 12:39:33 -04:00
Guangcong Luo
13189fdb02
Update Dex API (#8181)
This is the change that renames:

- `Dex.getMove` -> `Dex.moves.get`
- `Dex.getAbility` -> `Dex.abilities.get`
- `Dex.getItem` -> `Dex.items.get`
- `Dex.getSpecies` -> `Dex.species.get`
- `Dex.getEffect` -> `Dex.conditions.get`
- `Dex.getNature` -> `Dex.natures.get`
- `Dex.getType` -> `Dex.types.get`
- `Dex.getFormat` -> `Dex.formats.get`

In addition, some other APIs have been updated:

- `getByID` methods have also been added to every other table.
- `Dex.moves.all()` now gets an array of all moves
  - Plus equivalent methods for `abilities`, `items`, `species`, `formats`, `natures`, `types`
  - Note: there's no `Dex.conditions.all()`
- new API: `Dex.stats` for naming/iterating stats
- `Dex.getEffectByID` -> `Dex.conditions.getByID`
- `Dex.getType` -> `Dex.types.get`
- `Dex.data.Formats` -> `Dex.data.Rulesets`
- `Dex.formats` -> now an array `Dex.formats.all()`
- `Dex.getRuleTable` -> `Dex.formats.getRuleTable`
- `Dex.validateFormat` -> `Dex.formats.validate`

Team functions have been split off into a new `sim/teams` package:

- `Dex.packTeam` -> `Teams.pack`
- `Dex.fastUnpackTeam` -> `Teams.unpack`
- `Dex.generateTeam` -> `Teams.generate`
- `Dex.stringifyTeam` -> `Teams.export`

`Teams.export` has also been rewritten to better match how it works in client.

This implements #8178
2021-04-08 03:00:37 -07:00
pyuk-bot
9b47789e45
Fix Jaboca and Rowap vs. self-destruct and future moves (#8057) 2021-02-19 11:11:45 -05:00
Leonard Craft III
220cac3aa7
Convert modifiers from hex to decimal (#8003) 2021-02-10 17:02:18 -05:00
Flethan
293a694188
Fix Bright Powder/Lax Incense accuracy modifier (#7973) 2021-01-31 10:36:33 -05:00
Leonard Craft III
0d78f967d6 Fix Ripen's interaction with Jaboca/Rowap Berries 2021-01-26 20:36:25 -06:00
Adam Tran
2c65de1a16
Fix various Future Sight / Doom Desire issues (#7884) 2021-01-07 19:20:30 -05:00
urkerab
cdcdf2da1b Shell Bell should heal from all damage 2021-01-05 17:29:35 +00:00
urkerab
80d652d59b Sturdy should trigger before Focus Sash but after False Swipe 2021-01-05 16:58:03 +00:00
Marty-D
8b86eec2ba
Fix Eject Button interaction with Pursuit 2020-12-31 15:23:38 -05:00
The Immortal
d9c2ee8d39 Lum Berry activates after Synchronize
Thanks @DaWoblefet!
2020-12-31 21:58:36 +04:00
urkerab
74ae95a91c
Update accuracy calculation for latest Gen 7 research (#7806) 2020-12-15 18:37:24 -05:00
aviettran
f66569a242
Fix Symbiosis interaction with Eject Button (#7718) 2020-11-24 11:14:05 -05:00
The Immortal
6b1b318977 Fix Metronome interaction with two-turn moves 2020-11-20 13:14:00 +04:00
urkerab
5620a31f48
Fix custap berry with gluttony (#7653) 2020-11-07 19:09:47 -08:00
The Immortal
8d3e06854f Add Galarica Wreath 2020-10-29 21:01:56 +04:00
The Immortal
58e8e4203d Micle Berry is obtainable 2020-10-25 01:15:36 +04:00
The Immortal
ada31d73b6 Soul Dew is available 2020-10-24 03:45:42 +04:00
The Immortal
8d7b72c606 Release the berries 2020-10-23 19:41:40 +04:00
The Immortal
b4f3c98630 Update obtainable items
Haven't seen confirmation of Soul Dew yet.
2020-10-23 18:52:15 +04:00
Marty-D
744760ed24
Fix Wandering Spirit interaction with Protective Pads 2020-10-08 21:09:15 -04:00
The Immortal
2b0c77939f Correct Weakness Policy mechanics
And added relevant Burning Jealousy tests.
2020-09-26 00:56:41 +04:00
Marty-D
355c2e7868 Add Galarica Cuff
Closes #7408
2020-09-22 22:56:31 -04:00
Guangcong Luo
ea8f52ce97
Move descriptions to data/text/ files (#7036)
This adds some new `data/text/` files, which are the new home for
item/move/ability descriptions, as well as in-game messages, in one
place for ease of translation.
2020-09-06 22:00:11 -07:00
Kris Johnson
8656d633ac
Format volatiles consistently (#7314) 2020-09-05 08:12:24 -07:00
Mia
deeed6c789
Remove sim/ and data/'s globals (#7091) 2020-08-07 06:44:15 -07:00
Guangcong Luo
4d09f7acde Rename more instances of Effect to Condition 2020-07-26 11:26:23 -07:00
Guangcong Luo
2f805c93a2
Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Marty-D
10e4ecdc84 Clean up event priorities 2020-07-21 10:43:12 -04:00
Kris Johnson
4b22301e5d
Silver Powder has a space in its name in Gen 8 (#7028) 2020-07-21 03:27:40 +04:00
Marty-D
654d701e4c Update accuracy modifier chaining
Based on an understanding of Gen 4's system. Possibly not fully correct, but certainly less incorrect!
2020-07-20 15:00:54 -04:00
urkerab
97d4d973bb
Adjust fractional priority for very latest research (#6931) 2020-06-30 07:51:01 -07:00
urkerab
17e4cb49a4
Adjust fractional priority for latest research (#6928) 2020-06-29 12:09:10 -07:00
The Immortal
98e9bd2f8e Add new data for Slowpoke lines 2020-06-17 19:21:35 +04:00
Leonard Craft III
3496491d4f
Fix Farfetch'd / Sirfetch'd with new apostrophe (#6721)
Also fixes Stick's behavior
2020-05-19 21:56:35 -07:00
Marty-D
4f325648af
Fix Eject Pack interaction with Parting Shot
+1 SadisticMystic
2020-05-15 11:37:03 -04: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
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00