More battle core labels

This commit is contained in:
PikalaxALT 2015-11-08 13:27:26 -05:00
parent c34264ddd8
commit ac824f62fc
17 changed files with 378 additions and 816 deletions

View File

@ -16,7 +16,7 @@ AI_SwitchOrTryItem: ; 38000
bit SUBSTATUS_CANT_RUN, a bit SUBSTATUS_CANT_RUN, a
jr nz, DontSwitch jr nz, DontSwitch
ld a, [wc731] ld a, [wEnemyWrapCount]
and a and a
jr nz, DontSwitch jr nz, DontSwitch

View File

@ -1062,7 +1062,7 @@ AI_Smart_Bind: ; 38a71
; Bind, Wrap, Fire Spin, Clamp ; Bind, Wrap, Fire Spin, Clamp
; 50% chance to discourage this move if the player is already trapped. ; 50% chance to discourage this move if the player is already trapped.
ld a, [wc730] ld a, [wPlayerWrapCount]
and a and a
jr nz, .asm_38a8b jr nz, .asm_38a8b
@ -2466,7 +2466,7 @@ AI_Smart_RapidSpin: ; 39084
; 80% chance to greatly encourage this move if the enemy is ; 80% chance to greatly encourage this move if the enemy is
; trapped (Bind effect), seeded, or scattered with spikes. ; trapped (Bind effect), seeded, or scattered with spikes.
ld a, [wc731] ld a, [wEnemyWrapCount]
and a and a
jr nz, .asm_39097 jr nz, .asm_39097

View File

