mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Some bug fixes, added PriorityChange item handler
This commit is contained in:
@@ -136,6 +136,7 @@ module GameData
|
||||
trainer.party.push(pkmn)
|
||||
# Set Pokémon's properties if defined
|
||||
pkmn.form_simple = pkmn_data[:form] if pkmn_data[:form]
|
||||
pkmn.time_form_set = pbGetTimeNow.to_i # To allow Furfrou/Hoopa alternate forms
|
||||
pkmn.item = pkmn_data[:item]
|
||||
if pkmn_data[:moves] && pkmn_data[:moves].length > 0
|
||||
pkmn_data[:moves].each { |move| pkmn.learn_move(move) }
|
||||
@@ -180,6 +181,8 @@ module GameData
|
||||
elsif trainer.default_poke_ball
|
||||
pkmn.poke_ball = trainer.default_poke_ball
|
||||
end
|
||||
pkmn.form # Called just to recalculate it in case a defined property has changed it, e.g. gender for Espurr
|
||||
pkmn.reset_moves if !pkmn_data[:moves] || pkmn_data[:moves].empty? # In case form changed
|
||||
pkmn.calc_stats
|
||||
end
|
||||
return trainer
|
||||
|
||||
Reference in New Issue
Block a user