Commit Graph

209 Commits

Author SHA1 Message Date
Instruct
0685e88e4f
SSB4: Balance changes and Bugfixes, pt 2 (#7954) 2021-01-30 23:34:41 +04:00
Instruct
18dea767a9
SSB4: Fix Urgent Bug and Descriptions (#7941) 2021-01-22 21:02:00 -05:00
Instruct
0d1c9fe098
SSB4: Bugfixes and Balance Patches (#7889) 2021-01-22 14:56:26 +04:00
Kris Johnson
c09587d3e4 SSB: Re-add thewaffleman 2021-01-03 02:31:38 -07:00
Annika
bee946e822 SSB: Remove xJoelituh 2021-01-03 01:24:19 -08:00
Instruct
27f05678c0
SSB4: Balance changes and bugfixes (#7856) 2021-01-01 18:46:27 +04:00
Instruct
47a8a04aa9
SSB: Nerf Forever Winter Nights (#7841) 2020-12-27 19:47:20 +04:00
Distrib
0cb0b65f66
SSB: Fix Tiki's image (#7840) 2020-12-26 14:58:35 -08:00
Instruct
b73efd84ab
SSB4: Bugfixes and balance changes (#7838) 2020-12-25 21:36:07 -07:00
fart
4acb83acc7
SSB4: Fix typo in Archas's description (#7834) 2020-12-25 04:06:49 -08:00
Instruct
1f9954b374
SSB4: Bug & crashfixes (#7837) 2020-12-24 21:51:11 -05:00
Instruct
901c1d8573
SSB: Fix Winter Hail decrease amt. Add discussion thread to format. small QC changes. (#7833) 2020-12-24 13:24:18 -05:00
Kris Johnson
ec0ecb1264 SSB4: The Immortal's quote shouldn't be an ID 2020-12-24 10:14:36 -07:00
Instruct
5b441c2013
Super Staff Bros 4 (#7793)
Collaborative Project lead by @xInstruct with many contributors.

See the Special Thanks section of https://www.smogon.com/articles/super-staff-bros-4
2020-12-24 11:21:02 -05:00
Kris Johnson
fe52ec2dab SSB: Remove a random duck 2020-11-28 02:45:20 -07:00
Guangcong Luo
9b5217ab70
Split up dex-data into more files (#7634)
* Split up dex-data over individual files

This commit introduces:
- `dex-abilities.ts`
- `dex-conditions.ts`
- `dex-formats.ts`
- `dex-items.ts`
- `dex-moves.ts`
- `dex-species.ts`

These files centralize definitions from `dex-data` and `global-types`.

* Inherit ItemData from Item etc

Previously, Condition inherited from ConditionData. Now, ConditionData
inherits from Condition. The advantage of the new approach is that now,
Condition and DataCondition no longer need to be separate types, and
there should be much less duplication of type definitions in general.

This has also been done for

- ItemData/Item/DataItem
- AbilityData/Ability/DataAbility
- FormatData/Format/DataFormat

Species and DataSpecies was already merged, but this also reverses
their inheritance (saving a lot of duplicated definitions in the
process!)

The only one left is MoveData, which is just super complicated and
will need its own commit.
2020-11-05 05:00:13 -08:00
Guangcong Luo
a55d3cd530 Fix crashes from using moves with no target
Specifically, if you target your ally and your ally uses Ally Switch
(causing you to target yourself), certain moves (including Thunder,
Hurricane, and SSA) crash. This has been fixed.
2020-10-19 18:10:25 +01:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Instruct
c5b6622bc6
SSB: Remove Ashe (#7332) 2020-09-07 16:59:59 -07:00
Kris Johnson
8656d633ac
Format volatiles consistently (#7314) 2020-09-05 08:12:24 -07:00
Kris Johnson
03326bf0a0
Fix crash caused by missed instance of toID (#7193) 2020-08-10 00:18:19 -07:00
Mia
deeed6c789
Remove sim/ and data/'s globals (#7091) 2020-08-07 06:44:15 -07:00
Kris Johnson
5fb36bcc62
SSB: Remove Flare (#7170) 2020-08-07 12:36:12 +04: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
Guangcong Luo
e14c327f4e
Fix typo in SSB set 2020-07-16 05:14:07 -07:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
DeltaCoderr
f447333bdd
SSB: Batch Update (#6797) 2020-06-07 12:12:18 -07:00
Nol
fecb2f3cb8
SSB: Batch Update (#6594)
* SSB: Name change Salamander to Instruct

* Promote Kipkluif and Psynergy to Driver

* Demote xfix to voice

* Demote Pluviometer to voice
2020-05-20 12:39:32 -07: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
Guangcong Luo
79091f6362 SSB: Fix Next Level Strats
Fixes #6663
2020-05-08 18:06:49 -07:00
fart
8efbbda576
Fix Glitch Out bug (#6656) 2020-05-05 18:49:19 -07:00
fart
fa9775bcf9
Fix Glitzer Popping bug (#6655) 2020-05-05 16:16:00 -07:00
Kirk Scheibelhut
2af7040270
Group zMove and maxMove attributes (#6652)
This mostly serves to provide cleaner and more consistent field
naming. maxMove currently doesn't have boosts or effects to group
together but who knows what will be thrown at us via DLC, and being
symmetrical with zMoves is a nice.
2020-05-04 20:21:27 -07:00
Guangcong Luo
6c1992b067 Fix Metronome blacklists 2020-05-02 00:16:55 -07:00
Guangcong Luo
23b59de881 Fix Metronome 2020-05-01 13:22:16 -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
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
Guangcong Luo
c5faebd739 Remove extraneous properties from BasicEffect
BasicEffect always had a `status` property to support the pattern of
testing it to see if it's a move that sets status directly.

This is just a situation that TypeScript is bad at.

Another possibility would be to set `status: undefined` on PureEffect,
Ability, Item, and Species, but I think that's also ugly. Casting to
Move is probably the best approach, so that's what we do now.
2020-04-25 12:57:46 -07:00
Guangcong Luo
31a81a91a2 Fix @type in .ts files
Some JSDoc type assertions failed to get converted during various .ts
refactors. This commit takes care of them.
2020-04-24 14:19:08 -07:00
Guangcong Luo
5d63b16d4d Fix botched merge in data/.ts refactor
The data/.ts refactor left a few .js files in, which weren't deleted
between 13 and 3 days ago:

c85f5bccb0

Because of this, the corresponding `.ts` files were considered new,
rather than renamed, and changes to the `.js` files got deleted rather
than merged.

Fortunately, this only affected `moves.js`, which has now been manually
re-merged with the changes.
2020-04-23 11:22:21 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00
Nol
a3b8db05f7
SSB: Update several ranks (#6556) 2020-04-18 22:03:42 -07:00
Guangcong Luo
6884c7ee81 Remove unnecessarily quoted keys in data/
(By pulling this out from the rest of the TypeScript refactor, this
should make the diffs for the TypeScript refactor more readable.)
2020-04-16 01:32:18 -07:00
fart
9fda11310a
Fix activeMoveActions bug (#6570)
Bar Fight is supposed to act like Fake Out and only work on turn 1. This line added in this PR was missing from the runMove function, so Bar Fight and Fake Out were usable past turn 1.
2020-04-12 22:28:39 -07:00
Guangcong Luo
2d78044604 Fix activeTurns/activeMoveActions bugs
`activeTurns` was previously a horrible hack, used for "first full turn
only" effects like Speed Boost as well as "first move action" effects
like Fake Out.

In addition to being a huge hazard for API users such as OMs, this also
means weird bugs such as Speed Boost not working if you get hit by
Sky Drop on your first turn.

This commit fixes them by splitting these counters into two - an
`activeTurns` counter for Speed Boost, and an `activeMoveActions`
counter for Fake Out.
2020-03-30 04:07:05 -07:00
The Immortal
81891546b9 Rename Missingno. to MissingNo. 2020-03-26 18:37:35 +04:00
Kris Johnson
ea1b028950
Rename cosmeticFormeName to forme (#6492) 2020-03-26 18:13:31 +04:00
Kris Johnson
994fc60aed
Rename Template to Species (#6478) 2020-03-25 23:29:27 -07:00
Kris Johnson
4090d2baac
SSB: Remove Raid (#6465) 2020-03-17 12:18:50 +04:00
Kris Johnson
eb6985031e
SSB: Update martha's rank (#6447) 2020-03-11 23:56:42 -04:00
Guangcong Luo
125fe31d06 Improve eslintrc
Fixed some more code style, allowing these rules to be enabled:

- `comma-dangle`
- `function-paren-newline`
- `member-delimiter-style`
- `no-eval`
- `no-fallthrough`
- `no-misused-promises`
- `no-unused-vars`
- `operator-linebreak`
2020-03-06 22:35:55 -08:00
Kris Johnson
9d995eb838
SSB: Update Aeonic's rank (#6426) 2020-03-06 17:58:43 -08:00
Kris Johnson
358d947b15
Add Let's Go transfer support (#6367) 2020-02-12 21:22:45 -08:00
Guangcong Luo
652c7163cf
Refactor queue to new BattleQueue class (#6358)
Previously, battle queue stuff was just strewn around `battle.ts`.
This gives it a new home: `battle-queue.ts`.

This was intended to make `battle.ts` slightly more tractable, although
the difference is so small that maybe I shouldn't bother. Oh, well,
every little bit helps.
2020-02-12 16:20:17 -08:00
Guangcong Luo
55cbc52bba Fix bugs with secondary/ability order
Fixes #6346

The `AfterDamage` event has been replaced with `DamagingHit`, which
which happens for damaging moves after secondaries.

The `AfterHit` event has also been moved after `DamagingHit`, to make
sure Knock Off still procs after Rocky Helmet.

`AfterHit` is no longer a valid event on `secondary` and `self` blocks,
because it's meaningless in those blocks, anyway. All `self.onAfterHit`
and `secondary.onAfterHit` handlers have been moved to `onHit`, which
should have the same timing in practice.
2020-02-08 08:07:39 -08:00
Salaaa
66e46b8421
SSB: Prevent salamander's ability from crashing in edge cases (#6344) 2020-02-07 20:14:27 -05:00
DeltaCoderr
d4779cc558
Update Ranks in SSB (#6345)
* Update  Ranks in SSB

* Update Schiavetto's  SSB Rank.
2020-02-06 15:29:55 +04:00
Salaaa
3b59e44b52
SSB: Fix Lava Terrain damage boost (#6332) 2020-02-06 01:01:25 +10:30
urkerab
351089c3d9 Always use getAbility to get a Pokémon's Ability (#6293) 2020-01-18 19:37:01 -07:00
Guangcong Luo
b48733cb7a Rename resolveTarget -> getRandomTarget
Should be much clearer in terms of what it's actually doing.
2020-01-18 15:43:34 -07:00
urkerab
b589745a25 Typescript move.target (#6260) 2020-01-11 09:10:10 -05:00
SalamanderFire
6b2293918f SSB: More bugfixes/updates (#6262) 2020-01-05 22:47:15 -05:00
SalamanderFire
d8a0449702 SSB: Bugfixes and Namechanges (#6241) 2020-01-03 18:16:48 -05:00
420Blazeitt
82d1f8ed92 SSB: dont let glitzer popping call gen 8 moves (#6171) 2019-12-10 17:32:18 +04:00
Guangcong Luo
9b943fb62f Fix Dynamax stat handling
We now track `baseMaxhp`, the pre-Dynamax max HP. We also have a new
function `getUndynamaxedHP` for use by moves that use it (famously,
Endeavor).

- `baseStoredStats` is unused outside of the mouseover stats display.
  I updated its implementation to reflect this.

- Power Construct doesn't have a defined behavior during Dynamax. I
  ended up implementing an approximation of what it should probably do.

- Endeavor, Pain Split, Super Fang, and Nature's Madness now work on
  undynamaxed HP.

- Moves that deal or heal percentage damage now do it based on
  undynamaxed max HP, other than G-Max Finale.

Fixes #6131

Fixes #6087
2019-12-04 09:25:46 +09:00
Spandan Punwatkar
b6b66de896 Update Repo Links (#6102) 2019-11-28 12:47:38 +04:00
420Blazeitt
a10265cb0f Change the current Game Console (#6082) 2019-11-26 16:22:35 -05:00
Guangcong Luo
5364c63e23 Introduce item.itemUser
`item.itemUser` replaces `item.zMoveUser`, and is a new field
representing a list of possible users of an item, for items that are
restricted to specific species.

`item.zMoveUser` is a base forme for items that affect every forme, and
a forme name otherwise (forme name is currently only used for
`forcedForme` uses).

Arceus is a weird case. Both generic Z crystals and Plates, while
having unique effects on Arceus, also have effects on other Pokémon.
For this reason, Arceus isn't listed as an `itemUser` of either of
these item types - use-cases that want this should also check
`item.forcedForme`.

This is mostly intended to be useful to move-searching and custom
rules (like NatDex, which will only allow past-gen items associated
with removed species).
2019-11-25 15:26:36 +13:00
Guangcong Luo
b97b426f26 Fix SSB crash 2019-11-20 21:43:01 +13:00
The Immortal
22daf5795d SSB: Inherit from gen 7 2019-11-16 23:24:48 +04:00
Guangcong Luo
0bb2e58efd Fix Dynamax move base power
Dynamax moves now have the correct base power, and now correctly only
deal 25% usual damage against Protect.
2019-11-17 06:32:17 +13:00
HoeenHero
6dc80978e3 Suppress strange error with SSB Z-Move checks 2019-11-16 00:06:01 -05:00
HoeenHero
9ecbcabee9
Dynamaxing (#5946) 2019-11-15 21:33:10 -05:00
Lusamine
2e09c83906 SSB: Namechange Akasianse to Felucia, promote Aeonic (#5932) 2019-11-05 13:27:15 -05:00
HoeenHero
762b04ea34 Update position when swapping in Wonder Trade
Closes #5931
2019-11-05 13:09:32 -05:00
420Blazeitt
96cc1ed4f9 SSB: Bugfixes (#5922) 2019-10-31 09:16:53 -04:00
HoeenHero
dedc8e067c SSB: Fix issue where a side has no active pokemon. 2019-10-30 11:00:14 -04:00
HoeenHero
4ced391d6b SSB: Apply various updates 2019-10-30 10:39:20 -04:00
HoeenHero
074b78be71 SSB: Improve Wonder Trade's interaction with Super Illusion 2019-10-24 21:56:07 -04:00
420Blazeitt
74b3483da8 SSB: Fix Nap Time with existing status (#5836) 2019-10-20 08:55:03 -04:00
Lusamine
6cc9212321 SSB: Correct Fat Rain descriptions (#5900) 2019-10-19 20:12:52 +04:00
Lusamine
f1ec1785b2 SSB: Fix Quick Reload to properly use Defog and then U-Turn (#5892) 2019-10-18 19:31:00 -04:00
420Blazeitt
b49de0960d SSB: Nerf Rach (#5889) 2019-10-18 19:26:08 -04:00
Lusamine
0053aa3adc SSB: Nerf Sundar (#5881) 2019-10-18 19:20:03 -04:00
Lusamine
880ebf2438 SSB: Fixes Pirate Princess's Tea Break vs Substitute (#5893) 2019-10-18 12:00:53 +04:00
Lusamine
dcb438c041 Update vivalospride's and Rage's ranks (#5887) 2019-10-16 04:22:35 +04:00
Lusamine
66966f40d0 SSB: Fix Jolteonite's description (#5874) 2019-10-12 15:47:45 +04:00
Torracat
d3cd75ce8d SSB: Convert Distortion World to a Pseudo Weather (#5868) 2019-10-11 18:14:24 -04:00
Lusamine
2608ca74fc SSB: Buff Iyarito, rename signature move (#5870) 2019-10-11 17:19:47 -04:00
Torracat
baef9bcb77 SSB: buff Level 51 (#5869) 2019-10-11 17:19:19 -04:00
Lusamine
1145183ca0 SSB: Clarify Tipping Over short desc (#5862) 2019-10-11 17:09:33 -04:00
Lusamine
c3068e23de SSB: Fix typo in Volco's message (#5861) 2019-10-12 00:15:56 +04:00
Lusamine
6cbfe4c11a SSB: Buff ptoad (#5871) 2019-10-12 00:15:23 +04:00
Torracat
b27df882a2 Update Rory's quotes (#5872)
bad puns make the world go round
2019-10-12 00:15:06 +04:00
Lusamine
1cbcb654c1 SSB: Update HoeenHero's rank (#5856) 2019-10-09 01:00:15 +11:00
Guangcong Luo
7a023746ba
Refactor battle.dex out of battle (#5851)
In most other similar systems, like TeamValidator, we use `thing.dex` instead of having it extend `ModdedDex`. Battle has always extended `ModdedDex`, though. This changes Battle to match the others.

This should fix an issue with `Battle.data` not being cached.

This also frees up Battle to extend ObjectReadWriteStream<string> in a future update.
2019-10-06 07:38:08 +11:00
Torracat
86344e1de9 SSB: Properly update Snaq's health when switching out (#5837) 2019-10-05 14:55:31 -04:00
Torracat
ec388fd2d1 SSB: Trick Room & Alien Wave cancel eachother out (#5841) 2019-10-05 14:53:34 -04:00
Torracat
f088b25c83 SSB: Clarify Back Off's description (#5844)
The word "attacked" could mean that status moves can still work on it, which is not the case here.
2019-10-05 14:48:21 -04:00