1034 Commits

Author SHA1 Message Date
Martin Griffin
bb781f21a1
Arbitrary trainer scripts + map script/trigger softlock prevention (#5033)
Script_RunImmediatelyUntilEffect runs a script until either a specified
effect may occur or it reaches an end.

All existing script commands and natives, and some specials, call
Script_RequestEffects which allows us to analyze them.

Any downstream script commands/natives/specials will be statically known
not to call Script_RequestEffects and treated as if they have all
effects. Manually tagging them with requests_effects=1 and calling
Script_RequestEffects will make them analyzable.

Using these, we're able to execute scripts until they either exit with
no effect, or would possibly have an effect. This allows us to:
1. Not run on frame map scripts or triggers if they would have no
   effect.
2. Immediately run triggers if they only affect flags/vars. This removes
   the lag frames when biking into the Cycling Road, for example.
3. Migrate on load/on transition/on resume/on return to field/on dive
   warp scripts onto the global script context if they would block
   (approximated via SCREFF_HARDWARE).
4. Support arbitrary control flow in trainer scripts. The trainer does
   not see the player if the script has no effect, and the trainer will
   use whichever trainerbattle command is branched to.
5. Support arbitrary scripts in trainer scripts. cant_see and
   cant_see_if_* commands have been introduced so that scripts are able
   to do something when the player interacts with the trainer even if
   that trainer wouldn't see them.
2025-01-08 10:27:00 +00:00
Alex
5391b451ae
Shell Bell Clean up / Simplification and Tests (#5924) 2025-01-07 21:50:23 +01:00
Alex
5317371fea
Last fix for Sparkling Aria / Covert Cloak / Shield Dust interaction (#5956) 2025-01-06 12:03:41 +01:00
Eduardo Quezada
40ba25dd3e
Converted 2 various to callnative (#5950) 2025-01-05 17:47:49 +01:00
Eduardo Quezada
771156eb3d Merge branch '_RHH/master' into _RHH/upcoming 2025-01-05 10:08:16 -03:00
Eduardo Quezada
d7bbb2e628
Easy customizable Hidden Move types (#5872) 2025-01-04 21:42:14 +01:00
psf
a7f77ed08d
Adds B_VAR_DIFFICULTY and related functions READ DESC (#5337)
Co-authored-by: sbird <sbird@no.tld>
Co-authored-by: Philipp AUER <SBird1337@users.noreply.github.com>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
Co-authored-by: hedara90 <90hedara@gmail.com>
2025-01-04 14:25:03 +01:00
Alex
8ccb385ce4
Insomnia test used the wrong move in Turn section (#5939) 2025-01-03 14:15:05 +01:00
Eduardo Quezada
a50c78bb1e Merge branch '_RHH/master' into _RHH/upcoming 2025-01-01 18:34:42 -03:00
Alex
b7e945fbfb
Reverts wrongly done partial Eject Pack fix (#5928) 2025-01-01 21:41:42 +01:00
Eduardo Quezada
9669a0554d
Encapsulate move data (#5852) 2025-01-01 20:34:33 +01:00
Pawkkie
8d818445d2
Fixed ace switching bugs (#5922) 2025-01-01 19:29:45 +01:00
Eduardo Quezada
55f0d3aad5
Added missing Move Effect TODO tests - Volume E (#5915)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2025-01-01 16:06:20 +01:00
hedara90
13fba7b31f
Added final Sparkling Aria+Shield Dust interaction test (#5923)
Co-authored-by: Hedara <hedara90@gmail.com>
2025-01-01 12:30:59 +01:00
Eduardo Quezada
6b8665d08f
Speed up tests in headless mode (#5889) 2025-01-01 10:24:23 +01:00
Eduardo Quezada
004efd1e5a Merge branch '_RHH/master' into _RHH/upcoming 2024-12-31 18:38:03 -03:00
Alex
51cfb96fd5
Fixes Sparkling Aria Shield Dust / Covert Cloak interaction (#5911) 2024-12-31 12:52:16 +01:00
Alex
9d30299148
Fixes Stance Change, Sleep Talk interaction (#5909) 2024-12-31 00:38:01 +01:00
Alex
f864bf8b70
Adds Generational config for Magic Guard (Fix for Gen4+) (#5893) 2024-12-30 09:01:20 +01:00
Eduardo Quezada
009de5c98c
Setting Battle configs during tests (#5803)
Co-authored-by: sbird <sbird@no.tld>
2024-12-29 23:28:39 +01:00
Alex
e64da065e8
Fixes Eject Pack / Intimidate issue (#5902) 2024-12-29 22:24:09 +01:00
Hedara
0ad907fd76 Merge branch 'master' into master-upcoming 2024-12-29 21:43:47 +01:00
Hedara
2088f2a12d Merge branch 'master' into master-upcoming 2024-12-29 21:43:07 +01:00
Eduardo Quezada
a10f63e317
Fixed leaking tasks not showing up in summary (#5890) 2024-12-29 18:18:40 +01:00
Eduardo Quezada
1bd1e934f1
Comment out Ally Switch Illusion test (#5901) 2024-12-29 17:52:35 +01:00
ghoulslash
ca31145d36
Fix Salt Cure script (#5895)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-12-29 16:51:33 +01:00
Eduardo Quezada
433058edc1
Added missing Move Effect TODO tests - Volume D (#5887) 2024-12-29 14:27:08 +01:00
Alex
57db1ee08e
Fix Ally Switch test failing on CI (#5896) 2024-12-28 21:33:23 -03:00
Eduardo Quezada
3bc4126558 Merge branch '_RHH/master' into _RHH/upcoming 2024-12-28 15:28:07 -03:00
Alex
5900a01061
Atk Canceller refactor / reorder / clean up (#5885) 2024-12-27 21:14:05 +01:00
Eduardo Quezada
dccf2632b2
Added missing Belch tests (#5881) 2024-12-27 11:16:30 +01:00
Eduardo Quezada
91c7bd9e53
Fixed givemon not respecting perfect IVs for species (#5873) 2024-12-26 21:22:45 +01:00
Eduardo Quezada
2c9352921c
Fixed Ally Switch breaking Illusion (#5879) 2024-12-26 21:04:03 +01:00
Alex
b0b1f449a3
Fixes regression caused by argument refactor (#5870)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-12-24 23:23:17 +01:00
DizzyEggg
b1dbc6e9b2
Fix ASSUMPTIONS not working (#5869) 2024-12-24 06:46:40 -03:00
Alex
8edf14423a
Refactors argument into a union (#5853)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-12-23 15:51:35 -03:00
PhallenTree
caa35be7e7
Fixes Pursuit + Emergency Exit causing double switches and Pursuit user fainting causing target to not finish switch (#5849) 2024-12-22 23:41:13 +01:00
Eduardo Quezada
e883b7c251
Fixed Wish triggering Disguise (#5860) 2024-12-22 23:39:17 +01:00
PhallenTree
f1458dea45
Fixes Regenerator healing past maxHP (#5861) 2024-12-22 23:39:07 +01:00
Alex
f61a0f6a30
Sheer Force fix and move effect cleanup (#5812) 2024-12-21 19:45:50 +01:00
Eduardo Quezada
c1969052a6 Fix issues 2024-12-20 21:03:37 -03:00
Eduardo Quezada
53aebc34dd Merge branch '_RHH/master' into _RHH/upcoming 2024-12-20 20:48:13 -03:00
PhallenTree
742f7a4875
Fixes Cotton Down and Gulp Missile not interacting correctly with stat reduction prevention effects (#5841) 2024-12-20 22:24:23 +01:00
Bassoonian
5cc0b35d81
Replace power checks with IS_MOVE_STATUS (#5820)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-12-20 08:20:46 -03:00
Alex
b22a867e11
Fixes Room Service (#5827) 2024-12-19 14:12:01 +01:00
PhallenTree
f4a0cc0055
Adds Thief/Covet config to send stolen item to bag and Pickup config to pickup user's item in wild battles (#5829) 2024-12-19 13:51:03 +01:00
Alex
8f59d9c94f
Fixes Shed Tail substitute health (#5826) 2024-12-18 21:39:32 +01:00
ghoulslash
11bc9bd2f2
Ally Switch extra battlerId tracking (#5823)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-12-18 14:39:34 +01:00
Alex
99ba36b446
Fixes Tidy Up (#5819) 2024-12-17 09:47:37 +01:00
Alex
12f199c641
Fixes absorb still draining HP when flinched (#5814) 2024-12-16 10:54:50 +01:00