@ -166,8 +166,8 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
Function3c12f: ; 3c12f Function3c12f: ; 3c12f
.loop .loop
call Function3c1bf call MobileFn_3c1bf
call Function3c3f5 call CheckContestBattleOver
jp c, .quit jp c, .quit
xor a xor a
@ -192,8 +192,8 @@ Function3c12f: ; 3c12f
.not_disconnected .not_disconnected
call Function3c410 call Function3c410
jr c, .asm_3c18a jr c, .skip_iteration
.asm_3c179 .loop1
call BattleMenu call BattleMenu
jr c, .quit jr c, .quit
ld a, [BattleEnded] ld a, [BattleEnded]
@ -202,20 +202,20 @@ Function3c12f: ; 3c12f
ld a, [wd232] ; roared/whirlwinded/teleported ld a, [wd232] ; roared/whirlwinded/teleported
and a and a
jr nz, .quit jr nz, .quit
.asm_3c18a .skip_iteration
call Function3c434 call Function3c434
jr nz, .asm_3c179 jr nz, .loop1
call Function3c300 call Function3c300
jr c, .quit jr c, .quit
call DetermineMoveOrder call DetermineMoveOrder
jr c, .asm_3c19e jr c, .false
call Function3c5fe call Function3c5fe
jr .asm_3c1a1 jr .proceed
.asm_3c19e .false
call Function3c664 call Function3c664
.asm_3c1a1 .proceed
call Function3d2e0 call Function3d2e0
jr c, .quit jr c, .quit
@ -227,7 +227,7 @@ Function3c12f: ; 3c12f
and a and a
jr nz, .quit jr nz, .quit
call Function3c1d6 call HandleBetweenTurnEffects
ld a, [BattleEnded] ld a, [BattleEnded]
and a and a
jr nz, .quit jr nz, .quit
@ -237,46 +237,41 @@ Function3c12f: ; 3c12f
ret ret
; 3c1bf ; 3c1bf
Function3c1bf: ; 3c1bf MobileFn_3c1bf: mobile
ret
; 3c1c0
Function3c1c0: ; 3c1c0
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, $a89b ld hl, $a89b
inc [hl] inc [hl]
jr nz, .asm_3c1d2 jr nz, .finish
dec hl dec hl
inc [hl] inc [hl]
jr nz, .asm_3c1d2 jr nz, .finish
dec [hl] dec [hl]
inc hl inc hl
dec [hl] dec [hl]
.asm_3c1d2 .finish
call CloseSRAM call CloseSRAM
ret ret
; 3c1d6 ; 3c1d6
Function3c1d6: ; 3c1d6 HandleBetweenTurnEffects: ; 3c1d6
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .CheckEnemyFirst jr z, .CheckEnemyFirst
call CheckFaint_PlayerThenEnemy call CheckFaint_PlayerThenEnemy
ret c ret c
call Function3ca26 call HandleFutureSight
call CheckFaint_PlayerThenEnemy call CheckFaint_PlayerThenEnemy
ret c ret c
call HandleWeather call HandleWeather
call CheckFaint_PlayerThenEnemy call CheckFaint_PlayerThenEnemy
ret c ret c
call Function3c874 call HandleWrap
call CheckFaint_PlayerThenEnemy call CheckFaint_PlayerThenEnemy
ret c ret c
call Function3c801 call HandlePerishSong
call CheckFaint_PlayerThenEnemy call CheckFaint_PlayerThenEnemy
ret c ret c
jr .NoMoreFaintingConditions jr .NoMoreFaintingConditions
@ -284,27 +279,27 @@ Function3c1d6: ; 3c1d6
.CheckEnemyFirst .CheckEnemyFirst
call CheckFaint_EnemyThenPlayer call CheckFaint_EnemyThenPlayer
ret c ret c
call Function3ca26 call HandleFutureSight
call CheckFaint_EnemyThenPlayer call CheckFaint_EnemyThenPlayer
ret c ret c
call HandleWeather call HandleWeather
call CheckFaint_EnemyThenPlayer call CheckFaint_EnemyThenPlayer
ret c ret c
call Function3c874 call HandleWrap
call CheckFaint_EnemyThenPlayer call CheckFaint_EnemyThenPlayer
ret c ret c
call Function3c801 call HandlePerishSong
call CheckFaint_EnemyThenPlayer call CheckFaint_EnemyThenPlayer
ret c ret c
.NoMoreFaintingConditions .NoMoreFaintingConditions
call Function3c8eb call HandleLeftovers
call Function3c93c call HandleMysteryberry
call HanleDefrost call HanleDefrost
call HandleSafeguard call HandleSafeguard
call HandleScreens call HandleScreens
call Function3de97 call HandleStatBoostingHeldItems
call Function3dcf9 call HandleHealingItems
call UpdateBattleMonInParty call UpdateBattleMonInParty
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
jp Function3c4df jp Function3c4df
@ -578,13 +573,13 @@ DetermineMoveOrder: ; 3c314
ret ret
; 3c3f5 ; 3c3f5
Function3c3f5: ; 3c3f5 CheckContestBattleOver: ; 3c3f5
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_CONTEST cp BATTLETYPE_CONTEST
jr nz, .asm_3c40e jr nz, .contest_not_over
ld a, [wdc79] ld a, [wParkBallsRemaining]
and a and a
jr nz, .asm_3c40e jr nz, .contest_not_over
ld a, [wBattleResult] ld a, [wBattleResult]
and $c0 and $c0
add $2 add $2
@ -592,7 +587,7 @@ Function3c3f5: ; 3c3f5
scf scf
ret ret
.asm_3c40e .contest_not_over
and a and a
ret ret
; 3c410 ; 3c410
@ -787,7 +782,7 @@ TryEnemyFlee: ; 3c543
bit SUBSTATUS_CANT_RUN, a bit SUBSTATUS_CANT_RUN, a
jr nz, .Stay jr nz, .Stay
ld a, [wc731] ld a, [wEnemyWrapCount]
and a and a
jr nz, .Stay jr nz, .Stay
@ -1217,27 +1212,28 @@ ResidualDamage: ; 3c716
ret ret
; 3c801 ; 3c801
Function3c801: ; 3c801 HandlePerishSong: ; 3c801
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3c813 jr z, .EnemyFirst
call SetPlayerTurn call SetPlayerTurn
call .asm_3c81c call .do_it
call SetEnemyTurn call SetEnemyTurn
jp .asm_3c81c jp .do_it
.asm_3c813 .EnemyFirst
call SetEnemyTurn call SetEnemyTurn
call .asm_3c81c call .do_it
call SetPlayerTurn call SetPlayerTurn
.asm_3c81c
.do_it
ld hl, PlayerPerishCount ld hl, PlayerPerishCount
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3c827 jr z, .got_count
ld hl, EnemyPerishCount ld hl, EnemyPerishCount
.asm_3c827 .got_count
ld a, BATTLE_VARS_SUBSTATUS1 ld a, BATTLE_VARS_SUBSTATUS1
call GetBattleVar call GetBattleVar
bit SUBSTATUS_PERISH, a bit SUBSTATUS_PERISH, a
@ -1285,46 +1281,51 @@ Function3c801: ; 3c801
ret ret
; 3c874 ; 3c874
Function3c874: ; 3c874 HandleWrap: ; 3c874
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3c886 jr z, .EnemyFirst
call SetPlayerTurn call SetPlayerTurn
call .asm_3c88f call .do_it
call SetEnemyTurn call SetEnemyTurn
jp .asm_3c88f jp .do_it
.asm_3c886 .EnemyFirst
call SetEnemyTurn call SetEnemyTurn
call .asm_3c88f call .do_it
call SetPlayerTurn call SetPlayerTurn
.asm_3c88f
ld hl, wc730 .do_it
ld de, wc72e ld hl, wPlayerWrapCount
ld de, wPlayerTrappingMove
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3c8a0 jr z, .got_addrs
ld hl, wc731 ld hl, wEnemyWrapCount
ld de, wc72f ld de, wEnemyTrappingMove
.asm_3c8a0 .got_addrs
ld a, [hl] ld a, [hl]
and a and a
ret z ret z
ld a, BATTLE_VARS_SUBSTATUS4 ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar call GetBattleVar
bit SUBSTATUS_SUBSTITUTE, a bit SUBSTATUS_SUBSTITUTE, a
ret nz ret nz
ld a, [de] ld a, [de]
ld [wd265], a ld [wd265], a
ld [FXAnimIDLo], a ld [FXAnimIDLo], a
call GetMoveName call GetMoveName
dec [hl] dec [hl]
jr z, .asm_3c8de jr z, .release_from_bounds
ld a, BATTLE_VARS_SUBSTATUS3 ld a, BATTLE_VARS_SUBSTATUS3
call GetBattleVar call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jr nz, .asm_3c8d3 jr nz, .skip_anim
call SwitchTurnCore call SwitchTurnCore
xor a xor a
ld [wcfca], a ld [wcfca], a
@ -1332,13 +1333,13 @@ Function3c874: ; 3c874
predef PlayBattleAnim predef PlayBattleAnim
call SwitchTurnCore call SwitchTurnCore
.asm_3c8d3 .skip_anim
call GetSixteenthMaxHP call GetSixteenthMaxHP
call SubtractHPFromUser call SubtractHPFromUser
ld hl, BattleText_UsersHurtByStringBuffer1 ld hl, BattleText_UsersHurtByStringBuffer1
jr .asm_3c8e1 jr .asm_3c8e1
.asm_3c8de .release_from_bounds
ld hl, BattleText_UserWasReleasedFromStringBuffer1 ld hl, BattleText_UserWasReleasedFromStringBuffer1
.asm_3c8e1 .asm_3c8e1
@ -1352,20 +1353,21 @@ SwitchTurnCore: ; 3c8e4
ret ret
; 3c8eb ; 3c8eb
Function3c8eb: ; 3c8eb HandleLeftovers: ; 3c8eb
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3c8fd jr z, .DoEnemyFirst
call SetPlayerTurn call SetPlayerTurn
call .asm_3c906 call .do_it
call SetEnemyTurn call SetEnemyTurn
jp .asm_3c906 jp .do_it
.asm_3c8fd .DoEnemyFirst
call SetEnemyTurn call SetEnemyTurn
call .asm_3c906 call .do_it
call SetPlayerTurn call SetPlayerTurn
.asm_3c906 .do_it
callab GetUserItem callab GetUserItem
ld a, [hl] ld a, [hl]
ld [wd265], a ld [wd265], a
@ -1373,25 +1375,27 @@ Function3c8eb: ; 3c8eb
ld a, b ld a, b
cp HELD_LEFTOVERS cp HELD_LEFTOVERS
ret nz ret nz
ld hl, BattleMonHP ld hl, BattleMonHP
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3c922 jr z, .got_hp
ld hl, EnemyMonHP ld hl, EnemyMonHP
.asm_3c922 .got_hp
; Don't restore if we're already at max HP
ld a, [hli] ld a, [hli]
ld b, a ld b, a
ld a, [hli] ld a, [hli]
ld c, a ld c, a
ld a, [hli] ld a, [hli]
cp b cp b
jr nz, .asm_3c92d jr nz, .restore
ld a, [hl] ld a, [hl]
cp c cp c
ret z ret z
.asm_3c92d .restore
call GetSixteenthMaxHP call GetSixteenthMaxHP
call SwitchTurnCore call SwitchTurnCore
call RestoreHP call RestoreHP
@ -1399,24 +1403,25 @@ Function3c8eb: ; 3c8eb
jp StdBattleTextBox jp StdBattleTextBox
; 3c93c ; 3c93c
Function3c93c: ; 3c93c HandleMysteryberry: ; 3c93c
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3c94e jr z, .DoEnemyFirst
call SetPlayerTurn call SetPlayerTurn
call .asm_3c957 call .do_it
call SetEnemyTurn call SetEnemyTurn
jp .asm_3c957 jp .do_it
.asm_3c94e .DoEnemyFirst
call SetEnemyTurn call SetEnemyTurn
call .asm_3c957 call .do_it
call SetPlayerTurn call SetPlayerTurn
.asm_3c957
.do_it
callab GetUserItem callab GetUserItem
ld a, b ld a, b
cp HELD_RESTORE_PP cp HELD_RESTORE_PP
jr nz, .asm_3c9ae jr nz, .quit
ld hl, PartyMon1PP ld hl, PartyMon1PP
ld a, [CurBattleMon] ld a, [CurBattleMon]
call GetPartyLocation call GetPartyLocation
@ -1427,12 +1432,12 @@ Function3c93c: ; 3c93c
call GetPartyLocation call GetPartyLocation
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3c99b jr z, .wild
ld de, wc739 ld de, wc739
ld hl, wc735 ld hl, wc735
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
jr z, .asm_3c99b jr z, .wild
ld hl, OTPartyMon1PP ld hl, OTPartyMon1PP
ld a, [CurOTMon] ld a, [CurOTMon]
call GetPartyLocation call GetPartyLocation
@ -1442,33 +1447,33 @@ Function3c93c: ; 3c93c
ld a, [CurOTMon] ld a, [CurOTMon]
call GetPartyLocation call GetPartyLocation
.asm_3c99b .wild
ld c, $0 ld c, $0
.asm_3c99d .loop
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_3c9ae jr z, .quit
ld a, [de] ld a, [de]
and $3f and $3f
jr z, .asm_3c9af jr z, .restore
inc hl inc hl
inc de inc de
inc c inc c
ld a, c ld a, c
cp NUM_MOVES cp NUM_MOVES
jr nz, .asm_3c99d jr nz, .loop
.asm_3c9ae .quit
ret ret
.asm_3c9af .restore
; lousy hack ; lousy hack
ld a, [hl] ld a, [hl]
cp SKETCH cp SKETCH
ld b, 1 ld b, 1
jr z, .asm_3c9b8 jr z, .sketch
ld b, 5 ld b, 5
.asm_3c9b8 .sketch
ld a, [de] ld a, [de]
add b add b
ld [de], a ld [de], a
@ -1480,10 +1485,10 @@ Function3c93c: ; 3c93c
ld hl, BattleMonPP ld hl, BattleMonPP
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3c9d2 jr z, .player_pp
ld de, EnemyMonMoves - 1 ld de, EnemyMonMoves - 1
ld hl, EnemyMonPP ld hl, EnemyMonPP
.asm_3c9d2 .player_pp
inc de inc de
pop bc pop bc
ld b, 0 ld b, 0
@ -1497,38 +1502,38 @@ Function3c93c: ; 3c93c
ld a, [wd265] ld a, [wd265]
cp [hl] cp [hl]
jr nz, .asm_3c9f5 jr nz, .skip_checks
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
ld a, [PlayerSubStatus5] ld a, [PlayerSubStatus5]
jr z, .asm_3c9ee jr z, .check_transform
ld a, [EnemySubStatus5] ld a, [EnemySubStatus5]
.asm_3c9ee .check_transform
bit SUBSTATUS_TRANSFORMED, a bit SUBSTATUS_TRANSFORMED, a
jr nz, .asm_3c9f5 jr nz, .skip_checks
ld a, [de] ld a, [de]
add b add b
ld [de], a ld [de], a
.asm_3c9f5 .skip_checks
callab GetUserItem callab GetUserItem
ld a, [hl] ld a, [hl]
ld [wd265], a ld [wd265], a
xor a xor a
ld [hl], a ld [hl], a
call Function3df12 call GetPartymonItem
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3ca12 jr z, .consume_item
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
jr z, .asm_3ca14 jr z, .skip_consumption
call Function3df1f call GetOTPartymonItem
.asm_3ca12 .consume_item
xor a xor a
ld [hl], a ld [hl], a
.asm_3ca14 .skip_consumption
call GetItemName call GetItemName
call SwitchTurnCore call SwitchTurnCore
call ItemRecoveryAnim call ItemRecoveryAnim
@ -1537,27 +1542,28 @@ Function3c93c: ; 3c93c
jp StdBattleTextBox jp StdBattleTextBox
; 3ca26 ; 3ca26
Function3ca26: ; 3ca26 HandleFutureSight: ; 3ca26
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3ca38 jr z, .enemy_first
call SetPlayerTurn call SetPlayerTurn
call .asm_3ca41 call .do_it
call SetEnemyTurn call SetEnemyTurn
jp .asm_3ca41 jp .do_it
.asm_3ca38 .enemy_first
call SetEnemyTurn call SetEnemyTurn
call .asm_3ca41 call .do_it
call SetPlayerTurn call SetPlayerTurn
.asm_3ca41
ld hl, wc71d .do_it
ld hl, wPlayerFutureSightCount
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3ca4c jr z, .okay
ld hl, wc71e ld hl, wEnemyFutureSightCount
.asm_3ca4c .okay
ld a, [hl] ld a, [hl]
and a and a
ret z ret z
@ -3402,7 +3408,7 @@ ResetEnemyBattleVars: ; 3d557
dec a dec a
ld [wc6e6], a ld [wc6e6], a
xor a xor a
ld [wc730], a ld [wPlayerWrapCount], a
hlcoord 18, 0 hlcoord 18, 0
ld a, $8 ld a, $8
call Function3d490 call Function3d490
@ -3809,8 +3815,8 @@ endr
ld [wEnemyRageCounter], a ld [wEnemyRageCounter], a
ld [EnemyDisabledMove], a ld [EnemyDisabledMove], a
ld [wc6fa], a ld [wc6fa], a
ld [wc730], a ld [wPlayerWrapCount], a
ld [wc731], a ld [wEnemyWrapCount], a
ld [EnemyTurnsTaken], a ld [EnemyTurnsTaken], a
ld hl, PlayerSubStatus5 ld hl, PlayerSubStatus5
res SUBSTATUS_CANT_RUN, [hl] res SUBSTATUS_CANT_RUN, [hl]
@ -3907,7 +3913,7 @@ TryToRunAwayFromBattle: ; 3d8b3
bit SUBSTATUS_CANT_RUN, a bit SUBSTATUS_CANT_RUN, a
jp nz, .cant_escape jp nz, .cant_escape
ld a, [wc730] ld a, [wPlayerWrapCount]
and a and a
jp nz, .cant_escape jp nz, .cant_escape
@ -4258,7 +4264,7 @@ SendOutPlayerMon: ; 3db5f
call CheckAmuletCoin call CheckAmuletCoin
call Function3ee27 call Function3ee27
xor a xor a
ld [wc731], a ld [wEnemyWrapCount], a
call SetPlayerTurn call SetPlayerTurn
xor a xor a
ld [wcfca], a ld [wcfca], a
@ -4312,8 +4318,8 @@ endr
ld [wPlayerRageCounter], a ld [wPlayerRageCounter], a
ld [DisabledMove], a ld [DisabledMove], a
ld [wc6fe], a ld [wc6fe], a
ld [wc731], a ld [wEnemyWrapCount], a
ld [wc730], a ld [wPlayerWrapCount], a
ld [PlayerTurnsTaken], a ld [PlayerTurnsTaken], a
ld hl, EnemySubStatus5 ld hl, EnemySubStatus5
res SUBSTATUS_CANT_RUN, [hl] res SUBSTATUS_CANT_RUN, [hl]
@ -4462,31 +4468,31 @@ Function3dce6: ; 3dce6
ret ret
; 3dcf9 ; 3dcf9
Function3dcf9: ; 3dcf9 HandleHealingItems: ; 3dcf9
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .player_1 jr z, .player_1
call SetPlayerTurn call SetPlayerTurn
call Function3dd2f call HandleHPHealingItem
call UseHeldStatusHealingItem call UseHeldStatusHealingItem
call Function3de51 call HandleStatusHealingItem
call SetEnemyTurn call SetEnemyTurn
call Function3dd2f call HandleHPHealingItem
call UseHeldStatusHealingItem call UseHeldStatusHealingItem
jp Function3de51 jp HandleStatusHealingItem
.player_1 .player_1
call SetEnemyTurn call SetEnemyTurn
call Function3dd2f call HandleHPHealingItem
call UseHeldStatusHealingItem call UseHeldStatusHealingItem
call Function3de51 call HandleStatusHealingItem
call SetPlayerTurn call SetPlayerTurn
call Function3dd2f call HandleHPHealingItem
call UseHeldStatusHealingItem call UseHeldStatusHealingItem
jp Function3de51 jp HandleStatusHealingItem
; 3dd2f ; 3dd2f
Function3dd2f: ; 3dd2f HandleHPHealingItem: ; 3dd2f
callab GetOpponentItem callab GetOpponentItem
ld a, b ld a, b
cp $1 cp $1
@ -4495,11 +4501,11 @@ Function3dd2f: ; 3dd2f
ld hl, EnemyMonMaxHP ld hl, EnemyMonMaxHP
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3dd4a jr z, .go
ld de, BattleMonHP + 1 ld de, BattleMonHP + 1
ld hl, BattleMonMaxHP ld hl, BattleMonMaxHP
.asm_3dd4a .go
push bc push bc
ld a, [de] ld a, [de]
ld [wd1ec], a ld [wd1ec], a
@ -4515,17 +4521,17 @@ Function3dd2f: ; 3dd2f
cp [hl] cp [hl]
ld a, c ld a, c
pop bc pop bc
jr z, .asm_3dd62 jr z, .equal
jr c, .asm_3dd66 jr c, .less
ret ret
.asm_3dd62 .equal
inc hl inc hl
cp [hl] cp [hl]
dec hl dec hl
ret nc ret nc
.asm_3dd66 .less
call ItemRecoveryAnim call ItemRecoveryAnim
ld a, [hli] ld a, [hli]
ld [Buffer2], a ld [Buffer2], a
@ -4544,13 +4550,13 @@ Function3dd2f: ; 3dd2f
cp c cp c
ld a, [hl] ld a, [hl]
sbc b sbc b
jr nc, .asm_3dd8d jr nc, .okay
ld a, [hli] ld a, [hli]
ld [wd1ef], a ld [wd1ef], a
ld a, [hl] ld a, [hl]
ld [wd1ee], a ld [wd1ee], a
.asm_3dd8d .okay
ld a, [wd1ef] ld a, [wd1ef]
ld [de], a ld [de], a
inc de inc de
@ -4560,10 +4566,10 @@ Function3dd2f: ; 3dd2f
ld [wd10a], a ld [wd10a], a
and a and a
hlcoord 2, 2 hlcoord 2, 2
jr z, .asm_3dda4 jr z, .got_hp_bar_coords
hlcoord 10, 9 hlcoord 10, 9
.asm_3dda4 .got_hp_bar_coords
ld [wd10a], a ld [wd10a], a
predef AnimateHPBar predef AnimateHPBar
UseOpponentItem: UseOpponentItem:
@ -4627,7 +4633,7 @@ UseHeldStatusHealingItem: ; 3dde9
and [hl] and [hl]
res SUBSTATUS_NIGHTMARE, [hl] res SUBSTATUS_NIGHTMARE, [hl]
ld a, b ld a, b
cp 1 << PSN | 1 << FRZ | 1 << BRN | SLP | 1 << PAR cp ALL_STATUS
jr nz, .skip_confuse jr nz, .skip_confuse
ld a, BATTLE_VARS_SUBSTATUS3_OPP ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVarAddr call GetBattleVarAddr
@ -4658,12 +4664,12 @@ UseHeldStatusHealingItem: ; 3dde9
db HELD_HEAL_BURN, 1 << BRN db HELD_HEAL_BURN, 1 << BRN
db HELD_HEAL_SLEEP, SLP db HELD_HEAL_SLEEP, SLP
db HELD_HEAL_PARALYZE, 1 << PAR db HELD_HEAL_PARALYZE, 1 << PAR
db HELD_HEAL_STATUS, 1 << PSN | 1 << FRZ | 1 << BRN | SLP | 1 << PAR db HELD_HEAL_STATUS, ALL_STATUS
db $ff db $ff
; 3de51 ; 3de51
Function3de51: ; 3de51 HandleStatusHealingItem: ; 3de51
ld a, BATTLE_VARS_SUBSTATUS3_OPP ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar call GetBattleVar
bit SUBSTATUS_CONFUSED, a bit SUBSTATUS_CONFUSED, a
@ -4671,11 +4677,11 @@ Function3de51: ; 3de51
callab GetOpponentItem callab GetOpponentItem
ld a, b ld a, b
cp HELD_HEAL_CONFUSION cp HELD_HEAL_CONFUSION
jr z, .asm_3de67 jr z, .heal_status
cp HELD_HEAL_STATUS cp HELD_HEAL_STATUS
ret nz ret nz
.asm_3de67 .heal_status
ld a, [hl] ld a, [hl]
ld [wd265], a ld [wd265], a
ld a, BATTLE_VARS_SUBSTATUS3_OPP ld a, BATTLE_VARS_SUBSTATUS3_OPP
@ -4687,8 +4693,8 @@ Function3de51: ; 3de51
call StdBattleTextBox call StdBattleTextBox
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr nz, .asm_3de90 jr nz, .do_partymon
call Function3df1f call GetOTPartymonItem
xor a xor a
ld [bc], a ld [bc], a
ld a, [wBattleMode] ld a, [wBattleMode]
@ -4697,36 +4703,37 @@ Function3de51: ; 3de51
ld [hl], $0 ld [hl], $0
ret ret
.asm_3de90 .do_partymon
call Function3df12 call GetPartymonItem
xor a xor a
ld [bc], a ld [bc], a
ld [hl], a ld [hl], a
ret ret
; 3de97 ; 3de97
Function3de97: ; 3de97 HandleStatBoostingHeldItems: ; 3de97
; The effects handled here are not used in-game.
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .player_1 jr z, .player_1
call Function3dea9 call .DoEnemy
jp Function3deb1 jp .DoPlayer
.player_1 .player_1
call Function3deb1 call .DoPlayer
jp Function3dea9 jp .DoEnemy
; 3dea9 ; 3dea9
Function3dea9: ; 3dea9 .DoEnemy: ; 3dea9
call Function3df12 call GetPartymonItem
ld a, $0 ld a, $0
jp Function3deb6 jp .HandleItem
; 3deb1 ; 3deb1
Function3deb1: ; 3deb1 .DoPlayer: ; 3deb1
call Function3df1f call GetOTPartymonItem
ld a, $1 ld a, $1
Function3deb6: ; 3deb6 .HandleItem: ; 3deb6
ld [hBattleTurn], a ld [hBattleTurn], a
ld d, h ld d, h
ld e, l ld e, l
@ -4735,16 +4742,16 @@ Function3deb6: ; 3deb6
ld a, [bc] ld a, [bc]
ld b, a ld b, a
callab GetItem callab GetItem
ld hl, .data_3defc ld hl, .StatUpItems
.asm_3dec7 .loop
ld a, [hli] ld a, [hli]
cp $ff cp $ff
jr z, .asm_3def9 jr z, .finish
rept 2 rept 2
inc hl inc hl
endr endr
cp b cp b
jr nz, .asm_3dec7 jr nz, .loop
pop bc pop bc
ld a, [bc] ld a, [bc]
ld [wd265], a ld [wd265], a
@ -4771,13 +4778,13 @@ endr
callab BattleCommand_StatUpMessage callab BattleCommand_StatUpMessage
ret ret
.asm_3def9 .finish
pop bc pop bc
pop de pop de
ret ret
; 3defc ; 3defc
.data_3defc .StatUpItems
dbw HELD_ATTACK_UP, BattleCommand_AttackUp dbw HELD_ATTACK_UP, BattleCommand_AttackUp
dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp
dbw HELD_SPEED_UP, BattleCommand_SpeedUp dbw HELD_SPEED_UP, BattleCommand_SpeedUp
@ -4789,7 +4796,7 @@ endr
; 3df12 ; 3df12
Function3df12: ; 3df12 GetPartymonItem: ; 3df12
ld hl, PartyMon1Item ld hl, PartyMon1Item
ld a, [CurBattleMon] ld a, [CurBattleMon]
call GetPartyLocation call GetPartyLocation
@ -4797,7 +4804,7 @@ Function3df12: ; 3df12
ret ret
; 3df1f ; 3df1f
Function3df1f: ; 3df1f GetOTPartymonItem: ; 3df1f
ld hl, OTPartyMon1Item ld hl, OTPartyMon1Item
ld a, [CurOTMon] ld a, [CurOTMon]
call GetPartyLocation call GetPartyLocation
@ -4805,7 +4812,7 @@ Function3df1f: ; 3df1f
ret ret
; 3df2c ; 3df2c
Function3df2c: ; 3df2c UpdateBattleHUDs: ; 3df2c
push hl push hl
push de push de
push bc push bc
@ -5298,7 +5305,7 @@ Function3e234: ; 3e234
ld a, $1 ld a, $1
ld [MenuSelection2], a ld [MenuSelection2], a
call ExitMenu call ExitMenu
call Function3df2c call UpdateBattleHUDs
call WaitBGMap call WaitBGMap
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
call ResetTextRelatedRAM call ResetTextRelatedRAM
@ -5421,7 +5428,7 @@ Function3e358: ; 3e358
jp Function3e299 jp Function3e299
.asm_3e36b .asm_3e36b
ld a, [wc730] ld a, [wPlayerWrapCount]
and a and a
jr nz, .asm_3e378 jr nz, .asm_3e378
ld a, [EnemySubStatus5] ld a, [EnemySubStatus5]

