Prepare to merge

This commit is contained in:
PikalaxALT 2016-01-18 00:39:01 -05:00
parent 7cc2571529
commit 8bf255b9f8
14 changed files with 301 additions and 290 deletions

View File

@ -1248,7 +1248,7 @@ HandlePerishSong: ; 3c801
res SUBSTATUS_PERISH, [hl] res SUBSTATUS_PERISH, [hl]
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr nz, .asm_3c85c jr nz, .kill_enemy
ld hl, BattleMonHP ld hl, BattleMonHP
xor a xor a
ld [hli], a ld [hli], a
@ -1261,7 +1261,7 @@ HandlePerishSong: ; 3c801
ld [hl], a ld [hl], a
ret ret
.asm_3c85c .kill_enemy
ld hl, EnemyMonHP ld hl, EnemyMonHP
xor a xor a
ld [hli], a ld [hli], a
@ -1334,12 +1334,12 @@ HandleWrap: ; 3c874
call GetSixteenthMaxHP call GetSixteenthMaxHP
call SubtractHPFromUser call SubtractHPFromUser
ld hl, BattleText_UsersHurtByStringBuffer1 ld hl, BattleText_UsersHurtByStringBuffer1
jr .asm_3c8e1 jr .print_text
.release_from_bounds .release_from_bounds
ld hl, BattleText_UserWasReleasedFromStringBuffer1 ld hl, BattleText_UserWasReleasedFromStringBuffer1
.asm_3c8e1 .print_text
jp StdBattleTextBox jp StdBattleTextBox
; 3c8e4 ; 3c8e4
@ -1396,7 +1396,7 @@ HandleLeftovers: ; 3c8eb
call GetSixteenthMaxHP call GetSixteenthMaxHP
call SwitchTurnCore call SwitchTurnCore
call RestoreHP call RestoreHP
ld hl, BattleText_0x80880 ld hl, BattleText_TargetRecoveredWithItem
jp StdBattleTextBox jp StdBattleTextBox
; 3c93c ; 3c93c
@ -1569,7 +1569,7 @@ HandleFutureSight: ; 3ca26
cp $1 cp $1
ret nz ret nz
ld hl, BattleText_0x808b6 ld hl, BattleText_TargetWasHitByFutureSight
call StdBattleTextBox call StdBattleTextBox
ld a, BATTLE_VARS_MOVE ld a, BATTLE_VARS_MOVE
@ -1645,12 +1645,12 @@ HanleDefrost: ; 3ca8f
ld a, [wBattleMode] ld a, [wBattleMode]
dec a dec a
jr z, .asm_3caef jr z, .wild
ld a, [CurOTMon] ld a, [CurOTMon]
ld hl, OTPartyMon1Status ld hl, OTPartyMon1Status
call GetPartyLocation call GetPartyLocation
ld [hl], 0 ld [hl], 0
.asm_3caef .wild
call UpdateBattleHuds call UpdateBattleHuds
call SetPlayerTurn call SetPlayerTurn
@ -1661,13 +1661,13 @@ HanleDefrost: ; 3ca8f
HandleSafeguard: ; 3cafb HandleSafeguard: ; 3cafb
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .asm_3cb06 jr z, .player1
call .asm_3cb09 call .CheckPlayer
jr .asm_3cb1c jr .CheckEnemy
.asm_3cb06 .player1
call .asm_3cb1c call .CheckEnemy
.asm_3cb09 .CheckPlayer
ld a, [PlayerScreens] ld a, [PlayerScreens]
bit SCREENS_SAFEGUARD, a bit SCREENS_SAFEGUARD, a
ret z ret z
@ -1677,9 +1677,9 @@ HandleSafeguard: ; 3cafb
res SCREENS_SAFEGUARD, a res SCREENS_SAFEGUARD, a
ld [PlayerScreens], a ld [PlayerScreens], a
xor a xor a
jr .asm_3cb2e jr .print
.asm_3cb1c .CheckEnemy
ld a, [EnemyScreens] ld a, [EnemyScreens]
bit SCREENS_SAFEGUARD, a bit SCREENS_SAFEGUARD, a
ret z ret z
@ -1690,7 +1690,7 @@ HandleSafeguard: ; 3cafb
ld [EnemyScreens], a ld [EnemyScreens], a
ld a, $1 ld a, $1
.asm_3cb2e .print
ld [hBattleTurn], a ld [hBattleTurn], a
ld hl, BattleText_SafeguardFaded ld hl, BattleText_SafeguardFaded
jp StdBattleTextBox jp StdBattleTextBox
@ -1712,7 +1712,7 @@ HandleScreens: ; 3cb36
call .Copy call .Copy
ld hl, PlayerScreens ld hl, PlayerScreens
ld de, PlayerLightScreenCount ld de, PlayerLightScreenCount
jr .FadeScreens jr .TickScreens
.CheckEnemy .CheckEnemy
call SetEnemyTurn call SetEnemyTurn
@ -1721,11 +1721,11 @@ HandleScreens: ; 3cb36
ld hl, EnemyScreens ld hl, EnemyScreens
ld de, EnemyLightScreenCount ld de, EnemyLightScreenCount
.FadeScreens .TickScreens
bit SCREENS_LIGHT_SCREEN, [hl] bit SCREENS_LIGHT_SCREEN, [hl]
call nz, FadeLightScreen call nz, .LightScreenTick
bit SCREENS_REFLECT, [hl] bit SCREENS_REFLECT, [hl]
call nz, FadeReflect call nz, .ReflectTick
ret ret
.Copy .Copy
@ -1740,7 +1740,7 @@ HandleScreens: ; 3cb36
; 3cb80 ; 3cb80
FadeLightScreen: ; 3cb80 .LightScreenTick: ; 3cb80
ld a, [de] ld a, [de]
dec a dec a
ld [de], a ld [de], a
@ -1748,21 +1748,21 @@ FadeLightScreen: ; 3cb80
res SCREENS_LIGHT_SCREEN, [hl] res SCREENS_LIGHT_SCREEN, [hl]
push hl push hl
push de push de
ld hl, BattleText_PkmnnLightScreenFell ld hl, BattleText_PkmnLightScreenFell
call StdBattleTextBox call StdBattleTextBox
pop de pop de
pop hl pop hl
ret ret
; 3cb91 ; 3cb91
FadeReflect: ; 3cb91 .ReflectTick: ; 3cb91
inc de inc de
ld a, [de] ld a, [de]
dec a dec a
ld [de], a ld [de], a
ret nz ret nz
res SCREENS_REFLECT, [hl] res SCREENS_REFLECT, [hl]
ld hl, BattleText_0x80905 ld hl, BattleText_PkmnReflectFaded
jp StdBattleTextBox jp StdBattleTextBox
; 3cb9e ; 3cb9e
@ -3969,7 +3969,7 @@ TryToRunAwayFromBattle: ; 3d8b3
and a and a
jr z, .can_escape jr z, .can_escape
ld [hDivisor], a ld [hDivisor], a
ld b, $2 ld b, 2
call Divide call Divide
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
and a and a
@ -4941,16 +4941,16 @@ PrintPlayerHUD: ; 3dfbf
ld [MonType], a ld [MonType], a
callab GetGender callab GetGender
ld a, " " ld a, " "
jr c, .asm_3e013 jr c, .got_gender_char
ld a, "♂" ld a, "♂"
jr nz, .asm_3e013 jr nz, .got_gender_char
ld a, "♀" ld a, "♀"
.asm_3e013 .got_gender_char
hlcoord 17, 8 hlcoord 17, 8
ld [hl], a ld [hl], a
hlcoord 14, 8 hlcoord 14, 8
push af push af ; back up gender
push hl push hl
ld de, BattleMonStatus ld de, BattleMonStatus
predef PlaceNonFaintStatus predef PlaceNonFaintStatus
@ -4959,10 +4959,10 @@ PrintPlayerHUD: ; 3dfbf
ret nz ret nz
ld a, b ld a, b
cp " " cp " "
jr nz, .asm_3e02d jr nz, .copy_level ; male or female
dec hl dec hl ; genderless
.asm_3e02d .copy_level
ld a, [BattleMonLevel] ld a, [BattleMonLevel]
ld [TempMonLevel], a ld [TempMonLevel], a
jp PrintLevel jp PrintLevel

