mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Added checks that prevent aliasing a method if the alias method already exists, fixed Symbiosis not working properly for opponents
This commit is contained in:
@@ -169,7 +169,9 @@ end
|
||||
# Shadow Pokémon in battle.
|
||||
#===============================================================================
|
||||
class Battle
|
||||
alias __shadow__pbCanUseItemOnPokemon? pbCanUseItemOnPokemon?
|
||||
unless method_defined?(:__shadow__pbCanUseItemOnPokemon?)
|
||||
alias __shadow__pbCanUseItemOnPokemon? pbCanUseItemOnPokemon?
|
||||
end
|
||||
|
||||
def pbCanUseItemOnPokemon?(item, pkmn, battler, scene, showMessages = true)
|
||||
ret = __shadow__pbCanUseItemOnPokemon?(item, pkmn, battler, scene, showMessages)
|
||||
@@ -184,7 +186,7 @@ end
|
||||
|
||||
|
||||
class Battle::Battler
|
||||
alias __shadow__pbInitPokemon pbInitPokemon
|
||||
alias __shadow__pbInitPokemon pbInitPokemon unless method_defined?(:__shadow__pbInitPokemon)
|
||||
|
||||
def pbInitPokemon(*arg)
|
||||
if self.pokemonIndex > 0 && inHyperMode?
|
||||
|
||||
Reference in New Issue
Block a user