Class: Game_BattlerBase

(abstract) Game_BattlerBase()

(abstract) new Game_BattlerBase()

The superdeclare class of Game_Battler. It mainly contains parameters calculation.
Properties:
Name Type Description
hp Number [read-only] Hit Points
mp Number [read-only] Magic Points
tp Number [read-only] Tactical Points
mhp Number [read-only] Maximum Hit Points
mmp Number [read-only] Maximum Magic Points
atk Number [read-only] ATtacK power
def Number [read-only] DEFense power
mat Number [read-only] Magic ATtack power
mdf Number [read-only] Magic DeFense power
agi Number [read-only] AGIlity
luk Number [read-only] LUcK
hit Number [read-only] HIT rate
eva Number [read-only] EVAsion rate
cri Number [read-only] CRItical rate
cev Number [read-only] Critical EVasion rate
mev Number [read-only] Magic EVasion rate
mrf Number [read-only] Magic ReFlection rate
cnt Number [read-only] CouNTer attack rate
hrg Number [read-only] Hp ReGeneration rate
mrg Number [read-only] Mp ReGeneration rate
trg Number [read-only] Tp ReGeneration rate
tgr Number [read-only] TarGet Rate
grd Number [read-only] GuaRD effect rate
rec Number [read-only] RECovery effect rate
pha Number [read-only] PHArmacology
mcr Number [read-only] Mp Cost Rate
tcr Number [read-only] Tp Charge Rate
pdr Number [read-only] Physical Damage Rate
mdr Number [read-only] Magical Damage Rate
fdr Number [read-only] Floor Damage Rate
exr Number [read-only] EXperience Rate
TRAIT_ELEMENT_RATE Number
TRAIT_DEBUFF_RATE Number
TRAIT_STATE_RATE Number
TRAIT_STATE_RESIST Number
TRAIT_PARAM Number
TRAIT_XPARAM Number
TRAIT_SPARAM Number
TRAIT_ATTACK_ELEMENT Number
TRAIT_ATTACK_STATE Number
TRAIT_ATTACK_SPEED Number
TRAIT_ATTACK_TIMES Number
TRAIT_STYPE_ADD Number
TRAIT_STYPE_SEAL Number
TRAIT_SKILL_ADD Number
TRAIT_SKILL_SEAL Number
TRAIT_EQUIP_WTYPE Number
TRAIT_EQUIP_ATYPE Number
TRAIT_EQUIP_LOCK Number
TRAIT_EQUIP_SEAL Number
TRAIT_SLOT_TYPE Number
TRAIT_ACTION_PLUS Number
TRAIT_SPECIAL_FLAG Number
TRAIT_COLLAPSE_TYPE Number
TRAIT_PARTY_ABILITY Number
FLAG_ID_AUTO_BATTLE Number
FLAG_ID_GUARD Number
FLAG_ID_SUBSTITUTE Number
FLAG_ID_PRESERVE_TP Number
ICON_BUFF_START Number
ICON_DEBUFF_START Number

Methods

actionPlusSet() → {Array.<number>}

Returns:
Type
Array.<number>

addedSkills() → {Array.<number>}

Returns:
Type
Array.<number>

addedSkillTypes() → {Array.<number>}

Returns:
Type
Array.<number>

addNewState(stateId)

Adds a new state given a state id to the battler.
Parameters:
Name Type Description
stateId Number

addParam(paramId, value)

Parameters:
Name Type Description
paramId Number
value Number

allIcons() → {Array.<number>}

Returns all of the icons attached to the battler.
Returns:
Type
Array.<number>

allTraits() → {Array.<RPG.Trait>}

Returns all the traits of the battler.
Returns:
Type
Array.<RPG.Trait>

appear()

Shows the game battler.

attackElements() → {Array.<number>}

Returns the attack elements of the battler as a list of numbers.
Returns:
Type
Array.<number>

