mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
More or less standardised separator comments in the code
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Battle::Battler
|
||||
# Fundamental to this object
|
||||
attr_reader :battle
|
||||
@@ -52,9 +55,10 @@ class Battle::Battler
|
||||
ACC_EVA_STAGE_DIVISORS = [9, 8, 7, 6, 5, 4, 3, 3, 3, 3, 3, 3, 3]
|
||||
STAT_STAGE_MAXIMUM = 6 # Is also the minimum (-6)
|
||||
|
||||
#=============================================================================
|
||||
# Complex accessors
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Complex accessors.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
attr_reader :level
|
||||
|
||||
def level=(value)
|
||||
@@ -130,18 +134,20 @@ class Battle::Battler
|
||||
@battle.scene.pbRefreshOne(@index)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Properties from Pokémon
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Properties from Pokémon.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def happiness; return @pokemon ? @pokemon.happiness : 0; end
|
||||
def affection_level; return @pokemon ? @pokemon.affection_level : 2; end
|
||||
def gender; return @pokemon ? @pokemon.gender : 0; end
|
||||
def nature; return @pokemon ? @pokemon.nature : nil; end
|
||||
def pokerusStage; return @pokemon ? @pokemon.pokerusStage : 0; end
|
||||
|
||||
#=============================================================================
|
||||
# Mega Evolution, Primal Reversion, Shadow Pokémon
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Mega Evolution, Primal Reversion, Shadow Pokémon.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def hasMega?
|
||||
return false if @effects[PBEffects::Transform]
|
||||
return @pokemon&.hasMegaForm?
|
||||
@@ -160,9 +166,10 @@ class Battle::Battler
|
||||
|
||||
def inHyperMode?; return false; end
|
||||
|
||||
#=============================================================================
|
||||
# Display-only properties
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Display-only properties.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def name
|
||||
return @effects[PBEffects::Illusion].name if @effects[PBEffects::Illusion]
|
||||
return @name
|
||||
@@ -242,9 +249,10 @@ class Battle::Battler
|
||||
return lowerCase ? _INTL("the opposing team") : _INTL("The opposing team")
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Calculated properties
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Calculated properties.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbSpeed
|
||||
return 1 if fainted?
|
||||
stage = @stages[:SPEED] + STAT_STAGE_MAXIMUM
|
||||
@@ -287,9 +295,10 @@ class Battle::Battler
|
||||
return [ret, 1].max
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Queries about what the battler has
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Queries about what the battler has.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def plainStats
|
||||
ret = {}
|
||||
ret[:ATTACK] = self.attack
|
||||
@@ -698,9 +707,10 @@ class Battle::Battler
|
||||
@battle.belch[@index & 1][@pokemonIndex] = true
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Methods relating to this battler's position on the battlefield
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Methods relating to this battler's position on the battlefield.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Returns whether the given position belongs to the opposing Pokémon's side.
|
||||
def opposes?(i = 0)
|
||||
i = i.index if i.respond_to?("index")
|
||||
|
||||
Reference in New Issue
Block a user