mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
fixes jirachi & viridian river crash
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -274,6 +274,10 @@ class PokeBattle_Battler
|
||||
end
|
||||
|
||||
def pbTransform(target)
|
||||
if target.is_a?(Integer)
|
||||
@battle.pbDisplay(_INTL("But it failed..."))
|
||||
return
|
||||
end
|
||||
oldAbil = @ability_id
|
||||
@effects[PBEffects::Transform] = true
|
||||
@effects[PBEffects::TransformSpecies] = target.species
|
||||
|
||||
@@ -2717,34 +2717,34 @@ end
|
||||
#################
|
||||
# Fusion Swap
|
||||
# ###############
|
||||
class PokeBattle_Move_080 < PokeBattle_Move
|
||||
def pbMoveFailed?(user,targets)
|
||||
if targets[0].effects[PBEffects::Transform]
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def pbFailsAgainstTarget?(user,target)
|
||||
if target.effects[PBEffects::Transform] ||
|
||||
target.effects[PBEffects::Illusion] ||
|
||||
!target.pokemon.isFusion?
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
body = getBasePokemonID(target.pokemon.species, true)
|
||||
head = getBasePokemonID(target.pokemon.species, false)
|
||||
newspecies = (head) * Settings::NB_POKEMON + body
|
||||
target.pbTransform(newspecies)
|
||||
end
|
||||
|
||||
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
|
||||
super
|
||||
@battle.scene.pbChangePokemon(user,targets[0].pokemon)
|
||||
end
|
||||
end
|
||||
# class PokeBattle_Move_XXX < PokeBattle_Move
|
||||
# def pbMoveFailed?(user,targets)
|
||||
# if targets[0].effects[PBEffects::Transform]
|
||||
# @battle.pbDisplay(_INTL("But it failed!"))
|
||||
# return true
|
||||
# end
|
||||
# return false
|
||||
# end
|
||||
#
|
||||
# def pbFailsAgainstTarget?(user,target)
|
||||
# if target.effects[PBEffects::Transform] ||
|
||||
# target.effects[PBEffects::Illusion] ||
|
||||
# !target.pokemon.isFusion?
|
||||
# @battle.pbDisplay(_INTL("But it failed!"))
|
||||
# return true
|
||||
# end
|
||||
# return false
|
||||
# end
|
||||
#
|
||||
# def pbEffectAgainstTarget(user,target)
|
||||
# body = getBasePokemonID(target.pokemon.species, true)
|
||||
# head = getBasePokemonID(target.pokemon.species, false)
|
||||
# newspecies = (head) * Settings::NB_POKEMON + body
|
||||
# target.pbTransform(newspecies)
|
||||
# end
|
||||
#
|
||||
# def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
|
||||
# super
|
||||
# @battle.scene.pbChangePokemon(user,targets[0].pokemon)
|
||||
# end
|
||||
# end
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user