View File

@ -1928,6 +1928,7 @@ BattleCommand_CheckHit: ; 34d32
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
; load the user's accuracy into b and the opponent's evasion into c.
ld hl, wPlayerMoveStruct + MOVE_ACC ld hl, wPlayerMoveStruct + MOVE_ACC
ld a, [PlayerAccLevel] ld a, [PlayerAccLevel]
ld b, a ld b, a
@ -1944,26 +1945,31 @@ BattleCommand_CheckHit: ; 34d32
.got_acc_eva .got_acc_eva
cp b cp b
jr c, .eva_less_than_acc jr c, .skip_foresight_check
; if the target's evasion is greater than the user's accuracy,
; check the target's foresight status
ld a, BATTLE_VARS_SUBSTATUS1_OPP ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar call GetBattleVar
bit SUBSTATUS_IDENTIFIED, a bit SUBSTATUS_IDENTIFIED, a
ret nz ret nz
.eva_less_than_acc .skip_foresight_check
; subtract evasion from 14
ld a, 14 ld a, 14
sub c sub c
ld c, a ld c, a
; store the base move accuracy for math ops
xor a xor a
ld [hMultiplicand + 0], a ld [hMultiplicand + 0], a
ld [hMultiplicand + 1], a ld [hMultiplicand + 1], a
ld a, [hl] ld a, [hl]
ld [hMultiplicand + 2], a ld [hMultiplicand + 2], a
push hl push hl
ld d, 2 ld d, 2 ; do this twice, once for the user's accuracy and once for the target's evasion
.accuracy_loop .accuracy_loop
; look up the multiplier from the table
push bc push bc
ld hl, .AccProb ld hl, .AccProb
dec b dec b
@ -1972,27 +1978,32 @@ BattleCommand_CheckHit: ; 34d32
ld b, 0 ld b, 0
add hl, bc add hl, bc
pop bc pop bc
; multiply by the first byte in that row...
ld a, [hli] ld a, [hli]
ld [hMultiplier], a ld [hMultiplier], a
call Multiply call Multiply
; ... and divide by the second byte
ld a, [hl] ld a, [hl]
ld [hDivisor], a ld [hDivisor], a
ld b, 4 ld b, 4
call Divide call Divide
; minimum accuracy is $0001
ld a, [hQuotient + 2] ld a, [hQuotient + 2]
ld b, a ld b, a
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
or b or b
jr nz, .min_accuracy jr nz, .min_accuracy
ld [hQuotient + 1], a ld [hQuotient + 1], a
ld a, $1 ld a, 1
ld [hQuotient + 2], a ld [hQuotient + 2], a
.min_accuracy .min_accuracy
; do the same thing to the target's evasion
ld b, c ld b, c
dec d dec d
jr nz, .accuracy_loop jr nz, .accuracy_loop
; if the result is more than 2 bytes, max out at 100%
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
and a and a
ld a, [hQuotient + 2] ld a, [hQuotient + 2]
@ -8393,148 +8404,7 @@ BattleCommand_Heal: ; 3713e
; 371cd ; 371cd
INCLUDE "battle/effects/transform.asm"
BattleCommand_Transform: ; 371cd
; transform
call ClearLastMove
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
bit SUBSTATUS_TRANSFORMED, [hl]
jp nz, BattleEffect_ButItFailed
call CheckHiddenOpponent
jp nz, BattleEffect_ButItFailed
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $1
ld [wKickCounter], a
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVarAddr
bit SUBSTATUS_SUBSTITUTE, [hl]
push af
jr z, .mimic_substitute
call CheckUserIsCharging
jr nz, .mimic_substitute
ld a, SUBSTITUTE
call LoadAnim
.mimic_substitute
ld a, BATTLE_VARS_SUBSTATUS5
call GetBattleVarAddr
set SUBSTATUS_TRANSFORMED, [hl]
call ResetActorDisable
ld hl, BattleMonSpecies
ld de, EnemyMonSpecies
ld a, [hBattleTurn]
and a
jr nz, .got_mon_species
ld hl, EnemyMonSpecies
ld de, BattleMonSpecies
xor a
ld [CurMoveNum], a
.got_mon_species
push hl
ld a, [hli]
ld [de], a
inc hl
inc de
inc de
ld bc, NUM_MOVES
call CopyBytes
ld a, [hBattleTurn]
and a
jr z, .mimic_enemy_backup
ld a, [de]
ld [wEnemyBackupDVs], a
inc de
ld a, [de]
ld [wEnemyBackupDVs + 1], a
dec de
.mimic_enemy_backup
; copy DVs
ld a, [hli]
ld [de], a
inc de
ld a, [hli]
ld [de], a
inc de
; move pointer to stats
ld bc, BattleMonStats - BattleMonPP
add hl, bc
push hl
ld h, d
ld l, e
add hl, bc
ld d, h
ld e, l
pop hl
ld bc, BattleMonStructEnd - BattleMonStats
call CopyBytes
; init the power points
ld bc, BattleMonMoves - BattleMonStructEnd
add hl, bc
push de
ld d, h
ld e, l
pop hl
ld bc, BattleMonPP - BattleMonStructEnd
add hl, bc
ld b, NUM_MOVES
.pp_loop
ld a, [de]
inc de
and a
jr z, .done_move
cp SKETCH
ld a, 1
jr z, .done_move
ld a, 5
.done_move
ld [hli], a
dec b
jr nz, .pp_loop
pop hl
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld hl, EnemyStats
ld de, PlayerStats
ld bc, 2 * 5
call BattleSideCopy
ld hl, EnemyStatLevels
ld de, PlayerStatLevels
ld bc, 8
call BattleSideCopy
call _CheckBattleScene
jr c, .mimic_anims
ld a, [hBattleTurn]
and a
ld a, [wPlayerMinimized]
jr z, .got_byte
ld a, [wEnemyMinimized]
.got_byte
and a
jr nz, .mimic_anims
call LoadMoveAnim
jr .after_anim
.mimic_anims
call BattleCommand_MoveDelay
call BattleCommand_RaiseSubNoAnim
.after_anim
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $2
ld [wKickCounter], a
pop af
ld a, SUBSTITUTE
call nz, LoadAnim
ld hl, TransformedText
jp StdBattleTextBox
; 372c6
BattleSideCopy: ; 372c6 BattleSideCopy: ; 372c6
; Copy bc bytes from hl to de if it's the player's turn. ; Copy bc bytes from hl to de if it's the player's turn.

141
battle/effects/transform.asm Executable file
View File

@ -0,0 +1,141 @@
BattleCommand_Transform: ; 371cd
; transform
call ClearLastMove
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
bit SUBSTATUS_TRANSFORMED, [hl]
jp nz, BattleEffect_ButItFailed
call CheckHiddenOpponent
jp nz, BattleEffect_ButItFailed
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $1
ld [wKickCounter], a
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVarAddr
bit SUBSTATUS_SUBSTITUTE, [hl]
push af
jr z, .mimic_substitute
call CheckUserIsCharging
jr nz, .mimic_substitute
ld a, SUBSTITUTE
call LoadAnim
.mimic_substitute
ld a, BATTLE_VARS_SUBSTATUS5
call GetBattleVarAddr
set SUBSTATUS_TRANSFORMED, [hl]
call ResetActorDisable
ld hl, BattleMonSpecies
ld de, EnemyMonSpecies
ld a, [hBattleTurn]
and a
jr nz, .got_mon_species
ld hl, EnemyMonSpecies
ld de, BattleMonSpecies
xor a
ld [CurMoveNum], a
.got_mon_species
push hl
ld a, [hli]
ld [de], a
inc hl
inc de
inc de
ld bc, NUM_MOVES
call CopyBytes
ld a, [hBattleTurn]
and a
jr z, .mimic_enemy_backup
ld a, [de]
ld [wEnemyBackupDVs], a
inc de
ld a, [de]
ld [wEnemyBackupDVs + 1], a
dec de
.mimic_enemy_backup
; copy DVs
ld a, [hli]
ld [de], a
inc de
ld a, [hli]
ld [de], a
inc de
; move pointer to stats
ld bc, BattleMonStats - BattleMonPP
add hl, bc
push hl
ld h, d
ld l, e
add hl, bc
ld d, h
ld e, l
pop hl
ld bc, BattleMonStructEnd - BattleMonStats
call CopyBytes
; init the power points
ld bc, BattleMonMoves - BattleMonStructEnd
add hl, bc
push de
ld d, h
ld e, l
pop hl
ld bc, BattleMonPP - BattleMonStructEnd
add hl, bc
ld b, NUM_MOVES
.pp_loop
ld a, [de]
inc de
and a
jr z, .done_move
cp SKETCH
ld a, 1
jr z, .done_move
ld a, 5
.done_move
ld [hli], a
dec b
jr nz, .pp_loop
pop hl
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld hl, EnemyStats
ld de, PlayerStats
ld bc, 2 * 5
call BattleSideCopy
ld hl, EnemyStatLevels
ld de, PlayerStatLevels
ld bc, 8
call BattleSideCopy
call _CheckBattleScene
jr c, .mimic_anims
ld a, [hBattleTurn]
and a
ld a, [wPlayerMinimized]
jr z, .got_byte
ld a, [wEnemyMinimized]
.got_byte
and a
jr nz, .mimic_anims
call LoadMoveAnim
jr .after_anim
.mimic_anims
call BattleCommand_MoveDelay
call BattleCommand_RaiseSubNoAnim
.after_anim
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld a, $2
ld [wKickCounter], a
pop af
ld a, SUBSTITUTE
call nz, LoadAnim
ld hl, TransformedText
jp StdBattleTextBox
; 372c6

