mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed animations played by an event command being mispositioned, fixed Geomancy, removed $PokemonGlobal.playerID, tweaked player/bag object creation, overrode type effectiveness for Shadow moves, bug fixes
This commit is contained in:
@@ -4,6 +4,11 @@ SaveData.register(:player) do
|
||||
ensure_class :Player
|
||||
save_value { $Trainer }
|
||||
load_value { |value| $Trainer = value }
|
||||
new_game_value {
|
||||
trainer_type = nil # Get the first defined trainer type as a placeholder
|
||||
GameData::TrainerType.each { |t| trainer_type = t.id; break }
|
||||
Player.new("Unnamed", trainer_type)
|
||||
}
|
||||
from_old_format { |old_format| old_format[0] }
|
||||
end
|
||||
|
||||
@@ -100,6 +105,7 @@ SaveData.register(:bag) do
|
||||
ensure_class :PokemonBag
|
||||
save_value { $PokemonBag }
|
||||
load_value { |value| $PokemonBag = value }
|
||||
new_game_value { PokemonBag.new }
|
||||
from_old_format { |old_format| old_format[13] }
|
||||
end
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ SaveData.register_conversion(:v19_move_global_data_to_player) do
|
||||
to_all do |save_data|
|
||||
global = save_data[:global_metadata]
|
||||
player = save_data[:player]
|
||||
player.character_ID = global.playerID
|
||||
global.playerID = nil
|
||||
global.pokedexUnlocked.each_with_index do |value, i|
|
||||
if value
|
||||
player.pokedex.unlock(i)
|
||||
@@ -57,17 +59,17 @@ SaveData.register_conversion(:v19_move_global_data_to_player) do
|
||||
player.pokedex.lock(i)
|
||||
end
|
||||
end
|
||||
trainer.coins = global.coins
|
||||
player.coins = global.coins
|
||||
global.coins = nil
|
||||
trainer.soot = global.sootsack
|
||||
player.soot = global.sootsack
|
||||
global.sootsack = nil
|
||||
trainer.has_running_shoes = global.runningShoes
|
||||
player.has_running_shoes = global.runningShoes
|
||||
global.runningShoes = nil
|
||||
trainer.seen_storage_creator = global.seenStorageCreator
|
||||
player.seen_storage_creator = global.seenStorageCreator
|
||||
global.seenStorageCreator = nil
|
||||
trainer.has_snag_machine = global.snagMachine
|
||||
player.has_snag_machine = global.snagMachine
|
||||
global.snagMachine = nil
|
||||
trainer.seen_purify_chamber = global.seenPurifyChamber
|
||||
player.seen_purify_chamber = global.seenPurifyChamber
|
||||
global.seenPurifyChamber = nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user