Change HP Step
Introduction
Modifies the player’s current health points, providing damage or healing outside of combat scenarios.
Interface
interface ChangeHpStep {
kind: 'changeHp';
condition?: string;
amount: string;
}
Properties
kind
- Always 'changeHp'
amount
- Health change expression (positive heals, negative damages)
condition
(optional) - Conditional execution
Examples
Environmental Damage
{
kind: 'changeHp',
amount: '-2000'
}
Healing Effect
{
kind: 'changeHp',
amount: '5000'
}
Percentage-Based Damage
{
kind: 'changeHp',
amount: '-hp * 0.5' // Lose half current HP
}