diff options
| author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 16:51:04 +0200 |
|---|---|---|
| committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:50 +0200 |
| commit | 2fe782b11a039b52fd236da28fb2f1ae10cae7db (patch) | |
| tree | 580cc7bf8b0ebd617fd0ba0440618d38c355aa83 /engine/battle/init_battle_variables.asm | |
| parent | Rename battle files and split move effects Part 3 (diff) | |
| download | pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.tar.gz pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.tar.xz pokeyellow-2fe782b11a039b52fd236da28fb2f1ae10cae7db.zip | |
Rename battle files and split move effects Part 4
e.asm, e_2. asm, and 14.asm
Diffstat (limited to 'engine/battle/init_battle_variables.asm')
| -rw-r--r-- | engine/battle/init_battle_variables.asm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm new file mode 100644 index 00000000..457cc4e1 --- /dev/null +++ b/engine/battle/init_battle_variables.asm @@ -0,0 +1,40 @@ +InitBattleVariables: ; 525af (14:65af) + ld a, [hTilesetType] + ld [wd0d4], a + xor a + ld [wcd6a], a + ld [wBattleResult], a + ld hl, wcc2b + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld [wListScrollOffset], a + ld [wCriticalHitOrOHKO], a + ld [wBattleMonSpecies], a + ld [wPartyGainExpFlags], a + ld [wPlayerMonNumber], a + ld [wEscapedFromBattle], a + ld [wMapPalOffset], a + ld hl, wcf1d + ld [hli], a + ld [hl], a + ld hl, wccd3 + ld b, $3c +.loop + ld [hli], a + dec b + jr nz, .loop + inc a + ld [wccd9], a + ld a, [W_CURMAP] + cp SAFARI_ZONE_EAST + jr c, .notSafariBattle + cp SAFARI_ZONE_REST_HOUSE_1 + jr nc, .notSafariBattle + ld a, $2 ; safari battle + ld [W_BATTLETYPE], a +.notSafariBattle + ld hl, PlayBattleMusic + ld b, BANK(PlayBattleMusic) + jp Bankswitch |
