User Tools

Site Tools


plugin-block-generate

MYTH_BlockGenerate is a utility plugin which simulates Block in the style of deckbuilders like Slay the Spire. Block is a defensive resource that can be accumulated by playing cards or having certain items equipped. When damage is dealt to the Actor, Block is deducted first before Health.

This plugin has you select one State as the Block State which is automatically applied to an Actor or Enemy when they have any amount of Block. It includes Notetags and Script Calls (see below) for determining how this Block is gained and lost from different sources.

Current Version: 1.0.0

Parameters

Block State ID Set this to the ID of the Block State in your Database.
Default Initial Block Default Initial Block value for all Battlers at Battle Start.
Default Max Block Default Max Block value for all Battlers at Battle Start. Set to -1 to have no Max.
Position Offset X and Y Offsets for the Block Icon relative to its base position at the Actor.

Notetags

Notetag Syntax Database Usage Description
<Init Block: X>
Actors, Enemies Sets initial Block value this Actor/Enemy will have at the start of a battle.
<Max Block: X>
Actors, Enemies Sets maximum Block value this Actor/Enemy can have at any one time.
<Ignore Block>
Skills, Items Damage Formula of these Skills/Items will ignore target's Block and deal their damage directly to HP instead. Useful for “piercing” type Skills.
<Mod Init Block: +x>
Weapons, Armors Modifies an Actor's Initial Block amount by adding a positive/negative number. Can stack from multiple sources (like different pieces of equipment).
<Mod Max Block: +x>
Weapons, Armors Modifies an Actor's Max Block amount by adding a positive/negative number. Can stack from multiple sources (like different pieces of equipment).
<Block Change: +X>
States Determines how much an Actor with the State will gain/lose Block at the end of their turn (during the Regenerate Step). Can stack from multiple sources. If there is both Block Gain and Block Loss from multiple States, the values are summed together and applied as a single instance of generation e.g. if State A gains 20 BLOCK each turn and State B loses 40 Block each turn, then an Actor with both State A and B loses 20 Block (+20 - 40 = -20) each turn
<Negate Block>
States When a State with this Notetag is applied to an actor, they will lose all Block and be unable to gain Block until it elapses or is removed.

Script Calls

{battler}.getBlock()
Returns the Battler's current Block value.
{battler}.setBlock(value, show)
Sets the Battler's Block to value. Show can be true/false depending on whether you want a Damage Popup and Battle Log message to show the change.
{battler}.addBlock(value, show)
Adds to the Battler's Block. Value can be either positive or negative. If it goes over the Battler's Max or under 0, the value is automatically clamped. Show can be true/false depending on whether you want a Damage Popup and Battle Log message to show the change.
{battler}.clearBlock(show)
Clears the Battler's Block setting it to 0 and removing the Block State.

Version History

**v1.0.0** 
- Base Functionality complete! Will probably come back around and do some minor edits 
once I am done testing this with the CGC Demo Project.
plugin-block-generate.txt · Last modified: 2024/03/24 05:39 by banerjeesw