mirror of
https://github.com/pret/pokecrystal.git
synced 2024-11-27 07:10:29 +00:00
Add daily+weekly bit flags (close issue #429)
This commit is contained in:
parent
3a7f518de4
commit
efe6981a0d
@ -97,18 +97,18 @@
|
||||
; wDailyFlags
|
||||
const ENGINE_KURT_MAKING_BALLS ; 50
|
||||
const ENGINE_DAILY_BUG_CONTEST
|
||||
const ENGINE_SPECIAL_WILDDATA
|
||||
const ENGINE_FISH_SWARM
|
||||
const ENGINE_TIME_CAPSULE
|
||||
const ENGINE_ALL_FRUIT_TREES
|
||||
const ENGINE_SHUCKLE_GIVEN
|
||||
const ENGINE_GOT_SHUCKIE_TODAY
|
||||
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
|
||||
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
|
||||
; wWeeklyFlags
|
||||
const ENGINE_MT_MOON_SQUARE_CLEFAIRY
|
||||
const ENGINE_UNION_CAVE_LAPRAS
|
||||
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
|
||||
const ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT
|
||||
const ENGINE_TEA_IN_BLUES_HOUSE
|
||||
const ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
|
||||
const ENGINE_DAISYS_GROOMING
|
||||
const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
|
||||
const ENGINE_DAILY_MOVE_TUTOR
|
||||
const ENGINE_BUENAS_PASSWORD
|
||||
|
@ -17,7 +17,6 @@ AUTO_INPUT EQU $ff
|
||||
const WILDMON ; 4
|
||||
|
||||
; Options:: ; cfcc
|
||||
|
||||
const_value set 4
|
||||
const NO_TEXT_SCROLL ; 4
|
||||
const STEREO ; 5
|
||||
@ -226,6 +225,28 @@ CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2
|
||||
const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1
|
||||
const BIKEFLAGS_DOWNHILL_F ; 2
|
||||
|
||||
; wDailyFlags:: ; dc1e
|
||||
const_def
|
||||
const DAILYFLAGS_KURT_MAKING_BALLS_F ; 0
|
||||
const DAILYFLAGS_BUG_CONTEST_F ; 1
|
||||
const DAILYFLAGS_FISH_SWARM_F ; 2
|
||||
const DAILYFLAGS_TIME_CAPSULE_F ; 3
|
||||
const DAILYFLAGS_ALL_FRUIT_TREES_F ; 4
|
||||
const DAILYFLAGS_GOT_SHUCKIE_TODAY_F ; 5
|
||||
const DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6
|
||||
const DAILYFLAGS_TRAINER_HOUSE_F ; 7
|
||||
|
||||
; wWeeklyFlags:: ; dc1f
|
||||
const_def
|
||||
const WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; 0
|
||||
const WEEKLYFLAGS_UNION_CAVE_LAPRAS_F ; 1
|
||||
const WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2
|
||||
const WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3
|
||||
const WEEKLYFLAGS_DAISYS_GROOMING_F ; 4
|
||||
const WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5
|
||||
const WEEKLYFLAGS_DAILY_MOVE_TUTOR_F ; 6
|
||||
const WEEKLYFLAGS_BUENAS_PASSWORD_F ; 7
|
||||
|
||||
; wSwarmFlags:: ; dc20
|
||||
const_def
|
||||
const SWARMFLAGS_BUENAS_PASSWORD_F ; 0
|
||||
|
@ -104,23 +104,23 @@ EngineFlags: ; 80462
|
||||
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_F
|
||||
|
||||
engine_flag wDailyFlags, 0 ; kurt making balls ; $50
|
||||
engine_flag wDailyFlags, 1 ; ????
|
||||
engine_flag wDailyFlags, 2 ; special wilddata?
|
||||
engine_flag wDailyFlags, 3 ; time capsule (24h wait)
|
||||
engine_flag wDailyFlags, 4 ; all fruit trees
|
||||
engine_flag wDailyFlags, 5 ; shuckle given
|
||||
engine_flag wDailyFlags, 6 ; goldenrod underground merchant closed
|
||||
engine_flag wDailyFlags, 7 ; fought in trainer hall today
|
||||
engine_flag wDailyFlags, DAILYFLAGS_KURT_MAKING_BALLS_F ; $50
|
||||
engine_flag wDailyFlags, DAILYFLAGS_BUG_CONTEST_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_FISH_SWARM_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_TIME_CAPSULE_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_ALL_FRUIT_TREES_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_GOT_SHUCKIE_TODAY_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F
|
||||
engine_flag wDailyFlags, DAILYFLAGS_TRAINER_HOUSE_F
|
||||
|
||||
engine_flag wWeeklyFlags, 0 ; mt moon square clefairy ; $58
|
||||
engine_flag wWeeklyFlags, 1 ; union cave lapras
|
||||
engine_flag wWeeklyFlags, 2 ; goldenrod underground haircut used
|
||||
engine_flag wWeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
|
||||
engine_flag wWeeklyFlags, 4 ; tea in blues house
|
||||
engine_flag wWeeklyFlags, 5 ; indigo plateau rival fight
|
||||
engine_flag wWeeklyFlags, 6 ; move tutor
|
||||
engine_flag wWeeklyFlags, 7 ; buenas password
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; $58
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_UNION_CAVE_LAPRAS_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAISYS_GROOMING_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAILY_MOVE_TUTOR_F
|
||||
engine_flag wWeeklyFlags, WEEKLYFLAGS_BUENAS_PASSWORD_F
|
||||
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
|
||||
|
@ -98,7 +98,7 @@ GetFishGroupIndex: ; 9245b
|
||||
|
||||
push hl
|
||||
ld hl, wDailyFlags
|
||||
bit 2, [hl]
|
||||
bit DAILYFLAGS_FISH_SWARM_F, [hl]
|
||||
pop hl
|
||||
jr z, .done
|
||||
|
||||
|
@ -44,7 +44,7 @@ GetCurTreeFruit: ; 44041
|
||||
|
||||
TryResetFruitTrees: ; 4404c
|
||||
ld hl, wDailyFlags
|
||||
bit 4, [hl]
|
||||
bit DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
|
||||
ret nz
|
||||
jp ResetFruitTrees
|
||||
; 44055
|
||||
@ -71,7 +71,7 @@ ResetFruitTrees: ; 4406a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld hl, wDailyFlags
|
||||
set 4, [hl]
|
||||
set DAILYFLAGS_ALL_FRUIT_TREES_F, [hl]
|
||||
ret
|
||||
; 44078
|
||||
|
||||
|
@ -56,7 +56,7 @@ Special_GiveShuckle: ; 7305
|
||||
|
||||
; Engine flag for this event.
|
||||
ld hl, wDailyFlags
|
||||
set 5, [hl] ; ENGINE_SHUCKLE_GIVEN
|
||||
set DAILYFLAGS_GOT_SHUCKIE_TODAY_F, [hl]
|
||||
ld a, 1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
@ -59,7 +59,7 @@ BargainShop: ; 15a84
|
||||
or [hl]
|
||||
jr z, .skip_set
|
||||
ld hl, wDailyFlags
|
||||
set 6, [hl]
|
||||
set DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl]
|
||||
|
||||
.skip_set
|
||||
ld hl, Text_BargainShop_ComeAgain
|
||||
|
@ -788,7 +788,7 @@ RalphPhoneScript1:
|
||||
checkmorn
|
||||
iftrue Ralph_WednesdayMorning
|
||||
Ralph_CheckSwarm:
|
||||
checkflag ENGINE_SPECIAL_WILDDATA
|
||||
checkflag ENGINE_FISH_SWARM
|
||||
iftrue Ralph_ReportSwarm
|
||||
farjump UnknownScript_0xa0940
|
||||
|
||||
@ -824,9 +824,9 @@ Ralph_FightMe:
|
||||
farjump PhoneScript_WantsToBattle_Male
|
||||
|
||||
Ralph_SetUpSwarm:
|
||||
checkflag ENGINE_SPECIAL_WILDDATA
|
||||
checkflag ENGINE_FISH_SWARM
|
||||
iftrue .Generic
|
||||
setflag ENGINE_SPECIAL_WILDDATA
|
||||
setflag ENGINE_FISH_SWARM
|
||||
pokenamemem QWILFISH, MEM_BUFFER_1
|
||||
landmarktotext ROUTE_32, MEM_BUFFER_2
|
||||
writebyte FISHSWARM_QWILFISH
|
||||
|
@ -1560,7 +1560,7 @@ BuenasPassword4:
|
||||
ld a, [wBuenasPassword]
|
||||
; If we already generated the password today, we don't need to generate a new one.
|
||||
ld hl, wWeeklyFlags
|
||||
bit 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||
bit WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
|
||||
jr nz, .AlreadyGotIt
|
||||
; There are only 11 groups to choose from.
|
||||
.greater_than_11
|
||||
@ -1582,7 +1582,7 @@ BuenasPassword4:
|
||||
ld [wBuenasPassword], a
|
||||
; Set the flag so that we don't generate a new password this week.
|
||||
ld hl, wWeeklyFlags
|
||||
set 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||
set WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
|
||||
.AlreadyGotIt:
|
||||
ld c, a
|
||||
call GetBuenasPassword
|
||||
@ -1703,14 +1703,14 @@ BuenasPassword7:
|
||||
BuenasPasswordAfterMidnight:
|
||||
push hl
|
||||
ld hl, wWeeklyFlags
|
||||
res 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
|
||||
pop hl
|
||||
ld a, BUENAS_PASSWORD_8
|
||||
jp NextRadioLine
|
||||
|
||||
BuenasPassword8:
|
||||
ld hl, wWeeklyFlags
|
||||
res 7, [hl] ; ENGINE_BUENAS_PASSWORD
|
||||
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
|
||||
ld hl, BuenaRadioMidnightText10
|
||||
ld a, BUENAS_PASSWORD_9
|
||||
jp NextRadioLine
|
||||
@ -1778,7 +1778,7 @@ BuenasPassword20:
|
||||
pop af
|
||||
ld [hBGMapMode], a
|
||||
ld hl, wWeeklyFlags
|
||||
res 7, [hl]
|
||||
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl]
|
||||
ld a, BUENAS_PASSWORD
|
||||
ld [wCurrentRadioLine], a
|
||||
xor a
|
||||
|
@ -102,10 +102,10 @@ CheckDailyResetTimer:: ; 11452
|
||||
ret nc
|
||||
xor a
|
||||
ld hl, wDailyFlags
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld [hli], a ; wDailyFlags
|
||||
ld [hli], a ; wWeeklyFlags
|
||||
ld [hli], a ; wSwarmFlags
|
||||
ld [hl], a ; wSwarmFlags + 1
|
||||
ld hl, wDailyRematchFlags
|
||||
rept 4
|
||||
ld [hli], a
|
||||
@ -227,14 +227,14 @@ CheckUnusedTwoDayTimer: ; 1150c
|
||||
|
||||
; unused
|
||||
ld hl, wDailyFlags
|
||||
set 2, [hl]
|
||||
set DAILYFLAGS_FISH_SWARM_F, [hl]
|
||||
ret
|
||||
; 11522
|
||||
|
||||
; unused
|
||||
and a
|
||||
ld hl, wDailyFlags
|
||||
bit 2, [hl]
|
||||
bit DAILYFLAGS_FISH_SWARM_F, [hl]
|
||||
ret nz
|
||||
scf
|
||||
ret
|
||||
|
@ -19,7 +19,7 @@ DaisyScript:
|
||||
end
|
||||
|
||||
.ThreePM:
|
||||
checkflag ENGINE_TEA_IN_BLUES_HOUSE
|
||||
checkflag ENGINE_DAISYS_GROOMING
|
||||
iftrue .AlreadyGroomedMon
|
||||
writetext DaisyOfferGroomingText
|
||||
yesorno
|
||||
@ -29,7 +29,7 @@ DaisyScript:
|
||||
special Special_DaisyMassage
|
||||
if_equal $0, .Refused
|
||||
if_equal $1, .CantGroomEgg
|
||||
setflag ENGINE_TEA_IN_BLUES_HOUSE
|
||||
setflag ENGINE_DAISYS_GROOMING
|
||||
writetext DaisyAlrightText
|
||||
waitbutton
|
||||
closetext
|
||||
|
@ -63,7 +63,7 @@ ReceptionistScript_0x560ce:
|
||||
opentext
|
||||
checkcode VAR_WEEKDAY
|
||||
if_not_equal SUNDAY, .EventIsOver
|
||||
checkflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT
|
||||
checkflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
|
||||
iftrue .EventIsOver
|
||||
special Special_GetFirstPokemonHappiness
|
||||
writetext UnknownText_0x56143
|
||||
@ -77,7 +77,7 @@ ReceptionistScript_0x560ce:
|
||||
buttonsound
|
||||
verbosegiveitem TM_RETURN
|
||||
iffalse .Done
|
||||
setflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT
|
||||
setflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
|
||||
closetext
|
||||
end
|
||||
|
||||
@ -92,7 +92,7 @@ ReceptionistScript_0x560ce:
|
||||
buttonsound
|
||||
verbosegiveitem TM_FRUSTRATION
|
||||
iffalse .Done
|
||||
setflag ENGINE_GOLDENROD_MALL_5F_HAPPINESS_EVENT
|
||||
setflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN
|
||||
closetext
|
||||
end
|
||||
|
||||
|
@ -31,7 +31,7 @@ ManiaScript:
|
||||
end
|
||||
|
||||
.alreadyhaveshuckie
|
||||
checkflag ENGINE_SHUCKLE_GIVEN
|
||||
checkflag ENGINE_GOT_SHUCKIE_TODAY
|
||||
iffalse .returnshuckie
|
||||
writetext ManiaText_TakeCareOfShuckle
|
||||
waitbutton
|
||||
|
@ -174,7 +174,7 @@ TrainerFisherRalph1:
|
||||
opentext
|
||||
checkflag ENGINE_RALPH
|
||||
iftrue .Rematch
|
||||
checkflag ENGINE_SPECIAL_WILDDATA
|
||||
checkflag ENGINE_FISH_SWARM
|
||||
iftrue .Swarm
|
||||
checkcellnum PHONE_FISHER_RALPH
|
||||
iftrue .NumberAccepted
|
||||
|
Loading…
Reference in New Issue
Block a user