mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 15:44:57 +00:00
More or less standardised separator comments in the code
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class Battle::Battler
|
||||
#=============================================================================
|
||||
# Generalised checks for whether a status problem can be inflicted
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generalised checks for whether a status problem can be inflicted.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# NOTE: Not all "does it have this status?" checks use this method. If the
|
||||
# check is leading up to curing self of that status condition, then it
|
||||
# will look at the value of @status directly instead - if it is that
|
||||
@@ -212,9 +216,10 @@ class Battle::Battler
|
||||
return true
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Generalised infliction of status problem
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generalised infliction of status problem.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbInflictStatus(newStatus, newStatusCount = 0, msg = nil, user = nil)
|
||||
# Inflict the new status
|
||||
self.status = newStatus
|
||||
@@ -269,9 +274,10 @@ class Battle::Battler
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Sleep
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Sleep.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def asleep?
|
||||
return pbHasStatus?(:SLEEP)
|
||||
end
|
||||
@@ -323,9 +329,10 @@ class Battle::Battler
|
||||
return duration
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Poison
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Poison.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def poisoned?
|
||||
return pbHasStatus?(:POISON)
|
||||
end
|
||||
@@ -342,9 +349,10 @@ class Battle::Battler
|
||||
pbInflictStatus(:POISON, (toxic) ? 1 : 0, msg, user)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Burn
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Burn.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def burned?
|
||||
return pbHasStatus?(:BURN)
|
||||
end
|
||||
@@ -361,9 +369,10 @@ class Battle::Battler
|
||||
pbInflictStatus(:BURN, 0, msg, user)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Paralyze
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Paralyze.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def paralyzed?
|
||||
return pbHasStatus?(:PARALYSIS)
|
||||
end
|
||||
@@ -380,9 +389,10 @@ class Battle::Battler
|
||||
pbInflictStatus(:PARALYSIS, 0, msg, user)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Freeze
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Freeze.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def frozen?
|
||||
return pbHasStatus?(:FROZEN)
|
||||
end
|
||||
@@ -395,9 +405,10 @@ class Battle::Battler
|
||||
pbInflictStatus(:FROZEN, 0, msg, user)
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Generalised status displays
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Generalised status displays.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbContinueStatus
|
||||
if self.status == :POISON && @statusCount > 0
|
||||
@battle.pbCommonAnimation("Toxic", self)
|
||||
@@ -436,9 +447,10 @@ class Battle::Battler
|
||||
PBDebug.log("[Status change] #{pbThis}'s status was cured") if !showMessages
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Confusion
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Confusion.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbCanConfuse?(user = nil, showMessages = true, move = nil, selfInflicted = false)
|
||||
return false if fainted?
|
||||
if @effects[PBEffects::Confusion] > 0
|
||||
@@ -499,9 +511,10 @@ class Battle::Battler
|
||||
@effects[PBEffects::Confusion] = 0
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Attraction
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Attraction.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbCanAttract?(user, showMessages = true)
|
||||
return false if fainted?
|
||||
return false if !user || user.fainted?
|
||||
@@ -562,9 +575,10 @@ class Battle::Battler
|
||||
@effects[PBEffects::Attract] = -1
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Flinching
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Flinching.
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbFlinch(_user = nil)
|
||||
return if hasActiveAbility?(:INNERFOCUS) && !beingMoldBroken?
|
||||
@effects[PBEffects::Flinch] = true
|
||||
|
||||
Reference in New Issue
Block a user