diff --git a/Data/Actors.rxdata b/Data/Actors.rxdata index 7967a5432..41edc8e26 100644 Binary files a/Data/Actors.rxdata and b/Data/Actors.rxdata differ diff --git a/Data/Animations.rxdata b/Data/Animations.rxdata index 8e67182ba..826e1e8a6 100644 Binary files a/Data/Animations.rxdata and b/Data/Animations.rxdata differ diff --git a/Data/Armors.rxdata b/Data/Armors.rxdata index 2249bec14..901f2bb2b 100644 Binary files a/Data/Armors.rxdata and b/Data/Armors.rxdata differ diff --git a/Data/CommonEvents.rxdata b/Data/CommonEvents.rxdata index e0088e81a..62480ad2e 100644 Binary files a/Data/CommonEvents.rxdata and b/Data/CommonEvents.rxdata differ diff --git a/Data/Enemies.rxdata b/Data/Enemies.rxdata index 004ee903d..be622f513 100644 Binary files a/Data/Enemies.rxdata and b/Data/Enemies.rxdata differ diff --git a/Data/Items.rxdata b/Data/Items.rxdata index 3e62ba6d2..fe767fa0b 100644 Binary files a/Data/Items.rxdata and b/Data/Items.rxdata differ diff --git a/Data/Map734.rxdata b/Data/Map734.rxdata index 1bb078d03..1e9df2481 100644 Binary files a/Data/Map734.rxdata and b/Data/Map734.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 6573333cb..9b4f6fce0 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index c949423eb..01336190b 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -29,6 +29,7 @@ module Settings EGGSPRITE_SCALE = 1 BACKSPRITE_POSITION_OFFSET = 20 FRONTSPRITE_POSITION = 200 + SHINY_HUE_OFFSET = 60 RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW) VAR_1_PLACEHOLDER_SPECIES = :DIALGA @@ -69,7 +70,7 @@ module Settings # Number of badges in the game NB_BADGES = 16 # The odds of a newly generated Pokémon being shiny (out of 65536). - SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8 + SHINY_POKEMON_CHANCE = 16#(MECHANICS_GENERATION >= 6) ? 16 : 8 # The odds of a wild Pokémon/bred egg having Pokérus (out of 65536). POKERUS_CHANCE = 3 # Whether a bred baby Pokémon can inherit any TM/HM moves from its father. It diff --git a/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb b/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb index 3ce43cbf2..db3ecaf9c 100644 --- a/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb +++ b/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb @@ -29,6 +29,12 @@ class AnimatedBitmap end end + def shiftColors(offset=0) + offset/=350 if offset >350 + offset=30 if offset <30 #this method is only used for shinies. shinies that barely shift are boring + @bitmap.bitmap.hue_change(offset) + end + def [](index) ; @bitmap[index]; end diff --git a/Data/Scripts/049_Compatibility/Constants.rb b/Data/Scripts/049_Compatibility/Constants.rb index 1f51520f5..7cc8c5630 100644 --- a/Data/Scripts/049_Compatibility/Constants.rb +++ b/Data/Scripts/049_Compatibility/Constants.rb @@ -111,6 +111,7 @@ VAR_PREMIUM_WONDERTRADE_LEFT=111 VAR_PREMIUM_WONDERTRADE_LEFT=111 VAR_RIVAL_STARTER=250 VAR_FUSION_ICON_STYLE=220 +VAR_SHINY_HUE_OFFSET=275 #Randomizer VAR_RANDOMIZER_WILD_POKE_BST=197 diff --git a/Data/Scripts/050_AddOns/FusionSprites.rb b/Data/Scripts/050_AddOns/FusionSprites.rb index b34a442d0..e9278bbe9 100644 --- a/Data/Scripts/050_AddOns/FusionSprites.rb +++ b/Data/Scripts/050_AddOns/FusionSprites.rb @@ -5,9 +5,9 @@ module GameData species = GameData::Species.get(species).id_number # Just to be sure it's a number return self.egg_sprite_bitmap(species, pkmn.form) if pkmn.egg? if back - ret = self.back_sprite_bitmap(species) + ret = self.back_sprite_bitmap(species,pkmn.shiny?) else - ret = self.front_sprite_bitmap(species) + ret = self.front_sprite_bitmap(species,pkmn.shiny?) end return ret end @@ -21,17 +21,26 @@ module GameData return ret end - def self.front_sprite_bitmap(dex_number,a=0,b=0,c=0,d=0) #la méthode est utilisé ailleurs avec d'autres arguments (gender, form, etc.) mais on les veut pas + def self.front_sprite_bitmap(dex_number, isShiny = false, b = 0, c = 0, d = 0) + #la méthode est utilisé ailleurs avec d'autres arguments (gender, form, etc.) mais on les veut pas if dex_number.is_a?(Symbol) dex_number = GameData::Species.get(dex_number).id_number end filename = self.sprite_filename(dex_number) - return (filename) ? AnimatedBitmap.new(filename) : nil + sprite = (filename) ? AnimatedBitmap.new(filename) : nil + if isShiny + sprite.shiftColors(pbGet(VAR_SHINY_HUE_OFFSET)+dex_number) + end + return sprite end - def self.back_sprite_bitmap(dex_number,species=0, form = 0, gender = 0, shiny = false, shadow = false) + def self.back_sprite_bitmap(dex_number, isShiny = false, form = 0, gender = 0, c = false, shadow = false) filename = self.sprite_filename(dex_number) - return (filename) ? AnimatedBitmap.new(filename) : nil + sprite = (filename) ? AnimatedBitmap.new(filename) : nil + if isShiny + sprite.shiftColors(pbGet(VAR_SHINY_HUE_OFFSET)+dex_number) + end + return sprite end def self.egg_sprite_bitmap(dex_number, form = 0) @@ -40,47 +49,47 @@ module GameData end def self.getSpecialSpriteName(dexNum) - base_path="Graphics/Battlers/special/" + base_path = "Graphics/Battlers/special/" case dexNum - when Settings::ZAPMOLCUNO_NB..Settings::ZAPMOLCUNO_NB+1 + when Settings::ZAPMOLCUNO_NB..Settings::ZAPMOLCUNO_NB + 1 return sprintf(base_path + "144.145.146") - when Settings::ZAPMOLCUNO_NB+2 + when Settings::ZAPMOLCUNO_NB + 2 return sprintf(base_path + "243.244.245") - when Settings::ZAPMOLCUNO_NB+3 + when Settings::ZAPMOLCUNO_NB + 3 return sprintf(base_path +"340.341.342") - when Settings::ZAPMOLCUNO_NB+4 + when Settings::ZAPMOLCUNO_NB + 4 return sprintf(base_path +"343.344.345") - when Settings::ZAPMOLCUNO_NB+5 + when Settings::ZAPMOLCUNO_NB + 5 return sprintf(base_path +"349.350.351") - when Settings::ZAPMOLCUNO_NB+6 + when Settings::ZAPMOLCUNO_NB + 6 return sprintf(base_path +"151.251.381") - when Settings::ZAPMOLCUNO_NB+11 + when Settings::ZAPMOLCUNO_NB + 11 return sprintf(base_path +"150.348.380") #starters - when Settings::ZAPMOLCUNO_NB+7 + when Settings::ZAPMOLCUNO_NB + 7 return sprintf(base_path +"3.6.9") - when Settings::ZAPMOLCUNO_NB+8 + when Settings::ZAPMOLCUNO_NB + 8 return sprintf(base_path +"154.157.160") - when Settings::ZAPMOLCUNO_NB+9 + when Settings::ZAPMOLCUNO_NB + 9 return sprintf(base_path +"278.281.284") - when Settings::ZAPMOLCUNO_NB+10 + when Settings::ZAPMOLCUNO_NB + 10 return sprintf(base_path +"318.321.324") #starters prevos - when Settings::ZAPMOLCUNO_NB+12 + when Settings::ZAPMOLCUNO_NB + 12 return sprintf(base_path +"1.4.7") - when Settings::ZAPMOLCUNO_NB+13 + when Settings::ZAPMOLCUNO_NB + 13 return sprintf(base_path +"2.5.8") - when Settings::ZAPMOLCUNO_NB+14 + when Settings::ZAPMOLCUNO_NB + 14 return sprintf(base_path +"152.155.158") - when Settings::ZAPMOLCUNO_NB+15 + when Settings::ZAPMOLCUNO_NB + 15 return sprintf(base_path +"153.156.159") - when Settings::ZAPMOLCUNO_NB+16 + when Settings::ZAPMOLCUNO_NB + 16 return sprintf(base_path +"276.279.282") - when Settings::ZAPMOLCUNO_NB+17 + when Settings::ZAPMOLCUNO_NB + 17 return sprintf(base_path +"277.280.283") - when Settings::ZAPMOLCUNO_NB+18 + when Settings::ZAPMOLCUNO_NB + 18 return sprintf(base_path +"316.319.322") - when Settings::ZAPMOLCUNO_NB+19 + when Settings::ZAPMOLCUNO_NB + 19 return sprintf(base_path +"317.320.323") else return sprintf(base_path + "000") @@ -93,7 +102,7 @@ module GameData folder = dex_number.to_s filename = sprintf("%s.png", dex_number) else - if dex_number >=Settings::ZAPMOLCUNO_NB + if dex_number >= Settings::ZAPMOLCUNO_NB specialPath = getSpecialSpriteName(dex_number) return pbResolveBitmap(specialPath) else diff --git a/Data/Scripts/050_AddOns/New Items effects.rb b/Data/Scripts/050_AddOns/New Items effects.rb index 9d7d2e64b..bdfbf4dd5 100644 --- a/Data/Scripts/050_AddOns/New Items effects.rb +++ b/Data/Scripts/050_AddOns/New Items effects.rb @@ -1322,6 +1322,7 @@ def pbFuse(pokemon, poke2, supersplicers = false) if hasCustom previewwindow.picture.pbSetColor(150, 255, 150, 200) else + previewwindow.picture.shiftColors(pbGet(1)) previewwindow.picture.pbSetColor(255, 255, 255, 200) end end diff --git a/Data/Skills.rxdata b/Data/Skills.rxdata index 61cba7ea2..a45219f5e 100644 Binary files a/Data/Skills.rxdata and b/Data/Skills.rxdata differ diff --git a/Data/States.rxdata b/Data/States.rxdata index 0f9b4ae5d..868d49e59 100644 Binary files a/Data/States.rxdata and b/Data/States.rxdata differ diff --git a/Data/System.rxdata b/Data/System.rxdata index 7f67296eb..391451d06 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/Tilesets.rxdata b/Data/Tilesets.rxdata index 846799fe9..21025322b 100644 Binary files a/Data/Tilesets.rxdata and b/Data/Tilesets.rxdata differ diff --git a/Data/Weapons.rxdata b/Data/Weapons.rxdata index d9bd35260..c7ea19a7a 100644 Binary files a/Data/Weapons.rxdata and b/Data/Weapons.rxdata differ