View File

@ -193,44 +193,44 @@ NUM_SPRITEHEADER_FIELDS EQU const_value
; sprite movement data table indices ; sprite movement data table indices
const_def const_def
const SPRITEMOVEDATA_00 const SPRITEMOVEDATA_00 ; 00
const SPRITEMOVEDATA_ITEM_TREE const SPRITEMOVEDATA_ITEM_TREE ; 01
const SPRITEMOVEDATA_WANDER const SPRITEMOVEDATA_WANDER ; 02
const SPRITEMOVEDATA_SPINRANDOM_SLOW const SPRITEMOVEDATA_SPINRANDOM_SLOW ; 03
const SPRITEMOVEDATA_WALK_UP_DOWN const SPRITEMOVEDATA_WALK_UP_DOWN ; 04
const SPRITEMOVEDATA_WALK_LEFT_RIGHT const SPRITEMOVEDATA_WALK_LEFT_RIGHT ; 05
const SPRITEMOVEDATA_STANDING_DOWN const SPRITEMOVEDATA_STANDING_DOWN ; 06
const SPRITEMOVEDATA_STANDING_UP const SPRITEMOVEDATA_STANDING_UP ; 07
const SPRITEMOVEDATA_STANDING_LEFT const SPRITEMOVEDATA_STANDING_LEFT ; 08
const SPRITEMOVEDATA_STANDING_RIGHT const SPRITEMOVEDATA_STANDING_RIGHT ; 09
const SPRITEMOVEDATA_SPINRANDOM_FAST const SPRITEMOVEDATA_SPINRANDOM_FAST ; 0a
const SPRITEMOVEDATA_PLAYER const SPRITEMOVEDATA_PLAYER ; 0b
const SPRITEMOVEDATA_0C const SPRITEMOVEDATA_0C ; 0c
const SPRITEMOVEDATA_0D const SPRITEMOVEDATA_0D ; 0d
const SPRITEMOVEDATA_0E const SPRITEMOVEDATA_0E ; 0e
const SPRITEMOVEDATA_0F const SPRITEMOVEDATA_0F ; 0f
const SPRITEMOVEDATA_10 const SPRITEMOVEDATA_10 ; 10
const SPRITEMOVEDATA_11 const SPRITEMOVEDATA_11 ; 11
const SPRITEMOVEDATA_12 const SPRITEMOVEDATA_12 ; 12
const SPRITEMOVEDATA_FOLLOWING const SPRITEMOVEDATA_FOLLOWING ; 13
const SPRITEMOVEDATA_SCRIPTED const SPRITEMOVEDATA_SCRIPTED ; 14
const SPRITEMOVEDATA_SNORLAX const SPRITEMOVEDATA_SNORLAX ; 15
const SPRITEMOVEDATA_POKEMON const SPRITEMOVEDATA_POKEMON ; 16
const SPRITEMOVEDATA_SUDOWOODO const SPRITEMOVEDATA_SUDOWOODO ; 17
const SPRITEMOVEDATA_SMASHABLE_ROCK const SPRITEMOVEDATA_SMASHABLE_ROCK ; 18
const SPRITEMOVEDATA_STRENGTH_BOULDER const SPRITEMOVEDATA_STRENGTH_BOULDER ; 19
const SPRITEMOVEDATA_FOLLOWNOTEXACT const SPRITEMOVEDATA_FOLLOWNOTEXACT ; 1a
const SPRITEMOVEDATA_SHADOW const SPRITEMOVEDATA_SHADOW ; 1b
const SPRITEMOVEDATA_EMOTE const SPRITEMOVEDATA_EMOTE ; 1c
const SPRITEMOVEDATA_SCREENSHAKE const SPRITEMOVEDATA_SCREENSHAKE ; 1d
const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE ; 1e
const SPRITEMOVEDATA_SPINCLOCKWISE const SPRITEMOVEDATA_SPINCLOCKWISE ; 1f
const SPRITEMOVEDATA_20 const SPRITEMOVEDATA_20 ; 20
const SPRITEMOVEDATA_BIGDOLL const SPRITEMOVEDATA_BIGDOLL ; 21
const SPRITEMOVEDATA_BOULDERDUST const SPRITEMOVEDATA_BOULDERDUST ; 22
const SPRITEMOVEDATA_GRASS const SPRITEMOVEDATA_GRASS ; 23
const SPRITEMOVEDATA_LAPRAS const SPRITEMOVEDATA_LAPRAS ; 24
const SPRITEMOVEDATA_25 const SPRITEMOVEDATA_25 ; 25
NUM_SPRITEMOVEDATA EQU const_value +- 1 NUM_SPRITEMOVEDATA EQU const_value +- 1
SPRITEMOVEDATA_FIELDS EQU 6 SPRITEMOVEDATA_FIELDS EQU 6

