mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Ball property in trainers.txt can now be a Poké Ball item's ID, fixed move-learning saying "already knows four moves" regardless of the value of Pokemon::MAX_MOVES
This commit is contained in:
@@ -1222,6 +1222,15 @@ module Compiler
|
||||
value_hash[s.id] = property_value[s.pbs_order] || property_value[0]
|
||||
end
|
||||
current_pkmn[line_schema[0]] = value_hash
|
||||
when "Ball"
|
||||
if property_value[/^\d+$/]
|
||||
current_pkmn[line_schema[0]] = pbBallTypeToItem(property_value.to_i).id
|
||||
elsif !GameData::Item.exists?(property_value.to_sym) ||
|
||||
!GameData::Item.get(property_value.to_sym).is_poke_ball?
|
||||
raise _INTL("Value {1} isn't a defined Poké Ball.\r\n{2}", property_value, FileLineData.linereport)
|
||||
else
|
||||
current_pkmn[line_schema[0]] = property_value.to_sym
|
||||
end
|
||||
else
|
||||
current_pkmn[line_schema[0]] = property_value
|
||||
end
|
||||
|
||||
@@ -622,7 +622,7 @@ module Compiler
|
||||
f.write(sprintf(" IV = %s\r\n", ivs_array.join(","))) if pkmn[:iv]
|
||||
f.write(sprintf(" EV = %s\r\n", evs_array.join(","))) if pkmn[:ev]
|
||||
f.write(sprintf(" Happiness = %d\r\n", pkmn[:happiness])) if pkmn[:happiness]
|
||||
f.write(sprintf(" Ball = %d\r\n", pkmn[:poke_ball])) if pkmn[:poke_ball]
|
||||
f.write(sprintf(" Ball = %s\r\n", pkmn[:poke_ball])) if pkmn[:poke_ball]
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user