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
cmdMark = -1
if !@pokemon.egg?
commands[cmdGiveItem = commands.length] = _INTL("Give item")
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
#commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
if pbBattleChallenge.currentChallenge == -1
commands[cmdGiveItem = commands.length] = _INTL("Give item")
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
end
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
end
commands[cmdMark = commands.length] = _INTL("Mark")
commands[commands.length] = _INTL("Cancel")

View File

@@ -603,22 +603,39 @@ class PokemonFusionScene
return 1
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()
return
# for i in 0..@pokemon1.iv.length-1
# poke1Iv = @pokemon1.iv[i]
# poke2Iv = @pokemon2.iv[i]
# @pokemon1.iv[i] = ((poke1Iv+poke2Iv)/2).floor
# end
@pokemon1.iv[:HP] = calculateAverageValue(@pokemon1.iv[:HP], @pokemon2.iv[:HP])
@pokemon1.iv[:ATTACK] = calculateAverageValue(@pokemon1.iv[:ATTACK], @pokemon2.iv[:ATTACK])
@pokemon1.iv[:DEFENSE] = calculateAverageValue(@pokemon1.iv[:DEFENSE], @pokemon2.iv[:DEFENSE])
@pokemon1.iv[:SPECIAL_ATTACK] = calculateAverageValue(@pokemon1.iv[:SPECIAL_ATTACK], @pokemon2.iv[:SPECIAL_ATTACK])
@pokemon1.iv[:SPECIAL_DEFENSE] = calculateAverageValue(@pokemon1.iv[:SPECIAL_DEFENSE], @pokemon2.iv[:SPECIAL_DEFENSE])
@pokemon1.iv[:SPEED] = calculateAverageValue(@pokemon1.iv[:SPEED], @pokemon2.iv[:SPEED])
end
#unused. was meant for super splicers, but too broken
def setHighestFusionIvs()
for i in 0..@pokemon1.iv.length - 1
iv1 = @pokemon1.iv[i]
iv2 = @pokemon2.iv[i]
@pokemon1.iv[i] = iv1 >= iv2 ? iv1 : iv2
end
def setHighestFusionIvs()«
@pokemon1.iv[:HP] = pickHighestOfTwoValues(@pokemon1.iv[:HP], @pokemon2.iv[:HP])
@pokemon1.iv[:ATTACK] = pickHighestOfTwoValues(@pokemon1.iv[:ATTACK], @pokemon2.iv[:ATTACK])
@pokemon1.iv[:DEFENSE] = pickHighestOfTwoValues(@pokemon1.iv[:DEFENSE], @pokemon2.iv[:DEFENSE])
@pokemon1.iv[:SPECIAL_ATTACK] = pickHighestOfTwoValues(@pokemon1.iv[:SPECIAL_ATTACK], @pokemon2.iv[:SPECIAL_ATTACK])
@pokemon1.iv[:SPECIAL_DEFENSE] = pickHighestOfTwoValues(@pokemon1.iv[:SPECIAL_DEFENSE], @pokemon2.iv[:SPECIAL_DEFENSE])
@pokemon1.iv[:SPEED] = pickHighestOfTwoValues(@pokemon1.iv[:SPEED], @pokemon2.iv[:SPEED])
end
# Closes the evolution screen.
@@ -631,7 +648,6 @@ class PokemonFusionScene
# Opens the fusion screen
def pbFusionScreen(cancancel = false, superSplicer = false)
metaplayer1 = SpriteMetafilePlayer.new(@metafile1, @sprites["rsprite1"])
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_gained_since_fused = 0
averageFusionIvs()
setFusionIVs(superSplicer)
#add to pokedex
if !$Trainer.pokedex.owned?(newSpecies)
$Trainer.pokedex.set_seen(newSpecies)
@@ -708,11 +724,10 @@ class PokemonFusionScene
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[0][-1]
hiddenAbility2 = @pokemon2.ability == @pokemon2.getAbilityList[0][-1]
#change species
@pokemon1.species = newSpecies
#@pokemon1.ability = pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
pbChooseAbility(@pokemon1, hiddenAbility1, hiddenAbility2)
setFusionMoves(@pokemon1, @pokemon2) if !noMoves
@@ -736,7 +751,6 @@ class PokemonFusionScene
@pokemon1.obtain_method = 0
@pokemon1.owner = Pokemon::Owner.new_from_trainer($Trainer)
pbSEPlay("Voltorb Flip Point")
@pokemon1.name = newspeciesname if @pokemon1.name == oldspeciesname
@@ -759,7 +773,7 @@ end
def setAbilityAndNature(abilitiesList, naturesList)
clearUIForMoves
scene = FusionSelectOptionsScene.new(abilitiesList,naturesList)
scene = FusionSelectOptionsScene.new(abilitiesList, naturesList)
screen = PokemonOptionScreen.new(scene)
screen.pbStartScreen
@@ -781,7 +795,6 @@ def setFusionMoves(fusedPoke, poke2)
#
# 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)
if choice == 1
return
@@ -802,7 +815,7 @@ end
def setPokemonLevel(pokemon1, pokemon2, superSplicers)
lv1 = @pokemon1.level
lv2 = @pokemon2.level
return calculateFusedPokemonLevel(lv1,lv2,superSplicers)
return calculateFusedPokemonLevel(lv1, lv2, superSplicers)
end
def calculateFusedPokemonLevel(lv1, lv2, superSplicers)
@@ -848,7 +861,7 @@ def pbChooseAbility(poke, hidden1 = false, hidden2 = false)
availableNatures << @pokemon1.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
# return abID1 #hidden1 ? 4 : 0

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)

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