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 | |
| 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')
| -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 | ||||
| -rw-r--r-- | engine/events/poison.asm | 6 | ||||
| -rw-r--r-- | engine/events/prize_menu.asm | 6 | ||||
| -rw-r--r-- | engine/gfx/palettes.asm | 8 | ||||
| -rw-r--r-- | engine/items/town_map.asm | 2 | ||||
| -rw-r--r-- | engine/link/cable_club.asm | 2 | ||||
| -rw-r--r-- | engine/overworld/map_sprites.asm | 2 |
10 files changed, 26 insertions, 24 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 diff --git a/engine/events/poison.asm b/engine/events/poison.asm index 467d1a5f..18546254 100644 --- a/engine/events/poison.asm +++ b/engine/events/poison.asm @@ -22,7 +22,7 @@ ApplyOutOfBattlePoisonDamage: ld de, wPartySpecies .applyDamageLoop ld a, [hl] - and (1 << PSN) + and 1 << PSN jr z, .nextMon2 ; not poisoned dec hl dec hl @@ -92,7 +92,7 @@ ApplyOutOfBattlePoisonDamage: ld e, 0 .countPoisonedLoop ld a, [hl] - and (1 << PSN) + and 1 << PSN or e ld e, a ld bc, wPartyMon2 - wPartyMon1 @@ -103,7 +103,7 @@ ApplyOutOfBattlePoisonDamage: and a ; are any party members poisoned? jr z, .skipPoisonEffectAndSound ld b, $2 - predef ChangeBGPalColor0_4Frames ; change BG white to dark grey for 4 frames + predef ChangeBGPalColor0_4Frames ; change BG white to dark gray for 4 frames ld a, SFX_POISONED call PlaySound .skipPoisonEffectAndSound diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm index a365f45f..4b2121f5 100644 --- a/engine/events/prize_menu.asm +++ b/engine/events/prize_menu.asm @@ -128,15 +128,15 @@ GetPrizeMenuId: ; reg. c: ; [low nybble] number of bytes ; [bits 765 = %100] space-padding (not zero-padding) - ld c, (1 << 7 | 2) + ld c, (1 << 7) | 2 call PrintBCDNumber ld de, wPrize2Price hlcoord 13, 7 - ld c, (1 << 7 | 2) + ld c, (1 << 7) | 2 call PrintBCDNumber ld de, wPrize3Price hlcoord 13, 9 - ld c, (1 << 7 | 2) + ld c, (1 << 7) | 2 jp PrintBCDNumber NoThanksText: diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index d9ae4369..428a6998 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -180,7 +180,7 @@ SetPal_Overworld: ld [wDefaultPaletteCommand], a ret .PokemonTowerOrAgatha - ld a, PAL_GREYMON - 1 + ld a, PAL_GRAYMON - 1 jr .town .caveOrBruno ld a, PAL_CAVE - 1 @@ -189,7 +189,7 @@ SetPal_Overworld: xor a jr .town .trade_center_colosseum - ld a, PAL_GREYMON - 1 + ld a, PAL_GRAYMON - 1 jr .town ; used when a Pokemon is the only thing on the screen @@ -423,7 +423,7 @@ GetPal_Pikachu:: ret .PokemonTowerOrAgatha - ld a, PAL_GREYMON - 1 + ld a, PAL_GRAYMON - 1 jr .town .caveOrBruno @@ -435,7 +435,7 @@ GetPal_Pikachu:: jr .town .battleOrTradeCenter - ld a, PAL_GREYMON - 1 + ld a, PAL_GRAYMON - 1 jr .town InitPartyMenuBlkPacket: diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index a49e751e..abd3b13f 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -520,7 +520,7 @@ WriteSymmetricMonPartySpriteOAM: ld [hli], a ; tile ld a, [wSymmetricSpriteOAMAttributes] ld [hli], a ; attributes - xor (1 << OAM_X_FLIP) + xor 1 << OAM_X_FLIP ld [wSymmetricSpriteOAMAttributes], a inc d ld a, 8 diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index f2b651fe..26845d2e 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -119,7 +119,7 @@ CableClub_DoBattleOrTradeAgain: .skipSendingTwoZeroBytes call Delay3 call StopAllMusic - ld a, (1 << SERIAL) + ld a, 1 << SERIAL ldh [rIE], a ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 5d25b6d0..b6ce4229 100644 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -59,7 +59,7 @@ LoadSpriteSetFromMapHeader: ; (since the Red sprite always has the first VRAM tile pattern slot and the ; Pikachu sprite reserves the second slot) is the VRAM tile pattern slot. ld hl, wSpriteSet - ld bc, (wSpriteSetID - wSpriteSet) + ld bc, wSpriteSetID - wSpriteSet xor a call FillMemory ld a, SPRITE_PIKACHU ; load Pikachu separately |
