Prefix wram labels with w, part 2.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
BattleCommand_Attract: ; 377ce
|
||||
; attract
|
||||
ld a, [AttackMissed]
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
jr nz, .failed
|
||||
call CheckOppositeGender
|
||||
@@ -28,12 +28,12 @@ CheckOppositeGender: ; 377f5
|
||||
ld a, MON_SPECIES
|
||||
call BattlePartyAttr
|
||||
ld a, [hl]
|
||||
ld [CurPartySpecies], a
|
||||
ld [wCurPartySpecies], a
|
||||
|
||||
ld a, [CurBattleMon]
|
||||
ld [CurPartyMon], a
|
||||
ld a, [wCurBattleMon]
|
||||
ld [wCurPartyMon], a
|
||||
xor a
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
|
||||
farcall GetGender
|
||||
jr c, .genderless_samegender
|
||||
@@ -44,20 +44,20 @@ CheckOppositeGender: ; 377f5
|
||||
|
||||
.got_gender
|
||||
push bc
|
||||
ld a, [TempEnemyMonSpecies]
|
||||
ld [CurPartySpecies], a
|
||||
ld hl, EnemyMonDVs
|
||||
ld a, [EnemySubStatus5]
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wCurPartySpecies], a
|
||||
ld hl, wEnemyMonDVs
|
||||
ld a, [wEnemySubStatus5]
|
||||
bit SUBSTATUS_TRANSFORMED, a
|
||||
jr z, .not_transformed
|
||||
ld hl, wEnemyBackupDVs
|
||||
.not_transformed
|
||||
ld a, [hli]
|
||||
ld [TempMonDVs], a
|
||||
ld [wTempMonDVs], a
|
||||
ld a, [hl]
|
||||
ld [TempMonDVs + 1], a
|
||||
ld [wTempMonDVs + 1], a
|
||||
ld a, 3
|
||||
ld [MonType], a
|
||||
ld [wMonType], a
|
||||
farcall GetGender
|
||||
pop bc
|
||||
jr c, .genderless_samegender
|
||||
|
@@ -1,13 +1,13 @@
|
||||
BattleCommand_Curse: ; 37588
|
||||
; curse
|
||||
|
||||
ld de, BattleMonType1
|
||||
ld bc, PlayerStatLevels
|
||||
ld de, wBattleMonType1
|
||||
ld bc, wPlayerStatLevels
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .go
|
||||
ld de, EnemyMonType1
|
||||
ld bc, EnemyStatLevels
|
||||
ld de, wEnemyMonType1
|
||||
ld bc, wEnemyStatLevels
|
||||
|
||||
.go
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
BattleCommand_Foresight: ; 376a0
|
||||
; foresight
|
||||
|
||||
ld a, [AttackMissed]
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
jr nz, .failed
|
||||
|
||||
|
@@ -2,8 +2,8 @@ BattleCommand_PerishSong: ; 376c2
|
||||
; perishsong
|
||||
|
||||
|
||||
ld hl, PlayerSubStatus1
|
||||
ld de, EnemySubStatus1
|
||||
ld hl, wPlayerSubStatus1
|
||||
ld de, wEnemySubStatus1
|
||||
bit SUBSTATUS_PERISH, [hl]
|
||||
jr z, .ok
|
||||
|
||||
@@ -17,7 +17,7 @@ BattleCommand_PerishSong: ; 376c2
|
||||
|
||||
set SUBSTATUS_PERISH, [hl]
|
||||
ld a, 4
|
||||
ld [PlayerPerishCount], a
|
||||
ld [wPlayerPerishCount], a
|
||||
|
||||
.enemy
|
||||
ld a, [de]
|
||||
@@ -27,7 +27,7 @@ BattleCommand_PerishSong: ; 376c2
|
||||
set SUBSTATUS_PERISH, a
|
||||
ld [de], a
|
||||
ld a, 4
|
||||
ld [EnemyPerishCount], a
|
||||
ld [wEnemyPerishCount], a
|
||||
|
||||
.done
|
||||
call AnimateCurrentMove
|
||||
|
@@ -20,7 +20,7 @@ BattleCommand_Present: ; 37874
|
||||
ld a, [wTypeMatchup]
|
||||
and a
|
||||
jp z, AnimateFailedMove
|
||||
ld a, [AttackMissed]
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
jp nz, AnimateFailedMove
|
||||
|
||||
|
@@ -16,11 +16,11 @@ BattleCommand_Protect: ; 37618
|
||||
|
||||
ProtectChance: ; 3762c
|
||||
|
||||
ld de, PlayerProtectCount
|
||||
ld de, wPlayerProtectCount
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .asm_37637
|
||||
ld de, EnemyProtectCount
|
||||
ld de, wEnemyProtectCount
|
||||
.asm_37637
|
||||
|
||||
call CheckOpponentWentFirst
|
||||
|
@@ -4,11 +4,11 @@ MAX_ROLLOUT_COUNT EQU 5
|
||||
BattleCommand_CheckCurl: ; 37718
|
||||
; checkcurl
|
||||
|
||||
ld de, PlayerRolloutCount
|
||||
ld de, wPlayerRolloutCount
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .ok
|
||||
ld de, EnemyRolloutCount
|
||||
ld de, wEnemyRolloutCount
|
||||
.ok
|
||||
ld a, BATTLE_VARS_SUBSTATUS1
|
||||
call GetBattleVar
|
||||
@@ -33,11 +33,11 @@ BattleCommand_RolloutPower: ; 37734
|
||||
and SLP
|
||||
ret nz
|
||||
|
||||
ld hl, PlayerRolloutCount
|
||||
ld hl, wPlayerRolloutCount
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .got_rollout_count
|
||||
ld hl, EnemyRolloutCount
|
||||
ld hl, wEnemyRolloutCount
|
||||
|
||||
.got_rollout_count
|
||||
ld a, [hl]
|
||||
@@ -47,7 +47,7 @@ BattleCommand_RolloutPower: ; 37734
|
||||
ld [wSomeoneIsRampaging], a
|
||||
|
||||
.skip_set_rampage
|
||||
ld a, [AttackMissed]
|
||||
ld a, [wAttackMissed]
|
||||
and a
|
||||
jr z, .hit
|
||||
|
||||
@@ -84,7 +84,7 @@ BattleCommand_RolloutPower: ; 37734
|
||||
dec b
|
||||
jr z, .done_damage
|
||||
|
||||
ld hl, CurDamage + 1
|
||||
ld hl, wCurDamage + 1
|
||||
sla [hl]
|
||||
dec hl
|
||||
rl [hl]
|
||||
|
@@ -8,7 +8,7 @@ BattleCommand_StartSandstorm: ; 376f8
|
||||
ld a, WEATHER_SANDSTORM
|
||||
ld [wBattleWeather], a
|
||||
ld a, 5
|
||||
ld [WeatherCount], a
|
||||
ld [wWeatherCount], a
|
||||
call AnimateCurrentMove
|
||||
ld hl, SandstormBrewedText
|
||||
jp StdBattleTextBox
|
||||
|
@@ -1,11 +1,11 @@
|
||||
BattleCommand_Spikes: ; 37683
|
||||
; spikes
|
||||
|
||||
ld hl, EnemyScreens
|
||||
ld hl, wEnemyScreens
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .asm_3768e
|
||||
ld hl, PlayerScreens
|
||||
ld hl, wPlayerScreens
|
||||
.asm_3768e
|
||||
|
||||
; Fails if spikes are already down!
|
||||
|
@@ -26,7 +26,7 @@ BattleCommand_Thief: ; 37492
|
||||
farcall ItemIsMail
|
||||
ret c
|
||||
|
||||
ld a, [EffectFailed]
|
||||
ld a, [wEffectFailed]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
@@ -74,7 +74,7 @@ BattleCommand_Thief: ; 37492
|
||||
farcall ItemIsMail
|
||||
ret c
|
||||
|
||||
ld a, [EffectFailed]
|
||||
ld a, [wEffectFailed]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
@@ -103,7 +103,7 @@ BattleCommand_Thief: ; 37492
|
||||
call BattlePartyAttr
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, BattleMonItem
|
||||
ld hl, wBattleMonItem
|
||||
ret
|
||||
|
||||
.enemyitem
|
||||
@@ -111,6 +111,6 @@ BattleCommand_Thief: ; 37492
|
||||
call OTPartyAttr
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, EnemyMonItem
|
||||
ld hl, wEnemyMonItem
|
||||
ret
|
||||
; 37517
|
||||
|
@@ -11,7 +11,7 @@ BattleCommand_Transform: ; 371cd
|
||||
jp nz, BattleEffect_ButItFailed
|
||||
xor a
|
||||
ld [wNumHits], a
|
||||
ld [FXAnimID + 1], a
|
||||
ld [wFXAnimID + 1], a
|
||||
ld a, $1
|
||||
ld [wKickCounter], a
|
||||
ld a, BATTLE_VARS_SUBSTATUS4
|
||||
@@ -28,15 +28,15 @@ BattleCommand_Transform: ; 371cd
|
||||
call GetBattleVarAddr
|
||||
set SUBSTATUS_TRANSFORMED, [hl]
|
||||
call ResetActorDisable
|
||||
ld hl, BattleMonSpecies
|
||||
ld de, EnemyMonSpecies
|
||||
ld hl, wBattleMonSpecies
|
||||
ld de, wEnemyMonSpecies
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .got_mon_species
|
||||
ld hl, EnemyMonSpecies
|
||||
ld de, BattleMonSpecies
|
||||
ld hl, wEnemyMonSpecies
|
||||
ld de, wBattleMonSpecies
|
||||
xor a
|
||||
ld [CurMoveNum], a
|
||||
ld [wCurMoveNum], a
|
||||
.got_mon_species
|
||||
push hl
|
||||
ld a, [hli]
|
||||
@@ -64,7 +64,7 @@ BattleCommand_Transform: ; 371cd
|
||||
ld [de], a
|
||||
inc de
|
||||
; move pointer to stats
|
||||
ld bc, BattleMonStats - BattleMonPP
|
||||
ld bc, wBattleMonStats - wBattleMonPP
|
||||
add hl, bc
|
||||
push hl
|
||||
ld h, d
|
||||
@@ -73,16 +73,16 @@ BattleCommand_Transform: ; 371cd
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop hl
|
||||
ld bc, BattleMonStructEnd - BattleMonStats
|
||||
ld bc, wBattleMonStructEnd - wBattleMonStats
|
||||
call CopyBytes
|
||||
; init the power points
|
||||
ld bc, BattleMonMoves - BattleMonStructEnd
|
||||
ld bc, wBattleMonMoves - wBattleMonStructEnd
|
||||
add hl, bc
|
||||
push de
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop hl
|
||||
ld bc, BattleMonPP - BattleMonStructEnd
|
||||
ld bc, wBattleMonPP - wBattleMonStructEnd
|
||||
add hl, bc
|
||||
ld b, NUM_MOVES
|
||||
.pp_loop
|
||||
@@ -102,12 +102,12 @@ BattleCommand_Transform: ; 371cd
|
||||
ld a, [hl]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld hl, EnemyStats
|
||||
ld de, PlayerStats
|
||||
ld hl, wEnemyStats
|
||||
ld de, wPlayerStats
|
||||
ld bc, 2 * 5
|
||||
call BattleSideCopy
|
||||
ld hl, EnemyStatLevels
|
||||
ld de, PlayerStatLevels
|
||||
ld hl, wEnemyStatLevels
|
||||
ld de, wPlayerStatLevels
|
||||
ld bc, 8
|
||||
call BattleSideCopy
|
||||
call _CheckBattleScene
|
||||
@@ -129,7 +129,7 @@ BattleCommand_Transform: ; 371cd
|
||||
.after_anim
|
||||
xor a
|
||||
ld [wNumHits], a
|
||||
ld [FXAnimID + 1], a
|
||||
ld [wFXAnimID + 1], a
|
||||
ld a, $2
|
||||
ld [wKickCounter], a
|
||||
pop af
|
||||
|
Reference in New Issue
Block a user