mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
remove address comments
This commit is contained in:
parent
cee4d559f9
commit
7f34e28f24
764 changed files with 8371 additions and 8371 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
; formats a string at wMovesString that lists the moves at wMoves
|
||||
FormatMovesString: ; 39b87 (e:5b87)
|
||||
FormatMovesString:
|
||||
ld hl, wMoves
|
||||
ld de, wMovesString
|
||||
ld b, $0
|
||||
|
|
@ -52,7 +52,7 @@ FormatMovesString: ; 39b87 (e:5b87)
|
|||
ret
|
||||
|
||||
; XXX this is called in a few places, but it doesn't appear to do anything useful
|
||||
InitList: ; 39bd5 (e:5bd5)
|
||||
InitList:
|
||||
ld a, [wInitListType]
|
||||
cp INIT_ENEMYOT_LIST
|
||||
jr nz, .notEnemy
|
||||
|
|
@ -103,7 +103,7 @@ InitList: ; 39bd5 (e:5bd5)
|
|||
ret
|
||||
|
||||
; get species of mon e in list [wMonDataLocation] for LoadMonData
|
||||
GetMonSpecies: ; 39c37 (e:5c37)
|
||||
GetMonSpecies:
|
||||
ld hl, wPartySpecies
|
||||
ld a, [wMonDataLocation]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
BattleTransition: ; 7096d (1c:496d)
|
||||
BattleTransition:
|
||||
ld a, 1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Delay3
|
||||
|
|
@ -70,7 +70,7 @@ BattleTransition: ; 7096d (1c:496d)
|
|||
; bit 0: set if trainer battle
|
||||
; bit 1: set if enemy is at least 3 levels higher than player
|
||||
; bit 2: set if dungeon map
|
||||
BattleTransitions: ; 709d2 (1c:49d2)
|
||||
BattleTransitions:
|
||||
dw BattleTransition_DoubleCircle ; %000
|
||||
dw BattleTransition_Spiral ; %001
|
||||
dw BattleTransition_Circle ; %010
|
||||
|
|
@ -80,7 +80,7 @@ BattleTransitions: ; 709d2 (1c:49d2)
|
|||
dw BattleTransition_VerticalStripes ; %110
|
||||
dw BattleTransition_Split ; %111
|
||||
|
||||
GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
|
||||
GetBattleTransitionID_WildOrTrainer:
|
||||
ld a, [wCurOpponent]
|
||||
cp 200
|
||||
jr nc, .trainer
|
||||
|
|
@ -90,7 +90,7 @@ GetBattleTransitionID_WildOrTrainer: ; 709e2 (1c:49e2)
|
|||
set 0, c
|
||||
ret
|
||||
|
||||
GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
|
||||
GetBattleTransitionID_CompareLevels:
|
||||
ld hl, wPartyMon1HP
|
||||
.faintedLoop
|
||||
ld a, [hli]
|
||||
|
|
@ -121,7 +121,7 @@ GetBattleTransitionID_CompareLevels: ; 709ef (1c:49ef)
|
|||
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
|
||||
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
|
||||
; and SILPH_CO_[9-11]F as dungeon maps
|
||||
GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
|
||||
GetBattleTransitionID_IsDungeonMap:
|
||||
ld a, [wCurMap]
|
||||
ld e, a
|
||||
ld hl, DungeonMaps1
|
||||
|
|
@ -153,7 +153,7 @@ GetBattleTransitionID_IsDungeonMap: ; 70a19 (1c:4a19)
|
|||
|
||||
; GetBattleTransitionID_IsDungeonMap checks if wCurMap
|
||||
; is equal to one of these maps
|
||||
DungeonMaps1: ; 70a3f (1c:4a3f)
|
||||
DungeonMaps1:
|
||||
db VIRIDIAN_FOREST
|
||||
db ROCK_TUNNEL_1
|
||||
db SEAFOAM_ISLANDS_1
|
||||
|
|
@ -162,7 +162,7 @@ DungeonMaps1: ; 70a3f (1c:4a3f)
|
|||
|
||||
; GetBattleTransitionID_IsDungeonMap checks if wCurMap
|
||||
; is in between or equal to each pair of maps
|
||||
DungeonMaps2: ; 70a44 (1c:4a44)
|
||||
DungeonMaps2:
|
||||
; all MT_MOON maps
|
||||
db MT_MOON_1
|
||||
db MT_MOON_3
|
||||
|
|
@ -181,17 +181,17 @@ DungeonMaps2: ; 70a44 (1c:4a44)
|
|||
db UNKNOWN_DUNGEON_1
|
||||
db $FF
|
||||
|
||||
LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
|
||||
LoadBattleTransitionTile:
|
||||
ld hl, vChars1 + $7f0
|
||||
ld de, BattleTransitionTile
|
||||
lb bc, BANK(BattleTransitionTile), (BattleTransitionTileEnd - BattleTransitionTile) / $10
|
||||
jp CopyVideoData
|
||||
|
||||
BattleTransitionTile: ; 70a59 (1c:4a59)
|
||||
BattleTransitionTile:
|
||||
INCBIN "gfx/battle_transition.2bpp"
|
||||
BattleTransitionTileEnd:
|
||||
|
||||
BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
|
||||
BattleTransition_BlackScreen:
|
||||
ld a, $ff
|
||||
ld [rBGP], a
|
||||
ld [rOBP0], a
|
||||
|
|
@ -202,7 +202,7 @@ BattleTransition_BlackScreen: ; 70a69 (1c:4a69)
|
|||
; called regardless of mon levels, but does an
|
||||
; outward spiral if enemy is at least 3 levels
|
||||
; higher than player and does an inward spiral otherwise
|
||||
BattleTransition_Spiral: ; 70a72 (1c:4a72)
|
||||
BattleTransition_Spiral:
|
||||
ld a, [wBattleTransitionSpiralDirection]
|
||||
and a
|
||||
jr z, .outwardSpiral
|
||||
|
|
@ -235,7 +235,7 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72)
|
|||
ld [wOutwardSpiralTileMapPointer], a
|
||||
ret
|
||||
|
||||
BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
|
||||
BattleTransition_InwardSpiral:
|
||||
ld a, 7
|
||||
ld [wInwardSpiralUpdateScreenCounter], a
|
||||
coord hl, 0, 0
|
||||
|
|
@ -265,7 +265,7 @@ BattleTransition_InwardSpiral: ; 70aaa (1c:4aaa)
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
|
||||
BattleTransition_InwardSpiral_:
|
||||
push bc
|
||||
.loop
|
||||
ld [hl], $ff
|
||||
|
|
@ -284,7 +284,7 @@ BattleTransition_InwardSpiral_: ; 70ae0 (1c:4ae0)
|
|||
pop bc
|
||||
ret
|
||||
|
||||
BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
||||
BattleTransition_OutwardSpiral_:
|
||||
ld bc, -SCREEN_WIDTH
|
||||
ld de, SCREEN_WIDTH
|
||||
ld a, [wOutwardSpiralTileMapPointer + 1]
|
||||
|
|
@ -352,7 +352,7 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
|||
jr .done
|
||||
|
||||
FlashScreen:
|
||||
BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
|
||||
BattleTransition_FlashScreen_:
|
||||
ld hl, BattleTransition_FlashScreenPalettes
|
||||
.loop
|
||||
ld a, [hli]
|
||||
|
|
@ -367,12 +367,12 @@ BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
|
|||
jr nz, BattleTransition_FlashScreen_
|
||||
ret
|
||||
|
||||
BattleTransition_FlashScreenPalettes: ; 70b72 (1c:4b72)
|
||||
BattleTransition_FlashScreenPalettes:
|
||||
db $F9,$FE,$FF,$FE,$F9,$E4,$90,$40,$00,$40,$90,$E4
|
||||
db $01 ; terminator
|
||||
|
||||
; used for low level trainer dungeon battles
|
||||
BattleTransition_Shrink: ; 70b7f (1c:4b7f)
|
||||
BattleTransition_Shrink:
|
||||
ld c, SCREEN_HEIGHT / 2
|
||||
.loop
|
||||
push bc
|
||||
|
|
@ -406,7 +406,7 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f)
|
|||
jp DelayFrames
|
||||
|
||||
; used for high level trainer dungeon battles
|
||||
BattleTransition_Split: ; 70bca (1c:4bca)
|
||||
BattleTransition_Split:
|
||||
ld c, SCREEN_HEIGHT / 2
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
|
|
@ -437,7 +437,7 @@ BattleTransition_Split: ; 70bca (1c:4bca)
|
|||
ld c, 10
|
||||
jp DelayFrames
|
||||
|
||||
BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
|
||||
BattleTransition_CopyTiles1:
|
||||
ld a, c
|
||||
ld [wBattleTransitionCopyTilesOffset], a
|
||||
ld a, b
|
||||
|
|
@ -469,7 +469,7 @@ BattleTransition_CopyTiles1: ; 70c12 (1c:4c12)
|
|||
jr nz, .loop2
|
||||
ret
|
||||
|
||||
BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
|
||||
BattleTransition_CopyTiles2:
|
||||
ld a, c
|
||||
ld [wBattleTransitionCopyTilesOffset], a
|
||||
ld a, b
|
||||
|
|
@ -519,7 +519,7 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f)
|
|||
ret
|
||||
|
||||
; used for high level wild dungeon battles
|
||||
BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
||||
BattleTransition_VerticalStripes:
|
||||
ld c, SCREEN_HEIGHT
|
||||
coord hl, 0, 0
|
||||
coord de, 1, 17
|
||||
|
|
@ -547,7 +547,7 @@ BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e)
|
|||
jr nz, .loop
|
||||
jp BattleTransition_BlackScreen
|
||||
|
||||
BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
|
||||
BattleTransition_VerticalStripes_:
|
||||
ld c, SCREEN_WIDTH / 2
|
||||
.loop
|
||||
ld [hl], $ff
|
||||
|
|
@ -558,7 +558,7 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa)
|
|||
ret
|
||||
|
||||
; used for low level wild dungeon battles
|
||||
BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
|
||||
BattleTransition_HorizontalStripes:
|
||||
ld c, SCREEN_WIDTH
|
||||
coord hl, 0, 0
|
||||
coord de, 19, 1
|
||||
|
|
@ -582,7 +582,7 @@ BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4)
|
|||
jr nz, .loop
|
||||
jp BattleTransition_BlackScreen
|
||||
|
||||
BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
|
||||
BattleTransition_HorizontalStripes_:
|
||||
ld c, SCREEN_HEIGHT / 2
|
||||
ld de, SCREEN_WIDTH * 2
|
||||
.loop
|
||||
|
|
@ -595,7 +595,7 @@ BattleTransition_HorizontalStripes_: ; 70cd8 (1c:4cd8)
|
|||
; used for high level wild non-dungeon battles
|
||||
; makes one full circle around the screen
|
||||
; by animating each half circle one at a time
|
||||
BattleTransition_Circle: ; 70ce4 (1c:4ce4)
|
||||
BattleTransition_Circle:
|
||||
call BattleTransition_FlashScreen
|
||||
lb bc, 0, SCREEN_WIDTH / 2
|
||||
ld hl, BattleTransition_HalfCircle1
|
||||
|
|
@ -606,14 +606,14 @@ BattleTransition_Circle: ; 70ce4 (1c:4ce4)
|
|||
call BattleTransition_Circle_Sub1
|
||||
jp BattleTransition_BlackScreen
|
||||
|
||||
BattleTransition_FlashScreen: ; 70cfd (1c:4cfd)
|
||||
BattleTransition_FlashScreen:
|
||||
ld b, $3
|
||||
call BattleTransition_FlashScreen_
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
ret
|
||||
|
||||
BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
|
||||
BattleTransition_Circle_Sub1:
|
||||
push bc
|
||||
push hl
|
||||
ld a, b
|
||||
|
|
@ -627,7 +627,7 @@ BattleTransition_Circle_Sub1: ; 70d06 (1c:4d06)
|
|||
jr nz, BattleTransition_Circle_Sub1
|
||||
ret
|
||||
|
||||
BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
|
||||
BattleTransition_TransferDelay3:
|
||||
ld a, 1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Delay3
|
||||
|
|
@ -638,7 +638,7 @@ BattleTransition_TransferDelay3: ; 70d19 (1c:4d19)
|
|||
; used for low level wild non-dungeon battles
|
||||
; makes two half circles around the screen
|
||||
; by animating both half circles at the same time
|
||||
BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
|
||||
BattleTransition_DoubleCircle:
|
||||
call BattleTransition_FlashScreen
|
||||
ld c, SCREEN_WIDTH / 2
|
||||
ld hl, BattleTransition_HalfCircle1
|
||||
|
|
@ -666,7 +666,7 @@ BattleTransition_DoubleCircle: ; 70d24 (1c:4d24)
|
|||
jr nz, .loop
|
||||
jp BattleTransition_BlackScreen
|
||||
|
||||
BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
|
||||
BattleTransition_Circle_Sub2:
|
||||
ld [wBattleTransitionCircleScreenQuadrantY], a
|
||||
ld a, [hli]
|
||||
ld [wBattleTransitionCircleScreenQuadrantX], a
|
||||
|
|
@ -679,7 +679,7 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50)
|
|||
ld l, a
|
||||
jp BattleTransition_Circle_Sub3
|
||||
|
||||
BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
|
||||
BattleTransition_HalfCircle1:
|
||||
db $01
|
||||
dw BattleTransition_CircleData1
|
||||
dwCoord 18, 6
|
||||
|
|
@ -720,7 +720,7 @@ BattleTransition_HalfCircle1: ; 70d61 (1c:4d61)
|
|||
dw BattleTransition_CircleData1
|
||||
dwCoord 1, 6
|
||||
|
||||
BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
|
||||
BattleTransition_HalfCircle2:
|
||||
db $00
|
||||
dw BattleTransition_CircleData1
|
||||
dwCoord 1, 11
|
||||
|
|
@ -761,7 +761,7 @@ BattleTransition_HalfCircle2: ; 70d93 (1c:4d93)
|
|||
dw BattleTransition_CircleData1
|
||||
dwCoord 18, 11
|
||||
|
||||
BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
|
||||
BattleTransition_Circle_Sub3:
|
||||
push hl
|
||||
ld a, [de]
|
||||
ld c, a
|
||||
|
|
@ -806,17 +806,17 @@ BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5)
|
|||
jr nz, .loop2
|
||||
jr BattleTransition_Circle_Sub3
|
||||
|
||||
BattleTransition_CircleData1: ; 70dfe (1c:4dfe)
|
||||
BattleTransition_CircleData1:
|
||||
db $02,$03,$05,$04,$09,$FF
|
||||
|
||||
BattleTransition_CircleData2: ; 70e04 (1c:4e04)
|
||||
BattleTransition_CircleData2:
|
||||
db $01,$01,$02,$02,$04,$02,$04,$02,$03,$FF
|
||||
|
||||
BattleTransition_CircleData3: ; 70e0e (1c:4e0e)
|
||||
BattleTransition_CircleData3:
|
||||
db $02,$01,$03,$01,$04,$01,$04,$01,$04,$01,$03,$01,$02,$01,$01,$01,$01,$FF
|
||||
|
||||
BattleTransition_CircleData4: ; 70e20 (1c:4e20)
|
||||
BattleTransition_CircleData4:
|
||||
db $04,$01,$04,$00,$03,$01,$03,$00,$02,$01,$02,$00,$01,$FF
|
||||
|
||||
BattleTransition_CircleData5: ; 70e2e (1c:4e2e)
|
||||
BattleTransition_CircleData5:
|
||||
db $04,$00,$03,$00,$03,$00,$02,$00,$02,$00,$01,$00,$01,$00,$01,$FF
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrintBeginningBattleText: ; 58d99 (16:4d99)
|
||||
PrintBeginningBattleText:
|
||||
ld a, [wIsInBattle]
|
||||
dec a
|
||||
jr nz, .trainerBattle
|
||||
|
|
@ -70,31 +70,31 @@ PrintBeginningBattleText: ; 58d99 (16:4d99)
|
|||
.done
|
||||
ret
|
||||
|
||||
WildMonAppearedText: ; 58e3b (16:4e3b)
|
||||
WildMonAppearedText:
|
||||
TX_FAR _WildMonAppearedText
|
||||
db "@"
|
||||
|
||||
HookedMonAttackedText: ; 58e40 (16:4e40)
|
||||
HookedMonAttackedText:
|
||||
TX_FAR _HookedMonAttackedText
|
||||
db "@"
|
||||
|
||||
EnemyAppearedText: ; 58e45 (16:4e45)
|
||||
EnemyAppearedText:
|
||||
TX_FAR _EnemyAppearedText
|
||||
db "@"
|
||||
|
||||
TrainerWantsToFightText: ; 58e4a (16:4e4a)
|
||||
TrainerWantsToFightText:
|
||||
TX_FAR _TrainerWantsToFightText
|
||||
db "@"
|
||||
|
||||
UnveiledGhostText: ; 58e4f (16:4e4f)
|
||||
UnveiledGhostText:
|
||||
TX_FAR _UnveiledGhostText
|
||||
db "@"
|
||||
|
||||
GhostCantBeIDdText: ; 58e54 (16:4e54)
|
||||
GhostCantBeIDdText:
|
||||
TX_FAR _GhostCantBeIDdText
|
||||
db "@"
|
||||
|
||||
PrintSendOutMonMessage: ; 58e59 (16:4e59)
|
||||
PrintSendOutMonMessage:
|
||||
ld hl, wEnemyMonHP
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
|
|
@ -137,22 +137,22 @@ PrintSendOutMonMessage: ; 58e59 (16:4e59)
|
|||
.printText
|
||||
jp PrintText
|
||||
|
||||
GoText: ; 58eae (16:4eae)
|
||||
GoText:
|
||||
TX_FAR _GoText
|
||||
TX_ASM
|
||||
jr PrintPlayerMon1Text
|
||||
|
||||
DoItText: ; 58eb5 (16:4eb5)
|
||||
DoItText:
|
||||
TX_FAR _DoItText
|
||||
TX_ASM
|
||||
jr PrintPlayerMon1Text
|
||||
|
||||
GetmText: ; 58ebc (16:4ebc)
|
||||
GetmText:
|
||||
TX_FAR _GetmText
|
||||
TX_ASM
|
||||
jr PrintPlayerMon1Text
|
||||
|
||||
EnemysWeakText: ; 58ec3 (16:4ec3)
|
||||
EnemysWeakText:
|
||||
TX_FAR _EnemysWeakText
|
||||
TX_ASM
|
||||
|
||||
|
|
@ -160,15 +160,15 @@ PrintPlayerMon1Text:
|
|||
ld hl, PlayerMon1Text
|
||||
ret
|
||||
|
||||
PlayerMon1Text: ; 58ecc (16:4ecc)
|
||||
PlayerMon1Text:
|
||||
TX_FAR _PlayerMon1Text
|
||||
db "@"
|
||||
|
||||
RetreatMon: ; 58ed1 (16:4ed1)
|
||||
RetreatMon:
|
||||
ld hl, PlayerMon2Text
|
||||
jp PrintText
|
||||
|
||||
PlayerMon2Text: ; 58ed7 (16:4ed7)
|
||||
PlayerMon2Text:
|
||||
TX_FAR _PlayerMon2Text
|
||||
TX_ASM
|
||||
push de
|
||||
|
|
@ -219,25 +219,25 @@ PlayerMon2Text: ; 58ed7 (16:4ed7)
|
|||
ld hl, GoodText ; HP went down 70% or more
|
||||
ret
|
||||
|
||||
EnoughText: ; 58f25 (16:4f25)
|
||||
EnoughText:
|
||||
TX_FAR _EnoughText
|
||||
TX_ASM
|
||||
jr PrintComeBackText
|
||||
|
||||
OKExclamationText: ; 58f2c (16:4f2c)
|
||||
OKExclamationText:
|
||||
TX_FAR _OKExclamationText
|
||||
TX_ASM
|
||||
jr PrintComeBackText
|
||||
|
||||
GoodText: ; 58f33 (16:4f33)
|
||||
GoodText:
|
||||
TX_FAR _GoodText
|
||||
TX_ASM
|
||||
jr PrintComeBackText
|
||||
|
||||
PrintComeBackText: ; 58f3a (16:4f3a)
|
||||
PrintComeBackText:
|
||||
ld hl, ComeBackText
|
||||
ret
|
||||
|
||||
ComeBackText: ; 58f3e (16:4f3e)
|
||||
ComeBackText:
|
||||
TX_FAR _ComeBackText
|
||||
db "@"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,4 @@
|
|||
DecrementPP: ; 68000 (1a:4000)
|
||||
DecrementPP:
|
||||
; after using a move, decrement pp in battle and (if not transformed?) in party
|
||||
ld a, [de]
|
||||
cp a, STRUGGLE
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayEffectiveness: ; 2fb7b (b:7b7b)
|
||||
DisplayEffectiveness:
|
||||
ld a, [wDamageMultipliers]
|
||||
and a, $7F
|
||||
cp a, $0A
|
||||
|
|
@ -9,10 +9,10 @@ DisplayEffectiveness: ; 2fb7b (b:7b7b)
|
|||
.done
|
||||
jp PrintText
|
||||
|
||||
SuperEffectiveText: ; 2fb8e (b:7b8e)
|
||||
SuperEffectiveText:
|
||||
TX_FAR _SuperEffectiveText
|
||||
db "@"
|
||||
|
||||
NotVeryEffectiveText: ; 2fb93 (b:7b93)
|
||||
NotVeryEffectiveText:
|
||||
TX_FAR _NotVeryEffectiveText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DrawAllPokeballs: ; 3a849 (e:6849)
|
||||
DrawAllPokeballs:
|
||||
call LoadPartyPokeballGfx
|
||||
call SetupOwnPartyPokeballs
|
||||
ld a, [wIsInBattle]
|
||||
|
|
@ -6,17 +6,17 @@ DrawAllPokeballs: ; 3a849 (e:6849)
|
|||
ret z ; return if wild pokémon
|
||||
jp SetupEnemyPartyPokeballs
|
||||
|
||||
DrawEnemyPokeballs: ; 3a857 (e:6857)
|
||||
DrawEnemyPokeballs:
|
||||
call LoadPartyPokeballGfx
|
||||
jp SetupEnemyPartyPokeballs
|
||||
|
||||
LoadPartyPokeballGfx: ; 3a85d (e:685d)
|
||||
LoadPartyPokeballGfx:
|
||||
ld de, PokeballTileGraphics
|
||||
ld hl, vSprites + $310
|
||||
lb bc, BANK(PokeballTileGraphics), (PokeballTileGraphicsEnd - PokeballTileGraphics) / $10
|
||||
jp CopyVideoData
|
||||
|
||||
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
|
||||
SetupOwnPartyPokeballs:
|
||||
call PlacePlayerHUDTiles
|
||||
ld hl, wPartyMon1
|
||||
ld de, wPartyCount
|
||||
|
|
@ -30,7 +30,7 @@ SetupOwnPartyPokeballs: ; 3a869 (e:6869)
|
|||
ld hl, wOAMBuffer
|
||||
jp WritePokeballOAMData
|
||||
|
||||
SetupEnemyPartyPokeballs: ; 3a887 (e:6887)
|
||||
SetupEnemyPartyPokeballs:
|
||||
call PlaceEnemyHUDTiles
|
||||
ld hl, wEnemyMons
|
||||
ld de, wEnemyPartyCount
|
||||
|
|
@ -66,7 +66,7 @@ SetupPokeballs: ; 0x3a8a6
|
|||
jr nz, .monloop
|
||||
ret
|
||||
|
||||
PickPokeball: ; 3a8c2 (e:68c2)
|
||||
PickPokeball:
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
and a
|
||||
|
|
@ -94,7 +94,7 @@ PickPokeball: ; 3a8c2 (e:68c2)
|
|||
add hl, bc ; next mon struct
|
||||
ret
|
||||
|
||||
WritePokeballOAMData: ; 3a8e1 (e:68e1)
|
||||
WritePokeballOAMData:
|
||||
ld de, wBuffer
|
||||
ld c, PARTY_LENGTH
|
||||
.loop
|
||||
|
|
@ -116,7 +116,7 @@ WritePokeballOAMData: ; 3a8e1 (e:68e1)
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
PlacePlayerHUDTiles: ; 3a902 (e:6902)
|
||||
PlacePlayerHUDTiles:
|
||||
ld hl, PlayerBattleHUDGraphicsTiles
|
||||
ld de, wHUDGraphicsTiles
|
||||
ld bc, $3
|
||||
|
|
@ -125,13 +125,13 @@ PlacePlayerHUDTiles: ; 3a902 (e:6902)
|
|||
ld de, -1
|
||||
jr PlaceHUDTiles
|
||||
|
||||
PlayerBattleHUDGraphicsTiles: ; 3a916 (e:6916)
|
||||
PlayerBattleHUDGraphicsTiles:
|
||||
; The tile numbers for specific parts of the battle display for the player's pokemon
|
||||
db $73 ; unused ($73 is hardcoded into the routine that uses these bytes)
|
||||
db $77 ; lower-right corner tile of the HUD
|
||||
db $6F ; lower-left triangle tile of the HUD
|
||||
|
||||
PlaceEnemyHUDTiles: ; 3a919 (e:6919)
|
||||
PlaceEnemyHUDTiles:
|
||||
ld hl, EnemyBattleHUDGraphicsTiles
|
||||
ld de, wHUDGraphicsTiles
|
||||
ld bc, $3
|
||||
|
|
@ -140,13 +140,13 @@ PlaceEnemyHUDTiles: ; 3a919 (e:6919)
|
|||
ld de, $1
|
||||
jr PlaceHUDTiles
|
||||
|
||||
EnemyBattleHUDGraphicsTiles: ; 3a92d (e:692d)
|
||||
EnemyBattleHUDGraphicsTiles:
|
||||
; The tile numbers for specific parts of the battle display for the enemy
|
||||
db $73 ; unused ($73 is hardcoded in the routine that uses these bytes)
|
||||
db $74 ; lower-left corner tile of the HUD
|
||||
db $78 ; lower-right triangle tile of the HUD
|
||||
|
||||
PlaceHUDTiles: ; 3a930 (e:6930)
|
||||
PlaceHUDTiles:
|
||||
ld [hl], $73
|
||||
ld bc, SCREEN_WIDTH
|
||||
add hl, bc
|
||||
|
|
@ -163,7 +163,7 @@ PlaceHUDTiles: ; 3a930 (e:6930)
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
|
||||
SetupPlayerAndEnemyPokeballs:
|
||||
call LoadPartyPokeballGfx
|
||||
ld hl, wPartyMons
|
||||
ld de, wPartyCount
|
||||
|
|
@ -187,6 +187,6 @@ SetupPlayerAndEnemyPokeballs: ; 3a948 (e:6948)
|
|||
jp WritePokeballOAMData
|
||||
|
||||
; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (faited) and pokeball slot (no mon)
|
||||
PokeballTileGraphics:: ; 3a97e (e:697e)
|
||||
PokeballTileGraphics::
|
||||
INCBIN "gfx/pokeball.2bpp"
|
||||
PokeballTileGraphicsEnd:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
EndOfBattle: ; 137aa (4:77aa)
|
||||
EndOfBattle:
|
||||
ld a, [wLinkState]
|
||||
cp LINK_STATE_BATTLING
|
||||
jr nz, .notLinkBattle
|
||||
|
|
@ -74,15 +74,15 @@ EndOfBattle: ; 137aa (4:77aa)
|
|||
ld [wDestinationWarpID], a
|
||||
ret
|
||||
|
||||
YouWinText: ; 13853 (4:7853)
|
||||
YouWinText:
|
||||
db "YOU WIN@"
|
||||
|
||||
YouLoseText: ; 1385b (4:785b)
|
||||
YouLoseText:
|
||||
db "YOU LOSE@"
|
||||
|
||||
DrawText: ; 13864 (4:7864)
|
||||
DrawText:
|
||||
db " DRAW@"
|
||||
|
||||
PickUpPayDayMoneyText: ; 1386b (4:786b)
|
||||
PickUpPayDayMoneyText:
|
||||
TX_FAR _PickUpPayDayMoneyText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GainExperience: ; 5524f (15:524f)
|
||||
GainExperience:
|
||||
ld a, [wLinkState]
|
||||
cp LINK_STATE_BATTLING
|
||||
ret z ; return if link battle
|
||||
|
|
@ -291,7 +291,7 @@ GainExperience: ; 5524f (15:524f)
|
|||
predef_jump FlagActionPredef ; set the fought current enemy flag for the mon that is currently out
|
||||
|
||||
; divide enemy base stats, catch rate, and base exp by the number of mons gaining exp
|
||||
DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c)
|
||||
DivideExpDataByNumMonsGainingExp:
|
||||
ld a, [wPartyGainExpFlags]
|
||||
ld b, a
|
||||
xor a
|
||||
|
|
@ -325,7 +325,7 @@ DivideExpDataByNumMonsGainingExp: ; 5546c (15:546c)
|
|||
ret
|
||||
|
||||
; multiplies exp by 1.5
|
||||
BoostExp: ; 5549f (15:549f)
|
||||
BoostExp:
|
||||
ld a, [H_QUOTIENT + 2]
|
||||
ld b, a
|
||||
ld a, [H_QUOTIENT + 3]
|
||||
|
|
@ -339,7 +339,7 @@ BoostExp: ; 5549f (15:549f)
|
|||
ld [H_QUOTIENT + 2], a
|
||||
ret
|
||||
|
||||
GainedText: ; 554b2 (15:54b2)
|
||||
GainedText:
|
||||
TX_FAR _GainedText
|
||||
TX_ASM
|
||||
ld a, [wBoostExpByExpAll]
|
||||
|
|
@ -353,20 +353,20 @@ GainedText: ; 554b2 (15:54b2)
|
|||
ld hl, BoostedText
|
||||
ret
|
||||
|
||||
WithExpAllText: ; 554cb (15:54cb)
|
||||
WithExpAllText:
|
||||
TX_FAR _WithExpAllText
|
||||
TX_ASM
|
||||
ld hl, ExpPointsText
|
||||
ret
|
||||
|
||||
BoostedText: ; 554d4 (15:54d4)
|
||||
BoostedText:
|
||||
TX_FAR _BoostedText
|
||||
|
||||
ExpPointsText: ; 554d8 (15:54d8)
|
||||
ExpPointsText:
|
||||
TX_FAR _ExpPointsText
|
||||
db "@"
|
||||
|
||||
GrewLevelText: ; 554dd (15:54dd)
|
||||
GrewLevelText:
|
||||
TX_FAR _GrewLevelText
|
||||
db $0b
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GetTrainerName_: ; 13a58 (4:7a58)
|
||||
GetTrainerName_:
|
||||
ld hl, wGrassRate
|
||||
ld a, [wLinkState]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
MarowakAnim: ; 708ca (1c:48ca)
|
||||
MarowakAnim:
|
||||
; animate the ghost being unveiled as a Marowak
|
||||
ld a, $e4
|
||||
ld [rOBP1], a
|
||||
|
|
@ -49,7 +49,7 @@ MarowakAnim: ; 708ca (1c:48ca)
|
|||
jp ClearSprites
|
||||
|
||||
; copies a mon pic's from background VRAM to sprite VRAM and sets up OAM
|
||||
CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
|
||||
CopyMonPicFromBGToSpriteVRAM:
|
||||
ld de, vFrontPic
|
||||
ld hl, vSprites
|
||||
ld bc, 7 * 7
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
InitBattleVariables: ; 525af (14:65af)
|
||||
InitBattleVariables:
|
||||
ld a, [hTilesetType]
|
||||
ld [wSavedTilesetType], a
|
||||
xor a
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; display "[player] VS [enemy]" text box with pokeballs representing their parties next to the names
|
||||
DisplayLinkBattleVersusTextBox: ; 372d6 (d:72d6)
|
||||
DisplayLinkBattleVersusTextBox:
|
||||
call LoadTextBoxTilePatterns
|
||||
coord hl, 3, 4
|
||||
ld b, $7
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ConversionEffect_: ; 139a3 (4:79a3)
|
||||
ConversionEffect_:
|
||||
ld hl, wEnemyMonType1
|
||||
ld de, wBattleMonType1
|
||||
ld a, [H_WHOSETURN]
|
||||
|
|
@ -24,12 +24,12 @@ ConversionEffect_: ; 139a3 (4:79a3)
|
|||
ld hl, ConvertedTypeText
|
||||
jp PrintText
|
||||
|
||||
ConvertedTypeText: ; 139cd (4:79cd)
|
||||
ConvertedTypeText:
|
||||
TX_FAR _ConvertedTypeText
|
||||
db "@"
|
||||
|
||||
PrintButItFailedText: ; 139d2 (4:79d2)
|
||||
PrintButItFailedText:
|
||||
ld hl, PrintButItFailedText_
|
||||
CallBankF: ; 139d5 (4:79d5)
|
||||
CallBankF:
|
||||
ld b, BANK(PrintButItFailedText_)
|
||||
jp Bankswitch
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DrainHPEffect_: ; 783f (1:783f)
|
||||
DrainHPEffect_:
|
||||
ld hl, wDamage
|
||||
ld a, [hl]
|
||||
srl a ; divide damage by 2
|
||||
|
|
@ -95,10 +95,10 @@ DrainHPEffect_: ; 783f (1:783f)
|
|||
.printText
|
||||
jp PrintText
|
||||
|
||||
SuckedHealthText: ; 78dc (1:78dc)
|
||||
SuckedHealthText:
|
||||
TX_FAR _SuckedHealthText
|
||||
db "@"
|
||||
|
||||
DreamWasEatenText: ; 78e1 (1:78e1)
|
||||
DreamWasEatenText:
|
||||
TX_FAR _DreamWasEatenText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FocusEnergyEffect_: ; 27f86 (9:7f86)
|
||||
FocusEnergyEffect_:
|
||||
ld hl, wPlayerBattleStatus2
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
|
|
@ -16,7 +16,7 @@ FocusEnergyEffect_: ; 27f86 (9:7f86)
|
|||
call DelayFrames
|
||||
jpab PrintButItFailedText_
|
||||
|
||||
GettingPumpedText: ; 27fb3 (9:7fb3)
|
||||
GettingPumpedText:
|
||||
db $0a
|
||||
TX_FAR _GettingPumpedText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
HazeEffect_: ; 139da (4:79da)
|
||||
HazeEffect_:
|
||||
ld a, $7
|
||||
; store 7 on every stat mod
|
||||
ld hl, wPlayerMonAttackMod
|
||||
|
|
@ -45,7 +45,7 @@ HazeEffect_: ; 139da (4:79da)
|
|||
ld hl, StatusChangesEliminatedText
|
||||
jp PrintText
|
||||
|
||||
CureVolatileStatuses: ; 13a37 (4:7a37)
|
||||
CureVolatileStatuses:
|
||||
; only cures statuses of the Pokemon not using Haze
|
||||
res Confused, [hl]
|
||||
inc hl ; BATTSTATUS2
|
||||
|
|
@ -58,7 +58,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37)
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
ResetStatMods: ; 13a43 (4:7a43)
|
||||
ResetStatMods:
|
||||
ld b, $8
|
||||
.loop
|
||||
ld [hli], a
|
||||
|
|
@ -66,7 +66,7 @@ ResetStatMods: ; 13a43 (4:7a43)
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
ResetStats: ; 13a4a (4:7a4a)
|
||||
ResetStats:
|
||||
ld b, $8
|
||||
.loop
|
||||
ld a, [hli]
|
||||
|
|
@ -76,6 +76,6 @@ ResetStats: ; 13a4a (4:7a4a)
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
StatusChangesEliminatedText: ; 13a53 (4:7a53)
|
||||
StatusChangesEliminatedText:
|
||||
TX_FAR _StatusChangesEliminatedText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
HealEffect_: ; 3b9ec (e:79ec)
|
||||
HealEffect_:
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld de, wBattleMonHP
|
||||
|
|
@ -107,14 +107,14 @@ HealEffect_: ; 3b9ec (e:79ec)
|
|||
ld hl, PrintButItFailedText_
|
||||
jp BankswitchEtoF
|
||||
|
||||
StartedSleepingEffect: ; 3baa2 (e:7aa2)
|
||||
StartedSleepingEffect:
|
||||
TX_FAR _StartedSleepingEffect
|
||||
db "@"
|
||||
|
||||
FellAsleepBecameHealthyText: ; 3baa7 (e:7aa7)
|
||||
FellAsleepBecameHealthyText:
|
||||
TX_FAR _FellAsleepBecameHealthyText
|
||||
db "@"
|
||||
|
||||
RegainedHealthText: ; 3baac (e:7aac)
|
||||
RegainedHealthText:
|
||||
TX_FAR _RegainedHealthText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
LeechSeedEffect_: ; 2bea9 (a:7ea9)
|
||||
LeechSeedEffect_:
|
||||
callab MoveHitTest
|
||||
ld a, [wMoveMissed]
|
||||
and a
|
||||
|
|
@ -31,10 +31,10 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9)
|
|||
ld hl, EvadedAttackText
|
||||
jp PrintText
|
||||
|
||||
WasSeededText: ; 2bef2 (a:7ef2)
|
||||
WasSeededText:
|
||||
TX_FAR _WasSeededText
|
||||
db "@"
|
||||
|
||||
EvadedAttackText: ; 2bef7 (a:7ef7)
|
||||
EvadedAttackText:
|
||||
TX_FAR _EvadedAttackText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
MistEffect_: ; 33f2b (c:7f2b)
|
||||
MistEffect_:
|
||||
ld hl, wPlayerBattleStatus2
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
|
|
@ -14,6 +14,6 @@ MistEffect_: ; 33f2b (c:7f2b)
|
|||
.mistAlreadyInUse
|
||||
jpab PrintButItFailedText_
|
||||
|
||||
ShroudedInMistText: ; 33f52 (c:7f52)
|
||||
ShroudedInMistText:
|
||||
TX_FAR _ShroudedInMistText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
OneHitKOEffect_: ; 33f57 (c:7f57)
|
||||
OneHitKOEffect_:
|
||||
ld hl, wDamage
|
||||
xor a
|
||||
ld [hli], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ParalyzeEffect_: ; 52601 (14:6601)
|
||||
ParalyzeEffect_:
|
||||
ld hl, wEnemyMonStatus
|
||||
ld de, wPlayerMoveType
|
||||
ld a, [H_WHOSETURN]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PayDayEffect_: ; 2feb8 (b:7eb8)
|
||||
PayDayEffect_:
|
||||
xor a
|
||||
ld hl, wcd6d
|
||||
ld [hli], a
|
||||
|
|
@ -40,6 +40,6 @@ PayDayEffect_: ; 2feb8 (b:7eb8)
|
|||
ld hl, CoinsScatteredText
|
||||
jp PrintText
|
||||
|
||||
CoinsScatteredText: ; 2ff04 (b:7f04)
|
||||
CoinsScatteredText:
|
||||
TX_FAR _CoinsScatteredText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
RecoilEffect_: ; 1392c (4:792c)
|
||||
RecoilEffect_:
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld a, [wPlayerMoveNum]
|
||||
|
|
@ -65,6 +65,6 @@ RecoilEffect_: ; 1392c (4:792c)
|
|||
predef UpdateHPBar2
|
||||
ld hl, HitWithRecoilText
|
||||
jp PrintText
|
||||
HitWithRecoilText: ; 1399e (4:799e)
|
||||
HitWithRecoilText:
|
||||
TX_FAR _HitWithRecoilText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
|
||||
ReflectLightScreenEffect_:
|
||||
ld hl, wPlayerBattleStatus3
|
||||
ld de, wPlayerMoveEffect
|
||||
ld a, [H_WHOSETURN]
|
||||
|
|
@ -32,14 +32,14 @@ ReflectLightScreenEffect_: ; 3bb97 (e:7b97)
|
|||
ld hl, PrintButItFailedText_
|
||||
jp BankswitchEtoF
|
||||
|
||||
LightScreenProtectedText: ; 3bbd7 (e:7bd7)
|
||||
LightScreenProtectedText:
|
||||
TX_FAR _LightScreenProtectedText
|
||||
db "@"
|
||||
|
||||
ReflectGainedArmorText: ; 3bbdc (e:7bdc)
|
||||
ReflectGainedArmorText:
|
||||
TX_FAR _ReflectGainedArmorText
|
||||
db "@"
|
||||
|
||||
BankswitchEtoF: ; 3bbe1 (e:7be1)
|
||||
BankswitchEtoF:
|
||||
ld b, BANK(BattleCore)
|
||||
jp Bankswitch
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SubstituteEffect_: ; 17dad (5:7dad)
|
||||
SubstituteEffect_:
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
ld hl, wBattleMonMaxHP
|
||||
|
|
@ -64,14 +64,14 @@ SubstituteEffect_: ; 17dad (5:7dad)
|
|||
.printText
|
||||
jp PrintText
|
||||
|
||||
SubstituteText: ; 17e1d (5:7e1d)
|
||||
SubstituteText:
|
||||
TX_FAR _SubstituteText
|
||||
db "@"
|
||||
|
||||
HasSubstituteText: ; 17e22 (5:7e22)
|
||||
HasSubstituteText:
|
||||
TX_FAR _HasSubstituteText
|
||||
db "@"
|
||||
|
||||
TooWeakSubstituteText: ; 17e27 (5:7e27)
|
||||
TooWeakSubstituteText:
|
||||
TX_FAR _TooWeakSubstituteText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TransformEffect_: ; 3bab1 (e:7ab1)
|
||||
TransformEffect_:
|
||||
ld hl, wBattleMonSpecies
|
||||
ld de, wEnemyMonSpecies
|
||||
ld bc, wEnemyBattleStatus3
|
||||
|
|
@ -143,6 +143,6 @@ TransformEffect_: ; 3bab1 (e:7ab1)
|
|||
ld hl, PrintButItFailedText_
|
||||
jp BankswitchEtoF
|
||||
|
||||
TransformedText: ; 3bb92 (e:7b92)
|
||||
TransformedText:
|
||||
TX_FAR _TransformedText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; [wd0b5] = pokemon ID
|
||||
; hl = dest addr
|
||||
PrintMonType: ; 27d6b (9:7d6b)
|
||||
PrintMonType:
|
||||
call GetPredefRegisters
|
||||
push hl
|
||||
call GetMonHeader
|
||||
|
|
@ -19,25 +19,25 @@ PrintMonType: ; 27d6b (9:7d6b)
|
|||
|
||||
; a = type
|
||||
; hl = dest addr
|
||||
PrintType: ; 27d89 (9:7d89)
|
||||
PrintType:
|
||||
push hl
|
||||
jr PrintType_
|
||||
|
||||
; erase "TYPE2/" if the mon only has 1 type
|
||||
EraseType2Text: ; 27d8c (9:7d8c)
|
||||
EraseType2Text:
|
||||
ld a, " "
|
||||
ld bc, $13
|
||||
add hl, bc
|
||||
ld bc, $6
|
||||
jp FillMemory
|
||||
|
||||
PrintMoveType: ; 27d98 (9:7d98)
|
||||
PrintMoveType:
|
||||
call GetPredefRegisters
|
||||
push hl
|
||||
ld a, [wPlayerMoveType]
|
||||
; fall through
|
||||
|
||||
PrintType_: ; 27d9f (9:7d9f)
|
||||
PrintType_:
|
||||
add a
|
||||
ld hl, TypeNames
|
||||
ld e, a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ReadTrainer: ; 39c53 (e:5c53)
|
||||
ReadTrainer:
|
||||
|
||||
; don't change any moves in a link battle
|
||||
ld a,[wLinkState]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrintSafariZoneBattleText: ; 4277 (1:4277)
|
||||
PrintSafariZoneBattleText:
|
||||
ld hl, wSafariBaitFactor
|
||||
ld a, [hl]
|
||||
and a
|
||||
|
|
@ -27,10 +27,10 @@ PrintSafariZoneBattleText: ; 4277 (1:4277)
|
|||
pop hl
|
||||
jp PrintText
|
||||
|
||||
SafariZoneEatingText: ; 42a7 (1:42a7)
|
||||
SafariZoneEatingText:
|
||||
TX_FAR _SafariZoneEatingText
|
||||
db "@"
|
||||
|
||||
SafariZoneAngryText: ; 42ac (1:42ac)
|
||||
SafariZoneAngryText:
|
||||
TX_FAR _SafariZoneAngryText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SaveTrainerName: ; 27e4a (9:7e4a)
|
||||
SaveTrainerName:
|
||||
ld hl,TrainerNamePointers
|
||||
ld a,[wTrainerClass]
|
||||
dec a
|
||||
|
|
@ -18,7 +18,7 @@ SaveTrainerName: ; 27e4a (9:7e4a)
|
|||
jr nz,.CopyCharacter
|
||||
ret
|
||||
|
||||
TrainerNamePointers: ; 27e64 (9:7e64)
|
||||
TrainerNamePointers:
|
||||
; what is the point of these?
|
||||
dw YoungsterName
|
||||
dw BugCatcherName
|
||||
|
|
@ -68,45 +68,45 @@ TrainerNamePointers: ; 27e64 (9:7e64)
|
|||
dw wTrainerName
|
||||
dw wTrainerName
|
||||
|
||||
YoungsterName: ; 27ec2 (9:7ec2)
|
||||
YoungsterName:
|
||||
db "YOUNGSTER@"
|
||||
BugCatcherName: ; 27ecc (9:7ecc)
|
||||
BugCatcherName:
|
||||
db "BUG CATCHER@"
|
||||
LassName: ; 27ed8 (9:7ed8)
|
||||
LassName:
|
||||
db "LASS@"
|
||||
JrTrainerMName: ; 27edd (9:7edd)
|
||||
JrTrainerMName:
|
||||
db "JR.TRAINER♂@"
|
||||
JrTrainerFName: ; 27ee9 (9:7ee9)
|
||||
JrTrainerFName:
|
||||
db "JR.TRAINER♀@"
|
||||
PokemaniacName: ; 27ef5 (9:7ef5)
|
||||
PokemaniacName:
|
||||
db "POKéMANIAC@"
|
||||
SuperNerdName: ; 27f00 (9:7f00)
|
||||
SuperNerdName:
|
||||
db "SUPER NERD@"
|
||||
BurglarName: ; 27f0b (9:7f0b)
|
||||
BurglarName:
|
||||
db "BURGLAR@"
|
||||
EngineerName: ; 27f13 (9:7f13)
|
||||
EngineerName:
|
||||
db "ENGINEER@"
|
||||
JugglerXName: ; 27f1c (9:7f1c)
|
||||
JugglerXName:
|
||||
db "JUGGLER@"
|
||||
SwimmerName: ; 27f24 (9:7f24)
|
||||
SwimmerName:
|
||||
db "SWIMMER@"
|
||||
BeautyName: ; 27f2c (9:7f2c)
|
||||
BeautyName:
|
||||
db "BEAUTY@"
|
||||
RockerName: ; 27f33 (9:7f33)
|
||||
RockerName:
|
||||
db "ROCKER@"
|
||||
JugglerName: ; 27f3a (9:7f3a)
|
||||
JugglerName:
|
||||
db "JUGGLER@"
|
||||
BlackbeltName: ; 27f42 (9:7f42)
|
||||
BlackbeltName:
|
||||
db "BLACKBELT@"
|
||||
ProfOakName: ; 27f4c (9:7f4c)
|
||||
ProfOakName:
|
||||
db "PROF.OAK@"
|
||||
ChiefName: ; 27f55 (9:7f55)
|
||||
ChiefName:
|
||||
db "CHIEF@"
|
||||
ScientistName: ; 27f5b (9:7f5b)
|
||||
ScientistName:
|
||||
db "SCIENTIST@"
|
||||
RocketName: ; 27f65 (9:7f65)
|
||||
RocketName:
|
||||
db "ROCKET@"
|
||||
CooltrainerMName: ; 27f6c (9:7f6c)
|
||||
CooltrainerMName:
|
||||
db "COOLTRAINER♂@"
|
||||
CooltrainerFName: ; 27f79 (9:7f79)
|
||||
CooltrainerFName:
|
||||
db "COOLTRAINER♀@"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
; scales both uncompressed sprite chunks by two in every dimension (creating 2x2 output pixels per input pixel)
|
||||
; assumes that input sprite chunks are 4x4 tiles, and the rightmost and bottommost 4 pixels will be ignored
|
||||
; resulting in a 7*7 tile output sprite chunk
|
||||
ScaleSpriteByTwo: ; 2fe40 (b:7e40)
|
||||
ScaleSpriteByTwo:
|
||||
ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
|
||||
ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
|
||||
call ScaleLastSpriteColumnByTwo ; last tile column is special case
|
||||
|
|
@ -10,7 +10,7 @@ ScaleSpriteByTwo: ; 2fe40 (b:7e40)
|
|||
ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
|
||||
call ScaleLastSpriteColumnByTwo ; last tile column is special case
|
||||
|
||||
ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
|
||||
ScaleFirstThreeSpriteColumnsByTwo:
|
||||
ld b, $3 ; 3 tile columns
|
||||
.columnLoop
|
||||
ld c, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
|
||||
|
|
@ -39,7 +39,7 @@ ScaleFirstThreeSpriteColumnsByTwo: ; 2fe55 (b:7e55)
|
|||
jr nz, .columnLoop
|
||||
ret
|
||||
|
||||
ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d)
|
||||
ScaleLastSpriteColumnByTwo:
|
||||
ld a, 4*8 - 4 ; $1c, 4 tiles minus 4 unused rows
|
||||
ld [H_SPRITEINTERLACECOUNTER], a
|
||||
ld bc, -1
|
||||
|
|
@ -61,7 +61,7 @@ ScaleLastSpriteColumnByTwo: ; 2fe7d (b:7e7d)
|
|||
; scales the given 4 bits in a (4x1 pixels) to 2 output bytes (8x2 pixels)
|
||||
; hl: destination pointer
|
||||
; bc: destination pointer offset (added after the two bytes have been written)
|
||||
ScalePixelsByTwo: ; 2fe97 (b:7e97)
|
||||
ScalePixelsByTwo:
|
||||
push hl
|
||||
and $f
|
||||
ld hl, DuplicateBitsTable
|
||||
|
|
@ -78,7 +78,7 @@ ScalePixelsByTwo: ; 2fe97 (b:7e97)
|
|||
ret
|
||||
|
||||
; repeats each input bit twice
|
||||
DuplicateBitsTable: ; 2fea8 (b:7ea8)
|
||||
DuplicateBitsTable:
|
||||
db $00, $03, $0c, $0f
|
||||
db $30, $33, $3c, $3f
|
||||
db $c0, $c3, $cc, $cf
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
|
||||
_ScrollTrainerPicAfterBattle:
|
||||
; Load the enemy trainer's pic and scrolls it into
|
||||
; the screen from the right.
|
||||
xor a
|
||||
|
|
@ -32,7 +32,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3)
|
|||
jr .scrollLoop
|
||||
|
||||
; write one 7-tile column of the trainer pic to the tilemap
|
||||
DrawTrainerPicColumn: ; 39707 (e:5707)
|
||||
DrawTrainerPicColumn:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; creates a set of moves that may be used and returns its address in hl
|
||||
; unused slots are filled with 0, all used slots may be chosen with equal probability
|
||||
AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
|
||||
AIEnemyTrainerChooseMoves:
|
||||
ld a, $a
|
||||
ld hl, wBuffer ; init temporary move selection array. Only the moves with the lowest numbers are chosen in the end
|
||||
ld [hli], a ; move 1
|
||||
|
|
@ -103,14 +103,14 @@ AIEnemyTrainerChooseMoves: ; 39719 (e:5719)
|
|||
ld hl, wEnemyMonMoves ; use original move set
|
||||
ret
|
||||
|
||||
AIMoveChoiceModificationFunctionPointers: ; 397a3 (e:57a3)
|
||||
AIMoveChoiceModificationFunctionPointers:
|
||||
dw AIMoveChoiceModification1
|
||||
dw AIMoveChoiceModification2
|
||||
dw AIMoveChoiceModification3
|
||||
dw AIMoveChoiceModification4 ; unused, does nothing
|
||||
|
||||
; discourages moves that cause no damage but only a status ailment if player's mon already has one
|
||||
AIMoveChoiceModification1: ; 397ab (e:57ab)
|
||||
AIMoveChoiceModification1:
|
||||
ld a, [wBattleMonStatus]
|
||||
and a
|
||||
ret z ; return if no status ailment on player's mon
|
||||
|
|
@ -155,7 +155,7 @@ StatusAilmentMoveEffects: ; 57e2
|
|||
; slightly encourage moves with specific effects.
|
||||
; in particular, stat-modifying moves and other move effects
|
||||
; that fall in-bewteen
|
||||
AIMoveChoiceModification2: ; 397e7 (e:57e7)
|
||||
AIMoveChoiceModification2:
|
||||
ld a, [wAILayer2Encouragement]
|
||||
cp $1
|
||||
ret nz
|
||||
|
|
@ -188,7 +188,7 @@ AIMoveChoiceModification2: ; 397e7 (e:57e7)
|
|||
; encourages moves that are effective against the player's mon (even if non-damaging).
|
||||
; discourage damaging moves that are ineffective or not very effective against the player's mon,
|
||||
; unless there's no damaging move that deals at least neutral damage
|
||||
AIMoveChoiceModification3: ; 39817 (e:5817)
|
||||
AIMoveChoiceModification3:
|
||||
ld hl, wBuffer - 1 ; temp move selection array (-1 byte offset)
|
||||
ld de, wEnemyMonMoves ; enemy moves
|
||||
ld b, NUM_MOVES + 1
|
||||
|
|
@ -255,10 +255,10 @@ AIMoveChoiceModification3: ; 39817 (e:5817)
|
|||
jr z, .nextMove
|
||||
inc [hl] ; sligthly discourage this move
|
||||
jr .nextMove
|
||||
AIMoveChoiceModification4: ; 39883 (e:5883)
|
||||
AIMoveChoiceModification4:
|
||||
ret
|
||||
|
||||
ReadMove: ; 39884 (e:5884)
|
||||
ReadMove:
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
|
@ -275,7 +275,7 @@ ReadMove: ; 39884 (e:5884)
|
|||
|
||||
; move choice modification methods that are applied for each trainer class
|
||||
; 0 is sentinel value
|
||||
TrainerClassMoveChoiceModifications: ; 3989b (e:589b)
|
||||
TrainerClassMoveChoiceModifications:
|
||||
db 0 ; YOUNGSTER
|
||||
db 1,0 ; BUG CATCHER
|
||||
db 1,0 ; LASS
|
||||
|
|
@ -336,7 +336,7 @@ INCLUDE "data/trainer_moves.asm"
|
|||
|
||||
INCLUDE "data/trainer_parties.asm"
|
||||
|
||||
TrainerAI: ; 3a52e (e:652e)
|
||||
TrainerAI:
|
||||
and a
|
||||
ld a,[wIsInBattle]
|
||||
dec a
|
||||
|
|
@ -368,7 +368,7 @@ TrainerAI: ; 3a52e (e:652e)
|
|||
call Random
|
||||
jp [hl]
|
||||
|
||||
TrainerAIPointers: ; 3a55c (e:655c)
|
||||
TrainerAIPointers:
|
||||
; one entry per trainer class
|
||||
; first byte, number of times (per Pokémon) it can occur
|
||||
; next two bytes, pointer to AI subroutine for trainer class
|
||||
|
|
@ -420,27 +420,27 @@ TrainerAIPointers: ; 3a55c (e:655c)
|
|||
dbw 2,AgathaAI ; agatha
|
||||
dbw 1,LanceAI ; lance
|
||||
|
||||
JugglerAI: ; 3a5e9 (e:65e9)
|
||||
JugglerAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AISwitchIfEnoughMons
|
||||
|
||||
BlackbeltAI: ; 3a5ef (e:65ef)
|
||||
BlackbeltAI:
|
||||
cp $20
|
||||
ret nc
|
||||
jp AIUseXAttack
|
||||
|
||||
GiovanniAI: ; 3a5f5 (e:65f5)
|
||||
GiovanniAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseGuardSpec
|
||||
|
||||
CooltrainerMAI: ; 3a5fb (e:65fb)
|
||||
CooltrainerMAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseXAttack
|
||||
|
||||
CooltrainerFAI: ; 3a601 (e:6601)
|
||||
CooltrainerFAI:
|
||||
cp $40
|
||||
ld a,$A
|
||||
call AICheckIfHPBelowFraction
|
||||
|
|
@ -450,24 +450,24 @@ CooltrainerFAI: ; 3a601 (e:6601)
|
|||
ret nc
|
||||
jp AISwitchIfEnoughMons
|
||||
|
||||
BrockAI: ; 3a614 (e:6614)
|
||||
BrockAI:
|
||||
; if his active monster has a status condition, use a full heal
|
||||
ld a,[wEnemyMonStatus]
|
||||
and a
|
||||
ret z
|
||||
jp AIUseFullHeal
|
||||
|
||||
MistyAI: ; 3a61c (e:661c)
|
||||
MistyAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseXDefend
|
||||
|
||||
LtSurgeAI: ; 3a622 (e:6622)
|
||||
LtSurgeAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseXSpeed
|
||||
|
||||
ErikaAI: ; 3a628 (e:6628)
|
||||
ErikaAI:
|
||||
cp $80
|
||||
ret nc
|
||||
ld a,$A
|
||||
|
|
@ -475,17 +475,17 @@ ErikaAI: ; 3a628 (e:6628)
|
|||
ret nc
|
||||
jp AIUseSuperPotion
|
||||
|
||||
KogaAI: ; 3a634 (e:6634)
|
||||
KogaAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseXAttack
|
||||
|
||||
BlaineAI: ; 3a63a (e:663a)
|
||||
BlaineAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseSuperPotion
|
||||
|
||||
SabrinaAI: ; 3a640 (e:6640)
|
||||
SabrinaAI:
|
||||
cp $40
|
||||
ret nc
|
||||
ld a,$A
|
||||
|
|
@ -493,7 +493,7 @@ SabrinaAI: ; 3a640 (e:6640)
|
|||
ret nc
|
||||
jp AIUseHyperPotion
|
||||
|
||||
Sony2AI: ; 3a64c (e:664c)
|
||||
Sony2AI:
|
||||
cp $20
|
||||
ret nc
|
||||
ld a,5
|
||||
|
|
@ -501,7 +501,7 @@ Sony2AI: ; 3a64c (e:664c)
|
|||
ret nc
|
||||
jp AIUsePotion
|
||||
|
||||
Sony3AI: ; 3a658 (e:6658)
|
||||
Sony3AI:
|
||||
cp $20
|
||||
ret nc
|
||||
ld a,5
|
||||
|
|
@ -509,7 +509,7 @@ Sony3AI: ; 3a658 (e:6658)
|
|||
ret nc
|
||||
jp AIUseFullRestore
|
||||
|
||||
LoreleiAI: ; 3a664 (e:6664)
|
||||
LoreleiAI:
|
||||
cp $80
|
||||
ret nc
|
||||
ld a,5
|
||||
|
|
@ -517,12 +517,12 @@ LoreleiAI: ; 3a664 (e:6664)
|
|||
ret nc
|
||||
jp AIUseSuperPotion
|
||||
|
||||
BrunoAI: ; 3a670 (e:6670)
|
||||
BrunoAI:
|
||||
cp $40
|
||||
ret nc
|
||||
jp AIUseXDefend
|
||||
|
||||
AgathaAI: ; 3a676 (e:6676)
|
||||
AgathaAI:
|
||||
cp $14
|
||||
jp c,AISwitchIfEnoughMons
|
||||
cp $80
|
||||
|
|
@ -532,7 +532,7 @@ AgathaAI: ; 3a676 (e:6676)
|
|||
ret nc
|
||||
jp AIUseSuperPotion
|
||||
|
||||
LanceAI: ; 3a687 (e:6687)
|
||||
LanceAI:
|
||||
cp $80
|
||||
ret nc
|
||||
ld a,5
|
||||
|
|
@ -540,23 +540,23 @@ LanceAI: ; 3a687 (e:6687)
|
|||
ret nc
|
||||
jp AIUseHyperPotion
|
||||
|
||||
GenericAI: ; 3a693 (e:6693)
|
||||
GenericAI:
|
||||
and a ; clear carry
|
||||
ret
|
||||
|
||||
; end of individual trainer AI routines
|
||||
|
||||
DecrementAICount: ; 3a695 (e:6695)
|
||||
DecrementAICount:
|
||||
ld hl,wAICount
|
||||
dec [hl]
|
||||
scf
|
||||
ret
|
||||
|
||||
AIPlayRestoringSFX: ; 3a69b (e:669b)
|
||||
AIPlayRestoringSFX:
|
||||
ld a,SFX_HEAL_AILMENT
|
||||
jp PlaySoundWaitForCurrent
|
||||
|
||||
AIUseFullRestore: ; 3a6a0 (e:66a0)
|
||||
AIUseFullRestore:
|
||||
call AICureStatus
|
||||
ld a,FULL_RESTORE
|
||||
ld [wAIItem],a
|
||||
|
|
@ -580,25 +580,25 @@ AIUseFullRestore: ; 3a6a0 (e:66a0)
|
|||
ld [wEnemyMonHP],a
|
||||
jr AIPrintItemUseAndUpdateHPBar
|
||||
|
||||
AIUsePotion: ; 3a6ca (e:66ca)
|
||||
AIUsePotion:
|
||||
; enemy trainer heals his monster with a potion
|
||||
ld a,POTION
|
||||
ld b,20
|
||||
jr AIRecoverHP
|
||||
|
||||
AIUseSuperPotion: ; 3a6d0 (e:66d0)
|
||||
AIUseSuperPotion:
|
||||
; enemy trainer heals his monster with a super potion
|
||||
ld a,SUPER_POTION
|
||||
ld b,50
|
||||
jr AIRecoverHP
|
||||
|
||||
AIUseHyperPotion: ; 3a6d6 (e:66d6)
|
||||
AIUseHyperPotion:
|
||||
; enemy trainer heals his monster with a hyper potion
|
||||
ld a,HYPER_POTION
|
||||
ld b,200
|
||||
; fallthrough
|
||||
|
||||
AIRecoverHP: ; 3a6da (e:66da)
|
||||
AIRecoverHP:
|
||||
; heal b HP and print "trainer used $(a) on pokemon!"
|
||||
ld [wAIItem],a
|
||||
ld hl,wEnemyMonHP + 1
|
||||
|
|
@ -639,7 +639,7 @@ AIRecoverHP: ; 3a6da (e:66da)
|
|||
ld [wHPBarNewHP+1],a
|
||||
; fallthrough
|
||||
|
||||
AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718)
|
||||
AIPrintItemUseAndUpdateHPBar:
|
||||
call AIPrintItemUse_
|
||||
coord hl, 2, 2
|
||||
xor a
|
||||
|
|
@ -647,7 +647,7 @@ AIPrintItemUseAndUpdateHPBar: ; 3a718 (e:6718)
|
|||
predef UpdateHPBar2
|
||||
jp DecrementAICount
|
||||
|
||||
AISwitchIfEnoughMons: ; 3a72a (e:672a)
|
||||
AISwitchIfEnoughMons:
|
||||
; enemy trainer switches if there are 3 or more unfainted mons in party
|
||||
ld a,[wEnemyPartyCount]
|
||||
ld c,a
|
||||
|
|
@ -677,7 +677,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a)
|
|||
and a
|
||||
ret
|
||||
|
||||
SwitchEnemyMon: ; 3a74b (e:674b)
|
||||
SwitchEnemyMon:
|
||||
|
||||
; prepare to withdraw the active monster: copy hp, number, and status to roster
|
||||
|
||||
|
|
@ -708,17 +708,17 @@ SwitchEnemyMon: ; 3a74b (e:674b)
|
|||
scf
|
||||
ret
|
||||
|
||||
AIBattleWithdrawText: ; 3a781 (e:6781)
|
||||
AIBattleWithdrawText:
|
||||
TX_FAR _AIBattleWithdrawText
|
||||
db "@"
|
||||
|
||||
AIUseFullHeal: ; 3a786 (e:6786)
|
||||
AIUseFullHeal:
|
||||
call AIPlayRestoringSFX
|
||||
call AICureStatus
|
||||
ld a,FULL_HEAL
|
||||
jp AIPrintItemUse
|
||||
|
||||
AICureStatus: ; 3a791 (e:6791)
|
||||
AICureStatus:
|
||||
; cures the status of enemy's active pokemon
|
||||
ld a,[wEnemyMonPartyPos]
|
||||
ld hl,wEnemyMon1Status
|
||||
|
|
@ -738,7 +738,7 @@ AIUseXAccuracy: ; 0x3a7a8 unused
|
|||
ld a,X_ACCURACY
|
||||
jp AIPrintItemUse
|
||||
|
||||
AIUseGuardSpec: ; 3a7b5 (e:67b5)
|
||||
AIUseGuardSpec:
|
||||
call AIPlayRestoringSFX
|
||||
ld hl,wEnemyBattleStatus2
|
||||
set 1,[hl]
|
||||
|
|
@ -752,7 +752,7 @@ AIUseDireHit: ; 0x3a7c2 unused
|
|||
ld a,DIRE_HIT
|
||||
jp AIPrintItemUse
|
||||
|
||||
AICheckIfHPBelowFraction: ; 3a7cf (e:67cf)
|
||||
AICheckIfHPBelowFraction:
|
||||
; return carry if enemy trainer's current HP is below 1 / a of the maximum
|
||||
ld [H_DIVISOR],a
|
||||
ld hl,wEnemyMonMaxHP
|
||||
|
|
@ -778,27 +778,27 @@ AICheckIfHPBelowFraction: ; 3a7cf (e:67cf)
|
|||
sub c
|
||||
ret
|
||||
|
||||
AIUseXAttack: ; 3a7f2 (e:67f2)
|
||||
AIUseXAttack:
|
||||
ld b,$A
|
||||
ld a,X_ATTACK
|
||||
jr AIIncreaseStat
|
||||
|
||||
AIUseXDefend: ; 3a7f8 (e:67f8)
|
||||
AIUseXDefend:
|
||||
ld b,$B
|
||||
ld a,X_DEFEND
|
||||
jr AIIncreaseStat
|
||||
|
||||
AIUseXSpeed: ; 3a7fe (e:67fe)
|
||||
AIUseXSpeed:
|
||||
ld b,$C
|
||||
ld a,X_SPEED
|
||||
jr AIIncreaseStat
|
||||
|
||||
AIUseXSpecial: ; 3a804 (e:6804)
|
||||
AIUseXSpecial:
|
||||
ld b,$D
|
||||
ld a,X_SPECIAL
|
||||
; fallthrough
|
||||
|
||||
AIIncreaseStat: ; 3a808 (e:6808)
|
||||
AIIncreaseStat:
|
||||
ld [wAIItem],a
|
||||
push bc
|
||||
call AIPrintItemUse_
|
||||
|
|
@ -820,12 +820,12 @@ AIIncreaseStat: ; 3a808 (e:6808)
|
|||
ld [hl],a
|
||||
jp DecrementAICount
|
||||
|
||||
AIPrintItemUse: ; 3a82c (e:682c)
|
||||
AIPrintItemUse:
|
||||
ld [wAIItem],a
|
||||
call AIPrintItemUse_
|
||||
jp DecrementAICount
|
||||
|
||||
AIPrintItemUse_: ; 3a835 (e:6835)
|
||||
AIPrintItemUse_:
|
||||
; print "x used [wAIItem] on z!"
|
||||
ld a,[wAIItem]
|
||||
ld [wd11e],a
|
||||
|
|
@ -833,6 +833,6 @@ AIPrintItemUse_: ; 3a835 (e:6835)
|
|||
ld hl, AIBattleUseItemText
|
||||
jp PrintText
|
||||
|
||||
AIBattleUseItemText: ; 3a844 (e:6844)
|
||||
AIBattleUseItemText:
|
||||
TX_FAR _AIBattleUseItemText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TrainerPicAndMoneyPointers: ; 39914 (e:5914)
|
||||
TrainerPicAndMoneyPointers:
|
||||
; trainer pic pointers and base money.
|
||||
; money received after battle = base money × level of highest-level enemy mon
|
||||
dw YoungsterPic
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; does nothing since no stats are ever selected (barring glitches)
|
||||
DoubleSelectedStats: ; 39680 (e:5680)
|
||||
DoubleSelectedStats:
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld a, [wPlayerStatsToDouble]
|
||||
|
|
@ -29,7 +29,7 @@ DoubleSelectedStats: ; 39680 (e:5680)
|
|||
ret
|
||||
|
||||
; does nothing since no stats are ever selected (barring glitches)
|
||||
HalveSelectedStats: ; 396a7 (e:56a7)
|
||||
HalveSelectedStats:
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld a, [wPlayerStatsToHalve]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; try to initiate a wild pokemon encounter
|
||||
; returns success in Z
|
||||
TryDoWildEncounter: ; 13870 (4:7870)
|
||||
TryDoWildEncounter:
|
||||
ld a, [wNPCMovementScriptPointerTableNum]
|
||||
and a
|
||||
ret nz
|
||||
|
|
@ -101,7 +101,7 @@ TryDoWildEncounter: ; 13870 (4:7870)
|
|||
xor a
|
||||
ret
|
||||
|
||||
WildMonEncounterSlotChances: ; 13918 (4:7918)
|
||||
WildMonEncounterSlotChances:
|
||||
; There are 10 slots for wild pokemon, and this is the table that defines how common each of
|
||||
; those 10 slots is. A random number is generated and then the first byte of each pair in this
|
||||
; table is compared against that random number. If the random number is less than or equal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue