diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-02 23:30:21 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-02 23:30:21 -0400 |
| commit | f275790aec4a796ed969b099364abfdf25385967 (patch) | |
| tree | c56edfd01a61e9aa0e3c3ee8a046e66b5a1984e4 /engine/battle/moveEffects/transform_effect.asm | |
| parent | Actually run .travis/webhook.sh (diff) | |
| download | pokeyellow-f275790aec4a796ed969b099364abfdf25385967.tar.gz pokeyellow-f275790aec4a796ed969b099364abfdf25385967.tar.xz pokeyellow-f275790aec4a796ed969b099364abfdf25385967.zip | |
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/battle/moveEffects/transform_effect.asm')
| -rw-r--r-- | engine/battle/moveEffects/transform_effect.asm | 148 |
1 files changed, 0 insertions, 148 deletions
diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm deleted file mode 100644 index 9a5de9cc..00000000 --- a/engine/battle/moveEffects/transform_effect.asm +++ /dev/null @@ -1,148 +0,0 @@ -TransformEffect_: - ld hl, wBattleMonSpecies - ld de, wEnemyMonSpecies - ld bc, wEnemyBattleStatus3 - ld a, [wEnemyBattleStatus1] - ld a, [H_WHOSETURN] - and a - jr nz, .hitTest - ld hl, wEnemyMonSpecies - ld de, wBattleMonSpecies - ld bc, wPlayerBattleStatus3 - ld [wPlayerMoveListIndex], a - ld a, [wPlayerBattleStatus1] -.hitTest - bit INVULNERABLE, a ; is mon invulnerable to typical attacks? (fly/dig) - jp nz, .failed - push hl - push de - push bc - ld hl, wPlayerBattleStatus2 - ld a, [H_WHOSETURN] - and a - jr z, .transformEffect - ld hl, wEnemyBattleStatus2 -.transformEffect -; animation(s) played are different if target has Substitute up - bit HAS_SUBSTITUTE_UP, [hl] - push af - ld hl, HideSubstituteShowMonAnim - ld b, BANK(HideSubstituteShowMonAnim) - call nz, Bankswitch - ld a, [wOptions] - add a - ld hl, PlayCurrentMoveAnimation - ld b, BANK(PlayCurrentMoveAnimation) - jr nc, .gotAnimToPlay - ld hl, AnimationTransformMon - ld b, BANK(AnimationTransformMon) -.gotAnimToPlay - call Bankswitch - ld hl, ReshowSubstituteAnim - ld b, BANK(ReshowSubstituteAnim) - pop af - call nz, Bankswitch - pop bc - ld a, [bc] - set TRANSFORMED, a ; mon is now transformed - ld [bc], a - pop de - pop hl - push hl -; transform user into opposing Pokemon -; species - ld a, [hl] - ld [de], a -; type 1, type 2, catch rate, and moves - ld bc, $5 - add hl, bc - inc de - inc de - inc de - inc de - inc de - inc bc - inc bc - call CopyData - ld a, [H_WHOSETURN] - and a - jr z, .next -; save enemy mon DVs at wTransformedEnemyMonOriginalDVs - ld a, [de] - ld [wTransformedEnemyMonOriginalDVs], a - inc de - ld a, [de] - ld [wTransformedEnemyMonOriginalDVs + 1], a - dec de -.next -; DVs - ld a, [hli] - ld [de], a - inc de - ld a, [hli] - ld [de], a - inc de -; Attack, Defense, Speed, and Special stats - inc hl - inc hl - inc hl - inc de - inc de - inc de - ld bc, $8 - call CopyData - ld bc, wBattleMonMoves - wBattleMonPP - add hl, bc ; ld hl, wBattleMonMoves - ld b, NUM_MOVES -.copyPPLoop -; 5 PP for all moves - ld a, [hli] - and a - jr z, .lessThanFourMoves - ld a, $5 - ld [de], a - inc de - dec b - jr nz, .copyPPLoop - jr .copyStats -.lessThanFourMoves -; 0 PP for blank moves - xor a - ld [de], a - inc de - dec b - jr nz, .lessThanFourMoves -.copyStats -; original (unmodified) stats and stat mods - pop hl - ld a, [hl] - ld [wd11e], a - call GetMonName - ld hl, wEnemyMonUnmodifiedAttack - ld de, wPlayerMonUnmodifiedAttack - call .copyBasedOnTurn ; original (unmodified) stats - ld hl, wEnemyMonStatMods - ld de, wPlayerMonStatMods - call .copyBasedOnTurn ; stat mods - ld hl, TransformedText - jp PrintText - -.copyBasedOnTurn - ld a, [H_WHOSETURN] - and a - jr z, .gotStatsOrModsToCopy - push hl - ld h, d - ld l, e - pop de -.gotStatsOrModsToCopy - ld bc, $8 - jp CopyData - -.failed - ld hl, PrintButItFailedText_ - jp BankswitchEtoF - -TransformedText: - TX_FAR _TransformedText - db "@" |
