Fixed Natural Gift always being Normal-type

This commit is contained in:
Maruno17
2021-04-17 20:21:46 +01:00
parent 4489cde044
commit cef2beb063
2 changed files with 12 additions and 12 deletions

View File

@@ -95,8 +95,8 @@ class PokeBattle_Trainer
trainer.party.each { |p| ret.party.push(PokeBattle_Pokemon.convert(p)) }
ret.badges = trainer.badges.clone
ret.money = trainer.money
trainer.seen.each_with_index { |value, i| ret.pokedex.set_seen(i) if value }
trainer.owned.each_with_index { |value, i| ret.pokedex.set_owned(i) if value }
trainer.seen.each_with_index { |value, i| ret.pokedex.set_seen(i, false) if value }
trainer.owned.each_with_index { |value, i| ret.pokedex.set_owned(i, false) if value }
trainer.formseen.each_with_index do |value, i|
species_id = GameData::Species.try_get(i)&.species
next if species_id.nil? || value.nil?
@@ -112,6 +112,7 @@ class PokeBattle_Trainer
ret.pokedex.set_shadow_pokemon_owned(i) if value
end
end
ret.pokedex.refresh_accessible_dexes
ret.has_pokedex = trainer.pokedex
ret.has_pokegear = trainer.pokegear
ret.mystery_gift_unlocked = trainer.mysterygiftaccess if trainer.mysterygiftaccess