mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00
Honey Pot & Grandma
Ported from Pokemon October.8114fead91
1a6f3e4f03
d00cd6fafd
Alterations have been made in that the treemonset has been diversified a bit further, having Munchlax like in DPP. They're L60, intended to be used in Nihon. I haven't placed the grandma in the region yet, intending for her to be in Old City.
This commit is contained in:
parent
02233c5429
commit
bcfafaaf83
|
@ -14,8 +14,8 @@
|
||||||
; wMomSavingMoney
|
; wMomSavingMoney
|
||||||
const ENGINE_MOM_SAVING_MONEY
|
const ENGINE_MOM_SAVING_MONEY
|
||||||
const ENGINE_MOM_ACTIVE
|
const ENGINE_MOM_ACTIVE
|
||||||
; wUnusedTwoDayTimerOn
|
; wSweetHoneyEnabled
|
||||||
const ENGINE_UNUSED_TWO_DAY_TIMER_ON
|
const ENGINE_SWEET_HONEY
|
||||||
; wStatusFlags
|
; wStatusFlags
|
||||||
const ENGINE_POKEDEX
|
const ENGINE_POKEDEX
|
||||||
const ENGINE_UNOWN_DEX
|
const ENGINE_UNOWN_DEX
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
const WHT_APRICORN ; 61
|
const WHT_APRICORN ; 61
|
||||||
const BLACKBELT_I ; 62
|
const BLACKBELT_I ; 62
|
||||||
const BLK_APRICORN ; 63
|
const BLK_APRICORN ; 63
|
||||||
const ITEM_64 ; 64
|
const HONEY_POT ; 64
|
||||||
const PNK_APRICORN ; 65
|
const PNK_APRICORN ; 65
|
||||||
const BLACKGLASSES ; 66
|
const BLACKGLASSES ; 66
|
||||||
const SLOWPOKETAIL ; 67
|
const SLOWPOKETAIL ; 67
|
||||||
|
|
|
@ -191,6 +191,7 @@ DEF NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.as
|
||||||
const TREEMON_SET_ROCK_ICE
|
const TREEMON_SET_ROCK_ICE
|
||||||
const TREEMON_SET_ROCK_SQUARE
|
const TREEMON_SET_ROCK_SQUARE
|
||||||
const TREEMON_SET_ROCK_WELL
|
const TREEMON_SET_ROCK_WELL
|
||||||
|
const TREEMON_SET_SWEET_HONEY
|
||||||
DEF NUM_TREEMON_SETS EQU const_value
|
DEF NUM_TREEMON_SETS EQU const_value
|
||||||
|
|
||||||
; treemon scores
|
; treemon scores
|
||||||
|
|
|
@ -212,6 +212,9 @@ DEF MOM_ACTIVE_F EQU 7
|
||||||
|
|
||||||
DEF MOM_SAVING_MONEY_MASK EQU (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) | (1 << MOM_SAVING_ALL_MONEY_F)
|
DEF MOM_SAVING_MONEY_MASK EQU (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) | (1 << MOM_SAVING_ALL_MONEY_F)
|
||||||
|
|
||||||
|
; wSweetHoneyEnabled
|
||||||
|
SWEET_HONEY_F EQU 0
|
||||||
|
|
||||||
; wJohtoBadges::
|
; wJohtoBadges::
|
||||||
const_def
|
const_def
|
||||||
const ZEPHYRBADGE
|
const ZEPHYRBADGE
|
||||||
|
|
|
@ -23,7 +23,7 @@ EngineFlags:
|
||||||
engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F
|
engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F
|
||||||
engine_flag wMomSavingMoney, MOM_ACTIVE_F
|
engine_flag wMomSavingMoney, MOM_ACTIVE_F
|
||||||
|
|
||||||
engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
|
engine_flag wSweetHoneyEnabled, SWEET_HONEY_F ; unused, possibly related to a 2-day timer
|
||||||
|
|
||||||
engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
|
engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
|
||||||
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
||||||
|
|
|
@ -79,7 +79,7 @@ SpecialsPointers::
|
||||||
add_special FindPartyMonAtLeastThatHappy ; unused
|
add_special FindPartyMonAtLeastThatHappy ; unused
|
||||||
add_special FindPartyMonThatSpecies
|
add_special FindPartyMonThatSpecies
|
||||||
add_special FindPartyMonThatSpeciesYourTrainerID
|
add_special FindPartyMonThatSpeciesYourTrainerID
|
||||||
add_special UnusedCheckUnusedTwoDayTimer ; unused
|
add_special CheckSweetHoneyTimer ; unused
|
||||||
add_special DayCareMon1
|
add_special DayCareMon1
|
||||||
add_special DayCareMon2
|
add_special DayCareMon2
|
||||||
add_special SelectRandomBugContestContestants
|
add_special SelectRandomBugContestContestants
|
||||||
|
|
|
@ -206,8 +206,8 @@ ItemAttributes:
|
||||||
item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||||
; BLK_APRICORN
|
; BLK_APRICORN
|
||||||
item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||||
; ITEM_64
|
; HONEY_POT, was ITEM_64
|
||||||
item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
item_attribute 20000, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
|
||||||
; PNK_APRICORN
|
; PNK_APRICORN
|
||||||
item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
|
||||||
; BLACKGLASSES
|
; BLACKGLASSES
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
TimeCapsule_CatchRateItems:
|
TimeCapsule_CatchRateItems:
|
||||||
db FAIRY_FEATHER, LEFTOVERS
|
db FAIRY_FEATHER, LEFTOVERS
|
||||||
db ITEM_2D, BITTER_BERRY
|
db BERRY, BITTER_BERRY
|
||||||
db ITEM_32, GOLD_BERRY
|
db BERRY, GOLD_BERRY
|
||||||
db ITEM_5A, BERRY
|
db BERRY, BERRY
|
||||||
db ITEM_64, BERRY
|
db BERRY, BERRY
|
||||||
db ITEM_78, BERRY
|
db ITEM_78, BERRY
|
||||||
db HEART_STONE, BERRY
|
db HEART_STONE, BERRY
|
||||||
db OLD_AMBER, BERRY
|
db OLD_AMBER, BERRY
|
||||||
|
|
|
@ -100,7 +100,7 @@ ItemDescriptions:
|
||||||
dw WhtApricornDesc
|
dw WhtApricornDesc
|
||||||
dw BlackbeltDesc
|
dw BlackbeltDesc
|
||||||
dw BlkApricornDesc
|
dw BlkApricornDesc
|
||||||
dw QuestionMarkDesc
|
dw HoneyPotDesc
|
||||||
dw PnkApricornDesc
|
dw PnkApricornDesc
|
||||||
dw BlackGlassesDesc
|
dw BlackGlassesDesc
|
||||||
dw SlowpokeTailDesc
|
dw SlowpokeTailDesc
|
||||||
|
@ -975,3 +975,7 @@ PeatBlockDesc:
|
||||||
ClubFossilDesc:
|
ClubFossilDesc:
|
||||||
db "The club of an"
|
db "The club of an"
|
||||||
next "ancient #MON.@"
|
next "ancient #MON.@"
|
||||||
|
|
||||||
|
HoneyPotDesc:
|
||||||
|
db "A pot for storing"
|
||||||
|
next "SWEET HONEY.@"
|
||||||
|
|
|
@ -99,7 +99,7 @@ ItemNames::
|
||||||
li "WHT APRICORN"
|
li "WHT APRICORN"
|
||||||
li "BLACKBELT"
|
li "BLACKBELT"
|
||||||
li "BLK APRICORN"
|
li "BLK APRICORN"
|
||||||
li "TERU-SAMA"
|
li "HONEY POT"
|
||||||
li "PNK APRICORN"
|
li "PNK APRICORN"
|
||||||
li "BLACKGLASSES"
|
li "BLACKGLASSES"
|
||||||
li "SLOWPOKETAIL"
|
li "SLOWPOKETAIL"
|
||||||
|
|
|
@ -14,8 +14,8 @@ TreeMons:
|
||||||
dw TreeMonSet_Rock_Ice
|
dw TreeMonSet_Rock_Ice
|
||||||
dw TreeMonSet_Rock_Square
|
dw TreeMonSet_Rock_Square
|
||||||
dw TreeMonSet_Rock_Well
|
dw TreeMonSet_Rock_Well
|
||||||
|
dw TreeMonSet_Sweet_Honey
|
||||||
assert_table_length NUM_TREEMON_SETS
|
assert_table_length NUM_TREEMON_SETS
|
||||||
dw TreeMonSet_City ; unused
|
|
||||||
|
|
||||||
; Two tables each (common, rare).
|
; Two tables each (common, rare).
|
||||||
; Structure:
|
; Structure:
|
||||||
|
@ -180,3 +180,10 @@ TreeMonSet_Rock_Well:
|
||||||
dbbw 70, 15, KRABBY
|
dbbw 70, 15, KRABBY
|
||||||
dbbw 30, 15, SHELLDER
|
dbbw 30, 15, SHELLDER
|
||||||
db -1
|
db -1
|
||||||
|
|
||||||
|
TreeMonSet_Sweet_Honey:
|
||||||
|
dbbw 25, 60, HERACROSS
|
||||||
|
dbbw 25, 60, URSARING
|
||||||
|
dbbw 25, 60, BEEDRILL
|
||||||
|
dbbw 25, 60, MUNCHLAX
|
||||||
|
db -1
|
||||||
|
|
|
@ -1303,6 +1303,7 @@ TryHeadbuttOW::
|
||||||
|
|
||||||
AskHeadbuttScript:
|
AskHeadbuttScript:
|
||||||
opentext
|
opentext
|
||||||
|
callasm TrySweetHoneyOW
|
||||||
writetext AskHeadbuttText
|
writetext AskHeadbuttText
|
||||||
yesorno
|
yesorno
|
||||||
iftrue HeadbuttScript
|
iftrue HeadbuttScript
|
||||||
|
@ -1313,6 +1314,85 @@ AskHeadbuttText:
|
||||||
text_far _AskHeadbuttText
|
text_far _AskHeadbuttText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
|
TrySweetHoneyOW:
|
||||||
|
; is player at the right position?
|
||||||
|
call CheckSavedSweetHoneySpot
|
||||||
|
ret nz ; return if not
|
||||||
|
|
||||||
|
farcall _CheckSweetHoneyTimer
|
||||||
|
ld a, [wSweetHoneyTimer]
|
||||||
|
and a
|
||||||
|
; ret z
|
||||||
|
|
||||||
|
; - added day 2 check-
|
||||||
|
ld hl, .TwoDaysAgoText
|
||||||
|
jr z, .print_message
|
||||||
|
; - end add -
|
||||||
|
|
||||||
|
ld hl, .YesterdayText
|
||||||
|
cp 1 ; day left
|
||||||
|
jr z, .print_message
|
||||||
|
|
||||||
|
cp 2 ; days left
|
||||||
|
ret nz
|
||||||
|
|
||||||
|
ld hl, .TodayText
|
||||||
|
.print_message
|
||||||
|
; writetext
|
||||||
|
push hl
|
||||||
|
call SpeechTextbox
|
||||||
|
call SafeUpdateSprites
|
||||||
|
ld a, 1
|
||||||
|
ldh [hOAMUpdate], a
|
||||||
|
call ApplyTilemap
|
||||||
|
pop hl
|
||||||
|
call PrintTextboxText
|
||||||
|
xor a
|
||||||
|
ldh [hOAMUpdate], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.TodayText:
|
||||||
|
text "There's SWEET HONEY"
|
||||||
|
line "on the tree!"
|
||||||
|
para "It's still fresh."
|
||||||
|
prompt
|
||||||
|
|
||||||
|
.YesterdayText:
|
||||||
|
text "There's SWEET HONEY"
|
||||||
|
line "on the tree!"
|
||||||
|
para "It's about a day"
|
||||||
|
line "old."
|
||||||
|
prompt
|
||||||
|
|
||||||
|
.TwoDaysAgoText:
|
||||||
|
text "There's SWEET HONEY"
|
||||||
|
line "on the tree!"
|
||||||
|
para "Looks ripe!"
|
||||||
|
prompt
|
||||||
|
|
||||||
|
CheckSavedSweetHoneySpot:
|
||||||
|
; Z flag is set when player is in the exact spot
|
||||||
|
; where Sweet Honey is applied
|
||||||
|
|
||||||
|
; check map group
|
||||||
|
ld hl, wSweetHoneyMapGroup
|
||||||
|
ld a, [wMapGroup]
|
||||||
|
cp [hl]
|
||||||
|
ret nz
|
||||||
|
; map number
|
||||||
|
inc hl ; wSweetHoneyMapNumber
|
||||||
|
ld a, [wMapNumber]
|
||||||
|
cp [hl]
|
||||||
|
ret nz
|
||||||
|
; X and Y
|
||||||
|
call GetFacingTileCoord
|
||||||
|
ld a, [wSweetHoneyX]
|
||||||
|
cp d
|
||||||
|
ret nz
|
||||||
|
ld a, [wSweetHoneyY]
|
||||||
|
cp e
|
||||||
|
ret
|
||||||
|
|
||||||
RockSmashFunction:
|
RockSmashFunction:
|
||||||
call TryRockSmashFromMenu
|
call TryRockSmashFromMenu
|
||||||
and $7f
|
and $7f
|
||||||
|
|
|
@ -273,9 +273,9 @@ ScriptReturnCarry:
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnusedCheckUnusedTwoDayTimer:
|
CheckSweetHoneyTimer:
|
||||||
farcall CheckUnusedTwoDayTimer
|
farcall _CheckSweetHoneyTimer
|
||||||
ld a, [wUnusedTwoDayTimer]
|
ld a, [wSweetHoneyTimer]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
84
engine/events/sweet_honey.asm
Normal file
84
engine/events/sweet_honey.asm
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
; src - https://github.com/pokeachromicdevs/pokeoctober/commit/8114fead91828dd6d986fe120d6c5cd5e3c6cbf6
|
||||||
|
|
||||||
|
_UseHoney::
|
||||||
|
call .CheckHoney
|
||||||
|
and $7f
|
||||||
|
ld [wFieldMoveSucceeded], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.CheckHoney:
|
||||||
|
call GetFacingTileCoord
|
||||||
|
push de
|
||||||
|
call CheckHeadbuttTreeTile
|
||||||
|
pop de
|
||||||
|
jr nz, .NoTree
|
||||||
|
|
||||||
|
ld hl, wSweetHoneyEnabled
|
||||||
|
bit SWEET_HONEY_F, [hl]
|
||||||
|
jr z, .NoHoney
|
||||||
|
|
||||||
|
res SWEET_HONEY_F, [hl]
|
||||||
|
inc hl
|
||||||
|
inc hl
|
||||||
|
inc hl ; wSweetHoneyMapGroup
|
||||||
|
ld a, [wMapGroup]
|
||||||
|
ld [hli], a
|
||||||
|
ld a, [wMapNumber]
|
||||||
|
ld [hli], a
|
||||||
|
; X and Y
|
||||||
|
ld [hl], d
|
||||||
|
inc hl
|
||||||
|
ld [hl], e
|
||||||
|
|
||||||
|
farcall SetSweetHoneyTimer
|
||||||
|
|
||||||
|
ld hl, UseHoneyScript
|
||||||
|
call QueueScript
|
||||||
|
ld a, $81 ; success
|
||||||
|
ret
|
||||||
|
|
||||||
|
.NoTree:
|
||||||
|
ld a, $80 ; fail
|
||||||
|
ret
|
||||||
|
|
||||||
|
.NoHoney:
|
||||||
|
; TODO: this does not even run due to the "can't use!" text
|
||||||
|
ld hl, NoHoneyScript
|
||||||
|
call QueueScript
|
||||||
|
ld a, $80 ; fail
|
||||||
|
ret
|
||||||
|
|
||||||
|
UseHoneyScript:
|
||||||
|
reloadmappart
|
||||||
|
special UpdateTimePals
|
||||||
|
|
||||||
|
opentext
|
||||||
|
writetext .SpreadHoneyText
|
||||||
|
playsound SFX_DEX_FANFARE_50_79
|
||||||
|
waitsfx
|
||||||
|
waitbutton
|
||||||
|
closetext
|
||||||
|
end
|
||||||
|
|
||||||
|
.SpreadHoneyText:
|
||||||
|
text "<PLAYER> spread"
|
||||||
|
line "SWEET HONEY on the"
|
||||||
|
cont "tree!"
|
||||||
|
done
|
||||||
|
|
||||||
|
NoHoneyScript:
|
||||||
|
reloadmappart
|
||||||
|
special UpdateTimePals
|
||||||
|
|
||||||
|
opentext
|
||||||
|
writetext .NoHoneyText
|
||||||
|
playsound SFX_WRONG
|
||||||
|
waitsfx
|
||||||
|
waitbutton
|
||||||
|
closetext
|
||||||
|
end
|
||||||
|
|
||||||
|
.NoHoneyText:
|
||||||
|
text "You don't have"
|
||||||
|
line "SWEET HONEY!"
|
||||||
|
done
|
|
@ -12,7 +12,7 @@ TreeMonEncounter:
|
||||||
call GetTreeMons
|
call GetTreeMons
|
||||||
jr nc, .no_battle
|
jr nc, .no_battle
|
||||||
|
|
||||||
call GetTreeMon
|
call ModifyTreeMonRates
|
||||||
jr nc, .no_battle
|
jr nc, .no_battle
|
||||||
|
|
||||||
ld a, BATTLETYPE_TREE
|
ld a, BATTLETYPE_TREE
|
||||||
|
@ -122,6 +122,22 @@ GetTreeMons:
|
||||||
|
|
||||||
INCLUDE "data/wild/treemons.asm"
|
INCLUDE "data/wild/treemons.asm"
|
||||||
|
|
||||||
|
ModifyTreeMonRates:
|
||||||
|
push hl
|
||||||
|
farcall CheckSavedSweetHoneySpot
|
||||||
|
pop hl
|
||||||
|
jr nz, GetTreeMon
|
||||||
|
|
||||||
|
push hl
|
||||||
|
farcall _CheckSweetHoneyTimer
|
||||||
|
pop hl
|
||||||
|
|
||||||
|
ld a, [wSweetHoneyTimer]
|
||||||
|
cp 2 ; was 1; jump if sweethoney was applied today
|
||||||
|
jr z, GetTreeMon
|
||||||
|
|
||||||
|
ld hl, TreeMonSet_Sweet_Honey
|
||||||
|
; fallthrough for sweet honey mons
|
||||||
GetTreeMon:
|
GetTreeMon:
|
||||||
push hl
|
push hl
|
||||||
call GetTreeScore
|
call GetTreeScore
|
||||||
|
|
|
@ -113,7 +113,7 @@ ItemEffects:
|
||||||
dw NoEffect ; WHT_APRICORN
|
dw NoEffect ; WHT_APRICORN
|
||||||
dw NoEffect ; BLACKBELT_I
|
dw NoEffect ; BLACKBELT_I
|
||||||
dw NoEffect ; BLK_APRICORN
|
dw NoEffect ; BLK_APRICORN
|
||||||
dw NoEffect ; ITEM_64
|
dw UseHoneyEffect ; HONEY_POT was ITEM_64
|
||||||
dw NoEffect ; PNK_APRICORN
|
dw NoEffect ; PNK_APRICORN
|
||||||
dw NoEffect ; BLACKGLASSES
|
dw NoEffect ; BLACKGLASSES
|
||||||
dw EvoStoneEffect ; SLOWPOKETAIL
|
dw EvoStoneEffect ; SLOWPOKETAIL
|
||||||
|
@ -2838,6 +2838,10 @@ RestoreAllPP:
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
UseHoneyEffect:
|
||||||
|
farcall _UseHoney
|
||||||
|
ret
|
||||||
|
|
||||||
GetMaxPPOfMove:
|
GetMaxPPOfMove:
|
||||||
ld a, [wStringBuffer1 + 0]
|
ld a, [wStringBuffer1 + 0]
|
||||||
push af
|
push af
|
||||||
|
|
|
@ -5,7 +5,7 @@ _InitializeStartDay:
|
||||||
ClearDailyTimers:
|
ClearDailyTimers:
|
||||||
xor a
|
xor a
|
||||||
ld [wLuckyNumberDayTimer], a
|
ld [wLuckyNumberDayTimer], a
|
||||||
ld [wUnusedTwoDayTimer], a
|
ld [wSweetHoneyTimer], a
|
||||||
ld [wDailyResetTimer], a
|
ld [wDailyResetTimer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -203,36 +203,23 @@ CheckPokerusTick::
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SetUnusedTwoDayTimer: ; unreferenced
|
SetSweetHoneyTimer:
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld hl, wUnusedTwoDayTimer
|
ld hl, wSweetHoneyTimer
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld hl, wUnusedTwoDayTimerStartDate
|
ld hl, wSweetHoneyStartDate
|
||||||
call CopyDayToHL
|
call CopyDayToHL
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckUnusedTwoDayTimer:
|
_CheckSweetHoneyTimer:
|
||||||
ld hl, wUnusedTwoDayTimerStartDate
|
ld hl, wSweetHoneyStartDate
|
||||||
call CalcDaysSince
|
call CalcDaysSince
|
||||||
call GetDaysSince
|
call GetDaysSince
|
||||||
ld hl, wUnusedTwoDayTimer
|
ld hl, wSweetHoneyTimer
|
||||||
call UpdateTimeRemaining
|
call UpdateTimeRemaining
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnusedSetSwarmFlag: ; unreferenced
|
|
||||||
ld hl, wDailyFlags1
|
|
||||||
set DAILYFLAGS1_FISH_SWARM_F, [hl]
|
|
||||||
ret
|
|
||||||
|
|
||||||
UnusedCheckSwarmFlag: ; unreferenced
|
|
||||||
and a
|
|
||||||
ld hl, wDailyFlags1
|
|
||||||
bit DAILYFLAGS1_FISH_SWARM_F, [hl]
|
|
||||||
ret nz
|
|
||||||
scf
|
|
||||||
ret
|
|
||||||
|
|
||||||
RestartLuckyNumberCountdown:
|
RestartLuckyNumberCountdown:
|
||||||
call .GetDaysUntilNextFriday
|
call .GetDaysUntilNextFriday
|
||||||
ld hl, wLuckyNumberDayTimer
|
ld hl, wLuckyNumberDayTimer
|
||||||
|
|
2
main.asm
2
main.asm
|
@ -66,7 +66,7 @@ INCLUDE "engine/events/pokerus/apply_pokerus_tick.asm"
|
||||||
INCLUDE "engine/events/bug_contest/contest_2.asm"
|
INCLUDE "engine/events/bug_contest/contest_2.asm"
|
||||||
INCLUDE "engine/pokemon/correct_party_errors.asm"
|
INCLUDE "engine/pokemon/correct_party_errors.asm"
|
||||||
INCLUDE "engine/math/get_square_root.asm"
|
INCLUDE "engine/math/get_square_root.asm"
|
||||||
|
INCLUDE "engine/events/sweet_honey.asm"
|
||||||
|
|
||||||
SECTION "bank5", ROMX
|
SECTION "bank5", ROMX
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
|
|
||||||
!
|
!
|
||||||
E
|
E
|
||||||
E@AABHJ~IIIEF|}ABEJ~EF@AAB
|
E@AABHJ~IIIEF|}ABEJ~EF@AAB
|
||||||
DBIIIIJDFTnUDFX5YHIIIJ|}~EEE
|
DBIIIIJDFTnUDFX5YHIIIJ|}~EEE
|
|
@ -198,292 +198,127 @@ DebugTextE:
|
||||||
line "many items!"
|
line "many items!"
|
||||||
done
|
done
|
||||||
|
|
||||||
DebugFossilScientist:
|
; Honey Tree script (to be put in Old City)
|
||||||
|
HoneyGrannyScript:
|
||||||
faceplayer
|
faceplayer
|
||||||
|
|
||||||
opentext
|
opentext
|
||||||
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove the next two lines to immediately receive the fossil
|
writetext .IntroText
|
||||||
iftrue .GaveScientistFossil
|
|
||||||
checkevent EVENT_GAVE_SCIENTIST_OLD_AMBER
|
|
||||||
iftrue .GiveDecilla
|
|
||||||
checkevent EVENT_GAVE_SCIENTIST_DOME_FOSSIL
|
|
||||||
iftrue .GiveKabuto
|
|
||||||
checkevent EVENT_GAVE_SCIENTIST_HELIX_FOSSIL
|
|
||||||
iftrue .GiveOmanyte
|
|
||||||
checkevent EVENT_GAVE_SCIENTIST_CLUB_FOSSIL
|
|
||||||
iftrue .GiveXylodon
|
|
||||||
checkevent EVENT_GAVE_SCIENTIST_WING_FOSSIL
|
|
||||||
iftrue .GiveFeradactyl
|
|
||||||
writetext FossilScientistIntroText
|
|
||||||
waitbutton
|
|
||||||
loadmenu .MoveMenuHeader
|
|
||||||
verticalmenu
|
|
||||||
closewindow
|
|
||||||
ifequal REVIVE_OLD_AMBER, .OldAmber
|
|
||||||
ifequal REVIVE_DOME_FOSSIL, .DomeFossil
|
|
||||||
ifequal REVIVE_HELIX_FOSSIL, .HelixFossil
|
|
||||||
ifequal REVIVE_CLUB_FOSSIL, .ClubFossil
|
|
||||||
ifequal REVIVE_WING_FOSSIL, .WingFossil
|
|
||||||
sjump .No
|
|
||||||
|
|
||||||
.OldAmber
|
|
||||||
checkitem OLD_AMBER
|
|
||||||
iffalse .No
|
|
||||||
getmonname STRING_BUFFER_3, DECILLA
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
promptbutton
|
|
||||||
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove this to immediately receive the fossil
|
|
||||||
setevent EVENT_GAVE_SCIENTIST_OLD_AMBER
|
|
||||||
takeitem OLD_AMBER
|
|
||||||
writetext FossilScientistGiveText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
sjump .GaveScientistFossil
|
checkitem HONEY_POT
|
||||||
|
iffalse .no_pot
|
||||||
|
|
||||||
.DomeFossil:
|
checkflag ENGINE_SWEET_HONEY
|
||||||
checkitem DOME_FOSSIL
|
iftrue .just_given
|
||||||
iffalse .No
|
|
||||||
getmonname STRING_BUFFER_3, KABUTO
|
special CheckSweetHoneyTimer
|
||||||
writetext FossilScientistMonText
|
ifequal 1, .waited_a_day
|
||||||
promptbutton
|
ifequal 2, .just_used
|
||||||
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove this to immediately receive the fossil
|
|
||||||
setevent EVENT_GAVE_SCIENTIST_DOME_FOSSIL
|
writetext .UsedHoneyText
|
||||||
takeitem DOME_FOSSIL
|
.give_honey
|
||||||
opentext
|
setflag ENGINE_SWEET_HONEY
|
||||||
writetext FossilScientistGiveText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
sjump .GaveScientistFossil
|
|
||||||
|
|
||||||
.HelixFossil:
|
writetext .ReceivedSweetHoneyText
|
||||||
checkitem HELIX_FOSSIL
|
playsound SFX_ITEM
|
||||||
iffalse .No
|
pause 60
|
||||||
getmonname STRING_BUFFER_3, OMANYTE
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
promptbutton
|
|
||||||
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove this to immediately receive the fossil
|
|
||||||
setevent EVENT_GAVE_SCIENTIST_HELIX_FOSSIL
|
|
||||||
takeitem HELIX_FOSSIL
|
|
||||||
writetext FossilScientistGiveText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
sjump .GaveScientistFossil
|
|
||||||
|
writetext .TryUsingText
|
||||||
.ClubFossil:
|
|
||||||
checkitem HELIX_FOSSIL
|
|
||||||
iffalse .No
|
|
||||||
getmonname STRING_BUFFER_3, XYLODON
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
promptbutton
|
|
||||||
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove this to immediately receive the fossil
|
|
||||||
setevent EVENT_GAVE_SCIENTIST_CLUB_FOSSIL
|
|
||||||
takeitem HELIX_FOSSIL
|
|
||||||
writetext FossilScientistGiveText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
sjump .GaveScientistFossil
|
|
||||||
|
closetext
|
||||||
|
end
|
||||||
|
|
||||||
.WingFossil:
|
.just_used
|
||||||
checkitem HELIX_FOSSIL
|
writetext .DidYouPutText
|
||||||
iffalse .No
|
|
||||||
getmonname STRING_BUFFER_3, FERADACTYL
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
promptbutton
|
|
||||||
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 ; remove this to immediately receive the fossil
|
|
||||||
setevent EVENT_GAVE_SCIENTIST_WING_FOSSIL
|
|
||||||
takeitem HELIX_FOSSIL
|
|
||||||
writetext FossilScientistGiveText
|
|
||||||
waitbutton
|
|
||||||
sjump .GaveScientistFossil
|
|
||||||
|
|
||||||
.No
|
|
||||||
writetext FossilScientistNoText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
closetext
|
closetext
|
||||||
end
|
end
|
||||||
|
|
||||||
.GaveScientistFossil:
|
.no_pot
|
||||||
writetext FossilScientistTimeText
|
writetext .NoPotText
|
||||||
waitbutton
|
waitbutton
|
||||||
closetext
|
verbosegiveitem HONEY_POT
|
||||||
; older versions will use FadeBlackQuickly below instead
|
writetext .AfterPotGivenText
|
||||||
; special FadeOutToBlack ; uncomment the next five lines to immediately receive the fossil
|
sjump .give_honey
|
||||||
; special ReloadSpritesNoPalettes
|
|
||||||
; playsound SFX_WARP_TO
|
|
||||||
; waitsfx
|
|
||||||
; pause 35
|
|
||||||
end ; replace this with "sjump FossilScientist" to immediately receive the fossil
|
|
||||||
|
|
||||||
.GiveDecilla:
|
.just_given
|
||||||
readvar VAR_PARTYCOUNT
|
writetext .TryUsingText
|
||||||
ifequal PARTY_LENGTH, .NoRoom
|
|
||||||
clearevent EVENT_GAVE_SCIENTIST_OLD_AMBER
|
|
||||||
writetext FossilScientistDoneText
|
|
||||||
promptbutton
|
|
||||||
getmonname STRING_BUFFER_3, DECILLA
|
|
||||||
writetext FossilScientistReceiveText
|
|
||||||
playsound SFX_CAUGHT_MON
|
|
||||||
waitsfx
|
|
||||||
waitbutton
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
givepoke DECILLA, 30
|
|
||||||
closetext
|
|
||||||
end
|
|
||||||
|
|
||||||
.GiveKabuto:
|
|
||||||
readvar VAR_PARTYCOUNT
|
|
||||||
ifequal PARTY_LENGTH, .NoRoom
|
|
||||||
clearevent EVENT_GAVE_SCIENTIST_DOME_FOSSIL
|
|
||||||
writetext FossilScientistDoneText
|
|
||||||
promptbutton
|
|
||||||
getmonname STRING_BUFFER_3, KABUTO
|
|
||||||
writetext FossilScientistReceiveText
|
|
||||||
playsound SFX_CAUGHT_MON
|
|
||||||
waitsfx
|
|
||||||
waitbutton
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
givepoke KABUTO, 30
|
|
||||||
closetext
|
|
||||||
end
|
|
||||||
|
|
||||||
.GiveOmanyte:
|
|
||||||
readvar VAR_PARTYCOUNT
|
|
||||||
ifequal PARTY_LENGTH, .NoRoom
|
|
||||||
clearevent EVENT_GAVE_SCIENTIST_HELIX_FOSSIL
|
|
||||||
writetext FossilScientistDoneText
|
|
||||||
promptbutton
|
|
||||||
getmonname STRING_BUFFER_3, OMANYTE
|
|
||||||
writetext FossilScientistReceiveText
|
|
||||||
playsound SFX_CAUGHT_MON
|
|
||||||
waitsfx
|
|
||||||
waitbutton
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
givepoke OMANYTE, 30
|
|
||||||
closetext
|
|
||||||
end
|
|
||||||
|
|
||||||
.GiveXylodon:
|
|
||||||
readvar VAR_PARTYCOUNT
|
|
||||||
ifequal PARTY_LENGTH, .NoRoom
|
|
||||||
clearevent EVENT_GAVE_SCIENTIST_CLUB_FOSSIL
|
|
||||||
writetext FossilScientistDoneText
|
|
||||||
promptbutton
|
|
||||||
getmonname STRING_BUFFER_3, XYLODON
|
|
||||||
writetext FossilScientistReceiveText
|
|
||||||
playsound SFX_CAUGHT_MON
|
|
||||||
waitsfx
|
|
||||||
waitbutton
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
givepoke XYLODON, 30
|
|
||||||
closetext
|
|
||||||
end
|
|
||||||
|
|
||||||
.GiveFeradactyl:
|
|
||||||
readvar VAR_PARTYCOUNT
|
|
||||||
ifequal PARTY_LENGTH, .NoRoom
|
|
||||||
clearevent EVENT_GAVE_SCIENTIST_WING_FOSSIL
|
|
||||||
writetext FossilScientistDoneText
|
|
||||||
promptbutton
|
|
||||||
getmonname STRING_BUFFER_3, FERADACTYL
|
|
||||||
writetext FossilScientistReceiveText
|
|
||||||
playsound SFX_CAUGHT_MON
|
|
||||||
waitsfx
|
|
||||||
waitbutton
|
|
||||||
writetext FossilScientistMonText
|
|
||||||
givepoke FERADACTYL, 30
|
|
||||||
closetext
|
|
||||||
end
|
|
||||||
|
|
||||||
.NoRoom:
|
|
||||||
writetext FossilScientistPartyFullText
|
|
||||||
waitbutton
|
waitbutton
|
||||||
closetext
|
closetext
|
||||||
end
|
end
|
||||||
|
|
||||||
.MoveMenuHeader:
|
.waited_a_day
|
||||||
db MENU_BACKUP_TILES ; flags
|
writetext .DidYouPutText2
|
||||||
menu_coords 0, 0, 15, TEXTBOX_Y + 1
|
waitbutton
|
||||||
dw .MenuData
|
closetext
|
||||||
db 1 ; default option
|
end
|
||||||
|
|
||||||
.MenuData:
|
.IntroText:
|
||||||
db STATICMENU_CURSOR ; flags
|
text "Hello, hello!"
|
||||||
db 6 ; items
|
line "I'm the HONEY"
|
||||||
db "OLD AMBER@"
|
cont "GRANDMA!"
|
||||||
db "DOME FOSSIL@"
|
|
||||||
db "HELIX FOSSIL@"
|
|
||||||
db "CLUB FOSSIL@"
|
|
||||||
db "WING FOSSIL@"
|
|
||||||
db "CANCEL@"
|
|
||||||
|
|
||||||
FossilScientistIntroText:
|
|
||||||
text "Hiya!"
|
|
||||||
|
|
||||||
para "I am important"
|
|
||||||
line "doctor!"
|
|
||||||
|
|
||||||
para "I study here rare"
|
|
||||||
line "#MON fossils!"
|
|
||||||
|
|
||||||
para "You! Have you a"
|
|
||||||
line "fossil for me?"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
FossilScientistNoText:
|
.UsedHoneyText:
|
||||||
text "No! Is too bad!"
|
text "I see you have a"
|
||||||
|
line "HONEY POT with"
|
||||||
para "You come again!"
|
para "you. You can use"
|
||||||
|
line "it to collect"
|
||||||
|
cont "SWEET HONEY."
|
||||||
|
para "I know! I'll share"
|
||||||
|
line "some with you."
|
||||||
done
|
done
|
||||||
|
|
||||||
FossilScientistPartyFullText:
|
.ReceivedSweetHoneyText:
|
||||||
text "No! Is too bad!"
|
|
||||||
|
|
||||||
para "Your party is"
|
|
||||||
line "already full!"
|
|
||||||
done
|
|
||||||
|
|
||||||
FossilScientistTimeText:
|
|
||||||
text "I take a little"
|
|
||||||
line "time!"
|
|
||||||
|
|
||||||
para "You go for walk a"
|
|
||||||
line "little while!"
|
|
||||||
done
|
|
||||||
|
|
||||||
FossilScientistDoneText:
|
|
||||||
text "Where were you?"
|
|
||||||
|
|
||||||
para "Your fossil is"
|
|
||||||
line "back to life!"
|
|
||||||
done
|
|
||||||
|
|
||||||
FossilScientistMonText:
|
|
||||||
text "Oh! That is"
|
|
||||||
line "a fossil!"
|
|
||||||
|
|
||||||
para "It is fossil of"
|
|
||||||
line "@"
|
|
||||||
text_ram wStringBuffer3
|
|
||||||
text ", a"
|
|
||||||
|
|
||||||
|
|
||||||
para "#MON that is"
|
|
||||||
line "already extinct!"
|
|
||||||
|
|
||||||
para "My Resurrection"
|
|
||||||
line "Machine will make"
|
|
||||||
cont "that #MON live"
|
|
||||||
cont "again!"
|
|
||||||
done
|
|
||||||
|
|
||||||
FossilScientistGiveText:
|
|
||||||
text "So! You hurry and"
|
|
||||||
line "give me that!"
|
|
||||||
|
|
||||||
para "<PLAYER> handed"
|
|
||||||
line "over the fossil."
|
|
||||||
done
|
|
||||||
|
|
||||||
FossilScientistReceiveText:
|
|
||||||
text "<PLAYER> received"
|
text "<PLAYER> received"
|
||||||
line "@"
|
line "SWEET HONEY."
|
||||||
text_ram wStringBuffer3
|
done
|
||||||
text "!"
|
|
||||||
|
.DidYouPutText:
|
||||||
|
text "Did you put SWEET"
|
||||||
|
line "HONEY on a tree?"
|
||||||
|
|
||||||
|
para "It takes about a"
|
||||||
|
line "day for #MON to"
|
||||||
|
cont "be drawn to it."
|
||||||
|
done
|
||||||
|
|
||||||
|
.NoPotText:
|
||||||
|
text "You don't have a"
|
||||||
|
line "HONEY POT?"
|
||||||
|
|
||||||
|
para "Not to worry!"
|
||||||
|
line "I've got just the"
|
||||||
|
cont "thing for you."
|
||||||
|
done
|
||||||
|
|
||||||
|
.AfterPotGivenText:
|
||||||
|
text "A HONEY POT can"
|
||||||
|
line "store SWEET HONEY."
|
||||||
|
para "You can use it to"
|
||||||
|
line "attract rare wild"
|
||||||
|
cont "#MON."
|
||||||
|
|
||||||
|
para "In fact, I'll give"
|
||||||
|
line "you some to try"
|
||||||
|
cont "it out!"
|
||||||
|
done
|
||||||
|
|
||||||
|
.TryUsingText:
|
||||||
|
text "Try spreading some"
|
||||||
|
line "HONEY on a tree!"
|
||||||
|
done
|
||||||
|
|
||||||
|
.DidYouPutText2:
|
||||||
|
text "Did you put SWEET"
|
||||||
|
line "HONEY on a tree?"
|
||||||
|
|
||||||
|
para "What happened to"
|
||||||
|
line "it?"
|
||||||
done
|
done
|
||||||
|
|
||||||
DebugRoom_MapEvents:
|
DebugRoom_MapEvents:
|
||||||
|
@ -516,4 +351,4 @@ DebugRoom_MapEvents:
|
||||||
object_event 17, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugFlyScript, -1
|
object_event 17, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugFlyScript, -1
|
||||||
object_event 16, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugDexScript, -1
|
object_event 16, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugDexScript, -1
|
||||||
object_event 19, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugItemScript, -1
|
object_event 19, 13, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_PURPLE, OBJECTTYPE_SCRIPT, 0, DebugItemScript, -1
|
||||||
object_event 18, 13, SPRITE_NURSE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, DebugFossilScientist, -1
|
object_event 18, 13, SPRITE_NURSE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, HoneyGrannyScript, -1
|
||||||
|
|
|
@ -3221,7 +3221,14 @@ wBugContestStartTime:: ds 4 ; day, hour, min, sec
|
||||||
wUnusedTwoDayTimerOn:: db
|
wUnusedTwoDayTimerOn:: db
|
||||||
wUnusedTwoDayTimer:: db
|
wUnusedTwoDayTimer:: db
|
||||||
wUnusedTwoDayTimerStartDate:: db
|
wUnusedTwoDayTimerStartDate:: db
|
||||||
ds 4
|
wSweetHoneyEnabled:: db
|
||||||
|
wSweetHoneyTimer:: db ; counts days since start date
|
||||||
|
wSweetHoneyStartDate:: db
|
||||||
|
|
||||||
|
wSweetHoneyMapGroup:: db
|
||||||
|
wSweetHoneyMapNumber:: db
|
||||||
|
wSweetHoneyX:: db
|
||||||
|
wSweetHoneyY:: db
|
||||||
wMobileOrCable_LastSelection:: db
|
wMobileOrCable_LastSelection:: db
|
||||||
wdc41:: ds 1
|
wdc41:: ds 1
|
||||||
wdc42:: ds 8
|
wdc42:: ds 8
|
||||||
|
|
Loading…
Reference in a new issue