6798 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
khbsd
76964dd96a
Fly from Pokenav (#5679) 2025-01-05 00:24:58 +01: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
ghoulslash
03684c6539
Battle Weather Refactor (#5833) 2025-01-04 07:33:25 -05:00
ghoulslash
401df8da4d
move overwrittenAbilities field to DisableStruct (#5946)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2025-01-03 18:17:23 +01:00
Bassoonian
9199b6f3cc
Adds Dexnav (#4818) 2025-01-03 14:19:02 +01:00
Alex
ec1876b826
Remove EWRAM gHpDealt (not needed anymore) (#5925) 2025-01-02 23:37:58 +01:00
ghoulslash
9707d09f79 some more Dexnav -> DexNav 2025-01-02 10:13:06 -05:00
Philipp AUER
94fba81a90
Initialize m4a and IRQ handler in a loaded section (#5912)
Co-authored-by: sbird <sbird@no.tld>
2025-01-02 15:11:32 +01:00
ghoulslash
7a9e847fd4 some clean up 2025-01-02 09:00:56 -05:00
ghoulslash
d8ea4fa1ec Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into rhh/dexnav 2025-01-02 08:28:21 -05: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
Eduardo Quezada
e040dcb0b4 Begin 1.10.2 cycle 2025-01-01 16:20:40 -03:00
Eduardo Quezada
89699939de Version 1.10.1 2025-01-01 16:17:49 -03:00
Eduardo Quezada
6b8665d08f
Speed up tests in headless mode (#5889) 2025-01-01 10:24:23 +01:00
Eduardo Quezada
e1275594c5
Renamed OW type effectiveness function for clarity (#5917) 2024-12-31 22:55:42 +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
Bassoonian
bf125c8f5e
Fix wrong value for NUM_MOVE_EFFECTS (#5913) 2024-12-30 23:51:48 +01:00
Alex
3db351359a
Clean up redundancy for mugshots (#5906) 2024-12-30 18:32:21 +01:00
Alex
af19b13195
Adds Pledge Side Statuses as Starting Statuses (#5899) 2024-12-30 09:18:23 +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
Hedara
2088f2a12d Merge branch 'master' into master-upcoming 2024-12-29 21:43:07 +01:00
Eduardo Quezada
7ddb4cdc1b
Fixed TODO tests not showing up when filtering by name (#5894) 2024-12-29 14:18:33 +01:00
AlexOn1ine
74f1d7cb80 merge rhh/upcomig 2024-12-28 21:03:34 +01:00
AlexOn1ine
6a906a3fc1 refactor done 2024-12-28 20:55:59 +01:00
Eduardo Quezada
3bc4126558 Merge branch '_RHH/master' into _RHH/upcoming 2024-12-28 15:28:07 -03:00
AlexOn1ine
0bb86e4437 struct 2024-12-28 10:23:28 +01:00
Alex
5900a01061
Atk Canceller refactor / reorder / clean up (#5885) 2024-12-27 21:14:05 +01:00
Eduardo Quezada
91c7bd9e53
Fixed givemon not respecting perfect IVs for species (#5873) 2024-12-26 21:22:45 +01:00
AlexOn1ine
9c34634dd6 Draft Change 2024-12-25 11:03:32 +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
Eduardo Quezada
f9fed98665
Fixed MOVE_EFFECT_FREEZE_OR_FROSTBITE not being usable in battle scripts (#5859) 2024-12-22 23:39:48 +01:00
Bassoonian
5560f339d0
Remove unused various (#5851) 2024-12-21 20:26:46 -03:00
Alex
f61a0f6a30
Sheer Force fix and move effect cleanup (#5812) 2024-12-21 19:45:50 +01:00
Eduardo Quezada
25075239a2 Merge branch '_RHH/master' into _RHH/upcoming 2024-12-21 08:46:33 -03:00
Eduardo Quezada
e175c5aca8
Changes Various defines to an Enum (#5840)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-12-21 11:48:31 +01:00
AlexOn1ine
573200d56a nobody saw anything but again 2024-12-21 11:23:30 +01:00
AlexOn1ine
ff4c2aaf78 nobody saw anything 2024-12-21 10:24:34 +01:00
AlexOn1ine
71318eca5f Revert weather order 2024-12-21 10:04:16 +01:00
Eduardo Quezada
53aebc34dd Merge branch '_RHH/master' into _RHH/upcoming 2024-12-20 20:48:13 -03:00