Renamed $Trainer to $player

This commit is contained in:
Maruno17
2021-10-20 22:57:43 +01:00
parent fbddb9034f
commit e49cd8d498
71 changed files with 470 additions and 470 deletions

View File

@@ -208,7 +208,7 @@ GameData::Evolution.register({
:id => :LevelDarkInParty,
:parameter => Integer,
:level_up_proc => proc { |pkmn, parameter|
next pkmn.level >= parameter && $Trainer.has_pokemon_of_type?(:DARK)
next pkmn.level >= parameter && $player.has_pokemon_of_type?(:DARK)
}
})
@@ -267,7 +267,7 @@ GameData::Evolution.register({
next false # This is a dummy proc and shouldn't next true
},
:after_evolution_proc => proc { |pkmn, new_species, parameter, evo_species|
next false if $Trainer.party_full?
next false if $player.party_full?
next false if !$bag.has?(:POKEBALL)
PokemonEvolutionScene.pbDuplicatePokemon(pkmn, new_species)
$bag.remove(:POKEBALL)
@@ -475,7 +475,7 @@ GameData::Evolution.register({
:parameter => :Species,
:minimum_level => 1, # Needs any level up
:level_up_proc => proc { |pkmn, parameter|
next $Trainer.has_species?(parameter)
next $player.has_species?(parameter)
}
})

View File

@@ -124,7 +124,7 @@ module GameData
def is_mail?; return has_flag?("Mail") || has_flag?("IconMail"); end
def is_icon_mail?; return has_flag?("IconMail"); end
def is_poke_ball?; return has_flag?("PokeBall") || has_flag?("SnagBall"); end
def is_snag_ball?; return has_flag?("SnagBall") || (is_poke_ball? && $Trainer.has_snag_machine); end
def is_snag_ball?; return has_flag?("SnagBall") || (is_poke_ball? && $player.has_snag_machine); end
def is_berry?; return has_flag?("Berry"); end
def is_key_item?; return has_flag?("KeyItem"); end
def is_evolution_stone?; return has_flag?("EvolutionStone"); end

View File

@@ -57,7 +57,7 @@ module GameData
end
def self.player_front_sprite_filename(tr_type)
outfit = ($Trainer) ? $Trainer.outfit : 0
outfit = ($player) ? $player.outfit : 0
return self.check_file(tr_type, "Graphics/Trainers/", sprintf("_%d", outfit))
end
@@ -66,7 +66,7 @@ module GameData
end
def self.player_back_sprite_filename(tr_type)
outfit = ($Trainer) ? $Trainer.outfit : 0
outfit = ($player) ? $player.outfit : 0
return self.check_file(tr_type, "Graphics/Trainers/", sprintf("_%d", outfit), "_back")
end
@@ -75,7 +75,7 @@ module GameData
end
def self.player_map_icon_filename(tr_type)
outfit = ($Trainer) ? $Trainer.outfit : 0
outfit = ($player) ? $player.outfit : 0
return self.check_file(tr_type, "Graphics/Pictures/mapPlayer", sprintf("_%d", outfit))
end

View File

@@ -108,7 +108,7 @@ module GameData
end
# Create trainer object
trainer = NPCTrainer.new(tr_name, @trainer_type)
trainer.id = $Trainer.make_foreign_ID
trainer.id = $player.make_foreign_ID
trainer.items = @items.clone
trainer.lose_text = self.lose_text
# Create each Pokémon owned by the trainer