Some battle labels

This commit is contained in:
PikalaxALT 2015-11-05 19:13:09 -05:00
parent 1205fe5100
commit 5eed48f05d
7 changed files with 59 additions and 58 deletions

View File

@ -163,9 +163,9 @@ AI_TryItem: ; 38105
and a and a
ret nz ret nz
ld a, [wc650] ld a, [wEnemyTrainerItem1]
ld b, a ld b, a
ld a, [wc651] ld a, [wEnemyTrainerItem2]
or b or b
ret z ret z
@ -180,7 +180,7 @@ AI_TryItem: ; 38105
ld b, h ld b, h
ld c, l ld c, l
ld hl, AI_Items ld hl, AI_Items
ld de, wc650 ld de, wEnemyTrainerItem1
.loop .loop
ld a, [hl] ld a, [hl]
and a and a
@ -233,7 +233,7 @@ endr
xor a xor a
ld [EnemyFuryCutterCount], a ld [EnemyFuryCutterCount], a
ld [EnemyProtectCount], a ld [EnemyProtectCount], a
ld [wc72c], a ld [wEnemyRageCounter], a
ld hl, EnemySubStatus4 ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
@ -706,7 +706,7 @@ AI_Switch: ; 3846c
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
xor a xor a
ld [hBattleTurn], a ld [hBattleTurn], a
callab Function3dc5b callab PursuitSwitch
push af push af
ld a, [CurOTMon] ld a, [CurOTMon]
ld hl, OTPartyMon1Status ld hl, OTPartyMon1Status

View File

@ -1343,11 +1343,11 @@ AI_Smart_Rage: ; 38b7f
; Encourage this move based on Rage's counter. ; Encourage this move based on Rage's counter.
.asm_38b8c .asm_38b8c
ld a, [wc72c] ld a, [wEnemyRageCounter]
cp $2 cp $2
ret c ret c
dec [hl] dec [hl]
ld a, [wc72c] ld a, [wEnemyRageCounter]
cp $3 cp $3
ret c ret c
dec [hl] dec [hl]

View File

