Skip to content

Skills in Cowculator

Skills define the actions fighters perform during battle. Active skills run in a configured rotation, while passive skills run automatically when their trigger occurs.

Active skills

Active skills are the abilities fighters use during their normal turns. Define them in each fighter's skills array in rotation order.

Each active skill has a chance to execute and contains one or more actions. Actions are processed in their configured order.

Skill rotation

Cowculator selects active skills in their configured array order, then loops back to the first skill. Selecting a skill advances the rotation even if that skill misses or is replaced by fallback_skill because it is unaffordable.

An affordable skill consumes its energy before the skill's hit check. If the skill misses, its actions do not run, but the energy remains spent. If the skill is unaffordable, Cowculator uses the separately configured fallback_skill and does not charge the intended skill's energy cost. The fallback skill executes without an energy cost.

The skills array may be empty. In that configuration, Cowculator uses the required fallback_skill every time the fighter reaches skill execution. The fallback skill has no configurable energy_cost field.

Available actions

Action type What it does
attack Deals normal or true damage to the resolved target
heal Restores either health or energy to the resolved target
apply_status Applies a buff or debuff, such as a stat change, shield, control effect, DOT, or attack modifier
remove_status Cleanses or dispels eligible statuses from the resolved target

Every action uses these common controls:

  • type selects one of the action types above.
  • name provides an optional display name for the action.
  • chance determines whether the action succeeds for each resolved target.
  • target_type selects the opposing fighter, the acting fighter, or both.

Each action type also has its own configuration. Follow the action links above for its behavior and a focused example.

Looking for exact fields?

Use the OpenAPI reference for complete skill and action schemas, defaults, and validation rules.

An action uses target_type to choose its targets:

  • enemy: the opposing fighter
  • self: the fighter using the skill
  • all: both fighters

For all, the fighter using the action is resolved first, followed by the opposing fighter. The action's chance is checked independently for each target, so it can affect one fighter and miss the other.

Each action finishes all of its resolved targets before the next action begins. This means an all action still resolves against the opposing fighter if its first resolution knocks out the caster.

Within an active skill, a caster knockout stops the remaining actions. An opponent knockout does not. The surviving caster continues the skill in order, but the knocked-out opponent stays at 0 health and cannot gain or lose resources or statuses. Attacks and heals aimed at that opponent still produce their normal events with an applied amount of 0. Status actions produce action_no_effect instead. The action chance is checked first for each target, so a failed check produces action_missed even when that target is already knocked out.

Tip

Skill order = strategy. The right move at the wrong time is still the wrong move!

Active skill example

This skill performs one normal attack against the opposing fighter:

{
  "skill_id": "heavy-strike",
  "name": "Heavy Strike",
  "chance": 1.0,
  "actions": [
    {
      "type": "attack",
      "name": "Heavy hit",
      "chance": 1.0,
      "target_type": "enemy",
      "damage_value": 1.5,
      "damage_type": "normal"
    }
  ],
  "energy_cost": 40
}

Passive skills

Passive skills are configured in each fighter's passives array. Use them for opening buffs or actions that respond to either fighter's turn.

passive skill
└── triggers[]
    ├── trigger
    ├── actor (for turn_start)
    └── actions[]

Each passive trigger controls when its ordered actions run. Actions use the same chance checks and targeting rules as active skills. A passive trigger is not a status: it has no duration, stacking policy, or removal behavior.

Passive triggers and available actions

Trigger When its actions run Available actions
start_of_battle During preparation, before ordinary turns All available actions
turn_start After DOT and before skill execution on eligible normal turns All available actions

For start_of_battle, omit actor. Faster fighters process their preparation passives first, with fighter_1 first when speeds are equal.

For turn_start, set actor relative to the passive skill's owner:

  • self: the owner's turns.
  • enemy: the opponent's turns.
  • all: either fighter's turns.

The passive owner always performs the actions. Each action's target_type selects its target independently, relative to that owner. For example, a trigger with actor: "enemy" and a heal action targeting self heals the passive owner at the start of the opponent's normal turn.

When both fighters have eligible triggers, the acting fighter's triggers run first, then the opponent's. Actions run in configured order, with independent chance checks. A knockout during turn-start passive actions stops the remaining passive actions and ends the battle.

These triggers still run with skip_action, but do not run when skip_turn consumes only a global turn. Status durations decrease later, at turn end.

See How a battle progresses for the complete ordering alongside statuses, control effects, and regeneration.

Passive skill example

This passive applies a defence buff to its owner during preparation:

{
  "skill_id": "opening-guard",
  "name": "Opening Guard",
  "triggers": [
    {
      "name": "Opening Guard",
      "trigger": "start_of_battle",
      "actions": [
        {
          "type": "apply_status",
          "name": "Apply defence up",
          "chance": 1.0,
          "target_type": "self",
          "status_to_apply": {
            "name": "Defence Up",
            "target_type": "self",
            "status_type": "buff",
            "type": "stats_up",
            "removable": true,
            "duration": 3,
            "stack_policy": "replace",
            "stat_data": [
              { "stat": "defence", "value": 0.25 }
            ]
          }
        }
      ]
    }
  ]
}

Add this object to the fighter's passives array.