View File

@ -427,7 +427,7 @@ Gen2ToGen2LinkComms: ; 28177
or $3 or $3
ld [hl], a ld [hl], a
ld hl, OTPlayerName ld hl, OTPlayerName
ld de, OTName ld de, OTClassName
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
call ReturnToMapFromSubmenu call ReturnToMapFromSubmenu

View File

@ -136,7 +136,7 @@ DoPlayerMovement:: ; 80000
jr z, .land2 jr z, .land2
cp $70 ; warps cp $70 ; warps
jr z, .warps jr z, .warps
jr .asm_8013c jr .no_walk
.water .water
ld a, c ld a, c
@ -147,7 +147,7 @@ DoPlayerMovement:: ; 80000
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
ld [WalkingDirection], a ld [WalkingDirection], a
jr .asm_8013e jr .continue_walk
.water_table .water_table
db RIGHT db RIGHT
@ -164,9 +164,9 @@ DoPlayerMovement:: ; 80000
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp STANDING cp STANDING
jr z, .asm_8013c jr z, .no_walk
ld [WalkingDirection], a ld [WalkingDirection], a
jr .asm_8013e jr .continue_walk
.land1_table .land1_table
db STANDING db STANDING
@ -187,9 +187,9 @@ DoPlayerMovement:: ; 80000
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
cp STANDING cp STANDING
jr z, .asm_8013c jr z, .no_walk
ld [WalkingDirection], a ld [WalkingDirection], a
jr .asm_8013e jr .continue_walk
.land2_table .land2_table
db RIGHT db RIGHT
@ -210,18 +210,18 @@ DoPlayerMovement:: ; 80000
cp $7a ; stairs cp $7a ; stairs
jr z, .down jr z, .down
cp $7b ; cave cp $7b ; cave
jr nz, .asm_8013c jr nz, .no_walk
.down .down
ld a, DOWN ld a, DOWN
ld [WalkingDirection], a ld [WalkingDirection], a
jr .asm_8013e jr .continue_walk
.asm_8013c .no_walk
xor a xor a
ret ret
.asm_8013e .continue_walk
ld a, STEP_WALK ld a, STEP_WALK
call .DoStep call .DoStep
ld a, 5 ld a, 5

