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
|
||||
cmdFuse = -1
|
||||
cmdUnfuse = -1
|
||||
cmdReverse = -1
|
||||
cmdRelease = -1
|
||||
cmdDebug = -1
|
||||
cmdCancel = -1
|
||||
@@ -1659,6 +1660,7 @@ class PokemonStorageScreen
|
||||
if pokemon != nil
|
||||
if dexNum(pokemon.species) > NB_POKEMON
|
||||
commands[cmdUnfuse = commands.length] = _INTL("Unfuse")
|
||||
commands[cmdReverse = commands.length] = _INTL("Reverse") if $PokemonBag.pbQuantity(:DNAREVERSER) > 0
|
||||
else
|
||||
commands[cmdFuse = commands.length] = _INTL("Fuse")
|
||||
end
|
||||
@@ -1686,6 +1688,8 @@ class PokemonStorageScreen
|
||||
pbFuseFromPC(selected, @heldpkmn)
|
||||
elsif cmdUnfuse >= 0 && command == cmdUnfuse # unfuse
|
||||
pbUnfuseFromPC(selected)
|
||||
elsif cmdReverse >= 0 && command == cmdReverse # unfuse
|
||||
reverseFromPC(selected)
|
||||
elsif cmdRelease >= 0 && command == cmdRelease # Release
|
||||
pbRelease(selected, @heldpkmn)
|
||||
elsif cmdDebug >= 0 && command == cmdDebug # Debug
|
||||
@@ -2265,6 +2269,21 @@ class PokemonStorageScreen
|
||||
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)
|
||||
box = selected[0]
|
||||
index = selected[1]
|
||||
|
||||
@@ -456,31 +456,36 @@ ItemHandlers::UseOnPokemon.add(:DNAREVERSER, proc { |item, pokemon, scene|
|
||||
next false
|
||||
end
|
||||
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
|
||||
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
|
||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
||||
scene.pbRefresh
|
||||
}
|
||||
reverseFusion(pokemon)
|
||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
||||
scene.pbRefresh
|
||||
next true
|
||||
end
|
||||
|
||||
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|
|
||||
if !pokemon.isFusion?
|
||||
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.pbEvolution(false)
|
||||
evo.pbEndScreen
|
||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 })
|
||||
scene.pbRefreshAnnotations(proc { |p| pbCheckEvolution(p, item) > 0 }) if scene.pbHasAnnotations?
|
||||
scene.pbRefresh
|
||||
}
|
||||
next true
|
||||
@@ -1295,7 +1300,7 @@ def pbFuse(pokemon, poke2, supersplicers = false)
|
||||
typeWindow = drawPokemonType(newid)
|
||||
|
||||
if hasCustom
|
||||
previewwindow.picture.pbSetColor(220, 255, 220, 200)
|
||||
previewwindow.picture.pbSetColor(150, 255, 150, 200)
|
||||
else
|
||||
previewwindow.picture.pbSetColor(255, 255, 255, 200)
|
||||
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