ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.
- First, we no longer have separate eslint-no-types configs. Lint
performance shouldn't be enough of a problem to justify the
relevant maintenance complexity.
- Second, our base config should work out-of-the-box now. `npx eslint`
will work as expected, without any CLI flags. You should still use
`npm run lint` which adds the `--cached` flag for performance.
- Third, whatever updates I did fixed style linting, which apparently
has been bugged for quite some time, considering all the obvious
mixed-tabs-and-spaces issues I found in the upgrade.
Also here are some changes to our style rules. In particular:
- Curly brackets (for objects etc) now have spaces inside them. Sorry
for the huge change. ESLint doesn't support our old style, and most
projects use Prettier style, so we might as well match them in this way.
See https://github.com/eslint-stylistic/eslint-stylistic/issues/415
- String + number concatenation is no longer allowed. We now
consistently use template strings for this.
* Little Colosseum: New Ability + Ability Renaming
* Little Colosseum: Ability Renaming Pt. 2
* Little Colosseum: Add Eevee
* Little Colosseum: Add Eevee Pt. 2
* PiC: Don't activate abilities when a solo switch-in faints to hazards
* Better namespacing
* Another nickel in the saveReplay jar
Co-authored-by: HiZo <96159984+HisuianZoroark@users.noreply.github.com>
---------
Co-authored-by: HiZo <96159984+HisuianZoroark@users.noreply.github.com>
* SSB: Fix null reference error in 'Drifting' ability
Fixed a crash caused by a `TypeError` when the `defender` is `null` in the `Drifting` ability. Added necessary null checks in the `onModifyAtk` and `onModifySpA` methods to ensure `defender` is valid before accessing its properties.
**Stack Trace:**
```TS
A battle crashed: TypeError: Cannot read properties of null (reading 'activeTurns')
at Battle.onModifyAtk (/home/ps/main/data/mods/gen9ssb/abilities.ts:1725:18)
at Battle.runEvent (/home/ps/main/sim/battle.ts:845:34)
at Pokemon.getStat (/home/ps/main/sim/pokemon.ts:602:23)
at Battle.onModifyMove (/home/ps/main/data/mods/gen9ssb/moves.ts:6018:16)
at Battle.singleEvent (/home/ps/main/sim/battle.ts:585:25)
at BattleActions.useMoveInner (/home/ps/main/data/mods/gen9ssb/scripts.ts:1308:16)
at BattleActions.useMove (/home/ps/main/sim/battle-actions.ts:386:27)
at BattleActions.runMove (/home/ps/main/data/mods/gen9ssb/scripts.ts:1216:34)
at Battle.runAction (/home/ps/main/data/mods/gen9ssb/scripts.ts:443:17)
at Battle.turnLoop (/home/ps/main/sim/battle.ts:2802:9)
```
* put check on both modify events
* Sim: Use a CSPRNG
* Add test
* fix test prng
* move prng test to others
* fix slight hack
* tf?
* Fuck this
* fucking lol
* fix crap
* i'm going to kill someone
* i hate state
* fix test
* Good work genius
* typo
* Fix exportinputlog
* Refactor for inputlog backwards compatibility
This is a pretty major refactor which is mostly unrelated to the
feature, but it does make the code a lot simpler.
* Readability pass
* Readability (again)
* Remove sodium-native dependency
* Refactor to serialize seeds in hex strings
(Also removes the Buffer dependency from PRNG, and slightly improves
comments.)
* Apparently << is 32-bit signed
* Readability
---------
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
* Gen 4: Fix Non-Multitype Arceus Gain/Loss of Plates Interaction
* Shortening plate function
* Fling fails when used by Multitype
* Fix Fling + Multitype interaction
* Apply suggestions from code review
* Apply suggestions from code review
---------
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>