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/moveEffects/conversion_effect.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/moveEffects/conversion_effect.asm')
-rw-r--r-- | engine/battle/moveEffects/conversion_effect.asm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm new file mode 100644 index 00000000..511df2fd --- /dev/null +++ b/engine/battle/moveEffects/conversion_effect.asm @@ -0,0 +1,34 @@ +ConversionEffect_: ; 139a3 (4:79a3) + ld hl, wEnemyMonType1 + ld de, wBattleMonType1 + ld a, [H_WHOSETURN] + and a + ld a, [W_ENEMYBATTSTATUS1] + jr z, .asm_139b8 + push hl + ld h, d + ld l, e + pop de + ld a, [W_PLAYERBATTSTATUS1] +.asm_139b8 + bit Invulnerable, a ; is mon immune to typical attacks (dig/fly) + jr nz, PrintButItFailedText + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ld hl, PlayCurrentMoveAnimation + call CallBankF + ld hl, ConvertedTypeText + jp PrintText + +ConvertedTypeText: ; 139cd (4:79cd) + TX_FAR _ConvertedTypeText + db "@" + +PrintButItFailedText: ; 139d2 (4:79d2) + ld hl, PrintButItFailedText_ +CallBankF: ; 139d5 (4:79d5) + ld b, BANK(PrintButItFailedText_) + jp Bankswitch |