mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
double shinies and fake shinies
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -163,7 +163,7 @@ module Settings
|
||||
# e.g. To require the second badge, put false and 1.
|
||||
# To require at least 2 badges, put true and 2.
|
||||
BADGE_FOR_CUT = 1
|
||||
BADGE_FOR_FLASH = 2
|
||||
BADGE_FOR_FLASH = 1
|
||||
BADGE_FOR_ROCKSMASH = 0
|
||||
BADGE_FOR_SURF = 5
|
||||
BADGE_FOR_FLY = 3
|
||||
@@ -374,7 +374,7 @@ module Settings
|
||||
[265, 30, :KIRLIA,25,30], #Rt. 34
|
||||
[267, 30, :SUDOWOODO,25,30], #Rt. 36
|
||||
[300, 30, :ROSELIA,30,30], #National Park
|
||||
[300, 30, :BRELOOM,30,30], #Ilex Forest
|
||||
[266, 30, :BRELOOM,30,30], #Ilex Forest
|
||||
[670, 30, :WEAVILE,50,50], #Ice mountains
|
||||
[528, 30, :PYUKUMUKU,20,20], #Treasure Beach
|
||||
[690, 30, :OCTILLERY,32,45], #Deep Ocean
|
||||
|
||||
@@ -5,7 +5,6 @@ class AnimatedBitmap
|
||||
attr_reader :path
|
||||
attr_reader :filename
|
||||
|
||||
|
||||
def initialize(file, hue = 0)
|
||||
raise "Filename is nil (missing graphic)." if file.nil?
|
||||
path = file
|
||||
@@ -25,24 +24,27 @@ class AnimatedBitmap
|
||||
end
|
||||
|
||||
def pbSetColor(r = 0, g = 0, b = 0, a = 255)
|
||||
color = Color.new(r, g, b, a)
|
||||
pbSetColorValue(color)
|
||||
end
|
||||
|
||||
def pbSetColorValue(color)
|
||||
for i in 0..@bitmap.bitmap.width
|
||||
for j in 0..@bitmap.bitmap.height
|
||||
if @bitmap.bitmap.get_pixel(i, j).alpha != 0
|
||||
color = Color.new(r, g, b, a)
|
||||
@bitmap.bitmap.set_pixel(i, j, color)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
MAX_SHIFT_VALUE = 360
|
||||
MINIMUM_OFFSET=40
|
||||
def shiftColors(offset = 0)
|
||||
|
||||
offset/=360 if offset >360
|
||||
offset=30 if offset <30 #this method is only used for shinies. shinies that barely shift are boring
|
||||
|
||||
offset /= MAX_SHIFT_VALUE if offset > NB_POKEMON
|
||||
offset = MINIMUM_OFFSET if offset < MINIMUM_OFFSET || MAX_SHIFT_VALUE - offset < MINIMUM_OFFSET
|
||||
offset += pbGet(VAR_SHINY_HUE_OFFSET) #for testing - always 0 during normal gameplay
|
||||
@bitmap = GifBitmap.new(@path, @filename, offset)
|
||||
|
||||
#@bitmap.bitmap.hue_change(offset)
|
||||
end
|
||||
|
||||
def [](index)
|
||||
@@ -125,14 +127,10 @@ class AnimatedBitmap
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
def mirror
|
||||
@bitmap.bitmap
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
|
||||
@@ -1229,8 +1229,14 @@ def pbDrawImagePositions(bitmap,textpos)
|
||||
srcy=i[4] || 0
|
||||
width=(i[5] && i[5]>=0) ? i[5] : srcbitmap.width
|
||||
height=(i[6] && i[6]>=0) ? i[6] : srcbitmap.height
|
||||
color = i[7] || nil
|
||||
if color
|
||||
srcbitmap.pbSetColorValue(color)
|
||||
end
|
||||
srcrect=Rect.new(srcx,srcy,width,height)
|
||||
bitmap.blt(x,y,srcbitmap.bitmap,srcrect)
|
||||
|
||||
|
||||
srcbitmap.dispose
|
||||
end
|
||||
end
|
||||
|
||||
@@ -235,7 +235,7 @@ class PokemonDataBox < SpriteWrapper
|
||||
# Draw shiny icon
|
||||
if @battler.shiny?
|
||||
shinyX = (@battler.opposes?(0)) ? 206 : -6 # Foe's/player's
|
||||
imagePos.push(["Graphics/Pictures/shiny",@spriteBaseX+shinyX,36])
|
||||
addShinyStarsToGraphicsArray(imagePos,@spriteBaseX+shinyX,35, @battler.pokemon.bodyShiny?,@battler.pokemon.headShiny?,@battler.pokemon.debugShiny?)
|
||||
end
|
||||
# Draw Mega Evolution/Primal Reversion icon
|
||||
if @battler.mega?
|
||||
|
||||
@@ -33,6 +33,7 @@ class Pokemon
|
||||
attr_writer :shiny
|
||||
attr_accessor :head_shiny
|
||||
attr_accessor :body_shiny
|
||||
attr_accessor :debug_shiny
|
||||
# The index of this Pokémon's ability (0, 1 are natural abilities, 2+ are
|
||||
# hidden abilities)as defined for its species/form. An ability may not be
|
||||
# defined at this index. Is recalculated (as 0 or 1) if made nil.
|
||||
@@ -164,6 +165,10 @@ class Pokemon
|
||||
return headSpecies == checkSpeciesId
|
||||
end
|
||||
|
||||
def debugShiny?
|
||||
return @debug_shiny
|
||||
end
|
||||
|
||||
def bodyShiny?
|
||||
return @body_shiny
|
||||
end
|
||||
|
||||
@@ -427,8 +427,9 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
end
|
||||
# Draw shiny icon
|
||||
if @pokemon.shiny?
|
||||
pbDrawImagePositions(@overlaysprite.bitmap, [[
|
||||
"Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]])
|
||||
imagePos=[]
|
||||
addShinyStarsToGraphicsArray(imagePos,80,48,@pokemon.bodyShiny?,@pokemon.headShiny?,@pokemon.debugShiny?,0,0,16,16)
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,imagePos)
|
||||
end
|
||||
end
|
||||
pbDrawTextPositions(@overlaysprite.bitmap, textpos)
|
||||
|
||||
@@ -334,7 +334,8 @@ class PokemonSummary_Scene
|
||||
end
|
||||
# Show shininess star
|
||||
if @pokemon.shiny?
|
||||
imagepos.push([sprintf("Graphics/Pictures/shiny"), 2, 134])
|
||||
addShinyStarsToGraphicsArray(imagepos,2,134,@pokemon.bodyShiny?,@pokemon.headShiny?,@pokemon.debugShiny?,nil,nil,nil,nil,true)
|
||||
#imagepos.push([sprintf("Graphics/Pictures/shiny"), 2, 134])
|
||||
end
|
||||
# Draw all images
|
||||
pbDrawImagePositions(overlay, imagepos)
|
||||
|
||||
@@ -1546,7 +1546,8 @@ class PokemonStorageScene
|
||||
textstrings.push([_INTL("No item"), 86, 336, 2, nonbase, nonshadow])
|
||||
end
|
||||
if pokemon.shiny?
|
||||
imagepos.push(["Graphics/Pictures/shiny", 156, 198])
|
||||
addShinyStarsToGraphicsArray(imagepos,156,198,pokemon.bodyShiny?,pokemon.headShiny?,pokemon.debugShiny?,nil,nil,nil,nil,false,true)
|
||||
#imagepos.push(["Graphics/Pictures/shiny", 156, 198])
|
||||
end
|
||||
typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types"))
|
||||
type1_number = GameData::Type.get(pokemon.type1).id_number
|
||||
|
||||
@@ -811,33 +811,33 @@ PokemonDebugMenuCommands.register("speciesform", {
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
end
|
||||
when 1 # Set form
|
||||
cmd2 = 0
|
||||
formcmds = [[], []]
|
||||
GameData::Species.each do |sp|
|
||||
next if sp.species != pkmn.species
|
||||
form_name = sp.form_name
|
||||
form_name = _INTL("Unnamed form") if !form_name || form_name.empty?
|
||||
form_name = sprintf("%d: %s", sp.form, form_name)
|
||||
formcmds[0].push(sp.form)
|
||||
formcmds[1].push(form_name)
|
||||
cmd2 = sp.form if pkmn.form == sp.form
|
||||
end
|
||||
if formcmds[0].length <= 1
|
||||
screen.pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
|
||||
else
|
||||
cmd2 = screen.pbShowCommands(_INTL("Set the Pokémon's form."), formcmds[1], cmd2)
|
||||
next if cmd2 < 0
|
||||
f = formcmds[0][cmd2]
|
||||
if f != pkmn.form
|
||||
if MultipleForms.hasFunction?(pkmn, "getForm")
|
||||
next if !screen.pbConfirm(_INTL("This species decides its own form. Override?"))
|
||||
pkmn.forced_form = f
|
||||
end
|
||||
pkmn.form = f
|
||||
$Trainer.pokedex.register(pkmn) if !settingUpBattle
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
end
|
||||
end
|
||||
# cmd2 = 0
|
||||
# formcmds = [[], []]
|
||||
# GameData::Species.each do |sp|
|
||||
# next if sp.species != pkmn.species
|
||||
# form_name = sp.form_name
|
||||
# form_name = _INTL("Unnamed form") if !form_name || form_name.empty?
|
||||
# form_name = sprintf("%d: %s", sp.form, form_name)
|
||||
# formcmds[0].push(sp.form)
|
||||
# formcmds[1].push(form_name)
|
||||
# cmd2 = sp.form if pkmn.form == sp.form
|
||||
# end
|
||||
# if formcmds[0].length <= 1
|
||||
# screen.pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
|
||||
# else
|
||||
# cmd2 = screen.pbShowCommands(_INTL("Set the Pokémon's form."), formcmds[1], cmd2)
|
||||
# next if cmd2 < 0
|
||||
# f = formcmds[0][cmd2]
|
||||
# if f != pkmn.form
|
||||
# if MultipleForms.hasFunction?(pkmn, "getForm")
|
||||
# next if !screen.pbConfirm(_INTL("This species decides its own form. Override?"))
|
||||
# pkmn.forced_form = f
|
||||
# end
|
||||
# pkmn.form = f
|
||||
# $Trainer.pokedex.register(pkmn) if !settingUpBattle
|
||||
# screen.pbRefreshSingle(pkmnid)
|
||||
# end
|
||||
# end
|
||||
when 2 # Remove form override
|
||||
pkmn.forced_form = nil
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
@@ -872,10 +872,13 @@ PokemonDebugMenuCommands.register("setshininess", {
|
||||
case cmd
|
||||
when 0 # Make shiny
|
||||
pkmn.shiny = true
|
||||
pkmn.debug_shiny=true
|
||||
when 1 # Make normal
|
||||
pkmn.shiny = false
|
||||
pkmn.debug_shiny=false
|
||||
when 2 # Reset
|
||||
pkmn.shiny = nil
|
||||
pkmn.debug_shiny=nil
|
||||
end
|
||||
screen.pbRefreshSingle(pkmnid)
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ class RandomizerOptionsScene < PokemonOption_Scene
|
||||
@openWildOptions = false
|
||||
@openGymOptions = false
|
||||
@openItemOptions = false
|
||||
|
||||
$game_switches[SWITCH_RANDOMIZED_AT_LEAST_ONCE] = true
|
||||
end
|
||||
|
||||
def getDefaultDescription
|
||||
|
||||
@@ -97,7 +97,6 @@ def itemCanBeRandomized(item)
|
||||
end
|
||||
|
||||
def pbShuffleItems()
|
||||
$game_switches[SWITCH_RANDOMIZED_AT_LEAST_ONCE] = true
|
||||
randomItemsHash = Hash.new
|
||||
available_items = []
|
||||
for itemElement in GameData::Item.list_all
|
||||
@@ -121,7 +120,6 @@ end
|
||||
|
||||
|
||||
def pbShuffleTMs()
|
||||
$game_switches[SWITCH_RANDOMIZED_AT_LEAST_ONCE] = true
|
||||
randomItemsHash = Hash.new
|
||||
available_items = []
|
||||
for itemElement in GameData::Item.list_all
|
||||
|
||||
@@ -719,6 +719,8 @@ class PokemonFusionScene
|
||||
if @pokemon1.shiny?
|
||||
@pokemon1.body_shiny=true
|
||||
end
|
||||
@pokemon1.debug_shiny=true if @pokemon1.debug_shiny || @pokemon2.debug_shiny
|
||||
|
||||
setFusionIVs(superSplicer)
|
||||
#add to pokedex
|
||||
if !$Trainer.pokedex.owned?(newSpecies)
|
||||
|
||||
@@ -30,7 +30,7 @@ module GameData
|
||||
elsif isBodyShiny
|
||||
dex_offset = getBodyID(dex_number)
|
||||
end
|
||||
return pbGet(VAR_SHINY_HUE_OFFSET) + dex_offset + Settings::SHINY_HUE_OFFSET
|
||||
return dex_offset + Settings::SHINY_HUE_OFFSET
|
||||
end
|
||||
|
||||
def self.front_sprite_bitmap(dex_number, a = 0, b = 0, isShiny = false, bodyShiny = false, headShiny = false)
|
||||
|
||||
@@ -160,6 +160,22 @@ def getRandomCustomFusionForIntro(returnRandomPokemonIfNoneFound = true, customP
|
||||
end
|
||||
|
||||
|
||||
def addShinyStarsToGraphicsArray(imageArray, xPos, yPos, shinyBody, shinyHead, debugShiny, srcx=nil, srcy=nil, width=nil, height=nil,
|
||||
showSecondStarUnder=false, showSecondStarAbove=false)
|
||||
color = debugShiny ? Color.new(0,0,0,255) : nil
|
||||
imageArray.push(["Graphics/Pictures/shiny",xPos,yPos,srcx,srcy,width,height,color])
|
||||
if shinyBody && shinyHead
|
||||
if showSecondStarUnder
|
||||
yPos += 15
|
||||
elsif showSecondStarAbove
|
||||
yPos -= 15
|
||||
else
|
||||
xPos -= 15
|
||||
end
|
||||
imageArray.push(["Graphics/Pictures/shiny",xPos,yPos,srcx,srcy,width,height,color])
|
||||
end
|
||||
end
|
||||
|
||||
def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3, maxBST=300)
|
||||
if customPokeList.length == 0
|
||||
customPokeList = getCustomSpeciesList()
|
||||
|
||||
@@ -1420,10 +1420,20 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
pokemon.debug_shiny=true if pokemon.debug_shiny && pokemon.body_shiny
|
||||
poke2.debug_shiny=true if pokemon.debug_shiny || poke2.head_shiny
|
||||
|
||||
pokemon.body_shiny=false
|
||||
pokemon.head_shiny=false
|
||||
|
||||
|
||||
if !pokemon.shiny?
|
||||
pokemon.debug_shiny=false
|
||||
end
|
||||
if !poke2.shiny?
|
||||
poke2.debug_shiny=false
|
||||
end
|
||||
|
||||
if $Trainer.party.length >= 6
|
||||
if (keepInParty == 0)
|
||||
$PokemonStorage.pbStoreCaught(poke2)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user