Posted July 17, 2021 by Another RPG Enthusiast
Actor
properties:numAdjacent
: Returns the number of other characters in the area specified by the passed argument. Useful for AI code.guarded
: Returns true
if the character is guarded by another character in the battle grid.areaImmune
to avoid conflicts.Enemy
properties:actionsThisTurn
: Returns the enemy's list from the actionsThisTurn
object in the battle controller.Action
properties:delayHold
: If true
, character will be unable to act while the delayed action is charging.delayMessage
: Returns a message to be displayed at the top of rounds if the user is charging a delayed action. Set to null
to display no message.Action
objects rather than just their name. This is to more easily facilitate the behavior described above. The setupAction
property is still a string.slot
property as a Set
of the slots you want the item to cover rather than a string. A new item, the "Zweihander", has been added to the item database as an example. Credit to A Friendly Irin for providing this code.Enemy
's validTarget
function that prevented the guard check clause from behaving correctly.actorBox
from being used outside of battle due to it calling for the battle controller even when it didn't exist.Item
object's toString
function for consistency with other items.addText
and removeText
now take the entire character object as an argument, rather than just their name. This allows for more customizable messages.