Class: Game_Troop

Game_Troop()

new Game_Troop()

The game object declare class for a troop and the battle-related data. Use as global variable $gameTroop
Properties:
Name Type Description
LETTER_TABLE_HALF Array.<String> [static]
LETTER_TABLE_FULL Array.<String> [static]
_interpreter Game_Interpreter
_troopId Number
_eventFlags Object {[page: number]: boolean}
_enemies Array.<Game_Enemy>
_turnCount Number
_namesCount Object {[name: string]: number}

Extends

Methods

agility() → {Number}

Returns the agility of the unit.
Inherited From:
Returns:
Type
Number

aliveMembers() → {Array.<Game_Battler>}

Returns the list of alive battlers.
Inherited From:
Returns:
Type
Array.<Game_Battler>

clear()

clearActions()

Clears the unit's actions.
Inherited From:

clearResults()

Clears the action results.
Inherited From:

deadMembers() → {Array.<Game_Battler>}

Returns the list of dead battlers.
Inherited From:
Returns:
Type
Array.<Game_Battler>

enemyNames() → {Array.<String>}

Returns the name of enemies within the troop.
Returns:
Type
Array.<String>

expTotal() → {Number}

Returns the total exp of all members of the enemy troop.
Returns:
Type
Number

goldRate() → {Number}

Returns the gold rate based on game party gold rate.
Returns:
Type
Number

goldTotal() → {Number}

Return the total gold of all enemies.
Returns:
Type
Number

inBattle() → {Boolean}

Returns true if unit is in battle.
Inherited From:
Returns:
Type
Boolean

increaseTurn()

Increases the turn number.

initialize()

Overrides:

isAllDead() → {Boolean}

Returns true if all members of the unit are dead.
Inherited From:
Returns:
Type
Boolean

isEventRunning() → {Boolean}

Returns true if event is running.
Returns:
Type
Boolean

letterTable() → {Array.<String>}

Returns the letter table for enemy troops.
Returns:
Type
Array.<String>

makeActions()

Creates the action's of the game unit.
Inherited From:

makeDropItems() → {Array.<RPG.BaseItem>}

Creates the drop items for all members of the enemy troop, and returns the item information.
Returns:
Type
Array.<RPG.BaseItem>

makeUniqueNames()

Creates unique names for each enemy.

meetsConditions(page) → {Boolean}

Parameters:
Name Type Description
page RPG.BattleEventPage
Returns:
Type
Boolean

members() → {Array.<Game_Enemy>}

Returns all enemies in the battle.
Overrides:
Returns:
Type
Array.<Game_Enemy>

movableMembers() → {Array.<Game_Battler>}

Returns the list of movable members.
Inherited From:
Returns:
Type
Array.<Game_Battler>

onBattleEnd()

Handler for when battle has ended.
Inherited From:

onBattleStart()

Handler for when battle is started.
Inherited From:

randomDeadTarget() → {Game_Battler}

Returns a random dead target from the game unit.
Inherited From:
Returns:
Type
Game_Battler

randomTarget() → {Game_Battler}

Returns a random target from the game unit.
Inherited From:
Returns:
Type
Game_Battler

select(activeMember)

Selects a member of the unit given a battler.
Parameters:
Name Type Description
activeMember Game_Battler
Inherited From:

setup(troopId)

Parameters:
Name Type Description
troopId Number

setupBattleEvent()

smoothDeadTarget(index) → {Game_Battler}

Parameters:
Name Type Description
index Number
Inherited From:
Returns:
Type
Game_Battler

smoothTarget(index) → {Game_Battler}

Parameters:
Name Type Description
index Number
Inherited From:
Returns:
Type
Game_Battler

substituteBattler() → {Game_Battler}

Inherited From:
Returns:
Type
Game_Battler

tgrSum() → {Number}

Inherited From:
Returns:
Type
Number

troop() → {RPG.Troop}

Returns troop information from the database.
Returns:
Type
RPG.Troop

turnCount() → {Number}

Returns the turn count.
Returns:
Type
Number

updateInterpreter()

Updates the game interpreter.