View File

@ -367,13 +367,13 @@ NewPokedexEntry: ; fb877
ld a, [hSCX] ld a, [hSCX]
add -5 ; 251 ; NUM_POKEMON add -5 ; 251 ; NUM_POKEMON
ld [hSCX], a ld [hSCX], a
call Functionfb8c8 call .ReturnFromDexRegistration
pop af pop af
ld [hMapAnims], a ld [hMapAnims], a
ret ret
; fb8c8 ; fb8c8
Functionfb8c8: ; fb8c8 .ReturnFromDexRegistration: ; fb8c8
call ClearTileMap call ClearTileMap
call LoadFontsExtra call LoadFontsExtra
call LoadStandardFont call LoadStandardFont

View File

@ -196,16 +196,16 @@ TMHM_PocketLoop: ; 2c8d3 (b:48d3)
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call TMHM_DisplayPocketItems call TMHM_DisplayPocketItems
ld a, $2 ld a, 2
ld [w2DMenuCursorInitY], a ld [w2DMenuCursorInitY], a
ld a, $7 ld a, 7
ld [w2DMenuCursorInitX], a ld [w2DMenuCursorInitX], a
ld a, $1 ld a, 1
ld [w2DMenuNumCols], a ld [w2DMenuNumCols], a
ld a, $5 ld a, 5
sub d sub d
inc a inc a
cp $6 cp 6
jr nz, .okay jr nz, .okay
dec a dec a
.okay .okay

