Fixed: some items not working in battle, typo in Shell Trap's AI, Vs animation not triggering, Battle Factory Pokémon being chosen incorrectly, Battle Factory double mode being single battles, some game data not being cleared when compiling

This commit is contained in:
Maruno17
2021-06-12 15:44:13 +01:00
parent 7c3fdb9ef8
commit 63fb7aadf7
9 changed files with 19 additions and 10 deletions

View File

@@ -170,7 +170,7 @@ class Trainer
#=============================================================================
def initialize(name, trainer_type)
@trainer_type = trainer_type
@trainer_type = GameData::TrainerType.get(trainer_type).id
@name = name
@id = rand(2 ** 16) | rand(2 ** 16) << 16
@language = pbGetLanguage

View File

@@ -31,6 +31,13 @@ class Player < Trainer
# @return [Array<Array>] downloaded Mystery Gift data
attr_accessor :mystery_gifts
def trainer_type
if @trainer_type.is_a?(Integer)
@trainer_type = GameData::Metadata.get_player(@character_ID || 0)[0]
end
return @trainer_type
end
# Sets the player's money. It can not exceed {Settings::MAX_MONEY}.
# @param value [Integer] new money value
def money=(value)