@ -458,44 +458,45 @@ Function3c300: ; 3c300
Function3c314: ; 3c314 Function3c314: ; 3c314
ld a, [wLinkMode] ld a, [wLinkMode]
and a and a
jr z, .asm_3c35b jr z, .skip_ai
ld a, [wBattleAction] ld a, [wBattleAction]
cp $e cp $e
jr z, .asm_3c35b jr z, .skip_ai
cp $d cp $d
jr z, .asm_3c35b jr z, .skip_ai
sub NUM_MOVES sub NUM_MOVES
jr c, .asm_3c35b jr c, .skip_ai
ld a, [wd0ec] ld a, [wd0ec]
cp $2 cp $2
jr nz, .asm_3c34c jr nz, .switch
ld a, [$ffcb] ld a, [$ffcb]
cp $2 cp $2
jr z, .asm_3c341 jr z, .asm_3c341
call BattleRandom call BattleRandom
cp 1 + (50 percent) cp 1 + (50 percent)
jp c, .asm_3c3f1 jp c, .done
jp Function3c3f3 jp Function3c3f3
.asm_3c341 .asm_3c341
call BattleRandom call BattleRandom
cp 1 + (50 percent) cp 1 + (50 percent)
jp c, Function3c3f3 jp c, Function3c3f3
jp .asm_3c3f1 jp .done
.asm_3c34c .switch
callab AI_Switch callab AI_Switch
call SetEnemyTurn call SetEnemyTurn
call SpikesDamage call SpikesDamage
jp Function3c3f3 jp Function3c3f3
.asm_3c35b .skip_ai
ld a, [wd0ec] ld a, [wd0ec]
and a and a
jp nz, .asm_3c3f1 jp nz, .done
call CompareMovePriority call CompareMovePriority
jr z, .asm_3c36d jr z, .asm_3c36d
jp c, .asm_3c3f1 jp c, .done
jp Function3c3f3 jp Function3c3f3
.asm_3c36d .asm_3c36d
@ -513,7 +514,7 @@ Function3c314: ; 3c314
call BattleRandom call BattleRandom
cp e cp e
jr nc, .asm_3c3c5 jr nc, .asm_3c3c5
jp .asm_3c3f1 jp .done
.asm_3c391 .asm_3c391
ld a, b ld a, b
@ -533,13 +534,13 @@ Function3c314: ; 3c314
jp c, Function3c3f3 jp c, Function3c3f3
call BattleRandom call BattleRandom
cp e cp e
jp c, .asm_3c3f1 jp c, .done
jr .asm_3c3c5 jr .asm_3c3c5
.asm_3c3b5 .asm_3c3b5
call BattleRandom call BattleRandom
cp e cp e
jp c, .asm_3c3f1 jp c, .done
call BattleRandom call BattleRandom
cp c cp c
jp c, Function3c3f3 jp c, Function3c3f3
@ -551,7 +552,7 @@ Function3c314: ; 3c314
ld c, $2 ld c, $2
call StringCmp call StringCmp
jr z, .asm_3c3d8 jr z, .asm_3c3d8
jp nc, .asm_3c3f1 jp nc, .done
jp Function3c3f3 jp Function3c3f3
.asm_3c3d8 .asm_3c3d8
@ -560,14 +561,14 @@ Function3c314: ; 3c314
jr z, .asm_3c3e9 jr z, .asm_3c3e9
call BattleRandom call BattleRandom
cp 1 + (50 percent) cp 1 + (50 percent)
jp c, .asm_3c3f1 jp c, .done
jp Function3c3f3 jp Function3c3f3
.asm_3c3e9 .asm_3c3e9
call BattleRandom call BattleRandom
cp 1 + (50 percent) cp 1 + (50 percent)
jp c, Function3c3f3 jp c, Function3c3f3
.asm_3c3f1 .done
scf scf
ret ret
; 3c3f3 ; 3c3f3
@ -678,7 +679,7 @@ Function3c434: ; 3c434
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
xor a xor a
ld [wc72b], a ld [wPlayerRageCounter], a
.asm_3c4a4 .asm_3c4a4
ld a, [wPlayerMoveStruct + MOVE_EFFECT] ld a, [wPlayerMoveStruct + MOVE_EFFECT]
@ -698,7 +699,7 @@ Function3c434: ; 3c434
xor a xor a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [PlayerProtectCount], a ld [PlayerProtectCount], a
ld [wc72b], a ld [wPlayerRageCounter], a
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
@ -711,7 +712,7 @@ Function3c434: ; 3c434
xor a xor a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [PlayerProtectCount], a ld [PlayerProtectCount], a
ld [wc72b], a ld [wPlayerRageCounter], a
ld hl, PlayerSubStatus4 ld hl, PlayerSubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
xor a xor a
@ -3798,7 +3799,7 @@ endr
ld [EnemyDisableCount], a ld [EnemyDisableCount], a
ld [EnemyFuryCutterCount], a ld [EnemyFuryCutterCount], a
ld [EnemyProtectCount], a ld [EnemyProtectCount], a
ld [wc72c], a ld [wEnemyRageCounter], a
ld [EnemyDisabledMove], a ld [EnemyDisabledMove], a
ld [wc6fa], a ld [wc6fa], a
ld [wc730], a ld [wc730], a
@ -4301,7 +4302,7 @@ endr
ld [PlayerDisableCount], a ld [PlayerDisableCount], a
ld [PlayerFuryCutterCount], a ld [PlayerFuryCutterCount], a
ld [PlayerProtectCount], a ld [PlayerProtectCount], a
ld [wc72b], a ld [wPlayerRageCounter], a
ld [DisabledMove], a ld [DisabledMove], a
ld [wc6fe], a ld [wc6fe], a
ld [wc731], a ld [wc731], a
@ -4361,14 +4362,14 @@ SpikesDamage: ; 3dc23
jp [hl] jp [hl]
; 3dc5b ; 3dc5b
Function3dc5b: ; 3dc5b PursuitSwitch: ; 3dc5b
ld a, BATTLE_VARS_MOVE ld a, BATTLE_VARS_MOVE
call GetBattleVar call GetBattleVar
ld b, a ld b, a
call GetMoveEffect call GetMoveEffect
ld a, b ld a, b
cp EFFECT_PURSUIT cp EFFECT_PURSUIT
jr nz, .asm_3dce4 jr nz, .done
ld a, [CurBattleMon] ld a, [CurBattleMon]
push af push af
@ -4376,11 +4377,11 @@ Function3dc5b: ; 3dc5b
ld hl, DoPlayerTurn ld hl, DoPlayerTurn
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3dc7e jr z, .do_turn
ld hl, DoEnemyTurn ld hl, DoEnemyTurn
ld a, [LastPlayerMon] ld a, [LastPlayerMon]
ld [CurBattleMon], a ld [CurBattleMon], a
.asm_3dc7e .do_turn
ld a, BANK(DoPlayerTurn) ld a, BANK(DoPlayerTurn)
rst FarCall rst FarCall
@ -4394,14 +4395,14 @@ Function3dc5b: ; 3dc5b
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3dcc0 jr z, .check_enemy_fainted
ld a, [LastPlayerMon] ld a, [LastPlayerMon]
call UpdateBattleMon call UpdateBattleMon
ld hl, BattleMonHP ld hl, BattleMonHP
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .asm_3dce4 jr nz, .done
ld a, $f0 ld a, $f0
ld [CryTracks], a ld [CryTracks], a
@ -4414,13 +4415,13 @@ Function3dc5b: ; 3dc5b
predef FlagPredef predef FlagPredef
call PlayerMonFaintedAnimation call PlayerMonFaintedAnimation
ld hl, BattleText_PkmnFainted ld hl, BattleText_PkmnFainted
jr .asm_3dcdf jr .done_fainted
.asm_3dcc0 .check_enemy_fainted
ld hl, EnemyMonHP ld hl, EnemyMonHP
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr nz, .asm_3dce4 jr nz, .done
ld de, SFX_KINESIS ld de, SFX_KINESIS
call PlaySFX call PlaySFX
@ -4431,12 +4432,12 @@ Function3dc5b: ; 3dc5b
call EnemyMonFaintedAnimation call EnemyMonFaintedAnimation
ld hl, BattleText_EnemyPkmnFainted ld hl, BattleText_EnemyPkmnFainted
.asm_3dcdf .done_fainted
call StdBattleTextBox call StdBattleTextBox
scf scf
ret ret
.asm_3dce4 .done
and a and a
ret ret
; 3dce6 ; 3dce6
@ -5510,7 +5511,7 @@ BattleMonEntrance: ; 3e40b
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
call SetEnemyTurn call SetEnemyTurn
call Function3dc5b call PursuitSwitch
jr c, .ok jr c, .ok
call Function3dce6 call Function3dce6
.ok .ok
@ -6187,7 +6188,7 @@ Function3e7c1: ; 3e7c1
ld hl, EnemySubStatus4 ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
xor a xor a
ld [wc72c], a ld [wEnemyRageCounter], a
.asm_3e8af .asm_3e8af
ld a, [wEnemyMoveStruct + MOVE_EFFECT] ld a, [wEnemyMoveStruct + MOVE_EFFECT]
@ -6208,7 +6209,7 @@ ResetVarsForSubstatusRage: ; 3e8c1
xor a xor a
ld [EnemyFuryCutterCount], a ld [EnemyFuryCutterCount], a
ld [EnemyProtectCount], a ld [EnemyProtectCount], a
ld [wc72c], a ld [wEnemyRageCounter], a
ld hl, EnemySubStatus4 ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl] res SUBSTATUS_RAGE, [hl]
ret ret
@ -8483,10 +8484,10 @@ Function3f4dd: ; 3f4dd
ld [hBGMapMode], a ld [hBGMapMode], a
call EmptyBattleTextBox call EmptyBattleTextBox
hlcoord 9, 7 hlcoord 9, 7
ld bc, 5 << 8 + 11 lb bc, 5, 11
call ClearBox call ClearBox
hlcoord 1, 0 hlcoord 1, 0
ld bc, 4 << 8 + 10 lb bc, 4, 10
call ClearBox call ClearBox
call ClearSprites call ClearSprites
ld a, [wBattleMode] ld a, [wBattleMode]

