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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Data/Map763.rxdata Normal file

Binary file not shown.

BIN
Data/Map764.rxdata Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1215,9 +1215,11 @@ class PokemonSummary_Scene
cmdPokedex = -1 cmdPokedex = -1
cmdMark = -1 cmdMark = -1
if !@pokemon.egg? if !@pokemon.egg?
commands[cmdGiveItem = commands.length] = _INTL("Give item") if pbBattleChallenge.currentChallenge == -1
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem? commands[cmdGiveItem = commands.length] = _INTL("Give item")
#commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
end
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
end end
commands[cmdMark = commands.length] = _INTL("Mark") commands[cmdMark = commands.length] = _INTL("Mark")
commands[commands.length] = _INTL("Cancel") commands[commands.length] = _INTL("Cancel")

View File

@@ -603,22 +603,39 @@ class PokemonFusionScene
return 1 return 1
end end
def calculateAverageValue(value1, value2)
return ((value1 + value2) / 2).floor
end
def pickHighestOfTwoValues(value1, value2)
return value1 >= value2 ? value1 : value2
end
def setFusionIVs(supersplicers)
if supersplicers
setHighestFusionIvs()
else
averageFusionIvs()
end
end
def averageFusionIvs() def averageFusionIvs()
return @pokemon1.iv[:HP] = calculateAverageValue(@pokemon1.iv[:HP], @pokemon2.iv[:HP])
# for i in 0..@pokemon1.iv.length-1 @pokemon1.iv[:ATTACK] = calculateAverageValue(@pokemon1.iv[:ATTACK], @pokemon2.iv[:ATTACK])
# poke1Iv = @pokemon1.iv[i] @pokemon1.iv[:DEFENSE] = calculateAverageValue(@pokemon1.iv[:DEFENSE], @pokemon2.iv[:DEFENSE])
# poke2Iv = @pokemon2.iv[i] @pokemon1.iv[:SPECIAL_ATTACK] = calculateAverageValue(@pokemon1.iv[:SPECIAL_ATTACK], @pokemon2.iv[:SPECIAL_ATTACK])
# @pokemon1.iv[i] = ((poke1Iv+poke2Iv)/2).floor @pokemon1.iv[:SPECIAL_DEFENSE] = calculateAverageValue(@pokemon1.iv[:SPECIAL_DEFENSE], @pokemon2.iv[:SPECIAL_DEFENSE])
# end @pokemon1.iv[:SPEED] = calculateAverageValue(@pokemon1.iv[:SPEED], @pokemon2.iv[:SPEED])
end end
#unused. was meant for super splicers, but too broken #unused. was meant for super splicers, but too broken
def setHighestFusionIvs() def setHighestFusionIvs()«
for i in 0..@pokemon1.iv.length - 1 @pokemon1.iv[:HP] = pickHighestOfTwoValues(@pokemon1.iv[:HP], @pokemon2.iv[:HP])
iv1 = @pokemon1.iv[i] @pokemon1.iv[:ATTACK] = pickHighestOfTwoValues(@pokemon1.iv[:ATTACK], @pokemon2.iv[:ATTACK])
iv2 = @pokemon2.iv[i] @pokemon1.iv[:DEFENSE] = pickHighestOfTwoValues(@pokemon1.iv[:DEFENSE], @pokemon2.iv[:DEFENSE])
@pokemon1.iv[i] = iv1 >= iv2 ? iv1 : iv2 @pokemon1.iv[:SPECIAL_ATTACK] = pickHighestOfTwoValues(@pokemon1.iv[:SPECIAL_ATTACK], @pokemon2.iv[:SPECIAL_ATTACK])
end @pokemon1.iv[:SPECIAL_DEFENSE] = pickHighestOfTwoValues(@pokemon1.iv[:SPECIAL_DEFENSE], @pokemon2.iv[:SPECIAL_DEFENSE])
@pokemon1.iv[:SPEED] = pickHighestOfTwoValues(@pokemon1.iv[:SPEED], @pokemon2.iv[:SPEED])
end end
# Closes the evolution screen. # Closes the evolution screen.
@@ -631,7 +648,6 @@ class PokemonFusionScene
# Opens the fusion screen # Opens the fusion screen
def pbFusionScreen(cancancel = false, superSplicer = false) def pbFusionScreen(cancancel = false, superSplicer = false)
metaplayer1 = SpriteMetafilePlayer.new(@metafile1, @sprites["rsprite1"]) metaplayer1 = SpriteMetafilePlayer.new(@metafile1, @sprites["rsprite1"])
metaplayer2 = SpriteMetafilePlayer.new(@metafile2, @sprites["rsprite2"]) metaplayer2 = SpriteMetafilePlayer.new(@metafile2, @sprites["rsprite2"])
@@ -695,7 +711,7 @@ class PokemonFusionScene
@pokemon1.exp_when_fused_body = @pokemon1.exp #peut-être l'inverse @pokemon1.exp_when_fused_body = @pokemon1.exp #peut-être l'inverse
@pokemon1.exp_gained_since_fused = 0 @pokemon1.exp_gained_since_fused = 0
averageFusionIvs() setFusionIVs(superSplicer)
#add to pokedex #add to pokedex
if !$Trainer.pokedex.owned?(newSpecies) if !$Trainer.pokedex.owned?(newSpecies)
$Trainer.pokedex.set_seen(newSpecies) $Trainer.pokedex.set_seen(newSpecies)
@@ -708,11 +724,10 @@ class PokemonFusionScene
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[0][-1] hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[0][-1]
hiddenAbility2 = @pokemon2.ability == @pokemon2.getAbilityList[0][-1] hiddenAbility2 = @pokemon2.ability == @pokemon2.getAbilityList[0][-1]
#change species #change species
@pokemon1.species = newSpecies @pokemon1.species = newSpecies
#@pokemon1.ability = pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2) #@pokemon1.ability = pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2) pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
setFusionMoves(@pokemon1, @pokemon2) if !noMoves setFusionMoves(@pokemon1, @pokemon2) if !noMoves
@@ -736,7 +751,6 @@ class PokemonFusionScene
@pokemon1.obtain_method = 0 @pokemon1.obtain_method = 0
@pokemon1.owner = Pokemon::Owner.new_from_trainer($Trainer) @pokemon1.owner = Pokemon::Owner.new_from_trainer($Trainer)
pbSEPlay("Voltorb Flip Point") pbSEPlay("Voltorb Flip Point")
@pokemon1.name = newspeciesname if @pokemon1.name == oldspeciesname @pokemon1.name = newspeciesname if @pokemon1.name == oldspeciesname
@@ -759,7 +773,7 @@ end
def setAbilityAndNature(abilitiesList, naturesList) def setAbilityAndNature(abilitiesList, naturesList)
clearUIForMoves clearUIForMoves
scene = FusionSelectOptionsScene.new(abilitiesList,naturesList) scene = FusionSelectOptionsScene.new(abilitiesList, naturesList)
screen = PokemonOptionScreen.new(scene) screen = PokemonOptionScreen.new(scene)
screen.pbStartScreen screen.pbStartScreen
@@ -781,7 +795,6 @@ def setFusionMoves(fusedPoke, poke2)
# #
# fusedPoke.moves=moves # fusedPoke.moves=moves
choice = Kernel.pbMessage("What to do with the moveset?", [_INTL("Learn moves"), _INTL("Keep {1}'s moveset", fusedPoke.name), _INTL("Keep {1}'s moveset", poke2.name)], 0) choice = Kernel.pbMessage("What to do with the moveset?", [_INTL("Learn moves"), _INTL("Keep {1}'s moveset", fusedPoke.name), _INTL("Keep {1}'s moveset", poke2.name)], 0)
if choice == 1 if choice == 1
return return
@@ -802,7 +815,7 @@ end
def setPokemonLevel(pokemon1, pokemon2, superSplicers) def setPokemonLevel(pokemon1, pokemon2, superSplicers)
lv1 = @pokemon1.level lv1 = @pokemon1.level
lv2 = @pokemon2.level lv2 = @pokemon2.level
return calculateFusedPokemonLevel(lv1,lv2,superSplicers) return calculateFusedPokemonLevel(lv1, lv2, superSplicers)
end end
def calculateFusedPokemonLevel(lv1, lv2, superSplicers) def calculateFusedPokemonLevel(lv1, lv2, superSplicers)
@@ -848,7 +861,7 @@ def pbChooseAbility(poke, hidden1 = false, hidden2 = false)
availableNatures << @pokemon1.nature availableNatures << @pokemon1.nature
availableNatures << @pokemon2.nature availableNatures << @pokemon2.nature
setAbilityAndNature([GameData::Ability.get(abID1),GameData::Ability.get(abID2)],availableNatures) setAbilityAndNature([GameData::Ability.get(abID1), GameData::Ability.get(abID2)], availableNatures)
# if (Kernel.pbMessage("Choose an ability. ???", [_INTL("{1}", ability1_name), _INTL("{1}", ability2_name)], 2)) == 0 # if (Kernel.pbMessage("Choose an ability. ???", [_INTL("{1}", ability1_name), _INTL("{1}", ability2_name)], 2)) == 0
# return abID1 #hidden1 ? 4 : 0 # return abID1 #hidden1 ? 4 : 0

