diff options
author | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
commit | c2efe700ac1c5cca88bac710b98388a99665741e (patch) | |
tree | b30d2f676d5ad0d78b959c8ffcf0f8dcfca13943 /engine/battle/init_battle_variables.asm | |
parent | 52add272c6bca00d2ea827ef7fa4611a4bc41b47 (diff) | |
parent | ce9940a2eb89caa9f53507a6d6071f8eaf85ee48 (diff) |
Merge pull request #90 from xCrystal/master
Rename/split battle and move effect files. Battle functions, AI, and attack animations
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 |