hidden power error fix

This commit is contained in:
infinitefusion
2022-05-15 09:25:04 -04:00
parent 66e7d03fbd
commit bbf4bc6e9b
14 changed files with 9 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -243,13 +243,13 @@ end
#=============================================================================== #===============================================================================
class PokeBattle_Move_090 < PokeBattle_Move class PokeBattle_Move_090 < PokeBattle_Move
def pbBaseType(user) def pbBaseType(user)
hp = pbHiddenPower(user,user.hiddenPowerType) hp = pbHiddenPower(user,user.pokemon.hiddenPowerType)
return hp[0] return hp[0]
end end
def pbBaseDamage(baseDmg,user,target) def pbBaseDamage(baseDmg,user,target)
return super if Settings::MECHANICS_GENERATION >= 6 return super if Settings::MECHANICS_GENERATION >= 6
hp = pbHiddenPower(user,user.hiddenPowerType) hp = pbHiddenPower(user,user.pokemon.hiddenPowerType)
return hp[1] return hp[1]
end end
end end

View File

@@ -137,7 +137,7 @@ def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner
end end
def pbGenerateEgg(pkmn, text = "") def pbGenerateEgg(pkmn, text = "")
return false if !pkmn || $Trainer.party_full? return false if !pkmn #|| $Trainer.party_full?
pkmn = Pokemon.new(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon) pkmn = Pokemon.new(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon)
# Set egg's details # Set egg's details
pkmn.name = _INTL("Egg") pkmn.name = _INTL("Egg")
@@ -145,7 +145,12 @@ def pbGenerateEgg(pkmn, text = "")
pkmn.obtain_text = text pkmn.obtain_text = text
pkmn.calc_stats pkmn.calc_stats
# Add egg to party # Add egg to party
if $Trainer.party.length<6
$Trainer.party[$Trainer.party.length] = pkmn $Trainer.party[$Trainer.party.length] = pkmn
else
$PokemonStorage.pbStoreCaught(pkmn)
Kernel.pbMessage(_INTL("The egg was transfered to the PC."))
end
return true return true
end end
alias pbAddEgg pbGenerateEgg alias pbAddEgg pbGenerateEgg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.