Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/overworld/field_move_messages.asm
1271 views
1
PrintStrengthText:
2
ld hl, wStatusFlags1
3
set BIT_STRENGTH_ACTIVE, [hl]
4
ld hl, UsedStrengthText
5
call PrintText
6
ld hl, CanMoveBouldersText
7
jp PrintText
8
9
UsedStrengthText:
10
text_far _UsedStrengthText
11
text_asm
12
ld a, [wCurPartySpecies]
13
call PlayCry
14
call Delay3
15
jp TextScriptEnd
16
17
CanMoveBouldersText:
18
text_far _CanMoveBouldersText
19
text_end
20
21
IsSurfingAllowed:
22
; Returns whether surfing is allowed in BIT_SURF_ALLOWED of wStatusFlags1.
23
; Surfing isn't allowed on the Cycling Road or in the lowest level of the
24
; Seafoam Islands before the current has been slowed with boulders.
25
ld hl, wStatusFlags1
26
set BIT_SURF_ALLOWED, [hl]
27
ld a, [wStatusFlags6]
28
bit BIT_ALWAYS_ON_BIKE, a
29
jr nz, .forcedToRideBike
30
ld a, [wCurMap]
31
cp SEAFOAM_ISLANDS_B4F
32
ret nz
33
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
34
ret z
35
ld hl, SeafoamIslandsB4FStairsCoords
36
call ArePlayerCoordsInArray
37
ret nc
38
ld hl, wStatusFlags1
39
res BIT_SURF_ALLOWED, [hl]
40
ld hl, CurrentTooFastText
41
jp PrintText
42
.forcedToRideBike
43
ld hl, wStatusFlags1
44
res BIT_SURF_ALLOWED, [hl]
45
ld hl, CyclingIsFunText
46
jp PrintText
47
48
SeafoamIslandsB4FStairsCoords:
49
dbmapcoord 7, 11
50
db -1 ; end
51
52
CurrentTooFastText:
53
text_far _CurrentTooFastText
54
text_end
55
56
CyclingIsFunText:
57
text_far _CyclingIsFunText
58
text_end
59
60