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 | |
| 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')
| -rw-r--r-- | engine/battle/animations.asm | 2 | ||||
| -rw-r--r-- | engine/battle/core.asm | 4 | ||||
| -rw-r--r-- | engine/battle/effects.asm | 16 | ||||
| -rw-r--r-- | engine/battle/ghost_marowak_anim.asm | 2 |
4 files changed, 13 insertions, 11 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 42603824..f9608fdb 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -2589,7 +2589,7 @@ FallingObjects_UpdateOAMEntry: ld [wdef4], a .asm_79e5c inc hl - ld a, (1 << OAM_X_FLIP) + ld a, 1 << OAM_X_FLIP .next2 ld b, a ld a, [wdef4] diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 919de01c..d6ce6557 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6867,7 +6867,7 @@ BattleRandom: add hl, bc inc a ld [wLinkBattleRandomNumberListIndex], a - cp 9 + cp SERIAL_RNS_LENGTH - 1 ld a, [hl] pop bc pop hl @@ -6890,7 +6890,7 @@ ENDC ld [wLinkBattleRandomNumberListIndex], a ld hl, wLinkBattleRandomNumberList - ld b, 9 + ld b, SERIAL_RNS_LENGTH - 1 .loop ld a, [hl] ld c, a 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 diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm index 7fe42121..5b14f6df 100644 --- a/engine/battle/ghost_marowak_anim.asm +++ b/engine/battle/ghost_marowak_anim.asm @@ -17,7 +17,7 @@ MarowakAnim: ld a, $1 ldh [hWhoseTurn], a callfar ChangeMonPic - ; alternate between black and light grey 8 times. + ; alternate between black and light gray 8 times. ; this makes the ghost's body appear to flash ld d, $80 call FlashSprite8Times |