View File

@ -7247,13 +7247,13 @@ BattleCommand_TrapTarget: ; 36c2d
ld a, [AttackMissed] ld a, [AttackMissed]
and a and a
ret nz ret nz
ld hl, wc731 ld hl, wEnemyWrapCount
ld de, wc72f ld de, wEnemyTrappingMove
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_36c43 jr z, .asm_36c43
ld hl, wc730 ld hl, wPlayerWrapCount
ld de, wc72e ld de, wPlayerTrappingMove
.asm_36c43 .asm_36c43
ld a, [hl] ld a, [hl]
@ -7494,7 +7494,7 @@ endr
cp HELD_HEAL_CONFUSION cp HELD_HEAL_CONFUSION
ret nz ret nz
.asm_36db0 .asm_36db0
ld hl, Function3de51 ld hl, HandleStatusHealingItem
jp CallBattleCore jp CallBattleCore
; 36db6 ; 36db6
@ -7674,13 +7674,13 @@ endr
call GetBattleVarAddr call GetBattleVarAddr
set SUBSTATUS_SUBSTITUTE, [hl] set SUBSTATUS_SUBSTITUTE, [hl]
ld hl, wc730 ld hl, wPlayerWrapCount
ld de, wc72e ld de, wPlayerTrappingMove
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .player jr z, .player
ld hl, wc731 ld hl, wEnemyWrapCount
ld de, wc72f ld de, wEnemyTrappingMove
.player .player
xor a xor a
@ -9077,8 +9077,8 @@ ResetBatonPassStatus: ; 37ab1
ld [hl], 0 ld [hl], 0
xor a xor a
ld [wc730], a ld [wPlayerWrapCount], a
ld [wc731], a ld [wEnemyWrapCount], a
ret ret
; 37ae9 ; 37ae9
@ -9181,12 +9181,12 @@ BattleCommand_ClearHazards: ; 37b39
.asm_37b4a .asm_37b4a
ld hl, PlayerScreens ld hl, PlayerScreens
ld de, wc730 ld de, wPlayerWrapCount
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_37b5b ; 37b53 $6 jr z, .asm_37b5b ; 37b53 $6
ld hl, EnemyScreens ld hl, EnemyScreens
ld de, wc731 ld de, wEnemyWrapCount
.asm_37b5b .asm_37b5b
bit SCREENS_SPIKES, [hl] bit SCREENS_SPIKES, [hl]
jr z, .asm_37b69 ; 37b5d $a jr z, .asm_37b69 ; 37b5d $a
@ -9526,12 +9526,12 @@ BattleCommand_SkipSunCharge: ; 37d02
BattleCommand_CheckFutureSight: ; 37d0d BattleCommand_CheckFutureSight: ; 37d0d
; checkfuturesight ; checkfuturesight
ld hl, wc71d ld hl, wPlayerFutureSightCount
ld de, wc727 ld de, wc727
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .ok jr z, .ok
ld hl, wc71e ld hl, wEnemyFutureSightCount
ld de, wc729 ld de, wc729
.ok .ok
@ -9566,11 +9566,11 @@ BattleCommand_FutureSight: ; 37d34
call GetBattleVarAddr call GetBattleVarAddr
ld [hl], b ld [hl], b
.asm_37d4b .asm_37d4b
ld hl, wc71d ld hl, wPlayerFutureSightCount
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_37d56 ; 37d51 $3 jr z, .asm_37d56 ; 37d51 $3
ld hl, wc71e ld hl, wEnemyFutureSightCount
.asm_37d56 .asm_37d56
ld a, [hl] ld a, [hl]
and a and a

