mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
non custom finals export + random changes
This commit is contained in:
@@ -169,7 +169,7 @@ module Settings
|
||||
BADGE_FOR_FLY = 3
|
||||
BADGE_FOR_STRENGTH = 5
|
||||
BADGE_FOR_DIVE = 9
|
||||
BADGE_FOR_WATERFALL = 8
|
||||
BADGE_FOR_WATERFALL = 10
|
||||
BADGE_FOR_TELEPORT = 3
|
||||
BADGE_FOR_BOUNCE = 8
|
||||
BADGE_FOR_ROCKCLIMB = 16
|
||||
|
||||
@@ -277,6 +277,39 @@ module GameData
|
||||
return @species
|
||||
end
|
||||
|
||||
def get_pre_evolutions
|
||||
preEvolutions = []
|
||||
prevoSpecies = get_previous_species
|
||||
prevo = GameData::Species.get(prevoSpecies)
|
||||
preEvolutions << prevo.id if prevo.species != @species
|
||||
|
||||
prevo2 = GameData::Species.get(prevo.get_previous_species)
|
||||
preEvolutions << GameData::Species.get(prevo2).id if prevo2 != @species && !preEvolutions.include?(prevo2.id)
|
||||
|
||||
prevo3 = GameData::Species.get(prevo2.get_previous_species)
|
||||
preEvolutions << GameData::Species.get(prevo3).id if prevo3 != @species && !preEvolutions.include?(prevo3.id)
|
||||
|
||||
prevo4 = GameData::Species.get(prevo3.get_previous_species)
|
||||
preEvolutions << GameData::Species.get(prevo4).id if prevo4 != @species && !preEvolutions.include?(prevo4.id)
|
||||
|
||||
|
||||
prevo5 = GameData::Species.get(prevo4.get_previous_species)
|
||||
preEvolutions << GameData::Species.get(prevo5).id if prevo5 != @species && !preEvolutions.include?(prevo5.id)
|
||||
|
||||
prevo6 = GameData::Species.get(prevo5.get_previous_species)
|
||||
preEvolutions << GameData::Species.get(prevo6).id if prevo6 != @species && !preEvolutions.include?(prevo6.id)
|
||||
|
||||
echo preEvolutions
|
||||
echo "\n"
|
||||
return preEvolutions
|
||||
# baby = GameData::Species.get(get_baby_species)
|
||||
# familyEvolutions = baby.get_family_evolutions
|
||||
# for evo in familyEvolutions
|
||||
# preEvolutions << evo[0] if evo[0] != @species
|
||||
# end
|
||||
# return preEvolutions
|
||||
end
|
||||
|
||||
def get_baby_species(check_items = false, item1 = nil, item2 = nil)
|
||||
ret = @species
|
||||
return ret if @evolutions.length == 0
|
||||
|
||||
@@ -120,7 +120,14 @@ def pbMissingTrainer(tr_type, tr_name, tr_version)
|
||||
raise _INTL("Trainer type {1} does not exist.", tr_type) if !tr_type_data
|
||||
tr_type = tr_type_data.id
|
||||
if !$DEBUG
|
||||
raise _INTL("Can't find trainer ({1}, {2}, ID {3})", tr_type.to_s, tr_name, tr_version)
|
||||
#raise _INTL("Can't find trainer ({1}, {2}, ID {3})", tr_type.to_s, tr_name, tr_version)
|
||||
message = ""
|
||||
if $game_switches[SWITCH_MODERN_MODE]
|
||||
message << "[MODERN MODE] "
|
||||
end
|
||||
message << "This trainer appears to be missing from the game. Please report this on the game's Discord channel whenever you get a chance."
|
||||
pbMessage(message)
|
||||
return 1
|
||||
end
|
||||
message = ""
|
||||
if tr_version != 0
|
||||
|
||||
@@ -1008,7 +1008,7 @@ class PokemonPartyScreen
|
||||
def pbPokemonMultipleEntryScreenEx(ruleset)
|
||||
annot = []
|
||||
statuses = []
|
||||
ordinals = [_INTL("INELIGIBLE"), _INTL("NOT ENTERED"), _INTL("BANNED")]
|
||||
ordinals = [_INTL("INELIGIBLE"), _INTL("NOT ENTERED"), _INTL("CANNOT ENTER")]
|
||||
positions = [_INTL("FIRST"), _INTL("SECOND"), _INTL("THIRD"), _INTL("FOURTH"),
|
||||
_INTL("FIFTH"), _INTL("SIXTH"), _INTL("SEVENTH"), _INTL("EIGHTH"),
|
||||
_INTL("NINTH"), _INTL("TENTH"), _INTL("ELEVENTH"), _INTL("TWELFTH")]
|
||||
|
||||
@@ -2156,7 +2156,6 @@ class PokemonStorageScreen
|
||||
pbDisplay(_INTL("{1} is already fused!", heldpoke.name))
|
||||
return
|
||||
end
|
||||
p selected
|
||||
if(heldpoke.egg?)
|
||||
pbDisplay(_INTL("It's impossible to fuse an egg!"))
|
||||
return
|
||||
|
||||
38
Data/Scripts/048_Fusion/FusionPreviewScreen.rb
Normal file
38
Data/Scripts/048_Fusion/FusionPreviewScreen.rb
Normal file
@@ -0,0 +1,38 @@
|
||||
class FusionPreviewScreen < DoublePreviewScreen
|
||||
attr_reader :poke1
|
||||
attr_reader :poke2
|
||||
attr_reader :fusedPokemon
|
||||
attr_reader :fusedPokemon
|
||||
|
||||
attr_writer :draw_types
|
||||
attr_writer :draw_level
|
||||
|
||||
BACKGROUND_PATH = "Graphics/Pictures/DNAbg"
|
||||
|
||||
|
||||
def initialize(poke1,poke2, usingSuperSplicers=false)
|
||||
super(poke1,poke2)
|
||||
@draw_types = true
|
||||
@draw_level = true
|
||||
|
||||
#@viewport = viewport
|
||||
@poke1 = poke1
|
||||
@poke2 = poke2
|
||||
@fusedPokemon=nil
|
||||
new_level = calculateFusedPokemonLevel(poke1.level, poke2.level, usingSuperSplicers)
|
||||
|
||||
fusion_left = (poke1.species_data.id_number) * NB_POKEMON + poke2.species_data.id_number
|
||||
fusion_right = (poke2.species_data.id_number) * NB_POKEMON + poke1.species_data.id_number
|
||||
|
||||
@picture1 = draw_window(fusion_left,new_level,20,30)
|
||||
@picture2 = draw_window(fusion_right,new_level,270,30)
|
||||
|
||||
@sprites["picture1"] = @picture1
|
||||
@sprites["picture2"] = @picture2
|
||||
|
||||
end
|
||||
|
||||
def getBackgroundPicture
|
||||
super
|
||||
end
|
||||
end
|
||||
@@ -734,6 +734,9 @@ class PokemonFusionScene
|
||||
|
||||
#change species
|
||||
@pokemon1.species = newSpecies
|
||||
if @pokemon2.egg? || @pokemon1.egg?
|
||||
@pokemon1.steps_to_hatch = @pokemon1.species_data.hatch_steps
|
||||
end
|
||||
#@pokemon1.ability = pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
|
||||
pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,6 +85,75 @@ def extract_custom_sprites_that_evolve_into_non_customs(includeOnlyNextEvos=true
|
||||
|
||||
end
|
||||
|
||||
def listAllFinalEvos
|
||||
finalEvos = []
|
||||
for dexNum in 1..PBSpecies.maxValue
|
||||
species = GameData::Species.get(dexNum)
|
||||
if species.get_evolutions.length==0
|
||||
finalEvos << species
|
||||
end
|
||||
end
|
||||
return finalEvos
|
||||
end
|
||||
|
||||
def getPreEvoCustomSprites(species, customSPritesList)
|
||||
pre_evos_with_custom_sprites = []
|
||||
|
||||
for species_id in species.get_pre_evolutions
|
||||
species = GameData::Species.get(species_id)
|
||||
dexNum = species.id_number
|
||||
if customSPritesList.include?(dexNum)
|
||||
pre_evos_with_custom_sprites << species
|
||||
# echo species
|
||||
# echo "\n"
|
||||
end
|
||||
end
|
||||
return pre_evos_with_custom_sprites
|
||||
end
|
||||
|
||||
def extract_pokes_with_non_custom_final_evos2()
|
||||
|
||||
outfile = "nonCustomFinals2.csv"
|
||||
customSpecies = getCustomSpeciesList()
|
||||
alreadyWritten = []
|
||||
finalEvolutions = listAllFinalEvos()
|
||||
echo "\n\n"
|
||||
echo "WRITING FILE..."
|
||||
echo "\n\n"
|
||||
|
||||
File.open(outfile,"wb") { |f|
|
||||
for evo in finalEvolutions
|
||||
dexnum = evo.id_number
|
||||
if !customSpecies.include?(dexnum)
|
||||
preEvoCustomSprites = getPreEvoCustomSprites(evo,customSpecies)
|
||||
if preEvoCustomSprites.length >0
|
||||
|
||||
body = getBodyID(evo.id_number)
|
||||
head = getHeadID(evo.id_number,body)
|
||||
|
||||
# f.write((head.to_s) +";")
|
||||
# f.write(".;")
|
||||
# f.write((body.to_s) +";")
|
||||
f.write((head.to_s + "." + body.to_s) +";")
|
||||
f.write(" evolves from : ;")
|
||||
written_prevos=[]
|
||||
for prevo in preEvoCustomSprites
|
||||
next if written_prevos.include?(prevo)
|
||||
prevoBody = getBodyID(prevo.id_number)
|
||||
prevoHead = getHeadID(prevo.id_number,prevoBody)
|
||||
|
||||
f.write((prevoHead.to_s + "." + prevoBody.to_s) +";")
|
||||
written_prevos << prevo
|
||||
end
|
||||
f.write("\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
|
||||
def extract_pokes_with_non_custom_final_evos(includeOnlyNextEvos=true)
|
||||
outfile = "nonCustomFinals.csv"
|
||||
|
||||
@@ -165,7 +165,7 @@ module GameData
|
||||
customPath = pbResolveBitmap(Settings::CUSTOM_BATTLERS_FOLDER + filename)
|
||||
species = getSpecies(dex_number)
|
||||
use_custom = customPath && !species.always_use_generated
|
||||
if use_custom
|
||||
if use_custom && dex_number > Settings::NB_POKEMON
|
||||
return customPath
|
||||
end
|
||||
return Settings::BATTLERS_FOLDER + folder + "/" + filename
|
||||
|
||||
@@ -198,6 +198,12 @@ RandPokeNick = [
|
||||
"Skyrim",
|
||||
"Zeffy",
|
||||
"Hydra",
|
||||
"Lil' Wayne",
|
||||
"Drake",
|
||||
"Jay-Z",
|
||||
"50 Cent",
|
||||
"Kanye",
|
||||
"Nicki",
|
||||
"Ultimo!",
|
||||
"Sohcahtoa",
|
||||
"The Beast",
|
||||
@@ -468,6 +474,7 @@ RandPokeNick = [
|
||||
"Twitter",
|
||||
"Facebook",
|
||||
"Mia",
|
||||
"miam",
|
||||
"Lame-o",
|
||||
"Snoop",
|
||||
"Mephesto",
|
||||
@@ -538,6 +545,7 @@ RandPokeNick = [
|
||||
"Sniper",
|
||||
"Suzy",
|
||||
"Lucy",
|
||||
"Mike",
|
||||
"Molly",
|
||||
"Leela",
|
||||
"Pauvcon",
|
||||
|
||||
Reference in New Issue
Block a user