summaryrefslogtreecommitdiff
path: root/engine/battle/move_effects
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-04-04 23:56:40 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-04-04 23:56:40 -0400
commit81306889e33c599f8015bc4e653929bb7de00967 (patch)
tree7a812968ba565a13ef400cdcb5230e6e8185a1ec /engine/battle/move_effects
parent145efc13535fbc9d8ab2786d29209d97aebf0481 (diff)
parentf750d4f4185529cfb440ac7825d202ebcf160766 (diff)
Merge branch 'master' of https://github.com/pret/pokecrystal
Diffstat (limited to 'engine/battle/move_effects')
-rw-r--r--[-rwxr-xr-x]engine/battle/move_effects/attract.asm0
-rw-r--r--engine/battle/move_effects/beat_up.asm26
-rw-r--r--engine/battle/move_effects/false_swipe.asm6
-rw-r--r--[-rwxr-xr-x]engine/battle/move_effects/present.asm0
-rw-r--r--[-rwxr-xr-x]engine/battle/move_effects/transform.asm0
5 files changed, 26 insertions, 6 deletions
diff --git a/engine/battle/move_effects/attract.asm b/engine/battle/move_effects/attract.asm
index 026176694..026176694 100755..100644
--- a/engine/battle/move_effects/attract.asm
+++ b/engine/battle/move_effects/attract.asm
diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm
index 18e350504..8ea308d90 100644
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -5,9 +5,11 @@ BattleCommand_BeatUp: ; 35461
ld a, [hBattleTurn]
and a
jp nz, .enemy_beats_up
+
ld a, [wPlayerSubStatus3]
bit SUBSTATUS_IN_LOOP, a
jr nz, .next_mon
+
ld c, 20
call DelayFrames
xor a
@@ -51,11 +53,13 @@ BattleCommand_BeatUp: ; 35461
ld [wBeatUpHitAtLeastOnce], a
ld hl, BeatUpAttackText
call StdBattleTextBox
+
ld a, [wEnemyMonSpecies]
ld [wCurSpecies], a
call GetBaseData
ld a, [wBaseDefense]
ld c, a
+
push bc
ld a, MON_SPECIES
call GetBeatupMonLocation
@@ -65,12 +69,14 @@ BattleCommand_BeatUp: ; 35461
ld a, [wBaseAttack]
pop bc
ld b, a
+
push bc
ld a, MON_LEVEL
call GetBeatupMonLocation
ld a, [hl]
ld e, a
pop bc
+
ld a, [wPlayerMoveStructPower]
ld d, a
ret
@@ -78,21 +84,22 @@ BattleCommand_BeatUp: ; 35461
.enemy_beats_up
ld a, [wEnemySubStatus3]
bit SUBSTATUS_IN_LOOP, a
- jr nz, .not_first_enemy_beatup
+ jr nz, .enemy_next_mon
xor a
ld [wEnemyRolloutCount], a
ld [wd002], a
ld [wBeatUpHitAtLeastOnce], a
- jr .enemy_continue
+ jr .enemy_got_mon
-.not_first_enemy_beatup
+.enemy_next_mon
ld a, [wEnemyRolloutCount]
ld b, a
ld a, [wOTPartyCount]
sub b
ld [wd002], a
-.enemy_continue
+
+.enemy_got_mon
ld a, [wBattleMode]
dec a
jr z, .wild
@@ -122,19 +129,20 @@ BattleCommand_BeatUp: ; 35461
call AddNTimes
ld de, wStringBuffer1
call CopyBytes
+
.got_enemy_nick
ld a, MON_HP
call GetBeatupMonLocation
ld a, [hli]
or [hl]
jp z, .beatup_fail
+
ld a, [wd002]
ld b, a
ld a, [wCurOTMon]
cp b
ld hl, wEnemyMonStatus
jr z, .active_enemy
-
ld a, MON_STATUS
call GetBeatupMonLocation
.active_enemy
@@ -157,11 +165,13 @@ BattleCommand_BeatUp: ; 35461
.finish_beatup
ld hl, BeatUpAttackText
call StdBattleTextBox
+
ld a, [wBattleMonSpecies]
ld [wCurSpecies], a
call GetBaseData
ld a, [wBaseDefense]
ld c, a
+
push bc
ld a, MON_SPECIES
call GetBeatupMonLocation
@@ -171,12 +181,14 @@ BattleCommand_BeatUp: ; 35461
ld a, [wBaseAttack]
pop bc
ld b, a
+
push bc
ld a, MON_LEVEL
call GetBeatupMonLocation
ld a, [hl]
ld e, a
pop bc
+
ld a, [wEnemyMoveStructPower]
ld d, a
ret
@@ -191,7 +203,9 @@ BattleCommand_BeatUp: ; 35461
; 355b5
-BattleCommanda8: ; 355b5
+BattleCommand_BeatUpFailText: ; 355b5
+; beatupfailtext
+
ld a, [wBeatUpHitAtLeastOnce]
and a
ret nz
diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm
index e93b627ec..f00de91e7 100644
--- a/engine/battle/move_effects/false_swipe.asm
+++ b/engine/battle/move_effects/false_swipe.asm
@@ -1,6 +1,8 @@
BattleCommand_FalseSwipe: ; 35c94
; falseswipe
+; Makes sure wCurDamage < MonHP
+
ld hl, wEnemyMonHP
ld a, [hBattleTurn]
and a
@@ -15,12 +17,14 @@ BattleCommand_FalseSwipe: ; 35c94
pop de
pop hl
jr c, .done
+
ld a, [hli]
ld [de], a
inc de
ld a, [hl]
dec a
ld [de], a
+
inc a
jr nz, .okay
dec de
@@ -28,11 +32,13 @@ BattleCommand_FalseSwipe: ; 35c94
dec a
ld [de], a
.okay
+
ld a, [wCriticalHit]
cp 2
jr nz, .carry
xor a
ld [wCriticalHit], a
+
.carry
scf
ret
diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm
index a2ef5bc64..a2ef5bc64 100755..100644
--- a/engine/battle/move_effects/present.asm
+++ b/engine/battle/move_effects/present.asm
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
index 5ae7c1511..5ae7c1511 100755..100644
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm