4174 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
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
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
004efd1e5a Merge branch '_RHH/master' into _RHH/upcoming 2024-12-31 18:38:03 -03:00
Alex
7e0c1f9323
New U-turn animation to fix visibility (#5910) 2024-12-31 00:36:07 +01:00
Alex
af19b13195
Adds Pledge Side Statuses as Starting Statuses (#5899) 2024-12-30 09:18:23 +01:00
Hedara
2088f2a12d Merge branch 'master' into master-upcoming 2024-12-29 21:43:07 +01:00
ghoulslash
ca31145d36
Fix Salt Cure script (#5895)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-12-29 16:51: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
9c34634dd6 Draft Change 2024-12-25 11:03:32 +01:00
Eduardo Quezada
e883b7c251
Fixed Wish triggering Disguise (#5860) 2024-12-22 23:39:17 +01: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
kittenchilly
c3133193e2
Fix Hit Escape moves giving Exp to the mon that switches in (#5844) 2024-12-21 10:30:25 +01:00
Alex
5b05e7913c
Pret merge (20th of December) (#5845) 2024-12-21 10:17:58 +01: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
Eduardo Quezada
82252251e7 Merge branch '_pret/master' into _RHH/pr/master/pretMerge20241220 2024-12-20 16:04:33 -03:00
AlexOn1ine
99fef0260f Battle Weather Refactor 2024-12-19 20:50:08 +01:00
Alex
b22a867e11
Fixes Room Service (#5827) 2024-12-19 14:12:01 +01:00
Alex
99ba36b446
Fixes Tidy Up (#5819) 2024-12-17 09:47:37 +01:00
Eduardo Quezada
66a2a16bbc Merge branch '_RHH/master' into _RHH/upcoming 2024-12-08 12:00:29 -03:00
kittenchilly
6e6352569f
Narrower font tweaks and font fitting fixes (#5782) 2024-12-07 18:12:09 -03:00
iriv24
cb12bdc220
Fix No Guard failing OHKO Moves into Semi-Invulnerable Pokemon (#5779)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-12-07 18:11:45 -03:00
Alex
3f3f4cfe1c
New Volt Switch Animation (#5729)
Co-authored-by: Hedara <hedara90@gmail.com>
2024-12-07 15:52:13 +01:00
ghoulslash
6e24b6af3d
Gravity fix + Sky Drop Test (#5780)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-12-07 14:48:01 +01:00
ghoulslash
a775098e83
Fix octolock + defiant (#5781)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-12-07 13:38:34 +01:00
PhallenTree
775ea3b564
Pursuit refactor (#5707) 2024-12-06 19:14:46 +01:00
Pawkkie
da2a1e2aba
Destiny Bond fails on repeated use in Gen 7+ (#5652) 2024-12-05 22:29:20 +01:00
Eduardo Quezada
3f98c78297
Added POKEMART_LIST_END to avoid users accidentally removing it (#1947) 2024-12-04 17:38:23 -05:00
Eduardo Quezada
a92350fb53 Merge branch '_RHH/master' into _RHH/upcoming 2024-12-04 18:55:56 -03:00
Eduardo Quezada
e4f8b4ccf0 Addressed review changes (minus encapsulation) 2024-12-04 11:31:28 -03:00
Eduardo Quezada
5c180a0b09
Added FONT_SHORT_NARROWER (#5101) 2024-12-04 06:30:19 -08:00
Alex
70224f0ea3
Fixes items preventing other switch in effects (#5732)
Co-authored-by: Pawkkie <61265402+Pawkkie@users.noreply.github.com>
2024-12-03 11:15:29 -05:00
AlexOn1ine
d95dbadccc merge rhh/upcoming 2024-12-02 19:00:55 +01:00
AlexOn1ine
aa61f24e81 clean up 2024-12-02 18:25:24 +01:00
AlexOn1ine
09c9d8a800 merge rhh/upcoming 2024-12-02 17:45:00 +01:00
Pawkkie
2b7905beb1
Add B_FLAG_SLEEP_CLAUSE (#5566)
Co-authored-by: Isaac Rivera <isaacrivera2020@u.northwestern.edu>
Co-authored-by: iriv24 <40581123+iriv24@users.noreply.github.com>
Co-authored-by: Hedara <hedara90@gmail.com>
2024-12-02 09:06:03 +01:00
Eduardo Quezada
0322d51887
Split "Do nothing" move effects (#5613) 2024-12-02 09:05:04 +01:00
Eduardo Quezada
1a581c407c Merge branch '_RHH/master' into _RHH/upcoming 2024-12-01 08:11:32 -03:00
Alex
acdd447160
Changes Max Phantasm move anim script call (#5737) 2024-11-30 19:19:08 -05:00
Hedara
f6fdca615f Merge branch 'master' into master-to-upcoming 2024-11-29 11:32:12 +01:00
Alex
c4fe97011e
Fix Floral Healing anim (#5733) 2024-11-28 22:51:34 +01:00
Sadfish the Sad
64887ee876
dark void, clangorous soulblaze, vortex animation fixes (#5650) 2024-11-25 19:57:22 +01:00