View File

@ -506,18 +506,18 @@ Function3d9f:: ; 3d9f
; Places a BCD number at the ; Places a BCD number at the
; upper center of the screen. ; upper center of the screen.
; Unreferenced. ; Unreferenced.
ld a, $20 ld a, 4 * 8
ld [Sprites + $98], a ld [Sprites + 38 * 4], a
ld [Sprites + $9c], a ld [Sprites + 39 * 4], a
ld a, $50 ld a, 10 * 8
ld [Sprites + $99], a ld [Sprites + 38 * 4 + 1], a
ld a, $58 ld a, 11 * 8
ld [Sprites + $9d], a ld [Sprites + 39 * 4 + 1], a
xor a xor a
ld [Sprites + $9b], a ld [Sprites + 38 * 4 + 3], a
ld [Sprites + $9f], a ld [Sprites + 39 * 4 + 3], a
ld a, [wc296] ld a, [wc296]
cp $64 cp 100
jr nc, .max jr nc, .max
add 1 add 1
daa daa
@ -525,17 +525,17 @@ Function3d9f:: ; 3d9f
swap a swap a
and $f and $f
add "0" add "0"
ld [Sprites + $9a], a ld [Sprites + 38 * 4 + 2], a
ld a, b ld a, b
and $f and $f
add "0" add "0"
ld [Sprites + $9e], a ld [Sprites + 39 * 4 + 2], a
ret ret
.max .max
ld a, "9" ld a, "9"
ld [Sprites + $9a], a ld [Sprites + 38 * 4 + 2], a
ld [Sprites + $9e], a ld [Sprites + 39 * 4 + 2], a
ret ret
; 3dde ; 3dde

View File

@ -399,7 +399,7 @@ PlaceEnemysName:: ; 121b
cp RIVAL2 cp RIVAL2
jr z, .rival jr z, .rival
ld de, OTName ld de, OTClassName
call PlaceString call PlaceString
ld h, b ld h, b
ld l, c ld l, c
@ -416,7 +416,7 @@ PlaceEnemysName:: ; 121b
jr PlaceCommandCharacter jr PlaceCommandCharacter
.linkbattle .linkbattle
ld de, OTName ld de, OTClassName
jr PlaceCommandCharacter jr PlaceCommandCharacter

View File

@ -6621,7 +6621,7 @@ GetOTName: ; 39550
.ok .ok
ld bc, TRAINER_CLASS_NAME_LENGTH ld bc, TRAINER_CLASS_NAME_LENGTH
ld de, OTName ld de, OTClassName
push de push de
call CopyBytes call CopyBytes
pop de pop de
@ -9154,50 +9154,50 @@ Strings50a42: ; 50a42
dw .Youngster dw .Youngster
dw .BugCatcher dw .BugCatcher
dw .Lass dw .Lass
dw OTName dw OTClassName
dw .JrTrainerM dw .JrTrainerM
dw .JrTrainerF dw .JrTrainerF
dw .Pokemaniac dw .Pokemaniac
dw .SuperNerd dw .SuperNerd
dw OTName dw OTClassName
dw OTName dw OTClassName
dw .Burglar dw .Burglar
dw .Engineer dw .Engineer
dw .Jack dw .Jack
dw OTName dw OTClassName
dw .Swimmer dw .Swimmer
dw OTName dw OTClassName
dw OTName dw OTClassName
dw .Beauty dw .Beauty
dw OTName dw OTClassName
dw .Rocker dw .Rocker
dw .Juggler dw .Juggler
dw OTName dw OTClassName
dw OTName dw OTClassName
dw .Blackbelt dw .Blackbelt
dw OTName dw OTClassName
dw .ProfOak dw .ProfOak
dw .Chief dw .Chief
dw .Scientist dw .Scientist
dw OTName dw OTClassName
dw .Rocket dw .Rocket
dw .CooltrainerM dw .CooltrainerM
dw .CooltrainerF dw .CooltrainerF
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
dw OTName dw OTClassName
.Youngster db "たんパン@" .Youngster db "たんパン@"
.BugCatcher db "むしとり@" .BugCatcher db "むしとり@"

View File