attackSkillId() → {Number}

Returns the attack skill id in the database.
Returns:
Type
Number

attackSpeed() → {Number}

Returns the attack speed of the battler.
Returns:
Type
Number

attackStates() → {Array.<number>}

Returns the attack states of the battler as a list of numbers.
Returns:
Type
Array.<number>

attackStatesRate(stateId)

Parameters:
Name Type Description
stateId Number

attackTimesAdd() → {Number}

Returns the number of attacks available to the battler.
Returns:
Type
Number

buff(paramId) → {Number}

Buffs the current parameter id.
Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

buffIconIndex(buffLevel, paramId) → {Number}

Parameters:
Name Type Description
buffLevel Number
paramId Number
Returns:
Type
Number

buffIcons() → {Array.<number>}

Returns the array of buff icons attached to the battler; this is determined by the active buffs on the battler.
Returns:
Type
Array.<number>

buffLength() → {Number}

Returns the length of the buff.
Returns:
Type
Number

canAttack() → {Boolean}

Returns true if the battler can attack.
Returns:
Type
Boolean

canEquip(item) → {Boolean}

Returns true if the battler can equip the item.
Parameters:
Name Type Description
item RPG.EquipItem
Returns:
Type
Boolean

canEquipArmor(item) → {Boolean}

Returns true if the battler can equip armor.
Parameters:
Name Type Description
item RPG.EquipItem
Returns:
Type
Boolean

canEquipWeapon(item) → {Boolean}

Returns true if the battler can equip a weapon.
Parameters:
Name Type Description
item RPG.EquipItem
Returns:
Type
Boolean

canGuard() → {Boolean}

Returns true if the battler can guard.
Returns:
Type
Boolean

canInput() → {Boolean}

Returns true if the battler can input actions.
Returns:
Type
Boolean

canMove() → {Boolean}

Returns:
Type
Boolean

canPaySkillCost(skill) → {Boolean}

Returns true if the battler can pay the cost of the specified skill.
Parameters:
Name Type Description
skill RPG.Skill
Returns:
Type
Boolean

canUse(item) → {Boolean}

Returns true if the battler can use the item.
Parameters:
Name Type Description
item RPG.UsableItem
Returns:
Type
Boolean

clearBuffs()

Clears buffs from the battler.

clearParamPlus()

clearStates()

collapseType() → {Number}

Returns the collapse type of the battler.
Returns:
Type
Number

confusionLevel() → {Number}

Returns the confusion level of the battler.
Returns:
Type
Number

deathStateId() → {Number}

Returns the death state id.
Returns:
Type
Number

