summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRyan Tandy <ryan@nardis.ca>2019-08-26 22:17:00 -0700
committerRyan Tandy <ryan@nardis.ca>2019-08-26 22:17:00 -0700
commitcf4ab739af833709a6796e1434bee4dd07c1ea70 (patch)
treed9ccf53063d6f8d2651ca9ac533a0d8c8fbbd8a8 /engine
parent23daa5361f2b60b166b78f8ecae3d9d34771183c (diff)
Import trainer DVs data from pokecrystal
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/read_trainer_dvs.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/battle/read_trainer_dvs.asm b/engine/battle/read_trainer_dvs.asm
new file mode 100644
index 00000000..d35c9ea6
--- /dev/null
+++ b/engine/battle/read_trainer_dvs.asm
@@ -0,0 +1,21 @@
+GetTrainerDVs:
+; Return the DVs of wOtherTrainerClass in bc
+
+ push hl
+ ld a, [wOtherTrainerClass]
+ dec a
+ ld c, a
+ ld b, 0
+
+ ld hl, TrainerClassDVs
+ add hl, bc
+ add hl, bc
+
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+
+ pop hl
+ ret
+
+INCLUDE "data/trainers/dvs.asm"