summaryrefslogtreecommitdiff
path: root/engine/battle
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/battle_transition.asm6
-rw-r--r--engine/battle/core.asm17
2 files changed, 23 insertions, 0 deletions
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm
index f5b4effe..a9d6468b 100644
--- a/engine/battle/battle_transition.asm
+++ b/engine/battle/battle_transition.asm
@@ -21,6 +21,7 @@ DoBattleTransition:
ld hl, hVBlank
ld a, [hl]
push af
+ vc_hook FPA_link_fight_begin
ld [hl], $1
.loop
@@ -48,6 +49,7 @@ DoBattleTransition:
ldh [hSCY], a
pop af
+ vc_hook FPA_link_fight_End4
ldh [hVBlank], a
call DelayFrame
ret
@@ -260,6 +262,7 @@ StartTrainerBattle_Flash:
dc 0, 0, 0, 1
StartTrainerBattle_SetUpForWavyOutro:
+ vc_hook FPA_link_fight_End0
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
@@ -316,6 +319,7 @@ StartTrainerBattle_SineWave:
ret
StartTrainerBattle_SetUpForSpinOutro:
+ vc_hook FPA_link_fight_End1
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
xor a
@@ -456,6 +460,7 @@ ENDM
.wedge5: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
StartTrainerBattle_SetUpForRandomScatterOutro:
+ vc_hook FPA_link_fight_End2
farcall RespawnPlayerAndOpponent
call StartTrainerBattle_NextScene
ld a, $10
@@ -674,6 +679,7 @@ StartTrainerBattle_DrawSineWave:
calc_sine_wave
StartTrainerBattle_ZoomToBlack:
+ vc_hook FPA_link_fight_End3
farcall RespawnPlayerAndOpponent
ld de, .boxes
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 9f8c3421..e16ae0ad 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -5671,6 +5671,7 @@ LinkBattleSendReceiveAction:
.use_move
ld [wPlayerLinkAction], a
+ vc_hook send_byt2
callfar PlaceWaitingText
.waiting
@@ -5680,20 +5681,35 @@ LinkBattleSendReceiveAction:
inc a
jr z, .waiting
+ vc_hook send_byt2_ret
+ vc_patch send_byt2_wait
+if DEF(_GOLD_VC) || DEF(_SILVER_VC)
+ ld b, 26
+else
ld b, 10
+endc
+ vc_patch_end
.receive
call DelayFrame
call LinkTransfer
dec b
jr nz, .receive
+ vc_hook send_dummy
+ vc_patch send_dummy_wait
+if DEF(_GOLD_VC) || DEF(_SILVER_VC)
+ ld b, 26
+else
ld b, 10
+endc
+ vc_patch_end
.acknowledge
call DelayFrame
call LinkDataReceived
dec b
jr nz, .acknowledge
+ vc_hook send_dummy_end
ret
LoadEnemyMon:
@@ -8544,6 +8560,7 @@ InitBattleDisplay:
predef PlaceGraphic
xor a
ldh [hWY], a
+ vc_hook fight_begin
ldh [rWY], a
call WaitBGMap
call HideSprites