mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-22 15:32:16 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
66
engine/battle/read_trainer_attributes.asm
Normal file
66
engine/battle/read_trainer_attributes.asm
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
GetTrainerClassName:
|
||||
ld hl, wRivalName
|
||||
ld a, c
|
||||
cp RIVAL1
|
||||
jr z, .rival
|
||||
|
||||
ld [wCurSpecies], a
|
||||
ld a, TRAINER_NAME
|
||||
ld [wNamedObjectType], a
|
||||
call GetName
|
||||
ld de, wStringBuffer1
|
||||
ret
|
||||
|
||||
.rival
|
||||
ld de, wStringBuffer1
|
||||
push de
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyBytes
|
||||
pop de
|
||||
ret
|
||||
|
||||
GetOTName:
|
||||
ld hl, wOTPlayerName
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
jr nz, .ok
|
||||
|
||||
ld hl, wRivalName
|
||||
ld a, c
|
||||
cp RIVAL1
|
||||
jr z, .ok
|
||||
|
||||
ld [wCurSpecies], a
|
||||
ld a, TRAINER_NAME
|
||||
ld [wNamedObjectType], a
|
||||
call GetName
|
||||
ld hl, wStringBuffer1
|
||||
|
||||
.ok
|
||||
ld bc, TRAINER_CLASS_NAME_LENGTH
|
||||
ld de, wOTClassName
|
||||
push de
|
||||
call CopyBytes
|
||||
pop de
|
||||
ret
|
||||
|
||||
GetTrainerAttributes:
|
||||
ld a, [wTrainerClass]
|
||||
ld c, a
|
||||
call GetOTName
|
||||
ld a, [wTrainerClass]
|
||||
dec a
|
||||
ld hl, TrainerClassAttributes + TRNATTR_ITEM1
|
||||
ld bc, NUM_TRAINER_ATTRIBUTES
|
||||
call AddNTimes
|
||||
ld de, wEnemyTrainerItem1
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
ld a, [hl]
|
||||
ld [wEnemyTrainerBaseReward], a
|
||||
ret
|
||||
|
||||
INCLUDE "data/trainers/attributes.asm"
|
||||
Loading…
Add table
Add a link
Reference in a new issue