diff options
| author | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 16:16:43 +0200 |
|---|---|---|
| committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-01 17:05:49 +0200 |
| commit | 77d0e5ff84cc61ae625da19f184094241eddd4dc (patch) | |
| tree | 921ae74206ff3b396cc3423a0b699b4563239a96 /engine/battle/moveEffects | |
| parent | Rename battle files and split move effects Part 2 (diff) | |
| download | pokeyellow-77d0e5ff84cc61ae625da19f184094241eddd4dc.tar.gz pokeyellow-77d0e5ff84cc61ae625da19f184094241eddd4dc.tar.xz pokeyellow-77d0e5ff84cc61ae625da19f184094241eddd4dc.zip | |
Rename battle files and split move effects Part 3
b.asm, b_2.asm, c.asm, and d.asm
Diffstat (limited to '')
| -rw-r--r-- | engine/battle/moveEffects/mist_effect.asm | 21 | ||||
| -rw-r--r--[-rwxr-xr-x] | engine/battle/moveEffects/one_hit_ko_effect.asm (renamed from engine/battle/c.asm) | 22 | ||||
| -rw-r--r-- | engine/battle/moveEffects/pay_day_effect.asm | 43 |
3 files changed, 64 insertions, 22 deletions
diff --git a/engine/battle/moveEffects/mist_effect.asm b/engine/battle/moveEffects/mist_effect.asm new file mode 100644 index 00000000..adee1dfd --- /dev/null +++ b/engine/battle/moveEffects/mist_effect.asm @@ -0,0 +1,21 @@ +MistEffect_: ; 33f2b (c:7f2b) + ld hl, W_PLAYERBATTSTATUS2 + ld a, [$fff3] + and a + jr z, .asm_33f36 + ld hl, W_ENEMYBATTSTATUS2 +.asm_33f36 + bit ProtectedByMist, [hl] ; is mon protected by mist? + jr nz, .asm_33f4a + set ProtectedByMist, [hl] ; mon is now protected by mist + callab PlayCurrentMoveAnimation + ld hl, ShroudedInMistText + jp PrintText +.asm_33f4a + ld hl, PrintButItFailedText_ + ld b, BANK(PrintButItFailedText_) + jp Bankswitch + +ShroudedInMistText: ; 33f52 (c:7f52) + TX_FAR _ShroudedInMistText + db "@" diff --git a/engine/battle/c.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm index b7c20ef6..84418e33 100755..100644 --- a/engine/battle/c.asm +++ b/engine/battle/moveEffects/one_hit_ko_effect.asm @@ -1,25 +1,3 @@ -MistEffect_: ; 33f2b (c:7f2b) - ld hl, W_PLAYERBATTSTATUS2 - ld a, [$fff3] - and a - jr z, .asm_33f36 - ld hl, W_ENEMYBATTSTATUS2 -.asm_33f36 - bit ProtectedByMist, [hl] ; is mon protected by mist? - jr nz, .asm_33f4a - set ProtectedByMist, [hl] ; mon is now protected by mist - callab PlayCurrentMoveAnimation - ld hl, ShroudedInMistText - jp PrintText -.asm_33f4a - ld hl, PrintButItFailedText_ - ld b, BANK(PrintButItFailedText_) - jp Bankswitch - -ShroudedInMistText: ; 33f52 (c:7f52) - TX_FAR _ShroudedInMistText - db "@" - OneHitKOEffect_: ; 33f57 (c:7f57) ld hl, W_DAMAGE xor a diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm new file mode 100644 index 00000000..75a005ed --- /dev/null +++ b/engine/battle/moveEffects/pay_day_effect.asm @@ -0,0 +1,43 @@ +PayDayEffect_ ; 2feb8 (b:7eb8) + xor a + ld hl, wcd6d + ld [hli], a + ld a, [H_WHOSETURN] + and a + ld a, [wBattleMonLevel] + jr z, .asm_2fec8 + ld a, [wEnemyMonLevel] +.asm_2fec8 + add a + ld [H_DIVIDEND + 3], a + xor a + ld [H_DIVIDEND], a + ld [H_DIVIDEND + 1], a + ld [H_DIVIDEND + 2], a + ld a, $64 + ld [H_DIVISOR], a + ld b, $4 + call Divide + ld a, [H_QUOTIENT + 3] + ld [hli], a + ld a, [H_REMAINDER] + ld [H_DIVIDEND + 3], a + ld a, $a + ld [H_DIVISOR], a + ld b, $4 + call Divide + ld a, [H_QUOTIENT + 3] + swap a + ld b, a + ld a, [H_REMAINDER] + add b + ld [hl], a + ld de, wTotalPayDayMoney + 2 + ld c, $3 + predef AddBCDPredef + ld hl, CoinsScatteredText + jp PrintText + +CoinsScatteredText: ; 2ff04 (b:7f04) + TX_FAR _CoinsScatteredText + db "@" |
