mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
summary screen commands
This commit is contained in:
@@ -130,7 +130,7 @@ def isTripleFusion?(num)
|
||||
return num >= Settings::ZAPMOLCUNO_NB
|
||||
end
|
||||
|
||||
def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3)
|
||||
def getRandomCustomFusionForIntro(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3)
|
||||
if customPokeList.length == 0
|
||||
customPokeList = getCustomSpeciesList()
|
||||
end
|
||||
@@ -159,6 +159,31 @@ def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList
|
||||
return randPoke
|
||||
end
|
||||
|
||||
|
||||
def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3, maxBST=300)
|
||||
if customPokeList.length == 0
|
||||
customPokeList = getCustomSpeciesList()
|
||||
end
|
||||
randPoke = []
|
||||
if customPokeList.length >= 5000
|
||||
chosen = false
|
||||
i = 0 #loop pas plus que 3 fois pour pas lag
|
||||
while chosen == false
|
||||
fusedPoke = customPokeList[rand(customPokeList.length)]
|
||||
if (i >= recursionLimit) || maxPoke == -1
|
||||
return fusedPoke
|
||||
end
|
||||
end
|
||||
else
|
||||
if returnRandomPokemonIfNoneFound
|
||||
return rand(maxPoke) + 1
|
||||
end
|
||||
end
|
||||
|
||||
return randPoke
|
||||
end
|
||||
|
||||
|
||||
def getBodyID(species)
|
||||
dexNum = getDexNumberForSpecies(species)
|
||||
return (dexNum / NB_POKEMON).round
|
||||
|
||||
@@ -122,7 +122,7 @@ class GenOneStyle
|
||||
@customPokeList = getCustomSpeciesList()
|
||||
#Get random Pokemon (1st gen orandPokenly, pas de legend la prmeiere fois)
|
||||
|
||||
randPoke = getRandomCustomFusion(true, @customPokeList, @maxPoke)
|
||||
randPoke = getRandomCustomFusionForIntro(true, @customPokeList, @maxPoke)
|
||||
randpoke1 = randPoke[0] #rand(@maxPoke)+1
|
||||
randpoke2 = randPoke[1] #rand(@maxPoke)+1
|
||||
|
||||
@@ -358,7 +358,7 @@ class GenOneStyle
|
||||
if @maxPoke < NB_POKEMON - 1
|
||||
@maxPoke += 5 #-1 pour que ca arrive pile. tant pis pour kyurem
|
||||
end
|
||||
randPoke = getRandomCustomFusion(true, @customPokeList, @maxPoke)
|
||||
randPoke = getRandomCustomFusionForIntro(true, @customPokeList, @maxPoke)
|
||||
randpoke1 = randPoke[0] #rand(@maxPoke)+1
|
||||
randpoke2 = randPoke[1] #rand(@maxPoke)+1
|
||||
|
||||
|
||||
@@ -1305,10 +1305,12 @@ def pbFuse(pokemon, poke2, supersplicers = false)
|
||||
typeWindow = drawPokemonType(newid)
|
||||
drawFusionPreviewText(typeWindow, "Lv. " + new_level.to_s, 232, 0,)
|
||||
|
||||
if hasCustom
|
||||
previewwindow.picture.pbSetColor(150, 255, 150, 200)
|
||||
else
|
||||
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
||||
if !$Trainer.seen?(newid)
|
||||
if hasCustom
|
||||
previewwindow.picture.pbSetColor(150, 255, 150, 200)
|
||||
else
|
||||
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
||||
end
|
||||
end
|
||||
previewwindow.x = (Graphics.width / 2) - (previewwindow.width / 2)
|
||||
previewwindow.y = ((Graphics.height - 96) / 2) - (previewwindow.height / 2)
|
||||
|
||||
Reference in New Issue
Block a user