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