Skip to content

Commit

Permalink
Rename some script commands
Browse files Browse the repository at this point in the history
like print_text_string -> print_npc_text etc, and change instances of 'battle' to 'duel'
  • Loading branch information
dannye committed Jan 16, 2021
1 parent 09ac45c commit 518e7d3
Show file tree
Hide file tree
Showing 10 changed files with 625 additions and 571 deletions.
2 changes: 1 addition & 1 deletion src/constants/script_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const EVENT_FLAG_00 ; $00
const EVENT_FLAG_01 ; $01
const EVENT_TEMP_TALKED_TO_IMAKUNI ; $02
const EVENT_TEMP_BATTLED_IMAKUNI ; $03
const EVENT_TEMP_DUELED_IMAKUNI ; $03
const EVENT_FLAG_04 ; $04
const EVENT_FLAG_05 ; $05
const EVENT_FLAG_06 ; $06
Expand Down
2 changes: 1 addition & 1 deletion src/data/npc_map_data.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; NPC Map data. Note: pre-load functions also run after battles
; NPC Map data. Note: pre-load functions also run after duels
; Format:
; NPC, X position, Y Position, Direction,
; pre-load function. (Resets c flag if NPC should not be loaded)
Expand Down
20 changes: 10 additions & 10 deletions src/engine/bank01.asm
Original file line number Diff line number Diff line change
Expand Up @@ -188,29 +188,29 @@ MainDuelLoop: ; 40ee (1:40ee)
; load the correct music and animation depending on result
ld a, [wDuelFinished]
cp TURN_PLAYER_WON
jr z, .active_duelist_won_battle
jr z, .active_duelist_won_duel
cp TURN_PLAYER_LOST
jr z, .active_duelist_lost_battle
jr z, .active_duelist_lost_duel
ld a, DUEL_ANIM_DUEL_DRAW
ld c, MUSIC_MATCH_DRAW
ldtx hl, DuelWasADrawText
jr .handle_duel_finished
.active_duelist_won_battle
.active_duelist_won_duel
ldh a, [hWhoseTurn]
cp PLAYER_TURN
jr nz, .opponent_won_battle
.player_won_battle
jr nz, .opponent_won_duel
.player_won_duel
xor a ; DUEL_WIN
ld [wDuelResult], a
ld a, DUEL_ANIM_DUEL_WIN
ld c, MUSIC_MATCH_VICTORY
ldtx hl, WonDuelText
jr .handle_duel_finished
.active_duelist_lost_battle
.active_duelist_lost_duel
ldh a, [hWhoseTurn]
cp PLAYER_TURN
jr nz, .player_won_battle
.opponent_won_battle
jr nz, .player_won_duel
.opponent_won_duel
ld a, DUEL_LOSS
ld [wDuelResult], a
ld a, DUEL_ANIM_DUEL_LOSS
Expand All @@ -232,7 +232,7 @@ MainDuelLoop: ; 40ee (1:40ee)
jr nz, .wait_song
ld a, [wDuelFinished]
cp TURN_PLAYER_TIED
jr z, .tied_battle
jr z, .tied_duel
call Func_39fc
call WaitForWideTextBoxInput
call Func_3b31
Expand All @@ -241,7 +241,7 @@ MainDuelLoop: ; 40ee (1:40ee)
ldh [hWhoseTurn], a
ret

.tied_battle
.tied_duel
call WaitForWideTextBoxInput
call Func_3b31
ld a, [wDuelTheme]
Expand Down
Loading

0 comments on commit 518e7d3

Please sign in to comment.