debuffRate(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

decreaseBuff(paramId)

Parameters:
Name Type Description
paramId Number

die()

Kills the battler.

elementRate(elementId) → {Number}

Parameters:
Name Type Description
elementId Number
Returns:
Type
Number

eraseBuff(paramId)

Parameters:
Name Type Description
paramId Number

eraseState(stateId)

Erases the current state from the game battler given the stateId in the editor database.
Parameters:
Name Type Description
stateId Number

guardSkillId() → {Number}

Returns the guard skill id in the database.
Returns:
Type
Number

hide()

Hides the game battler.

hpRate() → {Number}

Returns the percentage of the battler's hp left as a float.
Returns:
Type
Number

increaseBuff(paramId)

Parameters:
Name Type Description
paramId Number

initialize()

initMembers()

isActor() → {Boolean}

Returns true if the battler is an actor.
Returns:
Type
Boolean

isAlive() → {Boolean}

Returns true if the battler is alive.
Returns:
Type
Boolean

isAppeared() → {Boolean}

Returns true if the game battler is not hidden.
Returns:
Type
Boolean

isAutoBattle() → {Boolean}

Returns true if the battler is set to battle automatically.
Returns:
Type
Boolean

isBuffAffected(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isBuffExpired(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isBuffOrDebuffAffected(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isConfused() → {Boolean}

Returns true if the battler is confused.
Returns:
Type
Boolean

isDead() → {Boolean}

Returns true if the battler is dead.
Returns:
Type
Boolean

isDeathStateAffected() → {Boolean}

Returns:
Type
Boolean

isDebuffAffected(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isDualWield() → {Boolean}

Returns true if the battler dual wields.
Returns:
Type
Boolean

isDying() → {Boolean}

Returns true if the battler is dying.
Returns:
Type
Boolean

isEnemy() → {Boolean}

Returns true if the battler is an enemy.
Returns:
Type
Boolean

isEquipAtypeOk(atypeId) → {Boolean}

Parameters:
Name Type Description
atypeId Number
Returns:
Type
Boolean

isEquipTypeLocked(etypeId) → {Boolean}

Parameters:
Name Type Description
etypeId Number
Returns:
Type
Boolean

isEquipTypeSealed(etypeId) → {Boolean}

Parameters:
Name Type Description
etypeId Number
Returns:
Type
Boolean

isEquipWtypeOk(wtypeId) → {Boolean}

Parameters:
Name Type Description
wtypeId Number
Returns:
Type
Boolean

isGuard() → {Boolean}

Returns true if the battler is guarding.
Returns:
Type
Boolean

isHidden() → {Boolean}

Returns true if the game battler is hidden.
Returns:
Type
Boolean

isMaxBuffAffected(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isMaxDebuffAffected(paramId) → {Boolean}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Boolean

isOccasionOk(item) → {Boolean}

Returns true if the item occasion is okay.
Parameters:
Name Type Description
item RPG.UsableItem
Returns:
Type
Boolean

isPreserveTp() → {Boolean}

Returns true if tp is preserved between battles.
Returns:
Type
Boolean

isRestricted() → {Boolean}

Returns true if the game battler is restricted.
Returns:
Type
Boolean

isSkillSealed(stypeId) → {Boolean}

Parameters:
Name Type Description
stypeId Number
Returns:
Type
Boolean

isSkillTypeSealed(stypeId) → {Boolean}

Parameters:
Name Type Description
stypeId Number
Returns:
Type
Boolean

isSkillWtypeOk(skill) → {Boolean}

Returns true if the skill is a weapon type oriented skill.
Parameters:
Name Type Description
skill RPG.Skill
Returns:
Type
Boolean

isStateAffected(stateId) → {Boolean}

Returns true if the battler is affected by the specified state given the state id.
Parameters:
Name Type Description
stateId Number
Returns:
Type
Boolean

isStateExpired(stateId) → {Boolean}

Returns true if the state, given the state id is expired.
Parameters:
Name Type Description
stateId Number
Returns:
Type
Boolean

isStateResist(stateId) → {Boolean}

Parameters:
Name Type Description
stateId Number
Returns:
Type
Boolean

isSubstitute() → {Boolean}

Returns:
Type
Boolean

maxTp() → {Number}

Returns the maximum tp of the battler.
Returns:
Type
Number

meetsItemConditions(item) → {Boolean}

Returns true if the battler meets the item conditions.
Parameters:
Name Type Description
item RPG.Item
Returns:
Type
Boolean

meetsSkillConditions(skill) → {Boolean}

Returns true if the battler meets the skill conditions.
Parameters:
Name Type Description
skill RPG.Skill
Returns:
Type
Boolean

meetsUsableItemConditions(item) → {Boolean}

Parameters:
Name Type Description
item RPG.UsableItem
Returns:
Type
Boolean

mostImportantStateText() → {String}

Returns:
Type
String

mpRate() → {Number}

Returns the percentage of the battler's mp left as a float.
Returns:
Type
Number

onRestrict()

Handler for when the battler is restricted.

overwriteBuffTurns(paramId, turns)

Parameters:
Name Type Description
paramId Number
turns Number

param(paramId) → {Number}

Returns a standard parameter, given a paramId; standard parameters include: HP, MP, Atk, M.Atk, Def, M.Def, Luck, Agility.
Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramBase(paramId) → {Number}

Returns the base parameters of the battler; this is determined by their current level and the paramId given.
Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramBuffRate(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramMax(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramMin(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramPlus(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

paramRate(paramId) → {Number}

Parameters:
Name Type Description
paramId Number
Returns:
Type
Number

partyAbility(abilityId) → {Boolean}

Parameters:
Name Type Description
abilityId Number
Returns:
Type
Boolean

paySkillCost(skill)

Pays the cost of the skill when activating the skill.
Parameters:
Name Type Description
skill RPG.Skill

recoverAll()

Recovers the battler from all states and restores the battler to maximum hp and mp.

refresh()

Refreshes the battler.

resetStateCounts(stateId)

Resets the state count of the specified state, given the state id.
Parameters:
Name Type Description
stateId Number

restriction() → {Number}

Returns the number of the restriction.
Returns:
Type
Number

revive()

Revives the battler.

setHp(hp)

Sets the battler hp.
Parameters:
Name Type Description
hp Number

setMp(mp)

Sets the battler mp.
Parameters:
Name Type Description
mp Number

setTp(tp)

Sets the battler tp.
Parameters:
Name Type Description
tp Number

skillMpCost(skill) → {Number}

Returns the mp cost of the skill.
Parameters:
Name Type Description
skill RPG.Skill
Returns:
Type
Number

skillTpCost(skill) → {Number}

Returns the tp cost of the skill.
Parameters:
Name Type Description
skill RPG.Skill
Returns:
Type
Number

slotType() → {Number}

Returns the battler slot type of a trait.
Returns:
Type
Number

sortStates()

Sorts the states attached to the battler.

sparam(sparamId) → {Number}

Parameters:
Name Type Description
sparamId Number
Returns:
Type
Number

specialFlag(flagId) → {Boolean}

Parameters:
Name Type Description
flagId Number
Returns:
Type
Boolean

stateIcons() → {Array.<number>}

Returns the array of state icons attached to the battler; this is determined by the active states on the battler.
Returns:
Type
Array.<number>

stateMotionIndex() → {Number}

Returns:
Type
Number

stateOverlayIndex() → {Number}

Returns:
Type
Number

stateRate(stateId) → {Number}

Parameters:
Name Type Description
stateId Number
Returns:
Type
Number

stateResistSet() → {Array.<number>}

Returns:
Type
Array.<number>

states() → {Array.<RPG.State>}

Returns the states applied to the battler.
Returns:
Type
Array.<RPG.State>

tpRate() → {Number}

Returns the percentage of the battler's tp left as a float.
Returns:
Type
Number

traitObjects() → {Array.<*>}

Returns an array of the all objects having traits. States only here.
Returns:
Type
Array.<*>

traits(code) → {Array.<RPG.Trait>}

Parameters:
Name Type Description
code Number
Returns:
Type
Array.<RPG.Trait>

traitsPi(code, id) → {Number}

Parameters:
Name Type Description
code Number
id Number
Returns:
Type
Number

traitsSet(code) → {Array.<number>}

Parameters:
Name Type Description
code Number
Returns:
Type
Array.<number>

traitsSum(code, id) → {Number}

Parameters:
Name Type Description
code Number
id Number
Returns:
Type
Number

traitsSumAll(code) → {Number}

Parameters:
Name Type Description
code Number
Returns:
Type
Number

traitsWithId(code, id) → {Array.<RPG.Trait>}

Parameters:
Name Type Description
code Number
id Number
Returns:
Type
Array.<RPG.Trait>

updateBuffTurns()

Updates the buff turns on battler.

updateStateTurns()

xparam(xparamId) → {Number}

Parameters:
Name Type Description
xparamId Number
Returns:
Type
Number