View File

@ -98,6 +98,8 @@ const_value SET 3
const PAR const PAR
const SLP ; 7 turns const SLP ; 7 turns
ALL_STATUS EQU (1 << PSN) + (1 << BRN) + (1 << FRZ) + (1 << PAR) + SLP
; substatus ; substatus
enum_start 7, -1 enum_start 7, -1
enum SUBSTATUS_IN_LOVE enum SUBSTATUS_IN_LOVE

View File

@ -219,7 +219,7 @@ NUM_SPRITEHEADER_FIELDS EQU const_value
const SPRITEMOVEDATA_SUDOWOODO const SPRITEMOVEDATA_SUDOWOODO
const SPRITEMOVEDATA_SMASHABLE_ROCK const SPRITEMOVEDATA_SMASHABLE_ROCK
const SPRITEMOVEDATA_STRENGTH_BOULDER const SPRITEMOVEDATA_STRENGTH_BOULDER
const SPRITEMOVEDATA_1A const SPRITEMOVEDATA_FOLLOWNOTEXACT
const SPRITEMOVEDATA_1B const SPRITEMOVEDATA_1B
const SPRITEMOVEDATA_1C const SPRITEMOVEDATA_1C
const SPRITEMOVEDATA_1D const SPRITEMOVEDATA_1D
@ -254,7 +254,7 @@ SPRITEMOVEDATA_FIELDS EQU 6
const SPRITEMOVEFN_FOLLOW const SPRITEMOVEFN_FOLLOW
const SPRITEMOVEFN_SCRIPTED const SPRITEMOVEFN_SCRIPTED
const SPRITEMOVEFN_STRENGTH const SPRITEMOVEFN_STRENGTH
const SPRITEMOVEFN_12 const SPRITEMOVEFN_FOLLOWNOTEXACT
const SPRITEMOVEFN_13 const SPRITEMOVEFN_13
const SPRITEMOVEFN_14 const SPRITEMOVEFN_14
const SPRITEMOVEFN_BIG_SNORLAX const SPRITEMOVEFN_BIG_SNORLAX

View File

@ -29,7 +29,7 @@ SpriteMovementData:: ; 4273
db SPRITEMOVEFN_STANDING, DOWN, $01, $0c, $00, $00 ; 17 db SPRITEMOVEFN_STANDING, DOWN, $01, $0c, $00, $00 ; 17
db SPRITEMOVEFN_STANDING, DOWN, $01, $2e, $10, $00 ; 18 db SPRITEMOVEFN_STANDING, DOWN, $01, $2e, $10, $00 ; 18
db SPRITEMOVEFN_STRENGTH, DOWN, $01, $2e, $00, $40 ; 19 db SPRITEMOVEFN_STRENGTH, DOWN, $01, $2e, $00, $40 ; 19
db SPRITEMOVEFN_12, DOWN, $01, $02, $00, $00 ; 1a db SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, $01, $02, $00, $00 ; 1a
db SPRITEMOVEFN_13, DOWN, $00, $8e, $01, $00 ; 1b db SPRITEMOVEFN_13, DOWN, $00, $8e, $01, $00 ; 1b
db SPRITEMOVEFN_14, DOWN, $08, $8e, $02, $00 ; 1c db SPRITEMOVEFN_14, DOWN, $08, $8e, $02, $00 ; 1c
db SPRITEMOVEFN_17, DOWN, $00, $82, $00, $00 ; 1d db SPRITEMOVEFN_17, DOWN, $00, $82, $00, $00 ; 1d
@ -963,7 +963,7 @@ Function47dd: ; 47dd
dw .Follow ; 0f dw .Follow ; 0f
dw .Script ; 10 dw .Script ; 10
dw .Strength ; 11 dw .Strength ; 11
dw .Movement12 ; 12 dw .FollowNotExact ; 12
dw .Movement13 ; 13 dw .Movement13 ; 13
dw .Movement14 ; 14 dw .Movement14 ; 14
dw .MovementBigStanding ; 15 dw .MovementBigStanding ; 15
@ -1145,7 +1145,7 @@ Function47dd: ; 47dd
ret ret
; 48ff ; 48ff
.Movement12: ; 48ff .FollowNotExact: ; 48ff
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]

