Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # * Auto Hue Pokémon - by Vendily
- #===============================================================================
- # But this time it's actually hue.
- # Put it above Main (It's because it aliases methods in PSystem_Utilities/EBS
- # and Pokemon_Sprites)
- #===============================================================================
- # If you want to use it, you can create a Multiple forms property called
- # "bitmapHue", which returns a number between 0 and 360
- # MultipleForms.register(:EEVEE,{
- # "bitmapHue"=>proc{|pokemon|
- # next if pokemon.form==0
- # next 180
- # }
- # })
- # You can also use it for shadow pokémon, thanks to conditional registration.
- # MultipleForms.registerIf(proc{|species| true},{
- # "bitmapHue"=>proc{|pokemon|
- # next 180 if (pokemon.isShadow? rescue false)
- # next
- # }
- # })
- #===============================================================================
- def drawShadowPoke(bitmap,hue=nil)
- shadowhue=(hue ? hue : 0)
- bitmap.hue_change(shadowhue)
- end
- alias _shadow_pbLoadPokemonBitmapSpecies pbLoadPokemonBitmapSpecies
- if defined?(EBUISTYLE)
- def pbLoadPokemonBitmapSpecies(pokemon, species, back=false,scale=POKEMONSPRITESCALE)
- ret=_shadow_pbLoadPokemonBitmapSpecies(pokemon, species, back,scale)
- if ret
- hue=(MultipleForms.call("bitmapHue",pokemon))
- ret.prepareStrip
- for i in 0...ret.totalFrames
- drawShadowPoke(ret.alterBitmap(i),hue)
- end
- ret.compileStrip
- end
- return ret
- end
- else
- def pbLoadPokemonBitmapSpecies(pokemon, species, back=false)
- ret=_shadow_pbLoadPokemonBitmapSpecies(pokemon, species, back)
- if ret
- hue=(MultipleForms.call("bitmapHue",pokemon))
- animatedBitmap=ret
- copiedBitmap=animatedBitmap.copy
- animatedBitmap.dispose
- copiedBitmap.each {|bitmap|
- drawShadowPoke(bitmap,hue)
- }
- ret=copiedBitmap
- end
- return ret
- end
- end
- class PokemonIconSprite
- alias _shadow_pokemon= pokemon=
- def pokemon=(value)
- self._shadow_pokemon=value
- if pokemon
- hue=(MultipleForms.call("bitmapHue",pokemon))
- drawShadowPoke(self.bitmap,hue)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement