mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
fusion menu
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
module Settings
|
module Settings
|
||||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||||
GAME_VERSION = '5.0.0'
|
GAME_VERSION = '5.0.0'
|
||||||
GAME_VERSION_NUMBER = "5.0.27 - beta"
|
GAME_VERSION_NUMBER = "5.0.29 - beta"
|
||||||
|
|
||||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||||
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ def pbBattleAnimation(bgm=nil,battletype=0,foe=nil)
|
|||||||
$PokemonEncounters.reset_step_count
|
$PokemonEncounters.reset_step_count
|
||||||
# Fade back to the overworld
|
# Fade back to the overworld
|
||||||
viewport.color = Color.new(0,0,0,255)
|
viewport.color = Color.new(0,0,0,255)
|
||||||
numFrames = Graphics.frame_rate*1/10 #4/10 0.4 seconds, 16 frames
|
numFrames = Graphics.frame_rate*4/10 # 0.4 seconds, 16 frames
|
||||||
alphaDiff = (255.0/numFrames).ceil
|
alphaDiff = (255.0/numFrames).ceil
|
||||||
numFrames.times do
|
numFrames.times do
|
||||||
viewport.color.alpha -= alphaDiff
|
viewport.color.alpha -= alphaDiff
|
||||||
|
|||||||
70
Data/Scripts/048_Fusion/FusionMenu.rb
Normal file
70
Data/Scripts/048_Fusion/FusionMenu.rb
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
class FusionSelectOptionsScene < PokemonOption_Scene
|
||||||
|
attr_accessor :selectedAbility
|
||||||
|
attr_accessor :selectedNature
|
||||||
|
|
||||||
|
|
||||||
|
def initialize(abilityList,natureList)
|
||||||
|
@abilityList = abilityList
|
||||||
|
@natureList = natureList
|
||||||
|
@selectedAbility=nil
|
||||||
|
@selectedNature=nil
|
||||||
|
@selBaseColor = Color.new(48,96,216)
|
||||||
|
@selShadowColor = Color.new(32,32,32)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def initUIElements
|
||||||
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
|
_INTL(""), 0, 0, Graphics.width, 64, @viewport)
|
||||||
|
@sprites["textbox"] = pbCreateMessageWindow
|
||||||
|
@sprites["textbox"].letterbyletter = false
|
||||||
|
pbSetSystemFont(@sprites["textbox"].contents)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def getAbilityName(ability)
|
||||||
|
return GameData::Ability.get(ability.id).real_name
|
||||||
|
end
|
||||||
|
|
||||||
|
def getAbilityDescription(ability)
|
||||||
|
return GameData::Ability.get(ability.id).real_description
|
||||||
|
end
|
||||||
|
|
||||||
|
def getNatureName(nature)
|
||||||
|
return GameData::Nature.get(nature.id).real_name
|
||||||
|
end
|
||||||
|
|
||||||
|
def getNatureDescription(nature)
|
||||||
|
change= GameData::Nature.get(nature.id).stat_changes
|
||||||
|
return "Neutral nature" if change.empty?
|
||||||
|
positiveChange = change[0]
|
||||||
|
negativeChange = change[1]
|
||||||
|
return _INTL("+ {1}\n- {2}",GameData::Stat.get(positiveChange[0]).name,GameData::Stat.get(negativeChange[0]).name)
|
||||||
|
end
|
||||||
|
|
||||||
|
def pbGetOptions(inloadscreen = false)
|
||||||
|
options = [
|
||||||
|
|
||||||
|
EnumOption.new(_INTL("Ability"), [_INTL(getAbilityName(@abilityList[0])), _INTL(getAbilityName(@abilityList[1]))],
|
||||||
|
proc { 0 },
|
||||||
|
proc { |value|
|
||||||
|
@selectedAbility=@abilityList[value]
|
||||||
|
}, [getAbilityDescription(@abilityList[0]), getAbilityDescription(@abilityList[1])]
|
||||||
|
),
|
||||||
|
EnumOption.new(_INTL("Nature"), [_INTL(getNatureName(@natureList[0])), _INTL(getNatureName(@natureList[1]))],
|
||||||
|
proc { 0 },
|
||||||
|
proc { |value|
|
||||||
|
@selectedNature=@natureList[value]
|
||||||
|
}, [getNatureDescription(@natureList[0]), getNatureDescription(@natureList[1])]
|
||||||
|
)
|
||||||
|
|
||||||
|
]
|
||||||
|
return options
|
||||||
|
end
|
||||||
|
|
||||||
|
def isConfirmedOnKeyPress
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
@@ -712,6 +712,8 @@ class PokemonFusionScene
|
|||||||
#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)
|
||||||
|
|
||||||
setFusionMoves(@pokemon1, @pokemon2) if !noMoves
|
setFusionMoves(@pokemon1, @pokemon2) if !noMoves
|
||||||
|
|
||||||
# if superSplicer
|
# if superSplicer
|
||||||
@@ -755,6 +757,8 @@ def clearUIForMoves
|
|||||||
end
|
end
|
||||||
|
|
||||||
def setAbilityAndNature(abilitiesList, naturesList)
|
def setAbilityAndNature(abilitiesList, naturesList)
|
||||||
|
clearUIForMoves
|
||||||
|
|
||||||
scene = FusionSelectOptionsScene.new(abilitiesList,naturesList)
|
scene = FusionSelectOptionsScene.new(abilitiesList,naturesList)
|
||||||
screen = PokemonOptionScreen.new(scene)
|
screen = PokemonOptionScreen.new(scene)
|
||||||
screen.pbStartScreen
|
screen.pbStartScreen
|
||||||
@@ -765,35 +769,43 @@ def setAbilityAndNature(abilitiesList, naturesList)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def setFusionMoves(fusedPoke, poke2)
|
def setFusionMoves(fusedPoke, poke2)
|
||||||
clearUIForMoves
|
#NEW METHOD (not ready)
|
||||||
|
|
||||||
moves=fusedPoke.moves
|
# clearUIForMoves
|
||||||
scene = FusionMovesOptionsScene.new(fusedPoke,poke2)
|
#
|
||||||
screen = PokemonOptionScreen.new(scene)
|
# moves=fusedPoke.moves
|
||||||
screen.pbStartScreen
|
# scene = FusionMovesOptionsScene.new(fusedPoke,poke2)
|
||||||
moves =[scene.move1,scene.move2,scene.move3,scene.move3]
|
# screen = PokemonOptionScreen.new(scene)
|
||||||
|
# screen.pbStartScreen
|
||||||
|
# moves =[scene.move1,scene.move2,scene.move3,scene.move3]
|
||||||
|
#
|
||||||
|
# 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
|
||||||
# elsif choice == 2
|
elsif choice == 2
|
||||||
# fusedPoke.moves = poke2.moves
|
fusedPoke.moves = poke2.moves
|
||||||
# return
|
return
|
||||||
# else
|
else
|
||||||
# #Learn moves
|
#Learn moves
|
||||||
# movelist = poke2.moves
|
movelist = poke2.moves
|
||||||
# for move in movelist
|
for move in movelist
|
||||||
# if move.id != 0
|
if move.id != 0
|
||||||
# pbLearnMove(fusedPoke, move.id, true, false, true)
|
pbLearnMove(fusedPoke, move.id, true, false, true)
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
end
|
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)
|
||||||
|
end
|
||||||
|
|
||||||
|
def calculateFusedPokemonLevel(lv1, lv2, superSplicers)
|
||||||
if superSplicers
|
if superSplicers
|
||||||
if lv1 > lv2
|
if lv1 > lv2
|
||||||
return lv1
|
return lv1
|
||||||
|
|||||||
@@ -1259,6 +1259,7 @@ def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false)
|
|||||||
pbRemovePokemonAt(chosen)
|
pbRemovePokemonAt(chosen)
|
||||||
scene.pbHardRefresh
|
scene.pbHardRefresh
|
||||||
pbBGMPlay(playingBGM)
|
pbBGMPlay(playingBGM)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
elsif pokemon == poke2
|
elsif pokemon == poke2
|
||||||
scene.pbDisplay(_INTL("{1} can't be fused with itself!", pokemon.name))
|
scene.pbDisplay(_INTL("{1} can't be fused with itself!", pokemon.name))
|
||||||
@@ -1266,7 +1267,6 @@ def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false)
|
|||||||
else
|
else
|
||||||
scene.pbDisplay(_INTL("{1} can't be fused with {2}.", poke2.name, pokemon.name))
|
scene.pbDisplay(_INTL("{1} can't be fused with {2}.", poke2.name, pokemon.name))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user