summary screen commands

This commit is contained in:
infinitefusion
2022-08-13 11:07:37 -04:00
parent ff67e4df73
commit 3921913d32
24 changed files with 4878 additions and 31 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)