View File

@ -3154,38 +3154,3 @@ String_be657: db "Dad@"
String_be65b: db "Sister@" String_be65b: db "Sister@"
String_be662: db "Brother@" String_be662: db "Brother@"
TalkToTrainerScript:: ; 0xbe66a
faceplayer
trainerstatus $2
iftrue AlreadyBeatenTrainerScript
loadtrainerdata
playrammusic
jump StartBattleWithMapTrainerScript
; 0xbe675
SeenByTrainerScript:: ; 0xbe675
loadtrainerdata
playrammusic
showemote EMOTE_SHOCK, LAST_TALKED, 30
callasm Function831e
applymovement2 MovementBuffer
writepersonxy LAST_TALKED
faceperson PLAYER, LAST_TALKED
jump StartBattleWithMapTrainerScript
; 0xbe68a
StartBattleWithMapTrainerScript: ; 0xbe68a
loadfont
trainertext $0
closetext
loadmovesprites
loadtrainerdata
startbattle
returnafterbattle
trainerstatus 1
loadvar wd04d, -1
AlreadyBeatenTrainerScript:
scripttalkafter
; 0xbe699

View File

@ -1360,7 +1360,7 @@ Script_writepersonxy: ; 0x9735b
ld a, [hLastTalked] ld a, [hLastTalked]
.ok .ok
ld b, a ld b, a
callba Function80a1 callba WritePersonXY
ret ret
; 0x9736f ; 0x9736f
@ -1376,7 +1376,7 @@ Script_follownotexact: ; 0x9736f
call GetScriptByte call GetScriptByte
call GetScriptPerson call GetScriptPerson
ld c, a ld c, a
callba Function839e callba FollowNotExact
ret ret
; 0x97384 ; 0x97384
@ -1546,7 +1546,7 @@ Script_catchtutorial: ; 0x97447
call GetScriptByte call GetScriptByte
ld [BattleType], a ld [BattleType], a
call BufferScreen call BufferScreen
callba Function4e554 callba CatchTutorial
jp Script_reloadmap jp Script_reloadmap
; 0x97459 ; 0x97459

View File

@ -724,7 +724,7 @@ endr
jp TossItem jp TossItem
.used_park_ball .used_park_ball
ld hl, wdc79 ld hl, wParkBallsRemaining
dec [hl] dec [hl]
ret ret
; ec0a ; ec0a

666
main.asm
View File