View File

@ -3295,12 +3295,12 @@ BattleCommand12: ; 35250
bit SUBSTATUS_RAGE, a bit SUBSTATUS_RAGE, a
ret z ret z
ld de, wc72c ld de, wEnemyRageCounter
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .asm_3526b jr z, .player
ld de, wc72b ld de, wPlayerRageCounter
.asm_3526b .player
ld a, [de] ld a, [de]
inc a inc a
ret z ret z
@ -3324,9 +3324,9 @@ BattleCommanda2: ; 3527b
ld c, a ld c, a
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
ld a, [wc72b] ld a, [wPlayerRageCounter]
jr z, .asm_35290 jr z, .asm_35290
ld a, [wc72c] ld a, [wEnemyRageCounter]
.asm_35290 .asm_35290
and a and a
jr z, .asm_3529a jr z, .asm_3529a

View File

@ -1398,7 +1398,7 @@ Function2821:: ; 2821
call FarDecompress call FarDecompress
ld hl, w6_d000 ld hl, w6_d000
ld de, VTiles2 ld de, VTiles2
ld bc, $0600 ld bc, $60 tiles
call CopyBytes call CopyBytes
ld a, [rVBK] ld a, [rVBK]
push af push af
@ -1406,7 +1406,7 @@ Function2821:: ; 2821
ld [rVBK], a ld [rVBK], a
ld hl, w6_d600 ld hl, w6_d600
ld de, VTiles2 ld de, VTiles2
ld bc, $0600 ld bc, $60 tiles
call CopyBytes call CopyBytes
pop af pop af
ld [rVBK], a ld [rVBK], a

