mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds option for toggling custom eggs
This commit is contained in:
@@ -63,6 +63,7 @@ module GameData
|
|||||||
# return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
|
# return (ret) ? ret : pbResolveBitmap("Graphics/Pokemon/Eggs/000")
|
||||||
# end
|
# end
|
||||||
def self.egg_sprite_filename(species, form)
|
def self.egg_sprite_filename(species, form)
|
||||||
|
return "Graphics/Battlers/Eggs/000" if $PokemonSystem.use_custom_eggs
|
||||||
dexNum = getDexNumberForSpecies(species)
|
dexNum = getDexNumberForSpecies(species)
|
||||||
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03d", dexNum) rescue nil
|
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%03d", dexNum) rescue nil
|
||||||
if !pbResolveBitmap(bitmapFileName)
|
if !pbResolveBitmap(bitmapFileName)
|
||||||
@@ -261,7 +262,6 @@ module GameData
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
def self.play_fusion_cry(head_id,body_id, volume = 90, pitch = 100)
|
def self.play_fusion_cry(head_id,body_id, volume = 90, pitch = 100)
|
||||||
echoln "fusion"
|
|
||||||
head_cry_filename = self.check_cry_file(head_id,nil)
|
head_cry_filename = self.check_cry_file(head_id,nil)
|
||||||
body_cry_filename = self.check_cry_file(body_id,nil)
|
body_cry_filename = self.check_cry_file(body_id,nil)
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class PokemonSystem
|
|||||||
attr_accessor :on_mobile
|
attr_accessor :on_mobile
|
||||||
attr_accessor :type_icons
|
attr_accessor :type_icons
|
||||||
attr_accessor :use_generated_dex_entries
|
attr_accessor :use_generated_dex_entries
|
||||||
|
attr_accessor :use_custom_eggs
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
||||||
@@ -45,6 +46,7 @@ class PokemonSystem
|
|||||||
@on_mobile = false
|
@on_mobile = false
|
||||||
@type_icons = true
|
@type_icons = true
|
||||||
@use_generated_dex_entries = true
|
@use_generated_dex_entries = true
|
||||||
|
@use_custom_eggs = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
|||||||
proc { $Trainer.selected_difficulty },
|
proc { $Trainer.selected_difficulty },
|
||||||
proc { |value|
|
proc { |value|
|
||||||
setDifficulty(value)
|
setDifficulty(value)
|
||||||
@manually_changed_difficulty=true
|
@manually_changed_difficulty = true
|
||||||
}, ["All Pokémon in the team gain experience. Otherwise the same as Normal difficulty.",
|
}, ["All Pokémon in the team gain experience. Otherwise the same as Normal difficulty.",
|
||||||
"The default experience. Levels are similar to the official games.",
|
"The default experience. Levels are similar to the official games.",
|
||||||
"Higher levels and smarter AI. All trainers have access to healing items."]
|
"Higher levels and smarter AI. All trainers have access to healing items."]
|
||||||
@@ -111,7 +111,7 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
|||||||
"Automatically download missing custom sprites and Pokédex entries from the internet"
|
"Automatically download missing custom sprites and Pokédex entries from the internet"
|
||||||
)
|
)
|
||||||
#
|
#
|
||||||
generated_entries_option_selected=$PokemonSystem.use_generated_dex_entries ? 1 : 0
|
generated_entries_option_selected = $PokemonSystem.use_generated_dex_entries ? 1 : 0
|
||||||
options << EnumOption.new(_INTL("Autogen dex entries"), [_INTL("Off"), _INTL("On")],
|
options << EnumOption.new(_INTL("Autogen dex entries"), [_INTL("Off"), _INTL("On")],
|
||||||
proc { generated_entries_option_selected },
|
proc { generated_entries_option_selected },
|
||||||
proc { |value|
|
proc { |value|
|
||||||
@@ -124,7 +124,17 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
if $game_switches && ($game_switches[SWITCH_NEW_GAME_PLUS] || $game_switches[SWITCH_BEAT_THE_LEAGUE]) #beat the league
|
custom_eggs_option_selected = $PokemonSystem.use_custom_eggs ? 1 : 0
|
||||||
|
options << EnumOption.new(_INTL("Custom Eggs"), [_INTL("On"), _INTL("Off")],
|
||||||
|
proc { custom_eggs_option_selected },
|
||||||
|
proc { |value|
|
||||||
|
$PokemonSystem.use_custom_eggs = value == 1
|
||||||
|
},
|
||||||
|
["Eggs have different sprites for each Pokémon.",
|
||||||
|
"Eggs all use the same sprite."]
|
||||||
|
)
|
||||||
|
|
||||||
|
if $game_switches && ($game_switches[SWITCH_NEW_GAME_PLUS] || $game_switches[SWITCH_BEAT_THE_LEAGUE]) # beat the league
|
||||||
options <<
|
options <<
|
||||||
EnumOption.new(_INTL("Battle type"), [_INTL("1v1"), _INTL("2v2"), _INTL("3v3")],
|
EnumOption.new(_INTL("Battle type"), [_INTL("1v1"), _INTL("2v2"), _INTL("3v3")],
|
||||||
proc { $PokemonSystem.battle_type },
|
proc { $PokemonSystem.battle_type },
|
||||||
@@ -183,15 +193,13 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
|||||||
["Combines both Pokémon's party icons",
|
["Combines both Pokémon's party icons",
|
||||||
"Uses the same party icon for all fusions"]
|
"Uses the same party icon for all fusions"]
|
||||||
)
|
)
|
||||||
battle_type_icon_option_selected=$PokemonSystem.type_icons ? 1 : 0
|
battle_type_icon_option_selected = $PokemonSystem.type_icons ? 1 : 0
|
||||||
options << EnumOption.new(_INTL("Battle Type Icons"), [_INTL("Off"), _INTL("On")],
|
options << EnumOption.new(_INTL("Battle Type Icons"), [_INTL("Off"), _INTL("On")],
|
||||||
proc { battle_type_icon_option_selected },
|
proc { battle_type_icon_option_selected },
|
||||||
proc { |value| $PokemonSystem.type_icons = value == 1 },
|
proc { |value| $PokemonSystem.type_icons = value == 1 },
|
||||||
"Display the enemy Pokémon type in battles."
|
"Display the enemy Pokémon type in battles."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
options << EnumOption.new(_INTL("Screen Size"), [_INTL("S"), _INTL("M"), _INTL("L"), _INTL("XL"), _INTL("Full")],
|
options << EnumOption.new(_INTL("Screen Size"), [_INTL("S"), _INTL("M"), _INTL("L"), _INTL("XL"), _INTL("Full")],
|
||||||
proc { [$PokemonSystem.screensize, 4].min },
|
proc { [$PokemonSystem.screensize, 4].min },
|
||||||
@@ -215,7 +223,7 @@ class PokemonGameOption_Scene < PokemonOption_Scene
|
|||||||
"Prevents leveling above the next gym leader's highest leveled Pokemon"
|
"Prevents leveling above the next gym leader's highest leveled Pokemon"
|
||||||
)
|
)
|
||||||
|
|
||||||
device_option_selected=$PokemonSystem.on_mobile ? 1 : 0
|
device_option_selected = $PokemonSystem.on_mobile ? 1 : 0
|
||||||
options << EnumOption.new(_INTL("Device"), [_INTL("PC"), _INTL("Mobile")],
|
options << EnumOption.new(_INTL("Device"), [_INTL("PC"), _INTL("Mobile")],
|
||||||
proc { device_option_selected },
|
proc { device_option_selected },
|
||||||
proc { |value| $PokemonSystem.on_mobile = value == 1 },
|
proc { |value| $PokemonSystem.on_mobile = value == 1 },
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ def pbLoadPokemonBitmap(pokemon, species, back = false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def getEggBitmapPath(pokemon)
|
def getEggBitmapPath(pokemon)
|
||||||
|
return "Graphics/Battlers/Eggs/000" if $PokemonSystem.use_custom_eggs
|
||||||
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%s", getConstantName(PBSpecies, pokemon.species)) rescue nil
|
bitmapFileName = sprintf("Graphics/Battlers/Eggs/%s", getConstantName(PBSpecies, pokemon.species)) rescue nil
|
||||||
if !pbResolveBitmap(bitmapFileName)
|
if !pbResolveBitmap(bitmapFileName)
|
||||||
if pokemon.species >= NUM_ZAPMOLCUNO
|
if pokemon.species >= NUM_ZAPMOLCUNO
|
||||||
|
|||||||
Reference in New Issue
Block a user