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 fight

  • isSpar (optional) - Whether this is a sparring match

  • spawnCondition (optional) - HP multiplier and buffs for opponent

  • victory - Steps to execute on victory

  • defeat - Steps to execute on defeat

  • condition (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.' },
  ]
}