mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user