• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[PokeCrystal] Did I do this shiny code correctly?

  • 1
    Posts
    5
    Years
    • Seen Oct 24, 2024
    Hello! I'm pretty new to this, and I altered the Crystal shiny odds using the unused check shininess as a guide. I thought I calculated this as being 1/606 shiny odds, but I think I messed something up. I'd greatly appreciate it if anyone has any pointers? Here's what I have for the 1/606 odds, if that's even correct;

    Code:
    INCLUDE "engine/gfx/sgb_layouts.asm"
    
    DEF SHINY_ATK_DV EQU 10
    DEF SHINY_DEF_DV EQU 10
    DEF SHINY_SPD_DV EQU 10
    DEF SHINY_SPC_DV EQU 10
    
    CheckShininess:
    ; Return carry if the DVs at hl are all 10 or higher.
    
    ; Attack
        ld a, [hl]
        cp 13 << 4
        jr c, .not_shiny
    
    ; Defense
        ld a, [hli]
        and %1111
        cp 13
        jr c, .not_shiny
    
    ; Speed
        ld a, [hl]
        cp 12 << 4
        jr c, .not_shiny
    
    ; Special
        ld a, [hl]
        and %1111
        cp 13
        jr c, .not_shiny
    
    ; shiny
        scf
        ret
    
    .not_shiny
        and a
        ret
     
    Last edited:
    Back
    Top