diff options
| author | Rangi42 <sylvie.oukaour+rangi42@gmail.com> | 2024-12-25 16:46:37 -0500 |
|---|---|---|
| committer | Rangi42 <sylvie.oukaour+rangi42@gmail.com> | 2024-12-25 16:53:04 -0500 |
| commit | 47b784a4fbc7513ea6106877fbb7a54158e1b13b (patch) | |
| tree | 301a856e76abb5dcb7bcc3986ddb4bbe4f70e88e /engine/battle/effects.asm | |
| parent | Fix comments around battle evolution code (#120) (diff) | |
| parent | Use `SERIAL_RNS_LENGTH` in `BattleRandom` (diff) | |
| download | pokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.tar.gz pokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.tar.xz pokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/battle/effects.asm')
| -rw-r--r-- | engine/battle/effects.asm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index 1feebb21..a78de9ca 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -221,11 +221,11 @@ FreezeBurnParalyzeEffect: cp b ; do target type 2 and move type match? ret z ; return if they match ld a, [wPlayerMoveEffect] - cp UNUSED_EFFECT_23 ; more stadium stuff + cp FREEZE_SIDE_EFFECT2 ; more stadium stuff jr nz, .asm_3f2c7 ld a, [wUnknownSerialFlag_d499] and a - ld a, FREEZE_SIDE_EFFECT + ld a, FREEZE_SIDE_EFFECT1 ld b, 30 percent + 1 jr z, .regular_effectiveness ld b, 10 percent + 1 @@ -236,7 +236,9 @@ FreezeBurnParalyzeEffect: jr c, .regular_effectiveness ; extra effectiveness ld b, 30 percent + 1 - sub BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1 ; treat extra effective as regular from now on + assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == BURN_SIDE_EFFECT2 - BURN_SIDE_EFFECT1 + assert PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 == FREEZE_SIDE_EFFECT2 - FREEZE_SIDE_EFFECT1 + sub PARALYZE_SIDE_EFFECT2 - PARALYZE_SIDE_EFFECT1 ; treat extra effective as regular from now on .regular_effectiveness push af call BattleRandom ; get random 8bit value for probability test @@ -246,7 +248,7 @@ FreezeBurnParalyzeEffect: ld a, b ; what type of effect is this? cp BURN_SIDE_EFFECT1 jr z, .burn1 - cp FREEZE_SIDE_EFFECT + cp FREEZE_SIDE_EFFECT1 jr z, .freeze1 ; .paralyze1 ld a, 1 << PAR @@ -284,11 +286,11 @@ FreezeBurnParalyzeEffect: cp b ret z ld a, [wEnemyMoveEffect] - cp UNUSED_EFFECT_23 ; more stadium stuff + cp FREEZE_SIDE_EFFECT2 ; more stadium stuff jr nz, .asm_3f341 ld a, [wUnknownSerialFlag_d499] and a - ld a, FREEZE_SIDE_EFFECT + ld a, FREEZE_SIDE_EFFECT1 ld b, 30 percent + 1 jr z, .regular_effectiveness2 ld b, 10 percent + 1 @@ -309,7 +311,7 @@ FreezeBurnParalyzeEffect: ld a, b cp BURN_SIDE_EFFECT1 jr z, .burn2 - cp FREEZE_SIDE_EFFECT + cp FREEZE_SIDE_EFFECT1 jr z, .freeze2 ; .paralyze2 ld a, 1 << PAR |
