Posted May 15, 2021 by Another RPG Enthusiast
B
. This allows more flexible usage of functions and widgets that call for interactions between characters, but may cause problems with existing code. Report any bugs.actionlist
has been split into actionListBattle
and actionListMenu
, for the different displays of actions in and out of battle.Action
s, ItemAction
s, and Item
s now have unique toString
functions that determine a standardized display for each. actionList
and itemList
have been restructured to take advantage of this function, making it much simpler and easier to use. (To customize the action display, attach a custom toString
to the Action
prototype.)actionInfo
has been removed, as it is now redundant with this feature.Action
properties:invisible
: If true
, the action will not be displayed in the action list.onApply
and onRemove
: Function as the corresponding properties for Effect
s and Item
s. Useful for keeping track of passive abilities, and other side-effects if you want to have modular actions. However, currently there's no in-built functionality for this in the party menu.onUse
: Functions as the corresponding property for Item
s. Rudimentary GUI has been added in the party menu code, but is untested. Report any bugs.toleranceDamage
: Determines the number of tolerance points the action will remove if it applies an effect.hits
: Determines the number of hits in a multi-hit attack. (This is now automatically read by the multihit
function as a default.)effects
: Array of strings; lists the effects the action will apply. (This is now automatically read by the applyEffect
and removeEffect
functions as a default.)preview
has been revamped: In the absence of a custom function, it will construct an appropriate preview automatically based on the action's properties, e.g. if weight
exists, it will provide a damage prediction.Item
properties:instantUse
: If true
, will cause the item's onUse
function to be executed immediately when selected, instead of selecting a target first.stackSize
: Integer determining the maximum number of copies that can be stored in an inventory.endOfRound
and refreshPuppets
.lastingDamage
, reviveAfterBattle
, and actionRefillAfterBattle
to all be properties of one object, afterBattleRecovery
. refreshPuppets
has been tweaked to make more sensible use of this object.refreshPuppets
now automatically removes effects with ULTIMATESTICKY
.endofbattle
now runs its custom passage before refreshPuppets
. This is useful if you need to alter a variable used in refreshPuppets
, such as afterBattleRecovery
.Puppet
and Enemy
objects now have an additional function: validTarget
. This determines whether they can be selected by the player in the targeting phase, and replaces the massive clunky blocks of logical expressions previously used for this determination.Actor
properties:shieldHits
: Returns the total number of hits remaining on shield effects possessed by the character.decTol
now takes an additional argument for the number of points to reduce the tolerance by (defaults to 1).testEffect
and testRemoval
, which test if a given effect can be applied or removed, effectively. These are used to construct previews.setup
variables:STATUS_BUTTON
: Text to be displayed to create the status buttons.SCALE_NAMES
: Set to true
to scale actor names to the width of the actor boxes, as specified in scaledTextDiv
.BestiaryEntry.revealAll
. It will now reveal tolerances correctly.