Fight Character Step
Introduction
Initiates a combat encounter with a specific character with branching outcomes.
Interface
interface FightCharacterStep {
kind: 'fightCharacter';
condition?: string;
character: string;
isSpar?: boolean;
spawnCondition?: {
hpMult: number;
buffs: Buff[];
};
victory: EventStep[];
defeat: EventStep[];
}
Properties
kind- Always'fightCharacter'character- Character to fightisSpar(optional) - Whether this is a sparring match. Whentrue, the player’s HP and any injuries sustained are restored after combat. However, items and qi droplets consumed during the fight are not returned — the resource cost of consumables still applies. Use this for training fights and friendly duels where the outcome shouldn’t leave the player permanently injured, but should still make them think about what they spend.spawnCondition(optional) - HP multiplier and buffs for opponentvictory- Steps to execute on victorydefeat- Steps to execute on defeatcondition(optional) - Conditional execution
Examples
Basic Combat
{
kind: 'fightCharacter',
character: 'RivalCultivator',
victory: [
{ kind: 'text', text: 'You emerge victorious!' },
{ kind: 'reputation', name: 'sect', amount: '5' }
],
defeat: [
{ kind: 'text', text: 'You suffer a humbling defeat.' },
]
}