• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Script] Unused shiny script in Pokecrystal disassembly

  • 33
    Posts
    4
    Years
    • Seen Apr 16, 2025
    I'm trying out the unused shiny script in the Pokecrystal disassembly and getting strange results. The script is supposed to make it so that about 1 in 50 encounters is shiny. This is the script:
    Code:
    Unused_CheckShininess:
    ; Return carry if the DVs at hl are all 10 or higher.
    
    ; Attack
    	ld a, [hl]
    	cp 10 << 4
    	jr c, .NotShiny
    
    ; Defense
    	ld a, [hli]
    	and $f
    	cp 10
    	jr c, .NotShiny
    
    ; Speed
    	ld a, [hl]
    	cp 10 << 4
    	jr c, .NotShiny
    
    ; Special
    	ld a, [hl]
    	and $f
    	cp 10
    	jr c, .NotShiny
    
    .Shiny:
    	scf
    	ret
    
    .NotShiny:
    	and a
    	ret

    The code as-is does not work, as I ran over 100 encounters and none were shiny.

    I replaced all the 10s with 0s, and predictably, every encounter was shiny.

    I replaced the 10s with 2s, which is more than half of the encounters. Only a small percentage was shiny, but every encounter played the shiny animation.

    What's up?
     
    Last edited:
    Back
    Top