Apply Status¶
What is ApplyStatus?¶
ApplyStatus is a skill action in Cowculator that applies a status effect (buff or debuff) to a target during battle. This action is used to grant beneficial effects to allies or inflict negative effects on enemies.
How ApplyStatus Works¶
The ApplyStatus object in a SkillAction contains a status_to_apply field, which must be a valid Status object. The status can be any supported buff or debuff.
Replace vs Stack (models)¶
There are two common policies for handling re-applications of a status with the same name:
- Replace model: only one instance exists; new application overwrites the old (duration and data are replaced).
- Stack model: multiple instances may coexist (up to
max_stacks); each application adds a stack and stacks may combine or track their own durations.
Status Stacking Behavior
When a status with the same name is applied to a target, behavior depends on the status fields and the model the game uses:
- If
allow_multipleis false (default): the new application will replace the existing status instance. Replacement typically overwrites duration and data with the new status payload. - If
allow_multipleis true: multiple instances are allowed. New applications will add a stack (up tomax_stacks), and may extend duration. Usemax_stacksto limit how many simultaneous instances can exist.
Note: "replace" vs "stack" semantics can vary by implementation (for example, some systems refresh duration instead of fully overwriting). The examples below follow this simple replace-or-stack model.
Example: Apply an Attack Buff¶
{
"skill_id": "1004",
"name": "Attack Up Up",
"chance": 1.0,
"actions": [
{
"type": "apply_status",
"status_to_apply": {
"name": "Attack Up Up",
"data": {
"type": "stats_up",
"data": [{ "stat": "attack", "value": 1.5 }]
},
"duration": 3,
"target_type": "self",
"max_stacks": 3,
"allow_multiple": true
}
}
],
"energy_cost": 40
}
Example: Apply a DOT Debuff¶
{
"skill_id": "1005",
"name": "Poison Venom",
"chance": 1.0,
"actions": [
{
"type": "apply_status",
"status_to_apply": {
"name": "Poison",
"data": {
"type": "dot",
"damage_type": "current_health_percent",
"value": 0.1
},
"duration": 2,
"target_type": "enemy",
"max_stacks": 1,
"allow_multiple": false
}
}
],
"energy_cost": 40
}