124 Commits

Author SHA1 Message Date
Bivurnum
47723c34e5
Follower NPCs (follow-me) (#6500)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2025-04-27 14:56:18 +02:00
psf
69f2f9f151
Add OW_DEFOG_FIELD_MOVE to allow players to clear overworld Fog (#6477) 2025-04-08 16:21:32 +02:00
Eduardo Quezada
8821779815 Merge branch '_RHH/master' into _RHH/upcoming 2025-01-11 08:07:15 -03:00
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
shachar700
cbd0b3ef0c
Field effect for cutting grass is missing setfieldeffectargument. Issue #5766 (#5952) 2025-01-05 16:45:21 +01:00
ghoulslash
7a9e847fd4 some clean up 2025-01-02 09:00:56 -05:00
ghoulslash
cf78462fab merge w upcoming 2024-10-15 21:24:47 -04:00
Eduardo Quezada
0a4b3a8dd7 Merge branch '_RHH/master' into _RHH/upcoming 2024-10-12 16:23:27 -03:00
Bassoonian
8dba27249c Merge branch 'followers-expanded-id' of https://github.com/aarant/pokeemerald into merrpmerge1210 2024-10-12 18:41:33 +02:00
Ariel A
d80190fe10 fix: Dig in Sealed Chamber no longer freezes follower. Fixed #5482 rhh 2024-10-12 12:23:18 -04:00
ghoulslash
2e52e3331f merge w upcoming 2024-10-04 12:56:21 -04:00
psf
23134cec85
Merge branch 'upcoming' into signpost 2024-08-27 21:31:07 -07:00
cawtds
3af93bdfee
FRLG+ whiteout message (#4967)
* FRLG whiteout message + post whiteout event
2024-08-02 08:28:05 -07:00
pkmnsnfrn
0a997fa6ca Moved follower scripts back to original position https://github.com/rh-hideout/pokeemerald-expansion/pull/5044/files\#r1694003538 2024-07-27 14:57:53 -07:00
pkmnsnfrn
7717812154 Clean up files 2024-07-25 20:34:14 -07:00
pkmnsnfrn
fd69ef339c Got pokemart and pokecenter changes working 2024-07-25 19:33:07 -07:00
pkmnsnfrn
b54cf221d8 Renamed and refactored FieldInput_HandleCancelSignpost into CancelSignPostMessageBox 2024-07-15 22:13:33 -07:00
pkmnsnfrn
28183ec299 first merge of ghoul's branch 2024-07-15 21:35:58 -07:00
ghoulslash
cb1696384c merge in original dexnav code with some rhh specific tweaks 2024-06-16 10:39:28 -04:00
Eduardo Quezada
569749f9c2 Merge remote-tracking branch '_merrp_origin/followers-expanded-id' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	Makefile
#	gflib/sprite.h
#	graphics/object_events/pics/pokemon/wailord.png
#	include/constants/event_objects.h
#	include/random.h
#	src/data/object_events/object_event_graphics.h
#	src/data/object_events/object_event_graphics_info.h
#	src/data/object_events/object_event_graphics_info_pointers.h
#	src/event_object_movement.c
#	src/random.c
#	src/scrcmd.c
2024-05-18 10:12:17 -04:00
Ariel A
d7a021a914 fix: Made Common_Movement_* 'safe' for followers
fixed #31
2024-04-27 22:47:41 -04:00
Eduardo Quezada
ddc752eb14 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	asm/macros/event.inc
#	data/field_effect_scripts.s
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/script_cmd_table.inc
#	graphics/pokemon/castform/sunny/anim_front.png
#	graphics/pokemon/castform/sunny/normal.pal
#	include/battle_util.h
#	include/constants/event_object_movement.h
#	include/constants/field_effects.h
#	src/battle_controller_player.c
#	src/battle_util.c
#	src/data/object_events/movement_action_func_tables.h
#	src/data/object_events/object_event_pic_tables.h
#	src/data/trainer_graphics/back_pic_anims.h
#	src/daycare.c
#	src/event_object_movement.c
#	src/field_effect_helpers.c
#	src/load_save.c
#	src/scrcmd.c
#	src/trainer_see.c
2024-01-17 18:11:35 -03:00
kittenchilly
28f17772ec
Implement Pokemon Box Link functionality (#3837)
* Implement Pokemon Box Link functionality

* Update item_use.c

* Update item_use.c

* Can only use box link if the map allows escape

* Revert "Can only use box link if the map allows escape"

This reverts commit be5b46b6c4420cd350ac1932d4c3562f7bfbebe5.

* Overworld_IsEscapingAllowed

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-28 11:47:00 +01:00
Alex
1e25b53433
Partner Battle refactor (#3592)
* Partner Battle refactor

* fix for steven id

* clean up

* Use trainer partner names for id

* removed testing leftover

* comment change

* more review changes

* fix compiling

* remove partener count

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-12-20 12:38:28 +01:00
psf
fe16a2cdee
Port pokefirered's Vs. Seeker to pokeemerald (#3256)
* First version of Vs. Seeker

* Update movement.inc

98f7e9978d (r1306721924)

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722004

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722024

* Update item_use.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722401

* Update movement_action_func_tables.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722828

* Update event_object_movement.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722887

* Update overworld.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306723396

* Update vs_seeker.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306724158

* Update vs_seeker.c

Addressed some cleanup comments from SBird

* Update UpdateRandomTrainerRematches
Fixed typo in ClearAllTrainerRematchStates
Fixed types in GetRematchableTrainerLocalId

* Updated UseVsSeekerEffect_2

* Updated UseVsSeekerEffect_3

* Updated UseVsSeekerEffect_4

* Fixed bug that allowed Vs Seeker to be used indoors in correct places
Moved VsSeeker function declarations into header

* Refactored FieldUseFunc_VsSeeker

* Added curly braces to else case in FieldUseFunc_VsSeeker

* renamed data[x] in Task_ResetObjectsRematchWantedState

* Refactored Task_ResetObjectsRematchWantedState

* Refactored VsSeekerResetObjectMovementAfterChargeComplete

* Refactored ResetMovementOfRematchableTrainers

* Refactored GatherNearbyTrainerInfo

* Refactored Task_VsSeeker_3

* CanUseVsSeeker

* Refactored GetVsSeekerResponseInArea

* GetCurVsSeekerResponse refactored

* Cleaned up GetTrainerFlagFromScript

* Gave sensible names to Task_VsSeeker

* Fixed two bugs where player would not have the right gfx state after using VsSeeker on a Bike or Underwater

* Renamed UseVsSeeker Functions

* Added I_VS_SEEKER_CHARGING to make Vs. Seeker broken until flag is assigned
Removed extra VsSeeker animation code

* Addressed PR feedback

* Fixed issue with building non-modern

* Refactored GetRunningBehaviorFromGraphicsId and renamed to GetResponseMovementTypeFromTrainerGraphicsId

* Addresses Lunos's PR feedback: https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1623547850
Removed the check to see if a map was not indoors to improve readability
Made IsValidLocationForVsSeeker into a static function

* Added changes in response to Jasper's feedback
https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1725276522

* Updated with Edu's discord feedback https://discord.com/channels/419213663107416084/1135040810082123907/1176872015085453392

* Removed ifdef tags around the repo unless needed
b5dc744ced
2023-11-26 18:58:43 +01:00
ghoulslash
5657f8369e merge w pret 2023-05-11 10:44:18 -04:00
ghoulslash
deddda451b merge w pret 2022-07-30 18:35:41 -04:00
Ariel A
9beee311c4 Merge branch 'master' into romhack 2022-07-17 15:13:15 -04:00
GriffinR
4660f8c88b Document battle tower TV show 2022-06-14 09:37:39 -04:00
Ariel A
831c73c18c Added system for conditional follower messages. 2022-05-03 23:01:02 -04:00
Ariel A
cf673fda9f Added movements to follower messages. Movement credit: SonikkuA-DatH 2021-12-31 19:23:44 -05:00
Ariel A
bdcbb5c700 Merge branch 'master' into romhack 2021-12-18 17:14:52 -05:00
ghoulslash
222d1d3194 merge with pret 2021-10-26 13:21:50 -04:00
GriffinR
24b4e898ad More mauville_old_man clean up 2021-10-18 14:40:04 -04:00
Ariel Antonitis
8a3b04e837 Merge branch 'master' into romhack 2021-09-02 01:03:13 -04:00
LOuroboros
554210c5e3 Removed trailing spaces in the most relevant files
Command used for the job:
egrep -rl ' $' --include *.c --include *.h --include  *.s --include  *.inc --include  *.txt *  | xargs sed -i 's/\s\+$//g'

Credits to Grant Murphy from Stack Overflow.
2021-08-24 19:59:32 -03:00
ghoulslash
03fa4939ff merge with pret 2021-08-18 20:22:03 -06:00
GriffinR
28a8fe191a Document item menu 2021-08-10 22:13:02 -04:00
GriffinR
8f43d1ebeb Document smart shopper TV show 2021-07-02 01:45:23 -04:00
ghoulslash
3c4bf808f1 merge with pret 2021-05-18 09:31:34 -06:00
Ariel Antonitis
221569a710 Merge branch 'master' into romhack 2021-04-18 22:17:53 -04:00
Ariel Antonitis
e647e926a8 Added all unconditional HGSS messages. 2021-04-18 20:59:23 -04:00
GriffinR
09a9efd5c5
Merge pull request #1398 from GriffinRichards/doc-field
Document field
2021-04-10 13:05:51 -04:00
GriffinR
4a1cfbead2 Document remaining overworld 2021-04-06 16:55:43 -04:00
ghoulslash
5e948e746b add dexnav 2021-04-02 12:28:00 -06:00
GriffinR
8be2c5d60b Document Contest Lady TV Show 2021-04-02 01:49:38 -04:00
ghoulslash
dfce7f1548 add auto read signposts 2021-04-01 09:45:17 -06:00
GriffinR
771a434730 Label Trend Watcher TV show texts 2021-03-31 16:29:42 -04:00
Ariel Antonitis
8dd1811ce5 Updated follower messages.
Added remote build scripts/workflows.
Fixed followers getting stuck when entering doors.
2021-03-03 02:07:08 -05:00
Ariel Antonitis
b5c8b0f494 Added more follower messages. 2021-03-03 02:00:32 -05:00