@ -3267,10 +3267,11 @@ PlayerSpawn_ConvertCoords: ; 808f
; 80a1 ; 80a1
Function80a1:: ; 80a1 WritePersonXY:: ; 80a1
ld a, b ld a, b
call CheckObjectVisibility call CheckObjectVisibility
ret c ret c
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]
@ -3685,7 +3686,7 @@ Function830d: ; 830d
ret ret
; 831e ; 831e
Function831e: ; 831e TrainerWalkToPlayer: ; 831e
ld a, [hLastTalked] ld a, [hLastTalked]
call Function1b1e call Function1b1e
ld a, $3e ld a, $3e
@ -3770,7 +3771,7 @@ Function8388: ; 8388
; 839e ; 839e
Function839e:: ; 839e FollowNotExact:: ; 839e
push bc push bc
ld a, c ld a, c
call CheckObjectVisibility call CheckObjectVisibility
@ -3778,9 +3779,12 @@ Function839e:: ; 839e
ld e, c ld e, c
pop bc pop bc
ret c ret c
ld a, b ld a, b
call CheckObjectVisibility call CheckObjectVisibility
ret c ret c
; Person 2 is now in bc, person 1 is now in de
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -3788,33 +3792,34 @@ Function839e:: ; 839e
add hl, bc add hl, bc
ld c, [hl] ld c, [hl]
ld b, a ld b, a
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
add hl, de add hl, de
ld a, [hl] ld a, [hl]
cp b cp b
jr z, .asm_83c7 jr z, .same_x
jr c, .asm_83c4 jr c, .to_the_left
inc b inc b
jr .asm_83d5 jr .continue
.asm_83c4 .to_the_left
dec b dec b
jr .asm_83d5 jr .continue
.asm_83c7 .same_x
ld hl, OBJECT_MAP_Y ld hl, OBJECT_MAP_Y
add hl, de add hl, de
ld a, [hl] ld a, [hl]
cp c cp c
jr z, .asm_83d5 jr z, .continue
jr c, .asm_83d4 jr c, .below
inc c inc c
jr .asm_83d5 jr .continue
.asm_83d4 .below
dec c dec c
.asm_83d5 .continue
ld hl, OBJECT_MAP_X ld hl, OBJECT_MAP_X
add hl, de add hl, de
ld [hl], b ld [hl], b
@ -3847,7 +3852,7 @@ Function839e:: ; 839e
ld [hl], a ld [hl], a
ld hl, OBJECT_MOVEMENTTYPE ld hl, OBJECT_MOVEMENTTYPE
add hl, de add hl, de
ld [hl], SPRITEMOVEDATA_1A ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
ld hl, OBJECT_09 ld hl, OBJECT_09
add hl, de add hl, de
ld [hl], $0 ld [hl], $0
@ -9760,7 +9765,7 @@ Functione41c: ; e41c (3:641c)
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
ld hl, UnknownText_0xe43a ld hl, UnknownText_0xe43a
call PrintText call PrintText
pop af pop af
@ -10477,7 +10482,7 @@ Function116c1: ; 116c1
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
ld a, [hMapAnims] ld a, [hMapAnims]
push af push af
xor a xor a
@ -13919,7 +13924,7 @@ Function12f5b: ; 12f5b
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
call LoadFontsBattleExtra call LoadFontsBattleExtra
call Function12f73 call Function12f73
pop bc pop bc
@ -13983,7 +13988,7 @@ ManagePokemonMoves: ; 12fba
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
call MoveScreenLoop call MoveScreenLoop
pop af pop af
ld [Options], a ld [Options], a
@ -14781,10 +14786,10 @@ Elevator_GetCurrentFloorText: ; 13512
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
hlcoord 0, 0 hlcoord 0, 0
ld b, $4 ld b, 4
ld c, $8 ld c, 8
call TextBox call TextBox
hlcoord 1, 2 hlcoord 1, 2
ld de, Elevator_CurrentFloorText ld de, Elevator_CurrentFloorText
@ -14916,7 +14921,7 @@ Special_GiveParkBalls: ; 135db
xor a xor a
ld [wContestMon], a ld [wContestMon], a
ld a, 20 ld a, 20
ld [wdc79], a ld [wParkBallsRemaining], a
callba StartBugContestTimer callba StartBugContestTimer
ret ret
; 135eb ; 135eb
@ -14926,7 +14931,7 @@ BugCatchingContestBattleScript:: ; 0x135eb
battlecheck battlecheck
startbattle startbattle
returnafterbattle returnafterbattle
copybytetovar wdc79 copybytetovar wParkBallsRemaining
iffalse BugCatchingContestOutOfBallsScript iffalse BugCatchingContestOutOfBallsScript
end end
; 0x135f8 ; 0x135f8
@ -16605,7 +16610,7 @@ LOG_OFF EQU 6
PC_DisplayTextWaitMenu: ; 157bb PC_DisplayTextWaitMenu: ; 157bb
ld a, [Options] ld a, [Options]
push af push af
set 4, a set NO_TEXT_SCROLL, a
ld [Options], a ld [Options], a
call MenuTextBox call MenuTextBox
pop af pop af
@ -18989,7 +18994,7 @@ Function16be4: ; 16be4
ld [hInMenu], a ld [hInMenu], a
ld a, [Options] ld a, [Options]
push af push af
set 4, a set NO_TEXT_SCROLL, a
ld [Options], a ld [Options], a
call WhiteBGMap call WhiteBGMap
call ClearTileMap call ClearTileMap
@ -20310,7 +20315,7 @@ Function20021: ; 20021 (8:4021)
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
call LoadPartyMenuDataHeader call LoadPartyMenuDataHeader
call ClearTileMap call ClearTileMap
ld hl, UnknownText_0x2004c ld hl, UnknownText_0x2004c
@ -20978,7 +20983,7 @@ Function245f1: ; 245f1
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
call Function247f0 call Function247f0
call Function2488b call Function2488b
call Function248b8 call Function248b8
@ -21868,26 +21873,27 @@ ShowMoney_TerminatorString: ; 24b8e
; 24b8f ; 24b8f
Function24b8f: ; 24b8f Function24b8f: ; 24b8f
; unreferenced, related to safari?
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af
set 4, [hl] set NO_TEXT_SCROLL, [hl]
hlcoord 0, 0 hlcoord 0, 0
ld b, $3 ld b, 3
ld c, $7 ld c, 7
call TextBox call TextBox
hlcoord 1, 1 hlcoord 1, 1
ld de, wdc7a ld de, wSafariTimeRemaining
lb bc, 2, 3 lb bc, 2, 3
call PrintNum call PrintNum
hlcoord 4, 1 hlcoord 4, 1
ld de, String24bcf ld de, .slash_500
call PlaceString call PlaceString
hlcoord 1, 3 hlcoord 1, 3
ld de, String24bd4 ld de, .booru_ko
call PlaceString call PlaceString
hlcoord 5, 3 hlcoord 5, 3
ld de, wdc79 ld de, wSafariBallsRemaining
lb bc, 1, 2 lb bc, 1, 2
call PrintNum call PrintNum
pop af pop af
@ -21895,9 +21901,9 @@ Function24b8f: ; 24b8f
ret ret
; 24bcf ; 24bcf
String24bcf: ; 24bcf .slash_500: ; 24bcf
db "/500@" db "/500@"
String24bd4: ; 24bd4 .booru_ko: ; 24bd4
db "ボール こ@" db "ボール こ@"
; 24bdc ; 24bdc
@ -21919,7 +21925,7 @@ Function24be7: ; 24be7
ld de, String24c52 ld de, String24c52
call PlaceString call PlaceString
hlcoord 8, 5 hlcoord 8, 5
ld de, wdc79 ld de, wSafariBallsRemaining
lb bc, PRINTNUM_RIGHTALIGN | 1, 2 lb bc, PRINTNUM_RIGHTALIGN | 1, 2
call PrintNum call PrintNum
hlcoord 1, 1 hlcoord 1, 1
@ -22459,7 +22465,7 @@ Strings24f5f: ; 24f5f
Function24f7c: ; 24f7c Function24f7c: ; 24f7c
hlcoord 17, 13 hlcoord 17, 13
ld de, wdc79 ld de, wSafariBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2 lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum call PrintNum
ret ret
@ -22484,14 +22490,14 @@ MenuData_0x24f91: ; 24f91
Strings24f9a: ; 24f9a Strings24f9a: ; 24f9a
db "FIGHT@" db "FIGHT@"
db $4a, "@" db "<PKMN>", "@"
db "PARKBALL× @" db "PARKBALL× @"
db "RUN@" db "RUN@"
; 24fb2 ; 24fb2
Function24fb2: ; 24fb2 Function24fb2: ; 24fb2
hlcoord 13, 16 hlcoord 13, 16
ld de, wdc79 ld de, wParkBallsRemaining
lb bc, PRINTNUM_LEADINGZEROS | 1, 2 lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum call PrintNum
ret ret
@ -27020,16 +27026,16 @@ Function28b87: ; 28b87
ld a, [wd003] ld a, [wd003]
call GetPartyLocation call GetPartyLocation
ld a, [hli] ld a, [hli]
ld [wc731], a ld [wEnemyWrapCount], a
ld a, [hl] ld a, [hl]
ld [wPlayerCharging], a ld [wPlayerCharging], a
ld hl, OTPartyMon1DVs ld hl, OTPartyMon1DVs
ld a, [wd003] ld a, [wd003]
call GetPartyLocation call GetPartyLocation
ld a, [hli] ld a, [hli]
ld [wc72f], a ld [wEnemyTrappingMove], a
ld a, [hl] ld a, [hl]
ld [wc730], a ld [wPlayerWrapCount], a
ld a, [wd003] ld a, [wd003]
ld hl, OTPartyMon1Species ld hl, OTPartyMon1Species
call GetPartyLocation call GetPartyLocation
@ -27400,7 +27406,7 @@ Function28fdb: ; 28fdb
ld de, VTiles0 ld de, VTiles0
call Function29491 call Function29491
ld a, [wc702] ld a, [wc702]
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles0 tile $31 ld de, VTiles0 tile $31
call Function29491 call Function29491
ld a, [wc6d0] ld a, [wc6d0]
@ -28011,9 +28017,9 @@ Function29461: ; 29461
call Function29549 call Function29549
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc72f] ld a, [wEnemyTrappingMove]
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wc730] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, $1a
call GetSGBLayout call GetSGBLayout
@ -28153,7 +28159,7 @@ Function29549: ; 29549
ld a, [wEnemyCharging] ld a, [wEnemyCharging]
ld de, wc724 ld de, wc724
call Function295f6 call Function295f6
ld de, wc731 ld de, wEnemyWrapCount
call Function29611 call Function29611
call Function295d8 call Function295d8
ret ret
@ -41188,7 +41194,7 @@ FlagPredef: ; 4d7c1
Function4d7fd: ; 4d7fd Function4d7fd: ; 4d7fd
ld a, [wc702] ld a, [wc702]
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles2 ld de, VTiles2
push de push de
push af push af
@ -41209,9 +41215,9 @@ Function4d81e: ; 4d81e
callba Function29549 callba Function29549
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc72f] ld a, [wEnemyTrappingMove]
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wc730] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, $1a
call GetSGBLayout call GetSGBLayout
@ -43043,11 +43049,11 @@ CheckFaintedFrzSlp: ; 4e53f
; 4e554 ; 4e554
Function4e554:: ; 4e554 CatchTutorial:: ; 4e554
ld a, [BattleType] ld a, [BattleType]
dec a dec a
ld c, a ld c, a
ld hl, Jumptable_4e564 ld hl, .jumptable
ld b, 0 ld b, 0
rept 2 rept 2
add hl, bc add hl, bc
@ -43058,23 +43064,24 @@ endr
jp [hl] jp [hl]
; 4e564 ; 4e564
Jumptable_4e564: ; 4e564 (13:6564) .jumptable: ; 4e564 (13:6564)
dw Function4e56a dw .DudeTutorial
dw Function4e56a dw .DudeTutorial
dw Function4e56a dw .DudeTutorial
Function4e56a: ; 4e56a (13:656a) .DudeTutorial: ; 4e56a (13:656a)
; Back up your name to your Mom's name.
ld hl, PlayerName ld hl, PlayerName
ld de, MomsName ld de, MomsName
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
; Copy Dude's name to your name
ld hl, DudeString ld hl, .Dude
ld de, PlayerName ld de, PlayerName
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
call Function4e5b7 call .LoadDudeData
xor a xor a
ld [hJoyDown], a ld [hJoyDown], a
@ -43084,8 +43091,8 @@ Function4e56a: ; 4e56a (13:656a)
and $f8 and $f8
add $3 add $3
ld [Options], a ld [Options], a
ld hl, AutoInput_4e5df ld hl, .AutoInput
ld a, BANK(AutoInput_4e5df) ld a, BANK(.AutoInput)
call StartAutoInput call StartAutoInput
callab StartBattle callab StartBattle
call StopAutoInput call StopAutoInput
@ -43098,13 +43105,13 @@ Function4e56a: ; 4e56a (13:656a)
call CopyBytes call CopyBytes
ret ret
Function4e5b7: ; 4e5b7 (13:65b7) .LoadDudeData: ; 4e5b7 (13:65b7)
ld hl, OTPartyMon1 ld hl, OTPartyMon1
ld [hl], $1 ld [hl], BULBASAUR
inc hl inc hl
ld [hl], $12 ld [hl], POTION
inc hl inc hl
ld [hl], $1 ld [hl], POUND
inc hl inc hl
ld [hl], $ff ld [hl], $ff
ld hl, OTPartyMon1Exp + 2 ld hl, OTPartyMon1Exp + 2
@ -43122,474 +43129,17 @@ endr
ret ret
; 4e5da (13:65da) ; 4e5da (13:65da)
DudeString: ; 4e5da .Dude: ; 4e5da
db "DUDE@" db "DUDE@"
; 4e5df ; 4e5df
AutoInput_4e5df: ; 4e5df .AutoInput: ; 4e5df
db NO_INPUT, $ff ; end db NO_INPUT, $ff ; end
; 4e5e1 ; 4e5e1
INCLUDE "engine/evolution_animation.asm"
EvolutionAnimation: ; 4e5e1 Function4e929: ; mobile function
push hl
push de
push bc
ld a, [CurSpecies]
push af
ld a, [rOBP0]
push af
ld a, [BaseDexNo]
push af
call _EvolutionAnimation
pop af
ld [BaseDexNo], a
pop af
ld [rOBP0], a
pop af
ld [CurSpecies], a
pop bc
pop de
pop hl
ld a, [wd1ed]
and a
ret z
scf
ret
; 4e607
_EvolutionAnimation: ; 4e607
ld a, $e4
ld [rOBP0], a
ld de, MUSIC_NONE
call PlayMusic
callba Function8cf53
ld de, EvolutionGFX
ld hl, VTiles0
lb bc, BANK(EvolutionGFX), 8
call Request2bpp
xor a
ld [Danger], a
call WaitBGMap
xor a
ld [hBGMapMode], a
ld a, [Buffer1]
ld [PlayerHPPal], a
ld c, $0
call Function4e703
ld a, [Buffer1]
ld [CurPartySpecies], a
ld [CurSpecies], a
call Function4e708
ld de, VTiles2
ld hl, VTiles2 tile $31
ld bc, $31
call Request2bpp
ld a, $31
ld [wd1ec], a
call Function4e755
ld a, [Buffer2]
ld [CurPartySpecies], a
ld [CurSpecies], a
call Function4e711
ld a, [Buffer1]
ld [CurPartySpecies], a
ld [CurSpecies], a
ld a, $1
ld [hBGMapMode], a
call Function4e794
jr c, .asm_4e67c
ld a, [Buffer1]
call PlayCry
.asm_4e67c
ld de, MUSIC_EVOLUTION
call PlayMusic
ld c, 80
call DelayFrames
ld c, $1
call Function4e703
call Function4e726
jr c, .asm_4e6df
ld a, $cf
ld [wd1ec], a
call Function4e755
xor a
ld [wd1ed], a
ld a, [Buffer2]
ld [PlayerHPPal], a
ld c, $0
call Function4e703
call Function4e7a6
callba Function8cf53
call Function4e794
jr c, .asm_4e6de
ld a, [wc2c6]
push af
ld a, $1
ld [wc2c6], a
ld a, [CurPartySpecies]
push af
ld a, [PlayerHPPal]
ld [CurPartySpecies], a
hlcoord 7, 2
ld d, $0
ld e, ANIM_MON_EVOLVE
predef AnimateFrontpic
pop af
ld [CurPartySpecies], a
pop af
ld [wc2c6], a
ret
.asm_4e6de
ret
.asm_4e6df
ld a, $1
ld [wd1ed], a
ld a, [Buffer1]
ld [PlayerHPPal], a
ld c, $0
call Function4e703
call Function4e7a6
callba Function8cf53
call Function4e794
ret c
ld a, [PlayerHPPal]
call PlayCry
ret
; 4e703
Function4e703: ; 4e703
ld b, $b
jp GetSGBLayout
; 4e708
Function4e708: ; 4e708
call GetBaseData
hlcoord 7, 2
jp Function3786
; 4e711
Function4e711: ; 4e711
call GetBaseData
ld a, $1
ld [wc2c6], a
ld de, VTiles2
predef Function5108b
xor a
ld [wc2c6], a
ret
; 4e726
Function4e726: ; 4e726
call ClearJoypad
lb bc, 1, 14
.asm_4e72c
push bc
call Function4e779
pop bc
jr c, .asm_4e73f
push bc
call Function4e741
pop bc
inc b
rept 2
dec c
endr
jr nz, .asm_4e72c
and a
ret
.asm_4e73f
scf
ret
; 4e741
Function4e741: ; 4e741
.asm_4e741
ld a, $cf
ld [wd1ec], a
call Function4e755
ld a, $31
ld [wd1ec], a
call Function4e755
dec b
jr nz, .asm_4e741
ret
; 4e755
Function4e755: ; 4e755
push bc
xor a
ld [hBGMapMode], a
hlcoord 7, 2
lb bc, 7, 7
ld de, $d
.asm_4e762
push bc
.asm_4e763
ld a, [wd1ec]
add [hl]
ld [hli], a
dec c
jr nz, .asm_4e763
pop bc
add hl, de
dec b
jr nz, .asm_4e762
ld a, $1
ld [hBGMapMode], a
call WaitBGMap
pop bc
ret
; 4e779
Function4e779: ; 4e779
.asm_4e779
call DelayFrame
push bc
call JoyTextDelay
ld a, [hJoyDown]
pop bc
and B_BUTTON
jr nz, .asm_4e78c
.asm_4e787
dec c
jr nz, .asm_4e779
and a
ret
.asm_4e78c
ld a, [wd1e9]
and a
jr nz, .asm_4e787
scf
ret
; 4e794
Function4e794: ; 4e794
ld a, [CurPartyMon]
ld hl, PartyMon1Species
call GetPartyLocation
ld b, h
ld c, l
callba CheckFaintedFrzSlp
ret
; 4e7a6
Function4e7a6: ; 4e7a6
ld a, [wd1ed]
and a
ret nz
ld de, SFX_EVOLVED
call PlaySFX
ld hl, wJumptableIndex
ld a, [hl]
push af
ld [hl], $0
.asm_4e7b8
call Function4e7cf
jr nc, .asm_4e7c2
call Function4e80c
jr .asm_4e7b8
.asm_4e7c2
ld c, $20
.asm_4e7c4
call Function4e80c
dec c
jr nz, .asm_4e7c4
pop af
ld [wJumptableIndex], a
ret
; 4e7cf
Function4e7cf: ; 4e7cf
ld hl, wJumptableIndex
ld a, [hl]
cp $20
ret nc
ld d, a
inc [hl]
and $1
jr nz, .asm_4e7e6
ld e, $0
call Function4e7e8
ld e, $10
call Function4e7e8
.asm_4e7e6
scf
ret
; 4e7e8
Function4e7e8: ; 4e7e8
push de
ld de, $4858
ld a, $13
call Function3b2a
ld hl, $b
add hl, bc
ld a, [wJumptableIndex]
and $e
sla a
pop de
add e
ld [hl], a
ld hl, $3
add hl, bc
ld [hl], $0
ld hl, $c
add hl, bc
ld [hl], $10
ret
; 4e80c
Function4e80c: ; 4e80c
push bc
callab Function8cf69
ld a, [$ff9b]
and $e
srl a
rept 2
inc a
endr
and $7
ld b, a
ld hl, Sprites + 3
ld c, $28
.asm_4e823
ld a, [hl]
or b
ld [hli], a
rept 3
inc hl
endr
dec c
jr nz, .asm_4e823
pop bc
call DelayFrame
ret
; 4e831
EvolutionGFX:
INCBIN "gfx/evo/bubble_large.2bpp"
INCBIN "gfx/evo/bubble.2bpp"
Function4e881: ; 4e881
call WhiteBGMap
call ClearTileMap
call ClearSprites
call DisableLCD
call LoadStandardFont
call LoadFontsBattleExtra
ld hl, VBGMap0
ld bc, VBGMap1 - VBGMap0
ld a, " "
call ByteFill
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
call ByteFill
xor a
ld [hSCY], a
ld [hSCX], a
call EnableLCD
ld hl, UnknownText_0x4e8bd
call PrintText
call Function3200
call SetPalettes
ret
; 4e8bd
UnknownText_0x4e8bd: ; 0x4e8bd
; SAVING RECORD… DON'T TURN OFF!
text_jump UnknownText_0x1bd39e
db "@"
; 0x4e8c2
Function4e8c2: ; 4e8c2
call WhiteBGMap
call ClearTileMap
call ClearSprites
call DisableLCD
call LoadStandardFont
call LoadFontsBattleExtra
ld hl, VBGMap0
ld bc, VBGMap1 - VBGMap0
ld a, " "
call ByteFill
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
call ByteFill
ld hl, wd000
ld c, $40
.asm_4e8ee
ld a, -1
ld [hli], a
ld a, " "
ld [hli], a
dec c
jr nz, .asm_4e8ee
xor a
ld [hSCY], a
ld [hSCX], a
call EnableLCD
call Function3200
call SetPalettes
ret
; 4e906
Function4e906: ; 4e906
ld a, [rSVBK]
push af
ld a, $6
ld [rSVBK], a
ld hl, w6_d000
ld bc, w6_d400 - w6_d000
ld a, " "
call ByteFill
ld hl, VBGMap0
ld de, w6_d000
ld b, $0
ld c, $40
call Request2bpp
pop af
ld [rSVBK], a
ret
; 4e929
Function4e929: ; 4e929
ld h, b ld h, b
ld l, c ld l, c
call Function4e930 call Function4e930
@ -43601,35 +43151,35 @@ Function4e930: ; 4e930
ld a, [hli] ld a, [hli]
xor [hl] xor [hl]
ld c, a ld c, a
jr z, .asm_4e941 jr z, .skip_male_trainers
srl c srl c
srl c srl c
.asm_4e939 .male_trainer_loop
srl c srl c
ld a, c ld a, c
cp MaleTrainersEnd - MaleTrainers - 1 cp MaleTrainersEnd - MaleTrainers - 1
jr nc, .asm_4e939 jr nc, .male_trainer_loop
inc c inc c
.asm_4e941 .skip_male_trainers
ld a, [de] ld a, [de]
cp $1 cp $1
ld hl, MaleTrainers ld hl, MaleTrainers
jr nz, .asm_4e958 jr nz, .finished
ld hl, FemaleTrainers ld hl, FemaleTrainers
ld a, c ld a, c
and a and a
jr z, .asm_4e958 jr z, .finished
.asm_4e950 .female_trainer_loop
srl c srl c
ld a, c ld a, c
cp FemaleTrainersEnd - FemaleTrainers - 1 cp FemaleTrainersEnd - FemaleTrainers - 1
jr nc, .asm_4e950 jr nc, .female_trainer_loop
inc c inc c
.asm_4e958 .finished
ld b, $0 ld b, $0
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
@ -64133,6 +63683,42 @@ INCLUDE "engine/std_scripts.asm"
INCLUDE "engine/phone_scripts.asm" INCLUDE "engine/phone_scripts.asm"
TalkToTrainerScript:: ; 0xbe66a
faceplayer
trainerstatus CHECK_FLAG
iftrue AlreadyBeatenTrainerScript
loadtrainerdata
playrammusic
jump StartBattleWithMapTrainerScript
; 0xbe675
SeenByTrainerScript:: ; 0xbe675
loadtrainerdata
playrammusic
showemote EMOTE_SHOCK, LAST_TALKED, 30
callasm TrainerWalkToPlayer
applymovement2 MovementBuffer
writepersonxy LAST_TALKED
faceperson PLAYER, LAST_TALKED
jump StartBattleWithMapTrainerScript
; 0xbe68a
StartBattleWithMapTrainerScript: ; 0xbe68a
loadfont
trainertext $0
closetext
loadmovesprites
loadtrainerdata
startbattle
returnafterbattle
trainerstatus SET_FLAG
loadvar wd04d, -1
AlreadyBeatenTrainerScript:
scripttalkafter
; 0xbe699
SECTION "bank30", ROMX, BANK[$30] SECTION "bank30", ROMX, BANK[$30]
@ -74748,13 +74334,13 @@ Functionfcc63: ; fcc63
ld e, TRADE_DVS ld e, TRADE_DVS
call GetTradeAttribute call GetTradeAttribute
ld de, wc72f ld de, wEnemyTrappingMove
call Functionfce0f call Functionfce0f
ld hl, PartyMon1DVs ld hl, PartyMon1DVs
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdde call Functionfcdde
ld hl, wc72f ld hl, wEnemyTrappingMove
call Functionfce0f call Functionfce0f
ld e, TRADE_OT_ID ld e, TRADE_OT_ID
@ -74765,7 +74351,7 @@ Functionfcc63: ; fcc63
ld hl, PartyMon1ID ld hl, PartyMon1ID
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call Functionfcdde call Functionfcdde
ld hl, wc731 ld hl, wEnemyWrapCount
call Functionfce0f call Functionfce0f
ld e, TRADE_ITEM ld e, TRADE_ITEM

