Commit Graph

413 Commits

Author SHA1 Message Date
Ivo Julca
ac4b94876b Sim: Refactor to use Battle#getAllPokemon() and Battle#getAllActive() 2019-03-26 23:18:19 -05:00
Ivo Julca
0ae0405f46 Sim: Implement Battle#getAllPokemon() and Battle#getAllActive() 2019-03-26 23:18:19 -05:00
Ivo Julca
2747ce61fb Sim: Split Pokemon#nearby(Allies|Foes) feature out of Pokemon#(allies|foes) 2019-03-26 23:18:19 -05:00
MacChaeger
9a7ce3dedf Put side conditions on p1 and p2 in multi battles (#5341) 2019-03-27 11:00:36 +08:00
Slayer95
d499a019f0
Battle#residualEvent: Check fainted status earlier 2019-03-26 18:15:18 -05:00
MacChaeger
860900ac57 Fix AfterDamage event running on secondary effects (#5350) 2019-03-26 15:29:46 +09:00
Kirk Scheibelhut
134fb8b852 Return from nextTurn if Endless Battle Clause is activated (#5347) 2019-03-26 03:07:09 +09:00
Guangcong Luo
c25b152e51 Fix onCreateBattleRoom
(And some other issues introduced by 4p refactor.)
2019-03-26 00:47:48 +09:00
MacChaeger
6760be4264 Restore Cancel Button (#5345) 2019-03-25 14:17:30 +09:00
Kirk Scheibelhut
9f5a727ad1 Pull Field out of Battle (#5333) 2019-03-23 02:52:12 +09:00
Kirk Scheibelhut
22b07d4ae6 Improve autochoose comment per @Slayer95 2019-03-22 02:42:05 -05:00
Kirk Scheibelhut
e61965eaf5 Pull out RandomPlayerAI from example and enhance 2019-03-22 02:42:05 -05:00
Kirk Scheibelhut
c911ee6fa6 Move sim/battle-stream-example.ts to sim/examples subdir 2019-03-22 02:42:05 -05:00
Guangcong Luo
8e7ba4d436
Fix line length for 0-EV check 2019-03-22 02:37:30 +09:00
Kirk Scheibelhut
2b1c278c42 Fix 'floating' promises and enable lint errors going forward (#5297) 2019-03-22 02:21:17 +09:00
Kirk Scheibelhut
03b2c92cb1 Make isNonstandard specify reason for non-standardness (#5330) 2019-03-22 01:49:22 +09:00
Kirk Scheibelhut
4be90a0a28 Cleanup sim/battle.ts (#5325) 2019-03-22 01:25:12 +09:00
Kirk Scheibelhut
564dae455d Make Battle throw on choice errors in tests (#5286) 2019-03-21 13:14:38 +09:00
Slayer95
0861c02479
Validator: Don't reject 0 EVs in debug mode 2019-03-20 15:27:51 -05:00
MacChaeger
d8514b47cc Refactor findEventHandlers to work with 4 players (#5313) 2019-03-19 11:49:18 +09:00
MacChaeger
47aadf9cc8 Fix spread modifier for gen 4 FFA battles (#5321) 2019-03-19 10:46:18 +09:00
Kirk Scheibelhut
cab87325e9 Push 'update' to p3 & p4 in BattleStream (#5317) 2019-03-19 09:40:31 +09:00
MacChaeger
6ac8266696 Support 4 player battles (#5266) 2019-03-18 13:37:27 +09:00
MacChaeger
6c486409f4 Fix spread move effect order (#5216) 2019-03-17 23:30:08 +09:00
Guangcong Luo
efa0af0ef1 Propagate errors through streams 2019-03-17 07:48:02 +09:00
Marty-D
39a8b4270e Fix Stealth Rock effectiveness during Delta Stream 2019-03-16 14:38:03 -04:00
Guangcong Luo
9073a5a8bf Improve Streams typing
When I originally wrote the Streams library, TypeScript-in-JS didn't
support generics. But now the library can have significantly nicer
typing, and so it now does.
2019-03-16 17:12:21 +09:00
Kirk Scheibelhut
0e1708bf9f Enable prefer-const and max 120 character lines for .ts files (#5292) 2019-03-16 07:14:04 +09:00
Guangcong Luo
84eebaad16
Fix sanity check in validTargetLoc 2019-03-15 10:26:54 +09:00
urkerab
2ea89698b0 Run effectiveness events even for string type (#5310) 2019-03-14 20:03:14 +09:00
Slayer95
f7982c390c
Remove |seed| messages
Redundant with randbats' public inputLog
2019-03-13 19:48:15 -05:00
Ivo Julca
150c451d0d PRNG: Fix logging of random team seeds in replays 2019-03-13 01:00:44 -05:00
Guangcong Luo
125ffcc633 Add NOT_FAIL, FAIL, SILENT_FAIL to battle
This replaces battle.NOT_FAILURE. The others aren't used anywhere yet,
but should in theory provide more readability than `null` and `false`.
2019-03-13 11:25:23 +09:00
Slayer95
7a7ad8453d Fix regressions in team generators (#5302) 2019-03-12 18:44:38 -07:00
Ivo Julca
37b537feea Fix long line warning 2019-03-12 00:35:51 -05:00
Ivo Julca
3686dcfe46 TS: ModdedDex#generateTeam() returns PokemonSet[] 2019-03-12 00:29:59 -05:00
Slayer95
5828a60663
Sim: Quit parsing on too many choices 2019-03-11 02:04:22 -05:00
Guangcong Luo
47111ac4c7 Make side#getChoice() show ultra where relevant
Fixes #5294
2019-03-10 13:52:30 -05:00
Kirk Scheibelhut
1b2aeb696b Reject move commands with multiple flags (#5290) 2019-03-09 23:23:36 -06:00
Kirk Scheibelhut
538731d6df Accept move choices with target/mega in either order (#5284) 2019-03-09 20:21:17 -06:00
Kirk Scheibelhut
98072fff34 Make the switch command more flexible (#5288)
Make it take a case-insensitive nickname or species id,
something several of our test cases already rely upon.
2019-03-09 20:15:12 -06:00
Kirk Scheibelhut
9e7ba68fc4 Properly terminate BattleStream (#5283)
Fixes regression caused by #5210
2019-03-09 10:16:41 -06:00
Kirk Scheibelhut
e634d9a7b9 Cleanup Side & Dex after .ts refactor (#5273) 2019-03-09 10:14:11 -06:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06:00
Kirk Scheibelhut
91993df916 Continue cleaning up sim/ after .ts refactor (#5267) 2019-03-08 07:29:04 -06:00
Kirk Scheibelhut
295f7c6c9f Switch hints to use double quotes everywhere (#5261)
Also, have `Battle#hint` take Side per @urkerab's suggestion.

Followup to #5258, no functionality changes.
2019-03-07 09:34:14 -06:00
Kirk Scheibelhut
dc5255f7c8 Fix Gen 1 Substitute + self damage behavior (#5263) 2019-03-06 16:12:32 -05:00
Kirk Scheibelhut
a04d4da992 Add more hints to Gen 1 & 4, migrate others to Battle#hint (#5258) 2019-03-06 11:24:47 -06:00
Kirk Scheibelhut
961b9882f5 Fix Gen 4 interaction between U-turn/Substitute/Intimidate (#5222) 2019-03-06 08:33:52 -05:00