From 6ddabde582bae0e678ff5d6696664ca5a5a01612 Mon Sep 17 00:00:00 2001 From: Bivurnum <147376167+Bivurnum@users.noreply.github.com> Date: Mon, 27 Oct 2025 11:41:07 -0500 Subject: [PATCH] New Feature: ORAS Dowsing (#7211) --- asm/macros/event.inc | 5 + data/field_effect_scripts.s | 6 + data/scripts/obtain_item.inc | 2 + .../field_effects/palettes/oras_dowsing.pal | 19 + .../pics/oras_dowsing_brendan.png | Bin 0 -> 313 bytes .../field_effects/pics/oras_dowsing_may.png | Bin 0 -> 345 bytes include/config/item.h | 11 + include/constants/field_effects.h | 4 + include/item_use.h | 2 + include/oras_dowse.h | 39 ++ spritesheet_rules.mk | 6 + src/bike.c | 2 + .../field_effect_object_template_pointers.h | 4 + src/field_effect.c | 6 + src/field_effect_helpers.c | 1 - src/field_player_avatar.c | 27 +- src/field_screen_effect.c | 3 + src/item_use.c | 32 +- src/oras_dowse.c | 562 ++++++++++++++++++ src/overworld.c | 2 + 20 files changed, 721 insertions(+), 12 deletions(-) create mode 100644 graphics/field_effects/palettes/oras_dowsing.pal create mode 100644 graphics/field_effects/pics/oras_dowsing_brendan.png create mode 100644 graphics/field_effects/pics/oras_dowsing_may.png create mode 100644 include/oras_dowse.h create mode 100644 src/oras_dowse.c diff --git a/asm/macros/event.inc b/asm/macros/event.inc index b15bf8deb3..e081819217 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -2313,6 +2313,11 @@ callnative ScriptSetDoubleBattleFlag, requests_effects=1 .endm + @ Stop using the ORAS dowsing machine. + .macro stoporasdowsing + callnative EndORASDowsing + .endm + @ ============================ @ @ FAKE RTC MACROS @ Will only function if OW_USE_FAKE_RTC is true. If it has any additional requirements, it will be listed accordingly. diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index 34678bb293..ce71a102fd 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -83,6 +83,7 @@ gFieldEffectScriptPointers:: .4byte gFieldEffectScript_Defog @ FLDEFF_DEFOG .4byte gFieldEffectScript_UseRockClimb @ FLDEFF_USE_ROCK_CLIMB .4byte gFieldEffectScript_RockClimbDust @ FLDEFF_ROCK_CLIMB_DUST + .4byte gFieldEffectScript_ORASDowse @ FLDEFF_ORAS_DOWSE gFieldEffectScript_ExclamationMarkIcon1:: field_eff_callnative FldEff_ExclamationMarkIcon @@ -386,6 +387,7 @@ gFieldEffectScript_CaveDust:: gFieldEffectScript_Defog:: field_eff_callnative FldEff_Defog field_eff_end + gFieldEffectScript_UseRockClimb:: @ 82DBC3F field_eff_callnative FldEff_UseRockClimb field_eff_end @@ -394,3 +396,7 @@ gFieldEffectScript_RockClimbDust:: @ 82DBB28 field_eff_loadfadedpal_callnative gSpritePalette_BigDust, FldEff_RockClimbDust field_eff_end +gFieldEffectScript_ORASDowse:: + field_eff_callnative FldEff_ORASDowsing + field_eff_end + diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc index 599961c821..3eb7f4f0d4 100644 --- a/data/scripts/obtain_item.inc +++ b/data/scripts/obtain_item.inc @@ -205,6 +205,7 @@ EventScript_FoundHiddenItem:: end EventScript_PutHiddenItemInPocket:: + callnative Script_ClearDowsingColor delay 10 showitemdescription waitmessage @@ -215,6 +216,7 @@ EventScript_PutHiddenItemInPocket:: hideitemdescription special TryPutTreasureInvestigatorsOnAir special SetHiddenItemFlag + callnative Script_UpdateDowseState releaseall end diff --git a/graphics/field_effects/palettes/oras_dowsing.pal b/graphics/field_effects/palettes/oras_dowsing.pal new file mode 100644 index 0000000000..d3446e3971 --- /dev/null +++ b/graphics/field_effects/palettes/oras_dowsing.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +115 197 164 +0 0 0 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 255 255 +255 0 255 diff --git a/graphics/field_effects/pics/oras_dowsing_brendan.png b/graphics/field_effects/pics/oras_dowsing_brendan.png new file mode 100644 index 0000000000000000000000000000000000000000..fd8351981984df9831e07206613f99e10d3b7e8f GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^6M$HOgBeJk3S#^Zq!^2X+?^QKos)S9@nOClWCH|8ecP1yI9wPZ!6Kh}O43j(mp=IGSq}{{Me_Y?od_kjs)dt(#q|5^}^< z1r<4(A{?$>TiYnL>hojH<4b;-=D0GSnz-_}-Mi?DXE*%WvM(Cuw6aV|cDVYVN956( z4`(*c@8RPt-DQ+r`SX4IWWg8SZ=P#&tN&7eq#YRWV5#;p=Z4qM9ef|tmboFyt=akR{03-C6;s5{u literal 0 HcmV?d00001 diff --git a/graphics/field_effects/pics/oras_dowsing_may.png b/graphics/field_effects/pics/oras_dowsing_may.png new file mode 100644 index 0000000000000000000000000000000000000000..6a4eb08f0293c22310a4582e4ec9be51af1e81a9 GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0vp^6M$HOgBeJk3S#^Zq!^2X+?^QKos)S9@nOClWCH|8ecP1yI9vPZ!6Kh}O4LqWPE=Ib4@Y7yRFyD|?ws-0{U3b@O8akw~=(@i|xMM<>2w0Va4+MX=N?~d1vQFT?#*>=;Leq!K7Zx z>%bp}+Et6ss^3>y^Cx2O*~>MRlNK-0o^${3wtq*0%ft#!?Y}E