mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 06:06:01 +00:00
Rewrote evolution methods to make them modular
This commit is contained in:
@@ -227,22 +227,10 @@ end
|
||||
#===============================================================================
|
||||
# Evolution methods
|
||||
#===============================================================================
|
||||
def pbTradeCheckEvolution(pokemon,pokemon2)
|
||||
ret = pbCheckEvolutionEx(pokemon) { |pokemon,evonib,level,poke|
|
||||
case evonib
|
||||
when PBEvolution::Trade
|
||||
next poke
|
||||
when PBEvolution::TradeItem
|
||||
if pokemon.item==level
|
||||
pokemon.setItem(0)
|
||||
next poke
|
||||
end
|
||||
when PBEvolution::TradeSpecies
|
||||
if !pokemon2.hasItem?(:EVERSTONE)
|
||||
next poke if pokemon2.species==level
|
||||
end
|
||||
end
|
||||
next -1
|
||||
def pbTradeCheckEvolution(pkmn, other_pkmn)
|
||||
ret = pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
|
||||
success = PBEvolution.call("tradeCheck", method, pkmn, parameter, other_pkmn)
|
||||
next (success) ? new_species : -1
|
||||
}
|
||||
return ret
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user