Posted December 31, 2021 by Another RPG Enthusiast
isDone property has been renamed to active and its logic has been flipped, e.g. situations that would have set isDone to true now set active to false. Apologies for any problems this causes, but it will make code clearer going forward for other initiative models.endOfRound widget has been renamed to "endTurn" for consistency with newTurn. The existing endturn widget has been renamed to "endRound" for clarity.newTurn and endTurn have been compartmentalized into additional widgets to reduce code redundancy. This will also allow you to more easily implement these features in other contexts.healBlock effect.Actor constructor, but they will only be defined if an en property is defined in the corresponding database entry. Default values can also be provided through the setup variables MAX_EN and EN_REGEN.newTurn widget. If you want to opt out, simply delete MAX_EN in your custom StoryInit section.cancelAction. It will remove the target's readied action if they have one.Actor properties:noENregen: Similar to healBlock, it will return true if the character has an effect with the same property, and will disable Energy regeneration in newTurn. It will also return true if the character is dead or has no en property. The core effects "Winded" and "Petrified" have been modified to use this property.interruptGuard: Checks if character has an effect with the same property. If true, protects against cancelAction.Effect class.preAction passage, and post-action code under the postAction passage. custom end of action effects has been renamed postAction custom for readability and consistency with other custom passages.waitTime under the timeline model, and otherwise forwards the player straight to the action phase.Action property: base. This is a flat value added to an action's damage output, and is 0 by default.base damage, and a new formula has been added that just uses base damage with no other fluff.switch now converts the input to lower case before reading it. This avoids potential errors arising from mixed case.STAT_NAMES object, which is part of setup.STAT_MIN and STAT_MAX objects. Returned stat values will be clamped between these two values.Actor property has been added: noMinimum. This is initialized as an empty array for all new Actors, and will ignore STAT_MIN for any stat names included within. In the core code, Forsaken has been modified to use this property instead of a forsaken flag.STAT_NAMES, STAT_MIN, and STAT_MAX. See support_functions.js for details.guard", that can be enabled in effect definitions. If true, the target of the ability will be flagged as protected by the subject.act function is now executed once for every hit property (default 1), and accuracy and shields are checked on every iteration. As a result, the multihit action function has been depreciated.Action properties:finisher: Function that executes only on the final hit of an action. Emulates multihit's previous rule for extensions (running only after all hits have been executed). Note that this finisher occurs instead of the regular act function.onMiss: Function that excecutes if an action misses. Increase the risk to your reward. Perhaps if your character attempts a bombastic jumping attack but misses, they land poorly and sprain an ankle?Effect.calculatePower.