View File

@ -32413,7 +32413,7 @@ Function3957b: ; 3957b
ld hl, TrainerClassAttributes ld hl, TrainerClassAttributes
ld bc, NUM_TRAINER_ATTRIBUTES ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes call AddNTimes
ld de, wc650 ld de, wEnemyTrainerItem1
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de

View File

@ -455,8 +455,8 @@ wc64c::
wc64d:: ds 1 wc64d:: ds 1
wc64e:: ds 2 wc64e:: ds 2
wc650:: ds 1 wEnemyTrainerItem1:: ds 1
wc651:: ds 1 wEnemyTrainerItem2:: ds 1
wc652:: ds 4 wc652:: ds 4
wc656:: wc656::
OTName:: ds NAME_LENGTH ; c656 OTName:: ds NAME_LENGTH ; c656
@ -818,8 +818,8 @@ wc720:: ds 4 ; copy from/to EnemyMonBaseStats, length=7
wc724:: ds 3 wc724:: ds 3
wc727:: ds 2 wc727:: ds 2
wc729:: ds 2 wc729:: ds 2
wc72b:: ds 1 wPlayerRageCounter:: ds 1
wc72c:: ds 1 wEnemyRageCounter:: ds 1
wc72d:: ds 1 ; if 0 then PrintButItFailed wc72d:: ds 1 ; if 0 then PrintButItFailed
wc72e:: ds 1 wc72e:: ds 1
wc72f:: ds 1 wc72f:: ds 1