View File

@ -6382,7 +6382,7 @@ Function102a3b: ; 102a3b
ld hl, OTPartyMon1ID ld hl, OTPartyMon1ID
call GetPartyLocation call GetPartyLocation
ld a, [hli] ld a, [hli]
ld [wc731], a ld [wEnemyWrapCount], a
ld a, [hl] ld a, [hl]
ld [wPlayerCharging], a ld [wPlayerCharging], a
ld a, [wcd4d] ld a, [wcd4d]
@ -6390,9 +6390,9 @@ Function102a3b: ; 102a3b
ld hl, OTPartyMon1DVs ld hl, OTPartyMon1DVs
call GetPartyLocation call GetPartyLocation
ld a, [hli] ld a, [hli]
ld [wc72f], a ld [wEnemyTrappingMove], a
ld a, [hl] ld a, [hl]
ld [wc730], a ld [wPlayerWrapCount], a
ld a, [wcd4d] ld a, [wcd4d]
dec a dec a
ld hl, OTPartyMon1Species ld hl, OTPartyMon1Species

View File

@ -170,7 +170,7 @@ Function1080b7: ; 1080b7
ld de, VTiles0 tile $30 ld de, VTiles0 tile $30
call Function1081e9 call Function1081e9
ld a, [wc702] ld a, [wc702]
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
call Function1081e9 call Function1081e9
ld a, [$c6d0] ld a, [$c6d0]
@ -515,7 +515,7 @@ Function10839b: ; 10839b
call Function1081ca call Function1081ca
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles2 ld de, VTiles2
call Function108201 call Function108201
call EnableLCD call EnableLCD
@ -548,9 +548,9 @@ Function10839b: ; 10839b
ld [hWY], a ld [hWY], a
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc72f] ld a, [wEnemyTrappingMove]
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wc730] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, $1a
call GetSGBLayout call GetSGBLayout
@ -650,7 +650,7 @@ Function1084d7: ; 1084d7
call Function1081ca call Function1081ca
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles2 ld de, VTiles2
call Function108201 call Function108201
call EnableLCD call EnableLCD
@ -692,16 +692,16 @@ Function1084d7: ; 1084d7
ld [hWY], a ld [hWY], a
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc72f] ld a, [wEnemyTrappingMove]
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wc730] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, $1a
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
ld a, [wc702] ld a, [wc702]
ld hl, wc72f ld hl, wEnemyTrappingMove
call Function10898a call Function10898a
ld a, [wc702] ld a, [wc702]
call Function108229 call Function108229
@ -719,7 +719,7 @@ Function108589: ; 108589
call Function1081ca call Function1081ca
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld hl, wc72f ld hl, wEnemyTrappingMove
ld de, VTiles2 ld de, VTiles2
call Function108201 call Function108201
call EnableLCD call EnableLCD
@ -761,16 +761,16 @@ Function108589: ; 108589
ld [hWY], a ld [hWY], a
ld a, [wc702] ld a, [wc702]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, [wc72f] ld a, [wEnemyTrappingMove]
ld [TempMonDVs], a ld [TempMonDVs], a
ld a, [wc730] ld a, [wPlayerWrapCount]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld b, $1a ld b, $1a
call GetSGBLayout call GetSGBLayout
ld a, $e4 ld a, $e4
call DmgToCgbBGPals call DmgToCgbBGPals
ld a, [wc702] ld a, [wc702]
ld hl, wc72f ld hl, wEnemyTrappingMove
call Function10898a call Function10898a
ld a, [wc702] ld a, [wc702]
call Function108229 call Function108229
@ -1262,7 +1262,7 @@ Function1089d2:
ld a, [wEnemyCharging] ld a, [wEnemyCharging]
ld de, wc724 ld de, wc724
call Function108aa3 call Function108aa3
ld de, wc731 ld de, wEnemyWrapCount
call Function108abe call Function108abe
call Function108a87 call Function108a87
ret ret
@ -1737,7 +1737,7 @@ Function108c9b: ; 108c9b
dec c dec c
jr nz, .asm_108ccc jr nz, .asm_108ccc
ld de, wc731 ld de, wEnemyWrapCount
ld c, $2 ld c, $2
.asm_108cd7 .asm_108cd7
ld a, [hli] ld a, [hli]