@ -2595,7 +2595,7 @@ Function10107d: ; 10107d
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call .CopyAllFromOT call .CopyAllFromOT
ld hl, OTPartyMonOT ld hl, OTPartyMonOT
ld de, OTName + 1 ld de, OTClassName + 1
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call .CopyAllFromOT call .CopyAllFromOT
ld hl, OTPartyMon1Species ld hl, OTPartyMon1Species
@ -4039,7 +4039,7 @@ Function1019ee: ; 1019ee
ld a, c ld a, c
ld [OtherTrainerClass], a ld [OtherTrainerClass], a
ld hl, OTPlayerName ld hl, OTPlayerName
ld de, OTName ld de, OTClassName
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
call CopyBytes call CopyBytes
ld a, [wcd2f] ld a, [wcd2f]

View File

@ -104,7 +104,7 @@ PerishCountText: ; 0x80864
prompt prompt
; 0x80880 ; 0x80880
BattleText_0x80880: ; 0x80880 BattleText_TargetRecoveredWithItem: ; 0x80880
text "<TARGET>" text "<TARGET>"
line "recovered with" line "recovered with"
cont "@" cont "@"
@ -122,7 +122,7 @@ BattleText_UserRecoveredPPUsing: ; 0x80899
prompt prompt
; 0x808b6 ; 0x808b6
BattleText_0x808b6: ; 0x808b6 BattleText_TargetWasHitByFutureSight: ; 0x808b6
text "<TARGET>" text "<TARGET>"
line "was hit by FUTURE" line "was hit by FUTURE"
cont "SIGHT!" cont "SIGHT!"
@ -135,14 +135,14 @@ BattleText_SafeguardFaded: ; 0x808d2
prompt prompt
; 0x808e7 ; 0x808e7
BattleText_PkmnnLightScreenFell: ; 0x808e7 BattleText_PkmnLightScreenFell: ; 0x808e7
text_from_ram StringBuffer1 text_from_ram StringBuffer1
text " #MON's" text " #MON's"
line "LIGHT SCREEN fell!" line "LIGHT SCREEN fell!"
prompt prompt
; 0x80905 ; 0x80905
BattleText_0x80905: ; 0x80905 BattleText_PkmnReflectFaded: ; 0x80905
text_from_ram StringBuffer1 text_from_ram StringBuffer1
text " #MON's" text " #MON's"
line "REFLECT faded!" line "REFLECT faded!"

View File

@ -12,7 +12,7 @@ StackTop::
SECTION "Audio", WRAM0 SECTION "Audio", WRAM0
wMusic::
MusicPlaying:: ; c100 MusicPlaying:: ; c100
; nonzero if playing ; nonzero if playing
ds 1 ds 1
@ -33,7 +33,7 @@ Channel8:: channel_struct Channel8 ; c25f
wCurTrackDuty:: ds 1 wCurTrackDuty:: ds 1
wCurTrackIntensity:: ds 1 wCurTrackIntensity:: ds 1
wCurTrackFrequency:: dw wCurTrackFrequency:: dw
wc296:: ds 1 ; used only in an unused script wc296:: ds 1 ; BCD value, dummied out
wc297:: ds 1 ; used in MusicE0 and LoadNote wc297:: ds 1 ; used in MusicE0 and LoadNote
CurMusicByte:: ; c298 CurMusicByte:: ; c298
@ -132,7 +132,7 @@ wMapMusic:: ; c2c0
ds 1 ds 1
wDontPlayMapMusicOnReload:: ds 1 wDontPlayMapMusicOnReload:: ds 1
wMusicEnd::
SECTION "WRAM", WRAM0 SECTION "WRAM", WRAM0
@ -397,7 +397,7 @@ wEnemyTrainerItem1:: ds 1
wEnemyTrainerItem2:: ds 1 wEnemyTrainerItem2:: ds 1
wEnemyTrainerBaseReward:: ds 1 wEnemyTrainerBaseReward:: ds 1
wEnemyTrainerAIFlags:: ds 3 wEnemyTrainerAIFlags:: ds 3
OTName:: ds NAME_LENGTH ; c656 OTClassName:: ds NAME_LENGTH ; c656
ds 2 ds 2
@ -1816,9 +1816,9 @@ wItemQuantityBuffer:: ds 1
TempMon:: ; d10e TempMon:: ; d10e
party_struct TempMon party_struct TempMon
wSpriteFlags:: ds 1 wSpriteFlags:: ds 1 ; d13e
wHandlePlayerStep:: ds 2 wHandlePlayerStep:: ds 2 ; d13f
PartyMenuActionText:: ; d141 PartyMenuActionText:: ; d141
ds 1 ds 1