View File

@@ -130,7 +130,7 @@ def isTripleFusion?(num)
return num >= Settings::ZAPMOLCUNO_NB return num >= Settings::ZAPMOLCUNO_NB
end end
def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3) def getRandomCustomFusionForIntro(returnRandomPokemonIfNoneFound = true, customPokeList = [], maxPoke = -1, recursionLimit = 3)
if customPokeList.length == 0 if customPokeList.length == 0
customPokeList = getCustomSpeciesList() customPokeList = getCustomSpeciesList()
end end
@@ -159,6 +159,31 @@ def getRandomCustomFusion(returnRandomPokemonIfNoneFound = true, customPokeList
return randPoke return randPoke
end 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) def getBodyID(species)
dexNum = getDexNumberForSpecies(species) dexNum = getDexNumberForSpecies(species)
return (dexNum / NB_POKEMON).round return (dexNum / NB_POKEMON).round

View File

@@ -122,7 +122,7 @@ class GenOneStyle
@customPokeList = getCustomSpeciesList() @customPokeList = getCustomSpeciesList()
#Get random Pokemon (1st gen orandPokenly, pas de legend la prmeiere fois) #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 randpoke1 = randPoke[0] #rand(@maxPoke)+1
randpoke2 = randPoke[1] #rand(@maxPoke)+1 randpoke2 = randPoke[1] #rand(@maxPoke)+1
@@ -358,7 +358,7 @@ class GenOneStyle
if @maxPoke < NB_POKEMON - 1 if @maxPoke < NB_POKEMON - 1
@maxPoke += 5 #-1 pour que ca arrive pile. tant pis pour kyurem @maxPoke += 5 #-1 pour que ca arrive pile. tant pis pour kyurem
end end
randPoke = getRandomCustomFusion(true, @customPokeList, @maxPoke) randPoke = getRandomCustomFusionForIntro(true, @customPokeList, @maxPoke)
randpoke1 = randPoke[0] #rand(@maxPoke)+1 randpoke1 = randPoke[0] #rand(@maxPoke)+1
randpoke2 = randPoke[1] #rand(@maxPoke)+1 randpoke2 = randPoke[1] #rand(@maxPoke)+1

View File

@@ -1305,10 +1305,12 @@ def pbFuse(pokemon, poke2, supersplicers = false)
typeWindow = drawPokemonType(newid) typeWindow = drawPokemonType(newid)
drawFusionPreviewText(typeWindow, "Lv. " + new_level.to_s, 232, 0,) drawFusionPreviewText(typeWindow, "Lv. " + new_level.to_s, 232, 0,)
if hasCustom if !$Trainer.seen?(newid)
previewwindow.picture.pbSetColor(150, 255, 150, 200) if hasCustom
else previewwindow.picture.pbSetColor(150, 255, 150, 200)
previewwindow.picture.pbSetColor(255, 255, 255, 200) else
previewwindow.picture.pbSetColor(255, 255, 255, 200)
end
end end
previewwindow.x = (Graphics.width / 2) - (previewwindow.width / 2) previewwindow.x = (Graphics.width / 2) - (previewwindow.width / 2)
previewwindow.y = ((Graphics.height - 96) / 2) - (previewwindow.height / 2) previewwindow.y = ((Graphics.height - 96) / 2) - (previewwindow.height / 2)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff