mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
reverse from pc
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1645,6 +1645,7 @@ class PokemonStorageScreen
|
|||||||
cmdItem = -1
|
cmdItem = -1
|
||||||
cmdFuse = -1
|
cmdFuse = -1
|
||||||
cmdUnfuse = -1
|
cmdUnfuse = -1
|
||||||
|
cmdReverse = -1
|
||||||
cmdRelease = -1
|
cmdRelease = -1
|
||||||
cmdDebug = -1
|
cmdDebug = -1
|
||||||
cmdCancel = -1
|
cmdCancel = -1
|
||||||
@@ -1659,6 +1660,7 @@ class PokemonStorageScreen
|
|||||||
if pokemon != nil
|
if pokemon != nil
|
||||||
if dexNum(pokemon.species) > NB_POKEMON
|
if dexNum(pokemon.species) > NB_POKEMON
|
||||||
commands[cmdUnfuse = commands.length] = _INTL("Unfuse")
|
commands[cmdUnfuse = commands.length] = _INTL("Unfuse")
|
||||||
|
commands[cmdReverse = commands.length] = _INTL("Reverse") if $PokemonBag.pbQuantity(:DNAREVERSER) > 0
|
||||||
else
|
else
|
||||||
commands[cmdFuse = commands.length] = _INTL("Fuse")
|
commands[cmdFuse = commands.length] = _INTL("Fuse")
|
||||||
end
|
end
|
||||||
@@ -1686,6 +1688,8 @@ class PokemonStorageScreen
|
|||||||
pbFuseFromPC(selected, @heldpkmn)
|
pbFuseFromPC(selected, @heldpkmn)
|
||||||
elsif cmdUnfuse >= 0 && command == cmdUnfuse # unfuse
|
elsif cmdUnfuse >= 0 && command == cmdUnfuse # unfuse
|
||||||
pbUnfuseFromPC(selected)
|
pbUnfuseFromPC(selected)
|
||||||
|
elsif cmdReverse >= 0 && command == cmdReverse # unfuse
|
||||||
|
reverseFromPC(selected)
|
||||||
elsif cmdRelease >= 0 && command == cmdRelease # Release
|
elsif cmdRelease >= 0 && command == cmdRelease # Release
|
||||||
pbRelease(selected, @heldpkmn)
|
pbRelease(selected, @heldpkmn)
|
||||||
elsif cmdDebug >= 0 && command == cmdDebug # Debug
|
elsif cmdDebug >= 0 && command == cmdDebug # Debug
|
||||||
@@ -2265,6 +2269,21 @@ class PokemonStorageScreen
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def reverseFromPC(selected)
|
||||||
|
box = selected[0]
|
||||||
|
index = selected[1]
|
||||||
|
pokemon = @storage[box, index]
|
||||||
|
|
||||||
|
if !pokemon.isFusion?
|
||||||
|
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
|
||||||
|
reverseFusion(pokemon)
|
||||||
|
end
|
||||||
|
$PokemonBag.pbDeleteItem(:DNAREVERSER)
|
||||||
|
end
|
||||||
|
|
||||||
def pbUnfuseFromPC(selected)
|
def pbUnfuseFromPC(selected)
|
||||||
box = selected[0]
|
box = selected[0]
|
||||||
index = selected[1]
|
index = selected[1]
|
||||||
|
|||||||
@@ -456,31 +456,36 @@ ItemHandlers::UseOnPokemon.add(:DNAREVERSER, proc { |item, pokemon, scene|
|
|||||||
next false
|
next false
|
||||||
end
|
end
|
||||||
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
|
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
|
||||||
body = getBasePokemonID(pokemon.species, true)
|
reverseFusion(pokemon)
|
||||||
head = getBasePokemonID(pokemon.species, false)
|
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
||||||
newspecies = (head) * Settings::NB_POKEMON + body
|
scene.pbRefresh
|
||||||
|
|
||||||
body_exp = pokemon.exp_when_fused_body
|
|
||||||
head_exp = pokemon.exp_when_fused_head
|
|
||||||
|
|
||||||
pokemon.exp_when_fused_body = head_exp
|
|
||||||
pokemon.exp_when_fused_head = body_exp
|
|
||||||
|
|
||||||
#play animation
|
|
||||||
pbFadeOutInWithMusic(99999) {
|
|
||||||
fus = PokemonEvolutionScene.new
|
|
||||||
fus.pbStartScreen(pokemon, newspecies, true)
|
|
||||||
fus.pbEvolution(false, true)
|
|
||||||
fus.pbEndScreen
|
|
||||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
|
||||||
scene.pbRefresh
|
|
||||||
}
|
|
||||||
next true
|
next true
|
||||||
end
|
end
|
||||||
|
|
||||||
next false
|
next false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def reverseFusion(pokemon)
|
||||||
|
body = getBasePokemonID(pokemon.species, true)
|
||||||
|
head = getBasePokemonID(pokemon.species, false)
|
||||||
|
newspecies = (head) * Settings::NB_POKEMON + body
|
||||||
|
|
||||||
|
body_exp = pokemon.exp_when_fused_body
|
||||||
|
head_exp = pokemon.exp_when_fused_head
|
||||||
|
|
||||||
|
pokemon.exp_when_fused_body = head_exp
|
||||||
|
pokemon.exp_when_fused_head = body_exp
|
||||||
|
|
||||||
|
#play animation
|
||||||
|
pbFadeOutInWithMusic(99999) {
|
||||||
|
fus = PokemonEvolutionScene.new
|
||||||
|
fus.pbStartScreen(pokemon, newspecies, true)
|
||||||
|
fus.pbEvolution(false, true)
|
||||||
|
fus.pbEndScreen
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene|
|
ItemHandlers::UseOnPokemon.add(:INFINITEREVERSERS, proc { |item, pokemon, scene|
|
||||||
if !pokemon.isFusion?
|
if !pokemon.isFusion?
|
||||||
scene.pbDisplay(_INTL("It won't have any effect."))
|
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||||
@@ -812,7 +817,7 @@ ItemHandlers::UseOnPokemon.add(:SLOWPOKETAIL, proc { |item, pokemon, scene|
|
|||||||
evo.pbStartScreen(pokemon, newspecies)
|
evo.pbStartScreen(pokemon, newspecies)
|
||||||
evo.pbEvolution(false)
|
evo.pbEvolution(false)
|
||||||
evo.pbEndScreen
|
evo.pbEndScreen
|
||||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 }) if scene.pbHasAnnotations?
|
||||||
scene.pbRefresh
|
scene.pbRefresh
|
||||||
}
|
}
|
||||||
next true
|
next true
|
||||||
@@ -1295,7 +1300,7 @@ def pbFuse(pokemon, poke2, supersplicers = false)
|
|||||||
typeWindow = drawPokemonType(newid)
|
typeWindow = drawPokemonType(newid)
|
||||||
|
|
||||||
if hasCustom
|
if hasCustom
|
||||||
previewwindow.picture.pbSetColor(220, 255, 220, 200)
|
previewwindow.picture.pbSetColor(150, 255, 150, 200)
|
||||||
else
|
else
|
||||||
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
13791
PBS/pokemon_420.txt
13791
PBS/pokemon_420.txt
File diff suppressed because it is too large
Load Diff
4680
PBS/trainers.txt
4680
PBS/trainers.txt
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user