mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Renamed $Trainer to $player
This commit is contained in:
@@ -385,7 +385,7 @@ MultipleForms.register(:GRENINJA,{
|
||||
|
||||
MultipleForms.register(:SCATTERBUG,{
|
||||
"getFormOnCreation" => proc { |pkmn|
|
||||
next $Trainer.secret_ID % 18
|
||||
next $player.secret_ID % 18
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
def pbRelicStone
|
||||
if !$Trainer.party.any? { |pkmn| pkmn.purifiable? }
|
||||
if !$player.party.any? { |pkmn| pkmn.purifiable? }
|
||||
pbMessage(_INTL("You have no Pokémon that can be purified."))
|
||||
return
|
||||
end
|
||||
@@ -157,7 +157,7 @@ def pbRelicStone
|
||||
pkmn.able? && pkmn.shadowPokemon? && pkmn.heart_gauge == 0
|
||||
})
|
||||
if $game_variables[1] >= 0
|
||||
pbRelicStoneScreen($Trainer.party[$game_variables[1]])
|
||||
pbRelicStoneScreen($player.party[$game_variables[1]])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -408,21 +408,21 @@ end
|
||||
# during battle and need to say they're ready to be purified afterwards
|
||||
Events.onStartBattle += proc { |_sender|
|
||||
$PokemonTemp.heart_gauges = []
|
||||
$Trainer.party.each_with_index do |pkmn, i|
|
||||
$player.party.each_with_index do |pkmn, i|
|
||||
$PokemonTemp.heart_gauges[i] = pkmn.heart_gauge
|
||||
end
|
||||
}
|
||||
|
||||
Events.onEndBattle += proc { |_sender,_e|
|
||||
$PokemonTemp.heart_gauges.each_with_index do |value, i|
|
||||
pkmn = $Trainer.party[i]
|
||||
pkmn = $player.party[i]
|
||||
next if !pkmn || !value || value == 0
|
||||
pkmn.check_ready_to_purify if pkmn.heart_gauge == 0
|
||||
end
|
||||
}
|
||||
|
||||
Events.onStepTaken += proc {
|
||||
for pkmn in $Trainer.able_party
|
||||
for pkmn in $player.able_party
|
||||
next if pkmn.heart_gauge == 0
|
||||
stage = pkmn.heartStage
|
||||
pkmn.adjustHeart(-1)
|
||||
|
||||
@@ -115,7 +115,7 @@ class PokemonStorage
|
||||
end
|
||||
|
||||
def party
|
||||
$Trainer.party
|
||||
$player.party
|
||||
end
|
||||
|
||||
def party=(_value)
|
||||
@@ -123,7 +123,7 @@ class PokemonStorage
|
||||
end
|
||||
|
||||
def party_full?
|
||||
return $Trainer.party_full?
|
||||
return $player.party_full?
|
||||
end
|
||||
|
||||
def maxBoxes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#===============================================================================
|
||||
# Instances of this class are individual Pokémon.
|
||||
# The player's party Pokémon are stored in the array $Trainer.party.
|
||||
# The player's party Pokémon are stored in the array $player.party.
|
||||
#===============================================================================
|
||||
class Pokemon
|
||||
# @return [Symbol] this Pokémon's species
|
||||
@@ -153,7 +153,7 @@ class Pokemon
|
||||
@ability = nil
|
||||
MultipleForms.call("onSetForm", self, value, oldForm)
|
||||
calc_stats
|
||||
$Trainer.pokedex.register(self) if $Trainer
|
||||
$player.pokedex.register(self) if $player
|
||||
end
|
||||
|
||||
# The same as def form=, but yields to a given block in the middle so that a
|
||||
@@ -166,7 +166,7 @@ class Pokemon
|
||||
yield if block_given?
|
||||
MultipleForms.call("onSetForm", self, value, oldForm)
|
||||
calc_stats
|
||||
$Trainer.pokedex.register(self) if $Trainer
|
||||
$player.pokedex.register(self) if $player
|
||||
end
|
||||
|
||||
def form_simple=(value)
|
||||
@@ -1111,7 +1111,7 @@ class Pokemon
|
||||
# @param owner [Owner, Player, NPCTrainer] Pokémon owner (the player by default)
|
||||
# @param withMoves [Boolean] whether the Pokémon should have moves
|
||||
# @param recheck_form [Boolean] whether to auto-check the form
|
||||
def initialize(species, level, owner = $Trainer, withMoves = true, recheck_form = true)
|
||||
def initialize(species, level, owner = $player, withMoves = true, recheck_form = true)
|
||||
species_data = GameData::Species.get(species)
|
||||
@species = species_data.species
|
||||
@form = species_data.base_form
|
||||
|
||||
@@ -38,7 +38,7 @@ class Pokemon
|
||||
# @param language [Integer] owner language
|
||||
# @return [Owner] foreign Owner object
|
||||
def self.new_foreign(name = '', gender = 2, language = 2)
|
||||
return new($Trainer.make_foreign_ID, name, gender, language)
|
||||
return new($player.make_foreign_ID, name, gender, language)
|
||||
end
|
||||
|
||||
# @param new_id [Integer] new owner ID
|
||||
|
||||
Reference in New Issue
Block a user