You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Battle animation annotations
This commit is contained in:
@ -38,8 +38,8 @@ _MapSetup_Sound_Off:: ; e8000
|
|||||||
dec e
|
dec e
|
||||||
jr nz, .clearsound
|
jr nz, .clearsound
|
||||||
|
|
||||||
ld hl, Channel1 ; start of channel data
|
ld hl, Channels ; start of channel data
|
||||||
ld de, $1bf ; length of area to clear (entire sound wram area)
|
ld de, ChannelsEnd - Channels ; length of area to clear (entire sound wram area)
|
||||||
.clearchannels ; clear Channel1-$c2bf
|
.clearchannels ; clear Channel1-$c2bf
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
callba CheckSubstatus_RechargeChargedRampageBideRollout
|
callba CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [PlayerSubStatus5]
|
ld a, [PlayerSubStatus5]
|
||||||
@ -716,7 +716,7 @@ AI_Switch: ; 3846c
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, EnemyMonStatus
|
ld hl, EnemyMonStatus
|
||||||
ld bc, $0004
|
ld bc, MON_MAXHP - MON_STATUS
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
|
|
||||||
@ -726,7 +726,7 @@ AI_Switch: ; 3846c
|
|||||||
|
|
||||||
.skiptext
|
.skiptext
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wd264], a
|
ld [wAISwitch], a
|
||||||
callab NewEnemyMonStatus
|
callab NewEnemyMonStatus
|
||||||
callab ResetEnemyStatLevels
|
callab ResetEnemyStatLevels
|
||||||
ld hl, PlayerSubStatus1
|
ld hl, PlayerSubStatus1
|
||||||
@ -734,7 +734,7 @@ AI_Switch: ; 3846c
|
|||||||
callba EnemySwitch
|
callba EnemySwitch
|
||||||
callba ResetBattleParticipants
|
callba ResetBattleParticipants
|
||||||
xor a
|
xor a
|
||||||
ld [wd264], a
|
ld [wAISwitch], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
; No use picking a move if there's no choice.
|
; No use picking a move if there's no choice.
|
||||||
callba CheckSubstatus_RechargeChargedRampageBideRollout
|
callba CheckEnemyLockedIn
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
AnimObj00GFX: ; 84a2e
|
AnimObj00GFX: ; 84a2e
|
||||||
AnimObj01GFX: INCBIN "gfx/fx/001.2bpp.lz"
|
AnimObjHitGFX: INCBIN "gfx/fx/001.2bpp.lz"
|
||||||
AnimObj02GFX: INCBIN "gfx/fx/002.2bpp.lz"
|
AnimObjCutGFX: INCBIN "gfx/fx/002.2bpp.lz"
|
||||||
AnimObj03GFX: INCBIN "gfx/fx/003.2bpp.lz"
|
AnimObjFireGFX: INCBIN "gfx/fx/003.2bpp.lz"
|
||||||
AnimObj04GFX: INCBIN "gfx/fx/004.2bpp.lz"
|
AnimObjWaterGFX: INCBIN "gfx/fx/004.2bpp.lz"
|
||||||
AnimObj05GFX: INCBIN "gfx/fx/005.2bpp.lz"
|
AnimObjLightningGFX: INCBIN "gfx/fx/005.2bpp.lz"
|
||||||
AnimObj07GFX: INCBIN "gfx/fx/007.2bpp.lz"
|
AnimObj07GFX: INCBIN "gfx/fx/007.2bpp.lz"
|
||||||
AnimObj08GFX: INCBIN "gfx/fx/008.2bpp.lz"
|
AnimObj08GFX: INCBIN "gfx/fx/008.2bpp.lz"
|
||||||
AnimObj10GFX: INCBIN "gfx/fx/010.2bpp.lz"
|
AnimObj10GFX: INCBIN "gfx/fx/010.2bpp.lz"
|
||||||
|
@ -1323,7 +1323,7 @@ BattleAnim_Thundershock: ; c9b53
|
|||||||
|
|
||||||
BattleAnim_Thunderbolt: ; c9b66
|
BattleAnim_Thunderbolt: ; c9b66
|
||||||
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION
|
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION
|
||||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||||
anim_wait 16
|
anim_wait 16
|
||||||
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
|
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
|
||||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||||
@ -2497,10 +2497,10 @@ BattleAnim_Transform: ; ca54d
|
|||||||
anim_call BattleAnim_FollowPlayerHead_0
|
anim_call BattleAnim_FollowPlayerHead_0
|
||||||
anim_transform
|
anim_transform
|
||||||
anim_sound 0, 0, SFX_PSYBEAM
|
anim_sound 0, 0, SFX_PSYBEAM
|
||||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_updateactorpic
|
anim_updateactorpic
|
||||||
anim_incbgeffect ANIM_BG_28
|
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_call BattleAnim_ShowMon_0
|
anim_call BattleAnim_ShowMon_0
|
||||||
anim_ret
|
anim_ret
|
||||||
@ -2759,10 +2759,10 @@ BattleAnim_Minimize: ; ca78a
|
|||||||
anim_1gfx ANIM_GFX_HIT
|
anim_1gfx ANIM_GFX_HIT
|
||||||
anim_call BattleAnim_FollowPlayerHead_0
|
anim_call BattleAnim_FollowPlayerHead_0
|
||||||
anim_minimize
|
anim_minimize
|
||||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_updateactorpic
|
anim_updateactorpic
|
||||||
anim_incbgeffect ANIM_BG_28
|
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_call BattleAnim_ShowMon_0
|
anim_call BattleAnim_ShowMon_0
|
||||||
anim_ret
|
anim_ret
|
||||||
@ -2774,7 +2774,7 @@ BattleAnim_SkyAttack: ; ca7a1
|
|||||||
anim_bgeffect ANIM_BG_27, $0, $1, $0
|
anim_bgeffect ANIM_BG_27, $0, $1, $0
|
||||||
anim_wait 32
|
anim_wait 32
|
||||||
anim_sound 0, 0, SFX_HYPER_BEAM
|
anim_sound 0, 0, SFX_HYPER_BEAM
|
||||||
anim_obj ANIM_OBJ_6E, 6, 0, 11, 0, $40
|
anim_obj ANIM_OBJ_SKY_ATTACK_FEAROW, 6, 0, 11, 0, $40
|
||||||
anim_wait 64
|
anim_wait 64
|
||||||
anim_incobj 1
|
anim_incobj 1
|
||||||
anim_wait 21
|
anim_wait 21
|
||||||
@ -2805,7 +2805,7 @@ BattleAnim_NightShade: ; ca7cc
|
|||||||
BattleAnim_Lick: ; ca7e5
|
BattleAnim_Lick: ; ca7e5
|
||||||
anim_1gfx ANIM_GFX_WATER
|
anim_1gfx ANIM_GFX_WATER
|
||||||
anim_sound 0, 1, SFX_LICK
|
anim_sound 0, 1, SFX_LICK
|
||||||
anim_obj ANIM_OBJ_6F, -15, 0, 7, 0, $0
|
anim_obj ANIM_OBJ_LICK, -15, 0, 7, 0, $0
|
||||||
anim_wait 64
|
anim_wait 64
|
||||||
anim_ret
|
anim_ret
|
||||||
; ca7f1
|
; ca7f1
|
||||||
@ -3025,9 +3025,9 @@ BattleAnim_Meditate: ; ca9d8
|
|||||||
anim_1gfx ANIM_GFX_HIT
|
anim_1gfx ANIM_GFX_HIT
|
||||||
anim_call BattleAnim_FollowEnemyFeet_0
|
anim_call BattleAnim_FollowEnemyFeet_0
|
||||||
anim_sound 0, 0, SFX_PSYBEAM
|
anim_sound 0, 0, SFX_PSYBEAM
|
||||||
anim_bgeffect ANIM_BG_28, $0, $1, $0
|
anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_incbgeffect ANIM_BG_28
|
anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_call BattleAnim_ShowMon_0
|
anim_call BattleAnim_ShowMon_0
|
||||||
anim_ret
|
anim_ret
|
||||||
@ -3765,13 +3765,13 @@ BattleAnim_Octazooka: ; cb06f
|
|||||||
BattleAnim_Spikes: ; cb092
|
BattleAnim_Spikes: ; cb092
|
||||||
anim_1gfx ANIM_GFX_MISC
|
anim_1gfx ANIM_GFX_MISC
|
||||||
anim_sound 6, 2, SFX_MENU
|
anim_sound 6, 2, SFX_MENU
|
||||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $20
|
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $20
|
||||||
anim_wait 8
|
anim_wait 8
|
||||||
anim_sound 6, 2, SFX_MENU
|
anim_sound 6, 2, SFX_MENU
|
||||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $30
|
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $30
|
||||||
anim_wait 8
|
anim_wait 8
|
||||||
anim_sound 6, 2, SFX_MENU
|
anim_sound 6, 2, SFX_MENU
|
||||||
anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $28
|
anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $28
|
||||||
anim_wait 64
|
anim_wait 64
|
||||||
anim_ret
|
anim_ret
|
||||||
; cb0b0
|
; cb0b0
|
||||||
@ -3784,7 +3784,7 @@ BattleAnim_ZapCannon: ; cb0b0
|
|||||||
anim_obj ANIM_OBJ_A3, 8, 0, 11, 4, $2
|
anim_obj ANIM_OBJ_A3, 8, 0, 11, 4, $2
|
||||||
anim_wait 40
|
anim_wait 40
|
||||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||||
anim_wait 16
|
anim_wait 16
|
||||||
anim_obj ANIM_OBJ_31, -15, 0, 7, 0, $0
|
anim_obj ANIM_OBJ_31, -15, 0, 7, 0, $0
|
||||||
anim_wait 128
|
anim_wait 128
|
||||||
@ -3830,14 +3830,14 @@ BattleAnim_PerishSong: ; cb113
|
|||||||
anim_bgeffect ANIM_BG_06, $0, $2, $0
|
anim_bgeffect ANIM_BG_06, $0, $2, $0
|
||||||
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
|
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
|
||||||
anim_sound 0, 2, SFX_PERISH_SONG
|
anim_sound 0, 2, SFX_PERISH_SONG
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $0
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $0
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $8
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $8
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $10
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $10
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $18
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $18
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $20
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $20
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $28
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $28
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $30
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $30
|
||||||
anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $38
|
anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $38
|
||||||
anim_wait 112
|
anim_wait 112
|
||||||
anim_ret
|
anim_ret
|
||||||
; cb14c
|
; cb14c
|
||||||
@ -4087,7 +4087,7 @@ BattleAnim_Spark: ; cb34d
|
|||||||
anim_incobj 2
|
anim_incobj 2
|
||||||
anim_wait 1
|
anim_wait 1
|
||||||
anim_sound 0, 1, SFX_THUNDERSHOCK
|
anim_sound 0, 1, SFX_THUNDERSHOCK
|
||||||
anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
|
anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
|
||||||
anim_obj ANIM_OBJ_33, -15, 0, 7, 0, $0
|
anim_obj ANIM_OBJ_33, -15, 0, 7, 0, $0
|
||||||
anim_wait 32
|
anim_wait 32
|
||||||
anim_ret
|
anim_ret
|
||||||
|
@ -7,7 +7,7 @@ DoBattle: ; 3c000
|
|||||||
ld [wPlayerAction], a
|
ld [wPlayerAction], a
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
inc a
|
inc a
|
||||||
ld [wd264], a
|
ld [wAISwitch], a
|
||||||
ld hl, OTPartyMon1HP
|
ld hl, OTPartyMon1HP
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
||||||
ld d, BATTLEACTION_SWITCH1 - 1
|
ld d, BATTLEACTION_SWITCH1 - 1
|
||||||
@ -60,7 +60,7 @@ DoBattle: ; 3c000
|
|||||||
xor a
|
xor a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
.loop2
|
.loop2
|
||||||
call CheckIfPartyHasPkmnToBattleWith
|
call CheckIfCurPartyMonIsFitToFight
|
||||||
jr nz, .alive2
|
jr nz, .alive2
|
||||||
ld hl, CurPartyMon
|
ld hl, CurPartyMon
|
||||||
inc [hl]
|
inc [hl]
|
||||||
@ -170,7 +170,7 @@ BattleTurn: ; 3c12f
|
|||||||
xor a
|
xor a
|
||||||
ld [wPlayerIsSwitching], a
|
ld [wPlayerIsSwitching], a
|
||||||
ld [wEnemyIsSwitching], a
|
ld [wEnemyIsSwitching], a
|
||||||
ld [wd264], a
|
ld [wAISwitch], a
|
||||||
ld [wPlayerJustGotFrozen], a
|
ld [wPlayerJustGotFrozen], a
|
||||||
ld [wEnemyJustGotFrozen], a
|
ld [wEnemyJustGotFrozen], a
|
||||||
ld [CurDamage], a
|
ld [CurDamage], a
|
||||||
@ -2497,7 +2497,7 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
call PrintWinLossText
|
call PrintWinLossText
|
||||||
|
|
||||||
.skip_win_loss_text
|
.skip_win_loss_text
|
||||||
jp HandleBattleReward
|
jp .GiveMoney
|
||||||
|
|
||||||
.mobile
|
.mobile
|
||||||
call BattleWinSlideInEnemyTrainerFrontpic
|
call BattleWinSlideInEnemyTrainerFrontpic
|
||||||
@ -2524,9 +2524,8 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
ret
|
ret
|
||||||
; 3d02b
|
|
||||||
|
|
||||||
HandleBattleReward: ; 3d02b
|
.GiveMoney
|
||||||
ld a, [wAmuletCoin]
|
ld a, [wAmuletCoin]
|
||||||
and a
|
and a
|
||||||
call nz, .DoubleReward
|
call nz, .DoubleReward
|
||||||
@ -3024,7 +3023,7 @@ PickPartyMonInBattle: ; 3d33c
|
|||||||
call JumpToPartyMenuAndPrintText
|
call JumpToPartyMenuAndPrintText
|
||||||
call SelectBattleMon
|
call SelectBattleMon
|
||||||
ret c
|
ret c
|
||||||
call CheckIfPartyHasPkmnToBattleWith
|
call CheckIfCurPartyMonIsFitToFight
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
@ -3373,14 +3372,14 @@ CheckWhetherSwitchmonIsPredetermined: ; 3d533
|
|||||||
.not_linked
|
.not_linked
|
||||||
ld a, [wEnemySwitchMonIndex]
|
ld a, [wEnemySwitchMonIndex]
|
||||||
and a
|
and a
|
||||||
jr z, .check_wd264
|
jr z, .check_wAISwitch
|
||||||
|
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
jr .return_carry
|
jr .return_carry
|
||||||
|
|
||||||
.check_wd264
|
.check_wAISwitch
|
||||||
ld a, [wd264]
|
ld a, [wAISwitch]
|
||||||
and a
|
and a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
jr nz, .return_carry
|
jr nz, .return_carry
|
||||||
@ -3656,7 +3655,7 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca
|
|||||||
; 3d714
|
; 3d714
|
||||||
|
|
||||||
CheckWhetherToAskSwitch: ; 3d714
|
CheckWhetherToAskSwitch: ; 3d714
|
||||||
ld a, [wd264]
|
ld a, [wAISwitch]
|
||||||
dec a
|
dec a
|
||||||
jp z, .return_nc
|
jp z, .return_nc
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
@ -3836,19 +3835,19 @@ CheckPlayerPartyForFitPkmn: ; 3d873
|
|||||||
xor a
|
xor a
|
||||||
ld hl, PartyMon1HP
|
ld hl, PartyMon1HP
|
||||||
ld bc, PartyMon2 - (PartyMon1 + 1)
|
ld bc, PartyMon2 - (PartyMon1 + 1)
|
||||||
.asm_3d87e
|
.loop
|
||||||
or [hl]
|
or [hl]
|
||||||
inc hl
|
inc hl
|
||||||
or [hl]
|
or [hl]
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec e
|
dec e
|
||||||
jr nz, .asm_3d87e
|
jr nz, .loop
|
||||||
ld d, a
|
ld d, a
|
||||||
ret
|
ret
|
||||||
; 3d887
|
; 3d887
|
||||||
|
|
||||||
|
|
||||||
CheckIfPartyHasPkmnToBattleWith: ; 3d887
|
CheckIfCurPartyMonIsFitToFight: ; 3d887
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld hl, PartyMon1HP
|
ld hl, PartyMon1HP
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
@ -3856,9 +3855,9 @@ CheckIfPartyHasPkmnToBattleWith: ; 3d887
|
|||||||
or [hl]
|
or [hl]
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [wd264]
|
ld a, [wAISwitch]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3d8b1
|
jr nz, .finish_fail
|
||||||
ld hl, PartySpecies
|
ld hl, PartySpecies
|
||||||
ld a, [CurPartyMon]
|
ld a, [CurPartyMon]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -3867,14 +3866,14 @@ CheckIfPartyHasPkmnToBattleWith: ; 3d887
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp EGG
|
cp EGG
|
||||||
ld hl, BattleText_AnEGGCantBattle
|
ld hl, BattleText_AnEGGCantBattle
|
||||||
jr z, .asm_3d8ae
|
jr z, .print_textbox
|
||||||
|
|
||||||
ld hl, BattleText_TheresNoWillToBattle
|
ld hl, BattleText_TheresNoWillToBattle
|
||||||
|
|
||||||
.asm_3d8ae
|
.print_textbox
|
||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
.asm_3d8b1
|
.finish_fail
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 3d8b3
|
; 3d8b3
|
||||||
@ -4501,6 +4500,8 @@ HandleHPHealingItem: ; 3dd2f
|
|||||||
ld hl, BattleMonMaxHP
|
ld hl, BattleMonMaxHP
|
||||||
|
|
||||||
.go
|
.go
|
||||||
|
; If, and only if, Pokemon's HP is less than half max, use the item.
|
||||||
|
; Store current HP in Buffer 3/4
|
||||||
push bc
|
push bc
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [Buffer3], a
|
ld [Buffer3], a
|
||||||
@ -4528,6 +4529,7 @@ HandleHPHealingItem: ; 3dd2f
|
|||||||
|
|
||||||
.less
|
.less
|
||||||
call ItemRecoveryAnim
|
call ItemRecoveryAnim
|
||||||
|
; store max HP in Buffer1/2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [Buffer2], a
|
ld [Buffer2], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -5434,7 +5436,7 @@ TryPlayerSwitch: ; 3e358
|
|||||||
jp BattleMenuPKMN_Loop
|
jp BattleMenuPKMN_Loop
|
||||||
|
|
||||||
.try_switch
|
.try_switch
|
||||||
call CheckIfPartyHasPkmnToBattleWith
|
call CheckIfCurPartyMonIsFitToFight
|
||||||
jp z, BattleMenuPKMN_Loop
|
jp z, BattleMenuPKMN_Loop
|
||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [LastPlayerMon], a
|
ld [LastPlayerMon], a
|
||||||
@ -5675,15 +5677,15 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
ld c, $2c
|
ld c, $2c
|
||||||
ld a, [wMoveSelectionMenuType]
|
ld a, [wMoveSelectionMenuType]
|
||||||
dec a
|
dec a
|
||||||
ld b, $c1
|
ld b, D_DOWN | D_UP | A_BUTTON
|
||||||
jr z, .okay
|
jr z, .okay
|
||||||
dec a
|
dec a
|
||||||
ld b, $c3
|
ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON
|
||||||
jr z, .okay
|
jr z, .okay
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .okay
|
jr nz, .okay
|
||||||
ld b, $c7
|
ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON | SELECT
|
||||||
|
|
||||||
.okay
|
.okay
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -5727,6 +5729,7 @@ MoveSelectionScreen: ; 3e4bc
|
|||||||
bit SELECT_F, a
|
bit SELECT_F, a
|
||||||
jp nz, .pressed_select
|
jp nz, .pressed_select
|
||||||
bit B_BUTTON_F, a
|
bit B_BUTTON_F, a
|
||||||
|
; A button
|
||||||
push af
|
push af
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
@ -6106,7 +6109,7 @@ ParseEnemyAction: ; 3e7c1
|
|||||||
jp .finish
|
jp .finish
|
||||||
|
|
||||||
.skip_encore
|
.skip_encore
|
||||||
call CheckSubstatus_RechargeChargedRampageBideRollout
|
call CheckEnemyLockedIn
|
||||||
jp nz, ResetVarsForSubstatusRage
|
jp nz, ResetVarsForSubstatusRage
|
||||||
jr .continue
|
jr .continue
|
||||||
|
|
||||||
@ -6173,7 +6176,7 @@ ParseEnemyAction: ; 3e7c1
|
|||||||
.skip_load
|
.skip_load
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
callab UpdateMoveData
|
callab UpdateMoveData
|
||||||
call CheckSubstatus_RechargeChargedRampageBideRollout
|
call CheckEnemyLockedIn
|
||||||
jr nz, .raging
|
jr nz, .raging
|
||||||
xor a
|
xor a
|
||||||
ld [wEnemyCharging], a
|
ld [wEnemyCharging], a
|
||||||
@ -6219,7 +6222,7 @@ ResetVarsForSubstatusRage: ; 3e8c1
|
|||||||
ret
|
ret
|
||||||
; 3e8d1
|
; 3e8d1
|
||||||
|
|
||||||
CheckSubstatus_RechargeChargedRampageBideRollout: ; 3e8d1
|
CheckEnemyLockedIn: ; 3e8d1
|
||||||
ld a, [EnemySubStatus4]
|
ld a, [EnemySubStatus4]
|
||||||
and 1 << SUBSTATUS_RECHARGE
|
and 1 << SUBSTATUS_RECHARGE
|
||||||
ret nz
|
ret nz
|
||||||
@ -8025,7 +8028,7 @@ SendOutPkmnText: ; 3f26d
|
|||||||
|
|
||||||
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
|
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
|
||||||
|
|
||||||
ld a, [wd264] ; unless this (unidentified) variable is set
|
ld a, [wAISwitch] ; unless this (unidentified) variable is set
|
||||||
and a
|
and a
|
||||||
jr nz, .skip_to_textbox
|
jr nz, .skip_to_textbox
|
||||||
|
|
||||||
@ -8482,7 +8485,7 @@ BattleIntro: ; 3f4dd
|
|||||||
ld [hMapAnims], a
|
ld [hMapAnims], a
|
||||||
callba PlayBattleMusic
|
callba PlayBattleMusic
|
||||||
callba ShowLinkBattleParticipants
|
callba ShowLinkBattleParticipants
|
||||||
callba FindFirstAliveMon
|
callba FindFirstAliveMonAndStartBattle
|
||||||
call DisableSpriteUpdates
|
call DisableSpriteUpdates
|
||||||
callba ClearBattleRAM
|
callba ClearBattleRAM
|
||||||
call InitEnemy
|
call InitEnemy
|
||||||
|
@ -2095,7 +2095,7 @@ FutureSight:
|
|||||||
damagestats
|
damagestats
|
||||||
damagecalc
|
damagecalc
|
||||||
futuresight
|
futuresight
|
||||||
damagevariation
|
damagevariation ; skip here if last turn
|
||||||
checkhit
|
checkhit
|
||||||
hittargetnosub
|
hittargetnosub
|
||||||
failuretext
|
failuretext
|
||||||
|
@ -156,7 +156,7 @@ endm
|
|||||||
; ANIM_OBJ_31
|
; ANIM_OBJ_31
|
||||||
battleanimobj $21, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, $03, $05
|
battleanimobj $21, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, $03, $05
|
||||||
|
|
||||||
; ANIM_OBJ_32
|
; ANIM_OBJ_LIGHTNING_BOLT
|
||||||
battleanimobj $21, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, $02, $08
|
battleanimobj $21, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, $02, $08
|
||||||
|
|
||||||
; ANIM_OBJ_33
|
; ANIM_OBJ_33
|
||||||
@ -336,10 +336,10 @@ endm
|
|||||||
; ANIM_OBJ_6D
|
; ANIM_OBJ_6D
|
||||||
battleanimobj $01, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
|
battleanimobj $01, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
|
||||||
|
|
||||||
; ANIM_OBJ_6E
|
; ANIM_OBJ_SKY_ATTACK_FEAROW
|
||||||
battleanimobj $21, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, $02, $20
|
battleanimobj $21, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, $02, $20
|
||||||
|
|
||||||
; ANIM_OBJ_6F
|
; ANIM_OBJ_LICK
|
||||||
battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
|
battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
|
||||||
|
|
||||||
; ANIM_OBJ_70
|
; ANIM_OBJ_70
|
||||||
@ -432,7 +432,7 @@ endm
|
|||||||
; ANIM_OBJ_8D
|
; ANIM_OBJ_8D
|
||||||
battleanimobj $21, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, $04, $19
|
battleanimobj $21, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, $04, $19
|
||||||
|
|
||||||
; ANIM_OBJ_8E
|
; ANIM_OBJ_SPIKES
|
||||||
battleanimobj $21, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, $02, $1f
|
battleanimobj $21, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, $02, $1f
|
||||||
|
|
||||||
; ANIM_OBJ_8F
|
; ANIM_OBJ_8F
|
||||||
@ -504,7 +504,7 @@ endm
|
|||||||
; ANIM_OBJ_A5
|
; ANIM_OBJ_A5
|
||||||
battleanimobj $61, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, $02, $23
|
battleanimobj $61, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, $02, $23
|
||||||
|
|
||||||
; ANIM_OBJ_A6
|
; ANIM_OBJ_PERISH_SONG
|
||||||
battleanimobj $00, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, $02, $0e
|
battleanimobj $00, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, $02, $0e
|
||||||
|
|
||||||
; ANIM_OBJ_A7
|
; ANIM_OBJ_A7
|
||||||
|
@ -8,11 +8,11 @@ object_gfx: MACRO
|
|||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
object_gfx 0, AnimObj00GFX
|
object_gfx 0, AnimObj00GFX
|
||||||
object_gfx 21, AnimObj01GFX
|
object_gfx 21, AnimObjHitGFX
|
||||||
object_gfx 6, AnimObj02GFX
|
object_gfx 6, AnimObjCutGFX
|
||||||
object_gfx 6, AnimObj03GFX
|
object_gfx 6, AnimObjFireGFX
|
||||||
object_gfx 20, AnimObj04GFX
|
object_gfx 20, AnimObjWaterGFX
|
||||||
object_gfx 26, AnimObj05GFX
|
object_gfx 26, AnimObjLightningGFX
|
||||||
object_gfx 18, AnimObj06GFX
|
object_gfx 18, AnimObj06GFX
|
||||||
object_gfx 12, AnimObj07GFX
|
object_gfx 12, AnimObj07GFX
|
||||||
object_gfx 9, AnimObj08GFX
|
object_gfx 9, AnimObj08GFX
|
||||||
|
@ -76,7 +76,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
|
|||||||
const ANIM_OBJ_2F
|
const ANIM_OBJ_2F
|
||||||
const ANIM_OBJ_30
|
const ANIM_OBJ_30
|
||||||
const ANIM_OBJ_31
|
const ANIM_OBJ_31
|
||||||
const ANIM_OBJ_32
|
const ANIM_OBJ_LIGHTNING_BOLT
|
||||||
const ANIM_OBJ_33
|
const ANIM_OBJ_33
|
||||||
const ANIM_OBJ_34
|
const ANIM_OBJ_34
|
||||||
const ANIM_OBJ_35
|
const ANIM_OBJ_35
|
||||||
@ -136,8 +136,8 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
|
|||||||
const ANIM_OBJ_6B
|
const ANIM_OBJ_6B
|
||||||
const ANIM_OBJ_6C
|
const ANIM_OBJ_6C
|
||||||
const ANIM_OBJ_6D
|
const ANIM_OBJ_6D
|
||||||
const ANIM_OBJ_6E
|
const ANIM_OBJ_SKY_ATTACK_FEAROW
|
||||||
const ANIM_OBJ_6F
|
const ANIM_OBJ_LICK
|
||||||
const ANIM_OBJ_70
|
const ANIM_OBJ_70
|
||||||
const ANIM_OBJ_71
|
const ANIM_OBJ_71
|
||||||
const ANIM_OBJ_72
|
const ANIM_OBJ_72
|
||||||
@ -168,7 +168,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
|
|||||||
const ANIM_OBJ_8B
|
const ANIM_OBJ_8B
|
||||||
const ANIM_OBJ_8C
|
const ANIM_OBJ_8C
|
||||||
const ANIM_OBJ_8D
|
const ANIM_OBJ_8D
|
||||||
const ANIM_OBJ_8E
|
const ANIM_OBJ_SPIKES
|
||||||
const ANIM_OBJ_8F
|
const ANIM_OBJ_8F
|
||||||
const ANIM_OBJ_90
|
const ANIM_OBJ_90
|
||||||
const ANIM_OBJ_91
|
const ANIM_OBJ_91
|
||||||
@ -192,7 +192,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
|
|||||||
const ANIM_OBJ_A3
|
const ANIM_OBJ_A3
|
||||||
const ANIM_OBJ_A4
|
const ANIM_OBJ_A4
|
||||||
const ANIM_OBJ_A5
|
const ANIM_OBJ_A5
|
||||||
const ANIM_OBJ_A6
|
const ANIM_OBJ_PERISH_SONG
|
||||||
const ANIM_OBJ_A7
|
const ANIM_OBJ_A7
|
||||||
const ANIM_OBJ_A8
|
const ANIM_OBJ_A8
|
||||||
const ANIM_OBJ_A9
|
const ANIM_OBJ_A9
|
||||||
@ -742,7 +742,7 @@ const_value SET 1
|
|||||||
const ANIM_BG_25
|
const ANIM_BG_25
|
||||||
const ANIM_BG_26
|
const ANIM_BG_26
|
||||||
const ANIM_BG_27
|
const ANIM_BG_27
|
||||||
const ANIM_BG_28
|
const ANIM_BG_WAVE_DEFORM_USER
|
||||||
const ANIM_BG_PSYCHIC
|
const ANIM_BG_PSYCHIC
|
||||||
const ANIM_BG_2A
|
const ANIM_BG_2A
|
||||||
const ANIM_BG_2B
|
const ANIM_BG_2B
|
||||||
@ -768,6 +768,47 @@ const_value SET 1
|
|||||||
const ANIM_MON_EGG1 ; 7
|
const ANIM_MON_EGG1 ; 7
|
||||||
const ANIM_MON_EGG2 ; 8
|
const ANIM_MON_EGG2 ; 8
|
||||||
|
|
||||||
|
const_value SET 1
|
||||||
|
const ANIM_GFX_HIT
|
||||||
|
const ANIM_GFX_CUT
|
||||||
|
const ANIM_GFX_FIRE
|
||||||
|
const ANIM_GFX_WATER
|
||||||
|
const ANIM_GFX_LIGHTNING
|
||||||
|
const ANIM_GFX_PLANT
|
||||||
|
const ANIM_GFX_SMOKE
|
||||||
|
const ANIM_GFX_EXPLOSION
|
||||||
|
const ANIM_GFX_ROCKS
|
||||||
|
const ANIM_GFX_ICE
|
||||||
|
const ANIM_GFX_POKE_BALL
|
||||||
|
const ANIM_GFX_POISON
|
||||||
|
const ANIM_GFX_BUBBLE
|
||||||
|
const ANIM_GFX_NOISE
|
||||||
|
const ANIM_GFX_POWDER
|
||||||
|
const ANIM_GFX_BEAM
|
||||||
|
const ANIM_GFX_SPEED
|
||||||
|
const ANIM_GFX_CHARGE
|
||||||
|
const ANIM_GFX_WIND
|
||||||
|
const ANIM_GFX_WHIP
|
||||||
|
const ANIM_GFX_EGG
|
||||||
|
const ANIM_GFX_ROPE
|
||||||
|
const ANIM_GFX_PSYCHIC
|
||||||
|
const ANIM_GFX_REFLECT
|
||||||
|
const ANIM_GFX_STATUS
|
||||||
|
const ANIM_GFX_SAND
|
||||||
|
const ANIM_GFX_WEB
|
||||||
|
const ANIM_GFX_HAZE
|
||||||
|
const ANIM_GFX_HORN
|
||||||
|
const ANIM_GFX_FLOWER
|
||||||
|
const ANIM_GFX_MISC
|
||||||
|
const ANIM_GFX_SKY_ATTACK
|
||||||
|
const ANIM_GFX_GLOBE
|
||||||
|
const ANIM_GFX_SHAPES
|
||||||
|
const ANIM_GFX_OBJECTS
|
||||||
|
const ANIM_GFX_SHINE
|
||||||
|
const ANIM_GFX_ANGELS
|
||||||
|
const ANIM_GFX_WAVE
|
||||||
|
const ANIM_GFX_AEROBLAST
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
const BG_EFFECT_STRUCT_FUNCTION
|
const BG_EFFECT_STRUCT_FUNCTION
|
||||||
const BG_EFFECT_STRUCT_JT_INDEX
|
const BG_EFFECT_STRUCT_JT_INDEX
|
||||||
|
@ -1,45 +1,3 @@
|
|||||||
const_value SET 1
|
|
||||||
const ANIM_GFX_HIT
|
|
||||||
const ANIM_GFX_CUT
|
|
||||||
const ANIM_GFX_FIRE
|
|
||||||
const ANIM_GFX_WATER
|
|
||||||
const ANIM_GFX_LIGHTNING
|
|
||||||
const ANIM_GFX_PLANT
|
|
||||||
const ANIM_GFX_SMOKE
|
|
||||||
const ANIM_GFX_EXPLOSION
|
|
||||||
const ANIM_GFX_ROCKS
|
|
||||||
const ANIM_GFX_ICE
|
|
||||||
const ANIM_GFX_POKE_BALL
|
|
||||||
const ANIM_GFX_POISON
|
|
||||||
const ANIM_GFX_BUBBLE
|
|
||||||
const ANIM_GFX_NOISE
|
|
||||||
const ANIM_GFX_POWDER
|
|
||||||
const ANIM_GFX_BEAM
|
|
||||||
const ANIM_GFX_SPEED
|
|
||||||
const ANIM_GFX_CHARGE
|
|
||||||
const ANIM_GFX_WIND
|
|
||||||
const ANIM_GFX_WHIP
|
|
||||||
const ANIM_GFX_EGG
|
|
||||||
const ANIM_GFX_ROPE
|
|
||||||
const ANIM_GFX_PSYCHIC
|
|
||||||
const ANIM_GFX_REFLECT
|
|
||||||
const ANIM_GFX_STATUS
|
|
||||||
const ANIM_GFX_SAND
|
|
||||||
const ANIM_GFX_WEB
|
|
||||||
const ANIM_GFX_HAZE
|
|
||||||
const ANIM_GFX_HORN
|
|
||||||
const ANIM_GFX_FLOWER
|
|
||||||
const ANIM_GFX_MISC
|
|
||||||
const ANIM_GFX_SKY_ATTACK
|
|
||||||
const ANIM_GFX_GLOBE
|
|
||||||
const ANIM_GFX_SHAPES
|
|
||||||
const ANIM_GFX_OBJECTS
|
|
||||||
const ANIM_GFX_SHINE
|
|
||||||
const ANIM_GFX_ANGELS
|
|
||||||
const ANIM_GFX_WAVE
|
|
||||||
const ANIM_GFX_AEROBLAST
|
|
||||||
|
|
||||||
|
|
||||||
LEN_2BPP_TILE EQU 16
|
LEN_2BPP_TILE EQU 16
|
||||||
LEN_1BPP_TILE EQU 8
|
LEN_1BPP_TILE EQU 8
|
||||||
TILES_PER_FRAME EQU 6
|
TILES_PER_FRAME EQU 6
|
||||||
|
@ -19,7 +19,7 @@ const_value SET 1
|
|||||||
const MAPCALLBACK_SPRITES
|
const MAPCALLBACK_SPRITES
|
||||||
const MAPCALLBACK_NEWMAP
|
const MAPCALLBACK_NEWMAP
|
||||||
|
|
||||||
; Command descriptions from Condensation water's scripting compendium. const_def
|
; Command descriptions from Condensation water's scripting compendium.
|
||||||
const_def
|
const_def
|
||||||
|
|
||||||
const map_lcd_on ; 00
|
const map_lcd_on ; 00
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
_AnimateHPBar: ; d627
|
_AnimateHPBar: ; d627
|
||||||
call Functiond65f
|
call .IsMaximumMoreThan48Pixels
|
||||||
jr c, .do_player
|
jr c, .MoreThan48Pixels
|
||||||
call Functiond670
|
call .ComputePixels
|
||||||
.enemy_loop
|
.ShortAnimLoop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
call Functiond6e2
|
call Functiond6e2
|
||||||
@ -16,12 +16,12 @@ _AnimateHPBar: ; d627
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
pop af
|
pop af
|
||||||
jr nc, .enemy_loop
|
jr nc, .ShortAnimLoop
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.do_player
|
.MoreThan48Pixels
|
||||||
call Functiond670
|
call .ComputePixels
|
||||||
.player_loop
|
.LongAnimLoop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
call Functiond6f5
|
call Functiond6f5
|
||||||
@ -36,11 +36,11 @@ _AnimateHPBar: ; d627
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
pop af
|
pop af
|
||||||
jr nc, .player_loop
|
jr nc, .LongAnimLoop
|
||||||
ret
|
ret
|
||||||
; d65f
|
; d65f
|
||||||
|
|
||||||
Functiond65f: ; d65f
|
.IsMaximumMoreThan48Pixels: ; d65f
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
and a
|
and a
|
||||||
jr nz, .player
|
jr nz, .player
|
||||||
@ -55,7 +55,7 @@ Functiond65f: ; d65f
|
|||||||
ret
|
ret
|
||||||
; d670
|
; d670
|
||||||
|
|
||||||
Functiond670: ; d670
|
.ComputePixels: ; d670
|
||||||
; Buffer1-2: Max HP
|
; Buffer1-2: Max HP
|
||||||
; Buffer3-4: Old HP
|
; Buffer3-4: Old HP
|
||||||
; Buffer5-6: New HP
|
; Buffer5-6: New HP
|
||||||
@ -72,7 +72,7 @@ Functiond670: ; d670
|
|||||||
pop hl
|
pop hl
|
||||||
call ComputeHPBarPixels
|
call ComputeHPBarPixels
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd1f1], a
|
ld [wCurHPBarPixels], a
|
||||||
|
|
||||||
ld a, [Buffer5]
|
ld a, [Buffer5]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -84,7 +84,7 @@ Functiond670: ; d670
|
|||||||
ld d, a
|
ld d, a
|
||||||
call ComputeHPBarPixels
|
call ComputeHPBarPixels
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wd1f2], a
|
ld [wNewHPBarPixels], a
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld hl, Buffer3
|
ld hl, Buffer3
|
||||||
@ -103,15 +103,15 @@ Functiond670: ; d670
|
|||||||
ld a, d
|
ld a, d
|
||||||
sbc b
|
sbc b
|
||||||
ld d, a
|
ld d, a
|
||||||
jr c, .asm_d6c1
|
jr c, .negative
|
||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
ld [wd1f5], a
|
ld [wd1f5], a
|
||||||
ld a, [Buffer5]
|
ld a, [Buffer5]
|
||||||
ld [wd1f6], a
|
ld [wd1f6], a
|
||||||
ld bc, 1
|
ld bc, 1
|
||||||
jr .asm_d6d9
|
jr .got_direction
|
||||||
|
|
||||||
.asm_d6c1
|
.negative
|
||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
ld [wd1f6], a
|
ld [wd1f6], a
|
||||||
ld a, [Buffer5]
|
ld a, [Buffer5]
|
||||||
@ -123,8 +123,8 @@ Functiond670: ; d670
|
|||||||
ld a, d
|
ld a, d
|
||||||
xor $ff
|
xor $ff
|
||||||
ld d, a
|
ld d, a
|
||||||
ld bc, rIE
|
ld bc, -1
|
||||||
.asm_d6d9
|
.got_direction
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wd1f3], a
|
ld [wd1f3], a
|
||||||
ld a, e
|
ld a, e
|
||||||
@ -133,14 +133,14 @@ Functiond670: ; d670
|
|||||||
; d6e2
|
; d6e2
|
||||||
|
|
||||||
Functiond6e2: ; d6e2
|
Functiond6e2: ; d6e2
|
||||||
ld hl, wd1f1
|
ld hl, wCurHPBarPixels
|
||||||
ld a, [wd1f2]
|
ld a, [wNewHPBarPixels]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .asm_d6ed
|
jr nz, .not_finished
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d6ed
|
.not_finished
|
||||||
ld a, c
|
ld a, c
|
||||||
add [hl]
|
add [hl]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -150,7 +150,7 @@ Functiond6e2: ; d6e2
|
|||||||
; d6f5
|
; d6f5
|
||||||
|
|
||||||
Functiond6f5: ; d6f5
|
Functiond6f5: ; d6f5
|
||||||
.asm_d6f5
|
.loop
|
||||||
ld hl, Buffer3
|
ld hl, Buffer3
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -158,22 +158,22 @@ Functiond6f5: ; d6f5
|
|||||||
ld d, a
|
ld d, a
|
||||||
ld a, e
|
ld a, e
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .asm_d707
|
jr nz, .next
|
||||||
inc hl
|
inc hl
|
||||||
ld a, d
|
ld a, d
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .asm_d707
|
jr nz, .next
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_d707
|
.next
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Buffer3], a
|
ld [Buffer3], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wd1ed], a
|
ld [Buffer4], a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@ -191,9 +191,9 @@ Functiond6f5: ; d6f5
|
|||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, e
|
ld a, e
|
||||||
ld hl, wd1f1
|
ld hl, wCurHPBarPixels
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .asm_d6f5
|
jr z, .loop
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
@ -205,7 +205,7 @@ Functiond730: ; d730
|
|||||||
ld a, [wWhichHPBar]
|
ld a, [wWhichHPBar]
|
||||||
and $1
|
and $1
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd1f1]
|
ld a, [wCurHPBarPixels]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld c, a
|
ld c, a
|
||||||
push de
|
push de
|
||||||
@ -219,7 +219,7 @@ Functiond749: ; d749
|
|||||||
call Functiond784
|
call Functiond784
|
||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wd1ed]
|
ld a, [Buffer4]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [Buffer1]
|
ld a, [Buffer1]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -275,7 +275,7 @@ endr
|
|||||||
dec hl
|
dec hl
|
||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
ld [StringBuffer2 + 1], a
|
ld [StringBuffer2 + 1], a
|
||||||
ld a, [wd1ed]
|
ld a, [Buffer4]
|
||||||
ld [StringBuffer2], a
|
ld [StringBuffer2], a
|
||||||
ld de, StringBuffer2
|
ld de, StringBuffer2
|
||||||
lb bc, 2, 3
|
lb bc, 2, 3
|
||||||
@ -375,7 +375,7 @@ Functiond839: ; d839
|
|||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld hl, 0
|
ld hl, 0
|
||||||
ld a, [wd1f1]
|
ld a, [wCurHPBarPixels]
|
||||||
cp 6 * 8
|
cp 6 * 8
|
||||||
jr nc, .coppy_buffer
|
jr nc, .coppy_buffer
|
||||||
and a
|
and a
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Predef_StartBattle: ; 8c20f
|
Predef_StartBattle: ; 8c20f
|
||||||
call Function8c26d
|
call .InitGFX
|
||||||
ld a, [rBGP]
|
ld a, [rBGP]
|
||||||
ld [wBGP], a
|
ld [wBGP], a
|
||||||
ld a, [rOBP0]
|
ld a, [rOBP0]
|
||||||
@ -52,15 +52,15 @@ Predef_StartBattle: ; 8c20f
|
|||||||
ret
|
ret
|
||||||
; 8c26d
|
; 8c26d
|
||||||
|
|
||||||
Function8c26d: ; 8c26d
|
.InitGFX: ; 8c26d
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
jr z, .mobile
|
jr z, .mobile
|
||||||
callba Function6454
|
callba Function6454
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function8c2a0
|
call .NonMobile_LoadPokeballTiles
|
||||||
call Function8cf4f
|
call BattleStart_LoadEDTile
|
||||||
jr .resume
|
jr .resume
|
||||||
|
|
||||||
.mobile
|
.mobile
|
||||||
@ -81,7 +81,7 @@ Function8c26d: ; 8c26d
|
|||||||
ret
|
ret
|
||||||
; 8c2a0
|
; 8c2a0
|
||||||
|
|
||||||
Function8c2a0: ; 8c2a0
|
.NonMobile_LoadPokeballTiles: ; 8c2a0
|
||||||
call LoadTrainerBattlePokeballTiles
|
call LoadTrainerBattlePokeballTiles
|
||||||
hlbgcoord 0, 0
|
hlbgcoord 0, 0
|
||||||
call Function8c2cf
|
call Function8c2cf
|
||||||
@ -663,7 +663,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a
|
ld [hCGBPalUpdate], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function8cf4f
|
call BattleStart_LoadEDTile
|
||||||
|
|
||||||
.nextscene: ; 8c673 (23:4673)
|
.nextscene: ; 8c673 (23:4673)
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
|
@ -67,7 +67,7 @@ TextJump_AreYouABoyOrAreYouAGirl: ; 0x48e0f
|
|||||||
InitGenderScreen: ; 48e14 (12:4e14)
|
InitGenderScreen: ; 48e14 (12:4e14)
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [MusicFade], a
|
ld [MusicFade], a
|
||||||
ld a, $0
|
ld a, MUSIC_NONE
|
||||||
ld [MusicFadeIDLo], a
|
ld [MusicFadeIDLo], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [MusicFadeIDHi], a
|
ld [MusicFadeIDHi], a
|
||||||
|
@ -202,7 +202,7 @@ MainMenuJoypadLoop: ; 49de4
|
|||||||
ld a, [w2DMenuFlags1]
|
ld a, [w2DMenuFlags1]
|
||||||
set 5, a
|
set 5, a
|
||||||
ld [w2DMenuFlags1], a
|
ld [w2DMenuFlags1], a
|
||||||
call Function1f1a
|
call GetScrollingMenuJoypad
|
||||||
ld a, [wMenuJoypad]
|
ld a, [wMenuJoypad]
|
||||||
cp B_BUTTON
|
cp B_BUTTON
|
||||||
jr z, .b_button
|
jr z, .b_button
|
||||||
|
@ -14,7 +14,7 @@ LoadOverworldMonIcon: ; 8e82b
|
|||||||
ret
|
ret
|
||||||
; 8e83f
|
; 8e83f
|
||||||
|
|
||||||
Function8e83f: ; 8e83f
|
LoadMenuMonIcon: ; 8e83f
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
@ -28,9 +28,8 @@ Function8e83f: ; 8e83f
|
|||||||
.LoadIcon: ; 8e849
|
.LoadIcon: ; 8e849
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .Jumptable
|
ld hl, .Jumptable
|
||||||
rept 2
|
|
||||||
add hl, de
|
add hl, de
|
||||||
endr
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -39,13 +38,13 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
.Jumptable: ; 8e854 (23:6854)
|
.Jumptable: ; 8e854 (23:6854)
|
||||||
dw Function8e8d5 ; init
|
dw Function8e8d5 ; party menu
|
||||||
dw Function8e961
|
dw Function8e961 ; naming screen
|
||||||
dw Function8e97d
|
dw Function8e97d ; moves (?)
|
||||||
dw Trade_LoadMonIconGFX
|
dw Trade_LoadMonIconGFX ; trade
|
||||||
dw Function8e898
|
dw Function8e898 ; mobile
|
||||||
dw Mobile_InitPartyMenuBGPal71
|
dw Mobile_InitPartyMenuBGPal71 ; mobile
|
||||||
dw .GetPartyMenuMonIcon
|
dw .GetPartyMenuMonIcon ; unused
|
||||||
|
|
||||||
|
|
||||||
.GetPartyMenuMonIcon: ; 8e862 (23:6862)
|
.GetPartyMenuMonIcon: ; 8e862 (23:6862)
|
||||||
@ -89,7 +88,7 @@ Function8e898: ; 8e898 (23:6898)
|
|||||||
call Function8e8d5
|
call Function8e8d5
|
||||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, $0
|
ld a, SPRITE_ANIM_SEQ_NULL
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -106,7 +105,7 @@ Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1)
|
|||||||
call SetPartyMonIconAnimSpeed
|
call SetPartyMonIconAnimSpeed
|
||||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, $0
|
ld a, SPRITE_ANIM_SEQ_NULL
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -229,7 +228,7 @@ Function8e961: ; 8e961 (23:6961)
|
|||||||
call InitSpriteAnimStruct
|
call InitSpriteAnimStruct
|
||||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $0
|
ld [hl], SPRITE_ANIM_SEQ_NULL
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function8e97d: ; 8e97d (23:697d)
|
Function8e97d: ; 8e97d (23:697d)
|
||||||
|
@ -55,8 +55,8 @@ MovementPointers: ; 5075
|
|||||||
dw Movement_fast_jump_step_up ; 35
|
dw Movement_fast_jump_step_up ; 35
|
||||||
dw Movement_fast_jump_step_left ; 36
|
dw Movement_fast_jump_step_left ; 36
|
||||||
dw Movement_fast_jump_step_right ; 37
|
dw Movement_fast_jump_step_right ; 37
|
||||||
dw Movement_38 ; 38
|
dw Movement_remove_sliding ; 38
|
||||||
dw Movement_39 ; 39
|
dw Movement_set_sliding ; 39
|
||||||
dw Movement_remove_fixed_facing ; 3a
|
dw Movement_remove_fixed_facing ; 3a
|
||||||
dw Movement_fix_facing ; 3b
|
dw Movement_fix_facing ; 3b
|
||||||
dw Movement_show_person ; 3c
|
dw Movement_show_person ; 3c
|
||||||
@ -373,14 +373,14 @@ Movement_56: ; 5279
|
|||||||
ret
|
ret
|
||||||
; 5293
|
; 5293
|
||||||
|
|
||||||
Movement_38: ; 5293
|
Movement_remove_sliding: ; 5293
|
||||||
ld hl, OBJECT_FLAGS1
|
ld hl, OBJECT_FLAGS1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
res SLIDING, [hl]
|
res SLIDING, [hl]
|
||||||
jp ContinueReadingMovement
|
jp ContinueReadingMovement
|
||||||
; 529c
|
; 529c
|
||||||
|
|
||||||
Movement_39: ; 529c
|
Movement_set_sliding: ; 529c
|
||||||
ld hl, OBJECT_FLAGS1
|
ld hl, OBJECT_FLAGS1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
set SLIDING, [hl]
|
set SLIDING, [hl]
|
||||||
|
@ -88,10 +88,10 @@ endr
|
|||||||
.Pokemon: ; 1173e (4:573e)
|
.Pokemon: ; 1173e (4:573e)
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
ld hl, Function8e83f
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(Function8e83f)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $1
|
ld e, $1
|
||||||
rst FarCall ; ; indirect jump to Function8e83f (8e83f (23:683f))
|
rst FarCall ; ; indirect jump to LoadMenuMonIcon (8e83f (23:683f))
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
ld [wd265], a
|
ld [wd265], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
@ -658,8 +658,8 @@ InitPartyMenuGFX: ; 503e0
|
|||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
ld hl, Function8e83f
|
ld hl, LoadMenuMonIcon
|
||||||
ld a, BANK(Function8e83f)
|
ld a, BANK(LoadMenuMonIcon)
|
||||||
ld e, $0
|
ld e, $0
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, [hObjectStructIndexBuffer]
|
ld a, [hObjectStructIndexBuffer]
|
||||||
@ -752,8 +752,8 @@ PartyMenuSelect: ; 0x50457
|
|||||||
ld [wPartyMenuCursor], a
|
ld [wPartyMenuCursor], a
|
||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
ld b, a
|
ld b, a
|
||||||
bit 1, b
|
bit B_BUTTON_F, b
|
||||||
jr nz, .exitmenu ; B button?
|
jr nz, .exitmenu ; B button
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
dec a
|
dec a
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user