View File

@ -7656,14 +7656,14 @@ Function11b7e5: ; 11b7e5
ld a, $50 ld a, $50
ld [de], a ld [de], a
ld a, [$c608 + 11] ld a, [$c608 + 11]
ld [wc731], a ld [wEnemyWrapCount], a
ld a, [$c608 + 12] ld a, [$c608 + 12]
ld [wPlayerCharging], a ld [wPlayerCharging], a
ld hl, $c608 + 26 ld hl, $c608 + 26
ld a, [hli] ld a, [hli]
ld [wc72f], a ld [wEnemyTrappingMove], a
ld a, [hl] ld a, [hl]
ld [wc730], a ld [wPlayerWrapCount], a
ld bc, $c608 + 5 ld bc, $c608 + 5
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c

View File

@ -55,12 +55,12 @@ Function17005a: ; 17005a
ld [de], a ld [de], a
ld hl, $a841 ld hl, $a841
ld a, [hli] ld a, [hli]
ld [wc72f], a ld [wEnemyTrappingMove], a
ld a, [hl] ld a, [hl]
ld [wc730], a ld [wPlayerWrapCount], a
ld hl, $a832 ld hl, $a832
ld a, [hli] ld a, [hli]
ld [wc731], a ld [wEnemyWrapCount], a
ld a, [hl] ld a, [hl]
ld [wPlayerCharging], a ld [wPlayerCharging], a
ld bc, $a82c ld bc, $a82c
@ -177,7 +177,7 @@ Function170139: ; 170139
ld e, l ld e, l
ld d, h ld d, h
ld hl, PlayerName ld hl, PlayerName
ld bc, $0005 ld bc, $0005 ; Japanese name length
call CopyBytes call CopyBytes
ld bc, PlayerID ld bc, PlayerID
ld de, PlayerGender ld de, PlayerGender

View File

@ -283,14 +283,14 @@ Function17d0f3: ; 17d0f3
ld a, $50 ld a, $50
ld [de], a ld [de], a
ld a, [$c608 + 11] ld a, [$c608 + 11]
ld [wc731], a ld [wEnemyWrapCount], a
ld a, [$c608 + 12] ld a, [$c608 + 12]
ld [wPlayerCharging], a ld [wPlayerCharging], a
ld hl, $c608 + 26 ld hl, $c608 + 26
ld a, [hli] ld a, [hli]
ld [wc72f], a ld [wEnemyTrappingMove], a
ld a, [hl] ld a, [hl]
ld [wc730], a ld [wPlayerWrapCount], a
ld bc, $c608 + 5 ld bc, $c608 + 5
callba GetCaughtGender callba GetCaughtGender
ld a, c ld a, c

View File

@ -841,8 +841,8 @@ LastPlayerMove:: ; c71b
LastEnemyMove:: ; c71c LastEnemyMove:: ; c71c
ds 1 ds 1
wc71d:: ds 1 wPlayerFutureSightCount:: ds 1
wc71e:: ds 1 wEnemyFutureSightCount:: ds 1
wc71f:: ds 1 wc71f:: ds 1
wc720:: ds 4 ; copy from/to EnemyMonBaseStats, length=7 wc720:: ds 4 ; copy from/to EnemyMonBaseStats, length=7
wc724:: ds 3 wc724:: ds 3
@ -851,10 +851,10 @@ wc729:: ds 2
wPlayerRageCounter:: ds 1 wPlayerRageCounter:: ds 1
wEnemyRageCounter:: ds 1 wEnemyRageCounter:: ds 1
wc72d:: ds 1 ; if 0 then PrintButItFailed wc72d:: ds 1 ; if 0 then PrintButItFailed
wc72e:: ds 1 wPlayerTrappingMove:: ds 1
wc72f:: ds 1 wEnemyTrappingMove:: ds 1
wc730:: ds 1 wPlayerWrapCount:: ds 1
wc731:: ds 1 wEnemyWrapCount:: ds 1
wPlayerCharging:: ds 1 wPlayerCharging:: ds 1
wEnemyCharging:: ds 1 wEnemyCharging:: ds 1
wc734:: wc734::
@ -1636,8 +1636,8 @@ wd148:: ds 1
wd149:: ds 1 wd149:: ds 1
wd14a:: ds 1 wd14a:: ds 1
wd14b:: ds 1 wd14b:: ds 1
wd14c:: ds 1 wd14c:: ds 1 ; used in FollowNotExact
wd14d:: ds 1 wd14d:: ds 1 ; used in FollowNotExact
wd14e:: ds 1 wd14e:: ds 1
wd14f:: ds 1 wd14f:: ds 1
wd150:: ds 1 wd150:: ds 1
@ -2512,8 +2512,10 @@ PoisonStepCount:: ; dc74
ds 2 ds 2
wdc77:: ds 2 wdc77:: ds 2
wdc79:: ds 1 wdc79::
wdc7a:: ds 2 wParkBallsRemaining::
wSafariBallsRemaining:: ds 1
wSafariTimeRemaining:: ds 2
wPhoneList:: ds CONTACT_LIST_SIZE wPhoneList:: ds CONTACT_LIST_SIZE
ds 23 ds 23
wLuckyNumberShowFlag:: ds 2 ; dc9d wLuckyNumberShowFlag:: ds 2 ; dc9d