2015-11-12 04:38:57 +00:00
|
|
|
SweetScentFromMenu: ; 506bc
|
2017-10-25 04:14:05 +00:00
|
|
|
ld hl, .SweetScent
|
2015-11-12 04:38:57 +00:00
|
|
|
call QueueScript
|
|
|
|
ld a, $1
|
2015-12-17 22:51:32 +00:00
|
|
|
ld [wFieldMoveSucceeded], a
|
2015-11-12 04:38:57 +00:00
|
|
|
ret
|
|
|
|
; 506c8
|
|
|
|
|
2017-10-25 04:14:05 +00:00
|
|
|
.SweetScent: ; 0x506c8
|
2015-11-12 04:38:57 +00:00
|
|
|
reloadmappart
|
|
|
|
special UpdateTimePals
|
|
|
|
callasm GetPartyNick
|
|
|
|
writetext UnknownText_0x50726
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2015-11-12 04:38:57 +00:00
|
|
|
callasm SweetScentEncounter
|
2017-10-25 04:14:05 +00:00
|
|
|
iffalse SweetScentNothing
|
2015-11-12 04:38:57 +00:00
|
|
|
checkflag ENGINE_BUG_CONTEST_TIMER
|
2017-10-25 04:14:05 +00:00
|
|
|
iftrue .BugCatchingContest
|
2015-12-02 02:54:11 +00:00
|
|
|
randomwildmon
|
2015-11-12 04:38:57 +00:00
|
|
|
startbattle
|
2015-12-26 23:11:55 +00:00
|
|
|
reloadmapafterbattle
|
2015-11-12 04:38:57 +00:00
|
|
|
end
|
|
|
|
; 0x506e5
|
|
|
|
|
2017-10-25 04:14:05 +00:00
|
|
|
.BugCatchingContest: ; 0x506e5
|
2015-11-12 04:38:57 +00:00
|
|
|
farjump BugCatchingContestBattleScript
|
|
|
|
; 0x506e9
|
|
|
|
|
2017-10-25 04:14:05 +00:00
|
|
|
SweetScentNothing: ; 0x506e9
|
2015-11-12 04:38:57 +00:00
|
|
|
writetext UnknownText_0x5072b
|
2015-11-25 15:16:29 +00:00
|
|
|
waitbutton
|
2015-11-12 04:38:57 +00:00
|
|
|
closetext
|
|
|
|
end
|
|
|
|
; 0x506ef
|
|
|
|
|
|
|
|
SweetScentEncounter: ; 506ef
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall CanUseSweetScent
|
2015-11-12 04:38:57 +00:00
|
|
|
jr nc, .no_battle
|
2017-12-28 12:15:46 +00:00
|
|
|
ld hl, wStatusFlags2
|
2018-01-22 20:40:43 +00:00
|
|
|
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
2015-11-12 04:38:57 +00:00
|
|
|
jr nz, .not_in_bug_contest
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall GetMapEncounterRate
|
2015-11-12 04:38:57 +00:00
|
|
|
ld a, b
|
|
|
|
and a
|
|
|
|
jr z, .no_battle
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ChooseWildEncounter
|
2015-11-12 04:38:57 +00:00
|
|
|
jr nz, .no_battle
|
|
|
|
jr .start_battle
|
|
|
|
|
|
|
|
.not_in_bug_contest
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ChooseWildEncounter_BugContest
|
2015-11-12 04:38:57 +00:00
|
|
|
|
|
|
|
.start_battle
|
|
|
|
ld a, $1
|
|
|
|
ld [ScriptVar], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.no_battle
|
|
|
|
xor a
|
|
|
|
ld [ScriptVar], a
|
|
|
|
ld [BattleType], a
|
|
|
|
ret
|
|
|
|
; 50726
|
|
|
|
|
|
|
|
UnknownText_0x50726: ; 0x50726
|
|
|
|
; used SWEET SCENT!
|
|
|
|
text_jump UnknownText_0x1c0b03
|
|
|
|
db "@"
|
|
|
|
; 0x5072b
|
|
|
|
|
|
|
|
UnknownText_0x5072b: ; 0x5072b
|
|
|
|
; Looks like there's nothing here…
|
|
|
|
text_jump UnknownText_0x1c0b1a
|
|
|
|
db "@"
|
|
|
|
; 0x50730
|