mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
corrupted data
This commit is contained in:
@@ -42,6 +42,7 @@ class PokeBattle_Battler
|
||||
attr_accessor :tookPhysicalHit
|
||||
attr_accessor :damageState
|
||||
attr_accessor :initialHP # Set at the start of each move's usage
|
||||
attr_accessor :hasTempSpeciesChange
|
||||
|
||||
#=============================================================================
|
||||
# Complex accessors
|
||||
|
||||
@@ -614,8 +614,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
playChangeFormAnimation(animation)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
# def changeUnfusedSpecies(pokemon, newSpecies, animation = "UltraBurst2")
|
||||
#
|
||||
|
||||
@@ -1504,6 +1504,48 @@ BattleHandlers::TargetAbilityOnHit.add(:JUSTIFIED,
|
||||
}
|
||||
)
|
||||
|
||||
BattleHandlers::TargetAbilityOnHit.add(:CORRUPTION,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if user.fainted?
|
||||
next if user.ability == :CORRUPTION
|
||||
oldAbil = nil
|
||||
|
||||
#next if user.unstoppableAbility? || user.ability == ability
|
||||
if move.specialMove?
|
||||
user.pokemon.tempSpeciesChange_originalSpecies = user.pokemon.species if !user.pokemon.tempSpeciesChange_originalSpecies
|
||||
user.pokemon.species = user.pokemon.tempSpeciesChange_originalSpecies
|
||||
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
||||
body_species_number = GameData::Species.get(user.pokemon.species).get_body_species
|
||||
body_species = GameData::Species.get(body_species_number).id
|
||||
oldAbil = user.ability
|
||||
user.ability = ability
|
||||
|
||||
user.changeSpecies(user.pokemon, body_species, :MISSINGNO, "Paralysis")
|
||||
user.pbUpdate(true)
|
||||
battle.scene.pbChangePokemon(user,user.pokemon)
|
||||
battle.scene.pbRefreshOne(user.index)
|
||||
elsif move.physicalMove?
|
||||
user.pokemon.tempSpeciesChange_originalSpecies = user.pokemon.species if !user.pokemon.tempSpeciesChange_originalSpecies
|
||||
user.pokemon.species = user.pokemon.tempSpeciesChange_originalSpecies
|
||||
|
||||
battle.pbShowAbilitySplash(target) if user.opposes?(target)
|
||||
head_species_number = GameData::Species.get(user.pokemon.species).get_head_species
|
||||
head_species = GameData::Species.get(head_species_number).id
|
||||
|
||||
|
||||
user.changeSpecies(user.pokemon, head_species, :MISSINGNO, "Paralysis")
|
||||
user.pbUpdate(true)
|
||||
oldAbil = user.ability
|
||||
user.ability = ability
|
||||
battle.scene.pbChangePokemon(user,user.pokemon)
|
||||
battle.scene.pbRefreshOne(user.index)
|
||||
end
|
||||
user.pbOnAbilityChanged(oldAbil) if oldAbil != nil
|
||||
battle.pbHideAbilitySplash(target) if user.opposes?(target)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
BattleHandlers::TargetAbilityOnHit.add(:MUMMY,
|
||||
proc { |ability,user,target,move,battle|
|
||||
next if !move.pbContactMove?(user)
|
||||
|
||||
@@ -717,6 +717,7 @@ def pbAfterBattle(decision,canLose)
|
||||
pkmn.statusCount = 0 if pkmn.status == :POISON # Bad poison becomes regular
|
||||
pkmn.makeUnmega
|
||||
pkmn.makeUnprimal
|
||||
pkmn.species = pkmn.tempSpeciesChange_originalSpecies if pkmn.tempSpeciesChange_originalSpecies
|
||||
end
|
||||
if $PokemonGlobal.partner
|
||||
$Trainer.heal_party
|
||||
|
||||
@@ -112,6 +112,7 @@ class Pokemon
|
||||
attr_accessor :size_category #the size attribute for scaling the sprite (used only for gourgeist/pumpkaboo)
|
||||
|
||||
attr_accessor :force_disobey
|
||||
attr_accessor :tempSpeciesChange_originalSpecies
|
||||
|
||||
# Max total IVs
|
||||
IV_STAT_LIMIT = 31
|
||||
|
||||
@@ -41,6 +41,7 @@ class Pokemon
|
||||
self.form = unmegaForm if unmegaForm >= 0
|
||||
end
|
||||
|
||||
|
||||
def megaName
|
||||
formName = species_data.form_name
|
||||
return (formName && !formName.empty?) ? formName : _INTL("Mega {1}", species_data.name)
|
||||
|
||||
@@ -857,17 +857,12 @@ def replaceFusionSpecies(pokemon, speciesToChange, newSpecies)
|
||||
should_update_body = currentBody == speciesToChange
|
||||
should_update_head = currentHead == speciesToChange
|
||||
|
||||
echoln speciesToChange
|
||||
echoln currentBody
|
||||
echoln currentHead
|
||||
|
||||
return if !should_update_body && !should_update_head
|
||||
|
||||
newSpeciesBody = should_update_body ? newSpecies : currentBody
|
||||
newSpeciesHead = should_update_head ? newSpecies : currentHead
|
||||
|
||||
newSpecies = getFusionSpecies(newSpeciesBody, newSpeciesHead)
|
||||
echoln newSpecies.id_number
|
||||
pokemon.species = newSpecies
|
||||
end
|
||||
|
||||
|
||||
@@ -73,7 +73,6 @@ def fetch_sprite_from_web(url, destinationPath)
|
||||
return true
|
||||
end
|
||||
echoln "Failed to download #{url}"
|
||||
echoln caller
|
||||
return false
|
||||
rescue MKXPError => e
|
||||
echoln "MKXPError: #{e.message}"
|
||||
|
||||
Reference in New Issue
Block a user