TensionItem
┗> Item > Class
TensionItem is an extension of Item that provides additional functionality for items that restore TP in battle.
This class can be extended from in an item file instead of Item
to include this functionality in the item.
Methods
TensionItem:onBattleDeselect(user: PartyBattler, target: Battler[]|EnemyBattler|EnemyBattler[]|PartyBattler|PartyBattler[])
Modified to remove the tension gained if the player undoes this item's use
Arguments:
user: PartyBattler |
|
target: Battler[]|EnemyBattler|EnemyBattler[]|PartyBattler|PartyBattler[] |
|
TensionItem:onBattleSelect(user: PartyBattler, target: Battler[]|EnemyBattler|EnemyBattler[]|PartyBattler|PartyBattler[])
Modified to restore tension at the instant the item is selected and create a special effect
Arguments:
user: PartyBattler |
|
target: Battler[]|EnemyBattler|EnemyBattler[]|PartyBattler|PartyBattler[] |
|
TensionItem:onWorldUse(target: PartyMember|PartyMember[])
Modified to display a special message indicating the item is only usable in battle
Arguments:
target: PartyMember|PartyMember[] | The PartyMember class is a type of data class that stores information about a member of the party. |
Returns:
1: boolean |
Fields
TensionItem.tension_given: number
(Used internally) A record of the actual amount of TP this item added incase the tension hit maximum, so that it can be reverted correctly if the action is undone
TensionItem.tp_amount: number
The amount of TP restored when using this item