diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-19 17:08:39 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-19 17:08:39 -0400 |
commit | f2c6c1972d343a567dffa7bb06c0170f34cc9e8d (patch) | |
tree | 8f9aac099d7c2417d7abc18f06bb070edd6506a6 | |
parent | c4f0021b17c9564b5592911e255d79b4140c167b (diff) |
diff +
-rw-r--r-- | Allow-more-trainer-parties,-with-individual-DVs,-stat-experience,-and-nicknames.md | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Allow-more-trainer-parties,-with-individual-DVs,-stat-experience,-and-nicknames.md b/Allow-more-trainer-parties,-with-individual-DVs,-stat-experience,-and-nicknames.md index c3cbbe1..f258d85 100644 --- a/Allow-more-trainer-parties,-with-individual-DVs,-stat-experience,-and-nicknames.md +++ b/Allow-more-trainer-parties,-with-individual-DVs,-stat-experience,-and-nicknames.md @@ -284,26 +284,26 @@ Finally, edit [engine/overworld/wildmons.asm](../blob/master/engine/overworld/wi - ; TRAINERTYPE_ITEM_MOVES - ld bc, 2 + 1 + NUM_MOVES ; level, species, item, moves -.got_mon_length -; b = trainer type - ld b, a -; c = mon length -; All trainers use 2 bytes for level and species - ld c, 2 -; TRAINERTYPE_ITEM uses 1 more byte - bit TRAINERTYPE_ITEM_F, b - jr z, .no_item - inc c -.no_item -; TRAINERTYPE_MOVES uses 4 more bytes - bit TRAINERTYPE_MOVES_F, b - jr z, .no_moves - ld a, 4 - add c - ld c, a -.no_moves -; bc = mon length - xor a - ld b, a ++; b = trainer type ++ ld b, a ++; c = mon length ++; All trainers use 2 bytes for level and species ++ ld c, 2 ++; TRAINERTYPE_ITEM uses 1 more byte ++ bit TRAINERTYPE_ITEM_F, b ++ jr z, .no_item ++ inc c ++.no_item ++; TRAINERTYPE_MOVES uses 4 more bytes ++ bit TRAINERTYPE_MOVES_F, b ++ jr z, .no_moves ++ ld a, 4 ++ add c ++ ld c, a ++.no_moves ++; bc = mon length ++ xor a ++ ld b, a ``` If we stopped here, the code would be cleaner and smaller, but would not do anything new. So let's continue. |