pokecrystal-board/engine/events/battle_tower/trainer_text.asm

712 lines
9.9 KiB
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
BattleTowerText::
2018-01-23 14:39:09 -08:00
; Print text c for trainer [wBT_OTTrainerClass]
2015-11-03 19:35:36 -08:00
; 1: Intro text
; 2: Player lost
; 3: Player won
ldh a, [rSVBK]
2015-11-03 19:35:36 -08:00
push af
2018-01-23 14:39:09 -08:00
ld a, BANK(wBT_OTTrainerClass)
ldh [rSVBK], a
2018-01-09 14:26:40 -08:00
if DEF(_CRYSTAL11)
2018-01-23 14:39:09 -08:00
ld hl, wBT_OTTrainerClass
else
2015-11-20 12:15:32 -08:00
; BUG ALERT
; Instead of loading the Trainer Class, this routine
; loads the 6th character in the Trainer's name, then
; uses it to get the gender of the trainer.
; As a consequence, the enemy trainer's dialog will
; always be sampled from the female array.
2018-01-23 14:39:09 -08:00
ld hl, wBT_OTName + NAME_LENGTH_JAPANESE - 1
endc
2015-11-03 19:35:36 -08:00
ld a, [hl]
dec a
ld e, a
ld d, 0
ld hl, BTTrainerClassGenders
2015-11-03 19:35:36 -08:00
add hl, de
ld a, [hl]
and a
jr nz, .female
; generate a random number between 0 and 24
ldh a, [hRandomAdd]
2015-11-03 19:35:36 -08:00
and $1f
cp 25
jr c, .okay0
sub 25
.okay0
ld hl, BTMaleTrainerTexts
2015-11-03 19:35:36 -08:00
jr .proceed
.female
; generate a random number between 0 and 14
ldh a, [hRandomAdd]
2015-11-03 19:35:36 -08:00
and $f
cp 15
jr c, .okay1
sub 15
.okay1
ld hl, BTFemaleTrainerTexts
2015-11-03 19:35:36 -08:00
.proceed
ld b, 0
dec c
jr nz, .restore
2018-01-23 14:39:09 -08:00
ld [wBT_TrainerTextIndex], a
2015-11-03 19:35:36 -08:00
jr .okay2
.restore
2018-01-23 14:39:09 -08:00
ld a, [wBT_TrainerTextIndex]
2015-11-03 19:35:36 -08:00
.okay2
push af
add hl, bc
add hl, bc
2015-11-03 19:35:36 -08:00
ld a, [hli]
ld c, a
ld a, [hl]
ld h, a
ld l, c
pop af
ld c, a
ld b, 0
add hl, bc
add hl, bc
2015-11-03 19:35:36 -08:00
ld a, [hli]
ld c, a
ld a, [hl]
ld l, c
ld h, a
bccoord 1, 14
pop af
ldh [rSVBK], a
call PlaceHLTextAtBC
2015-11-03 19:35:36 -08:00
ret
INCLUDE "mobile/fixed_words.asm"
2015-11-03 19:35:36 -08:00
INCLUDE "data/trainers/genders.asm"
2018-06-24 07:09:41 -07:00
BTMaleTrainerTexts:
dw .Greetings
dw .PlayerLost
dw .PlayerWon
2018-06-24 07:09:41 -07:00
.Greetings:
dw BTGreetingM1Text
dw BTGreetingM2Text
dw BTGreetingM3Text
dw BTGreetingM4Text
dw BTGreetingM5Text
dw BTGreetingM6Text
dw BTGreetingM7Text
dw BTGreetingM8Text
dw BTGreetingM9Text
dw BTGreetingM10Text
dw BTGreetingM11Text
dw BTGreetingM12Text
dw BTGreetingM13Text
dw BTGreetingM14Text
dw BTGreetingM15Text
dw BTGreetingM16Text
dw BTGreetingM17Text
dw BTGreetingM18Text
dw BTGreetingM19Text
dw BTGreetingM20Text
dw BTGreetingM21Text
dw BTGreetingM22Text
dw BTGreetingM23Text
dw BTGreetingM24Text
dw BTGreetingM25Text
2018-06-24 07:09:41 -07:00
.PlayerLost:
dw BTLossM1Text
dw BTLossM2Text
dw BTLossM3Text
dw BTLossM4Text
dw BTLossM5Text
dw BTLossM6Text
dw BTLossM7Text
dw BTLossM8Text
dw BTLossM9Text
dw BTLossM10Text
dw BTLossM11Text
dw BTLossM12Text
dw BTLossM13Text
dw BTLossM14Text
dw BTLossM15Text
dw BTLossM16Text
dw BTLossM17Text
dw BTLossM18Text
dw BTLossM19Text
dw BTLossM20Text
dw BTLossM21Text
dw BTLossM22Text
dw BTLossM23Text
dw BTLossM24Text
dw BTLossM25Text
2018-06-24 07:09:41 -07:00
.PlayerWon:
dw BTWinM1Text
dw BTWinM2Text
dw BTWinM3Text
dw BTWinM4Text
dw BTWinM5Text
dw BTWinM6Text
dw BTWinM7Text
dw BTWinM8Text
dw BTWinM9Text
dw BTWinM10Text
dw BTWinM11Text
dw BTWinM12Text
dw BTWinM13Text
dw BTWinM14Text
dw BTWinM15Text
dw BTWinM16Text
dw BTWinM17Text
dw BTWinM18Text
dw BTWinM19Text
dw BTWinM20Text
dw BTWinM21Text
dw BTWinM22Text
dw BTWinM23Text
dw BTWinM24Text
dw BTWinM25Text
BTFemaleTrainerTexts:
dw .Greetings
dw .PlayerLost
dw .PlayerWon
2018-06-24 07:09:41 -07:00
.Greetings:
dw BTGreetingF1Text
dw BTGreetingF2Text
dw BTGreetingF3Text
dw BTGreetingF4Text
dw BTGreetingF5Text
dw BTGreetingF6Text
dw BTGreetingF7Text
dw BTGreetingF8Text
dw BTGreetingF9Text
dw BTGreetingF10Text
dw BTGreetingF11Text
dw BTGreetingF12Text
dw BTGreetingF13Text
dw BTGreetingF14Text
dw BTGreetingF15Text
2018-06-24 07:09:41 -07:00
.PlayerLost:
dw BTLossF1Text
dw BTLossF2Text
dw BTLossF3Text
dw BTLossF4Text
dw BTLossF5Text
dw BTLossF6Text
dw BTLossF7Text
dw BTLossF8Text
dw BTLossF9Text
dw BTLossF10Text
dw BTLossF11Text
dw BTLossF12Text
dw BTLossF13Text
dw BTLossF14Text
dw BTLossF15Text
2018-06-24 07:09:41 -07:00
.PlayerWon:
dw BTWinF1Text
dw BTWinF2Text
dw BTWinF3Text
dw BTWinF4Text
dw BTWinF5Text
dw BTWinF6Text
dw BTWinF7Text
dw BTWinF8Text
dw BTWinF9Text
dw BTWinF10Text
dw BTWinF11Text
dw BTWinF12Text
dw BTWinF13Text
dw BTWinF14Text
dw BTWinF15Text
BTGreetingM1Text:
text_far _BTGreetingM1Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM1Text:
text_far _BTLossM1Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM1Text:
text_far _BTWinM1Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM2Text:
text_far _BTGreetingM2Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM2Text:
text_far _BTLossM2Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM2Text:
text_far _BTWinM2Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM3Text:
text_far _BTGreetingM3Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM3Text:
text_far _BTLossM3Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM3Text:
text_far _BTWinM3Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM4Text:
text_far _BTGreetingM4Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM4Text:
text_far _BTLossM4Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM4Text:
text_far _BTWinM4Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM5Text:
text_far _BTGreetingM5Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM5Text:
text_far _BTLossM5Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM5Text:
text_far _BTWinM5Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM6Text:
text_far _BTGreetingM6Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM6Text:
text_far _BTLossM6Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM6Text:
text_far _BTWinM6Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM7Text:
text_far _BTGreetingM7Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM7Text:
text_far _BTLossM7Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM7Text:
text_far _BTWinM7Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM8Text:
text_far _BTGreetingM8Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM8Text:
text_far _BTLossM8Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM8Text:
text_far _BTWinM8Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM9Text:
text_far _BTGreetingM9Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM9Text:
text_far _BTLossM9Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM9Text:
text_far _BTWinM9Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM10Text:
text_far _BTGreetingM10Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM10Text:
text_far _BTLossM10Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM10Text:
text_far _BTWinM10Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM11Text:
text_far _BTGreetingM11Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM11Text:
text_far _BTLossM11Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM11Text:
text_far _BTWinM11Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM12Text:
text_far _BTGreetingM12Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM12Text:
text_far _BTLossM12Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM12Text:
text_far _BTWinM12Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM13Text:
text_far _BTGreetingM13Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM13Text:
text_far _BTLossM13Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM13Text:
text_far _BTWinM13Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM14Text:
text_far _BTGreetingM14Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM14Text:
text_far _BTLossM14Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM14Text:
text_far _BTWinM14Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM15Text:
text_far _BTGreetingM15Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM15Text:
text_far _BTLossM15Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM15Text:
text_far _BTWinM15Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM16Text:
text_far _BTGreetingM16Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM16Text:
text_far _BTLossM16Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM16Text:
text_far _BTWinM16Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM17Text:
text_far _BTGreetingM17Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM17Text:
text_far _BTLossM17Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM17Text:
text_far _BTWinM17Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM18Text:
text_far _BTGreetingM18Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM18Text:
text_far _BTLossM18Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM18Text:
text_far _BTWinM18Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM19Text:
text_far _BTGreetingM19Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM19Text:
text_far _BTLossM19Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM19Text:
text_far _BTWinM19Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM20Text:
text_far _BTGreetingM20Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM20Text:
text_far _BTLossM20Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM20Text:
text_far _BTWinM20Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM21Text:
text_far _BTGreetingM21Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM21Text:
text_far _BTLossM21Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM21Text:
text_far _BTWinM21Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM22Text:
text_far _BTGreetingM22Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM22Text:
text_far _BTLossM22Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM22Text:
text_far _BTWinM22Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM23Text:
text_far _BTGreetingM23Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM23Text:
text_far _BTLossM23Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM23Text:
text_far _BTWinM23Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM24Text:
text_far _BTGreetingM24Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM24Text:
text_far _BTLossM24Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM24Text:
text_far _BTWinM24Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingM25Text:
text_far _BTGreetingM25Text
text_end
2015-11-03 19:35:36 -08:00
BTLossM25Text:
text_far _BTLossM25Text
text_end
2015-11-03 19:35:36 -08:00
BTWinM25Text:
text_far _BTWinM25Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF1Text:
text_far _BTGreetingF1Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF1Text:
text_far _BTLossF1Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF1Text:
text_far _BTWinF1Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF2Text:
text_far _BTGreetingF2Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF2Text:
text_far _BTLossF2Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF2Text:
text_far _BTWinF2Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF3Text:
text_far _BTGreetingF3Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF3Text:
text_far _BTLossF3Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF3Text:
text_far _BTWinF3Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF4Text:
text_far _BTGreetingF4Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF4Text:
text_far _BTLossF4Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF4Text:
text_far _BTWinF4Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF5Text:
text_far _BTGreetingF5Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF5Text:
text_far _BTLossF5Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF5Text:
text_far _BTWinF5Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF6Text:
text_far _BTGreetingF6Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF6Text:
text_far _BTLossF6Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF6Text:
text_far _BTWinF6Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF7Text:
text_far _BTGreetingF7Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF7Text:
text_far _BTLossF7Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF7Text:
text_far _BTWinF7Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF8Text:
text_far _BTGreetingF8Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF8Text:
text_far _BTLossF8Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF8Text:
text_far _BTWinF8Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF9Text:
text_far _BTGreetingF9Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF9Text:
text_far _BTLossF9Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF9Text:
text_far _BTWinF9Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF10Text:
text_far _BTGreetingF10Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF10Text:
text_far _BTLossF10Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF10Text:
text_far _BTWinF10Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF11Text:
text_far _BTGreetingF11Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF11Text:
text_far _BTLossF11Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF11Text:
text_far _BTWinF11Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF12Text:
text_far _BTGreetingF12Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF12Text:
text_far _BTLossF12Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF12Text:
text_far _BTWinF12Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF13Text:
text_far _BTGreetingF13Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF13Text:
text_far _BTLossF13Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF13Text:
text_far _BTWinF13Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF14Text:
text_far _BTGreetingF14Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF14Text:
text_far _BTLossF14Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF14Text:
text_far _BTWinF14Text
text_end
2015-11-03 19:35:36 -08:00
BTGreetingF15Text:
text_far _BTGreetingF15Text
text_end
2015-11-03 19:35:36 -08:00
BTLossF15Text:
text_far _BTLossF15Text
text_end
2015-11-03 19:35:36 -08:00
BTWinF15Text:
text_far _BTWinF15Text
text_end