Turn-Based Character Mechanics and an Event-Driven Implementation

    This article models a multi-faction turn-based character as an event-driven combat system. It covers survival stats, damage-stacking buffs, two faction synergies, command targeting and rewards, and conditional assist defense, and it explains how to separate event boundaries, state fields, and unresolved settlement order for testable implementation.

    From Character Description to an Executable Combat Model

    The source material describes a turn-based character with multi-faction synergy. The character builds a strengthening state by dealing damage and, depending on the factions of allied units on the field, gains different coin upgrades, status application, and assist abilities.

    To keep a specific character concept separate from general technical logic, this article uses neutral names. The damage-accumulation state is called the accumulation buff. The two faction synergies are called Faction A synergy and Faction B synergy. Instruction-related mechanics are called the command system. These names are only for analysis. They do not add rules.

    The core of the model is not the number on a single attack. It is the dependency among several events:

    The turn start establishes state. Skill selection determines the target. Attack resolution produces damage and abnormal status. An enemy action may trigger an assist. At turn end, rewards are granted according to the command execution result.

    Whether the goal is tactics or combat-system development, the first questions should be when something triggers, whom it affects, and which conditions limit it. Passives should not simply be added together.

    Base Stats and Survival Role

    At the given progression stage, the character’s base data are:

    • HP: 219.
    • Stagger thresholds: 60% and 30%.
    • Speed range: 3–6.
    • Slash damage multiplier: 0.5.
    • Pierce damage multiplier: 1.0.
    • Blunt damage multiplier: 2.0.

    If these multipliers apply to incoming physical damage of the matching type, the character resists slash strongly, takes pierce at the baseline, and is clearly vulnerable to blunt. A relatively high HP value therefore does not mean the character should absorb every attack.

    This matters more when an assist exists, because the character may deliberately take an attack that was aimed at an ally. Enemy attack type, current HP, stagger risk, and the actual protection of the assist skill all need to be checked together. An assist transfers risk. It does not make damage disappear.

    Stagger thresholds also affect command-system stability. The source states that when the character is staggered or in certain other states, some command effects and execution checks do not apply. Survival therefore determines not only whether the character can keep dealing damage, but also whether command rewards can continue in later turns.

    Damage Accumulation: Turning Output into a Long-Term Buff

    Establishing and Growing the State

    The accumulation buff caps at 999 stacks. At the start of the turn, if the character does not have the state, it gains 1 stack. For each point of damage dealt by its own skills, it gains 1 stack.

    These are two different events. The first initializes the state at turn start. The second increases stacks after skill-damage resolution. They should be implemented separately so initialization is not written as “add 1 stack every turn.”

    If the state is already present, the original rule does not require another initialization stack.

    Damage Bonus Uses Discrete Tiers

    Every 33 stacks increases base skill damage by 1%, up to 10%. If the current stack count is S, the bonus is:

    bonus = min(floor(S / 33), 10) × 1%.

    The bonus does not change continuously. It steps by tier:

    • 32 stacks: this rule has not yet granted a bonus.
    • 33 stacks: 1% bonus.
    • 66 stacks: 2% bonus.
    • 330 stacks or more: the 10% bonus cap.

    The state-stack cap and the current damage-bonus cap are different. 999 is the maximum the state can store. 330 is where this bonus rule reaches its cap. Remaining stacks should not be assumed to have another purpose, and extra rewards should not be added.

    Boundaries of Damage Resolution

    An implementation must decide which damage counts as “damage dealt by the character’s own skills.” Direct hit damage, damage attached to a skill, and damage caused by abnormal status may not share the same attribution rule.

    The source does not fully define these boundaries, so damage caused indirectly by the character should not be assumed to grant stacks. Whether growth uses damage before shield absorption, HP actually lost, or another settlement basis also needs a complete rule.

    A sound approach is to attach source, damage type, and attribution to the damage event, then let a rules module decide whether the growth condition is met.

    Faction A Synergy: An Output Chain Built on Status Potency

    Target Damage Bonus with No Faction Requirement

    The character deals 10% more damage to an enemy that is staggered or has a shield.

    This condition should not be read as requiring a Faction A ally. In the source structure, it sits at a different level from the later faction-presence condition.

    “Staggered or shielded” is a logical OR. If the target meets both, this description alone does not justify applying the 10% bonus twice.

    Skill Upgrade When the Faction Is Present

    When a Faction A ally is on the field, all coins on base skills of a specified attribute become indestructible coins.

    This changes a skill-component property. It does not directly raise a damage multiplier. “Indestructible” is not the same as “guaranteed hit,” and it does not mean the character is immune to stagger or attack cancellation. The exact result still depends on how the combat system defines coins, clashes, and the later attack flow.

    Under the same synergy, when the last coin of a base skill hits, the target gains 1 tremor potency, and the skill is treated as able to apply tremor potency.

    “Last coin” must be confirmed against the skill rules. It should not be simplified to “the last attack fragment that happened to hit.”

    Potency Threshold and Form Conversion

    When the last coin of a base skill hits a target whose tremor potency is at least 20, the logic branches:

    • If the target is not in an amplitude-conversion state, convert it to the specified scorching tremor.
    • If the target is already in an amplitude-conversion state, trigger a tremor burst and reduce tremor count by 1.

    Tremor potency and tremor count are different fields. Merging them into one number would mix threshold checks with ongoing resource consumption.

    A critical order also needs confirmation: does the +1 potency from the last coin count toward the same hit’s threshold of 20? If the target previously had 19 potency, different orders produce different results. The current source is not enough to decide this. The design should list it as an unconfirmed rule rather than fill it in.

    Faction B Synergy: From Command Target to Execution Reward

    Command Setup at Turn Start

    At turn start, the command system handles three things:

    • Grant a terminal command of the level corresponding to the current command-blessing stacks.
    • Randomly select one enemy as the command target. In a focused encounter, select one part instead.
    • Add a command mark to the character’s own base attack skills on the dashboard, at most one per action slot.

    The source does not give the concrete requirements of each terminal-command level, nor the full mapping from blessing stacks to command level. The only confirmed mechanism is that command level is determined by stack count. Upgrade thresholds and execution tasks must not be invented.

    The random target should be stored as a trackable combat-object identifier. In part-based combat, the part itself should be recorded, not only its parent enemy. Otherwise a hit on another part can be mistaken for meeting the target requirement.

    Restricted Actions Interrupt the Check

    If the character is staggered, unable to act, panicked, or in a special loss-of-control state, the turn-start effects above and the command-execution check do not apply.

    In code, this limit should be an eligibility check for the command system, not a condition copied into every effect. That reduces omissions and keeps branches consistent for the same state.

    The check still has to run at the relevant event time. Being able to act at turn start does not mean the character still qualifies when the skill executes.

    Extra Effects from Faction B

    When a Faction B ally is present, the character gains:

    • All coins on base skills of another specified attribute become indestructible coins.
    • When the last coin of a skill in the applicable range hits, apply 1 sinking to the target.
    • When a skill with a command mark is used and the command target is selected, gain 1 stack of command-assist resource.

    Sinking explicitly excludes assist-defense-only skills and special-resource skills. Applying a status on hit and gaining assist resource when a target is selected are different triggers. They must not be collapsed into one hit event.

    Damage dealt by Faction B units to the command target increases by 10%. The mark is applied to only one target per turn. More allies of the same faction do not extend it to additional targets.

    Assist Defense: Resource Cost and Target Redirection

    Command-assist resource caps at 3 stacks and is removed at turn end. When a Faction B ally is about to take a one-sided enemy attack, 1 stack is consumed, the attack target becomes this character, and an assist-defense-only skill is used.

    Two exclusions matter:

    • If the protected ally has a guard skill equipped, the assist does not trigger.
    • If the protected ally did not select the command target, the assist does not trigger.

    This is not unconditional protection for every ally. It is conditional assist bound to command-target selection.

    From an implementation view, the assist needs an atomic sequence: confirm that the attack and the ally meet the conditions, check the resource, then spend the resource and redirect the target. Spending the resource when redirection fails creates inconsistent resolution.

    The source also says this resource is handled as assist defense and is added together with other assist-defense stacks. Consumption priority across sources, and how the exclusive defense skill is chosen, are not specified. Those belong to the full combat rules.

    Turn End: Separate Execution Records from Reward Grants

    If the character executed a command this turn, turn end restores 5 sanity and grants 1 command-blessing stack.

    That creates feedback across turns:

    Execute a command, then gain sanity and blessing, then generate the next turn’s command from the blessing.

    Gaining command-assist resource is not necessarily the same as completing a command. The former has explicit skill and target conditions. The latter still depends on terminal-command rules that were not provided. Implementation should use an independent execution-result field rather than infer completion from a side effect.

    Turn end both grants rewards and clears assist resource. Those events should be handled separately, and their order should be recorded so abnormal results can be explained.

    Event-Driven Implementation and Test Suggestions

    Split the character into five rule modules:

    1. Damage accumulation: state initialization, growth, and bonus calculation.
    2. Faction synergy: checks for allies on the field and skill-component changes.
    3. On-hit effects: the last coin and abnormal-status handling.
    4. Commands: target selection, marks, and execution checks.
    5. Assist: eligibility, resource consumption, and target redirection.

    Each event should at least record the actor, target, skill category, coin position, damage attribution, and state values before and after the change. Random selection should also have reproducible test conditions so problems in complex fights can be replayed.

    Tests should cover boundaries, not only the normal attack path:

    • Whether the bonus is correct at 32, 33, 329, 330, and 999 accumulation stacks.
    • Whether a target that is both staggered and shielded incorrectly receives the bonus twice.
    • How event order changes the result when tremor potency is 19 or 20.
    • Whether other parts are incorrectly recognized when the command target is an enemy part.
    • Whether consumption and the cap are correct at 0, 1, and 3 assist-resource stacks.
    • Whether an assist still triggers incorrectly when an ally has a guard skill equipped.
    • Whether command checks follow the rules if the character becomes staggered mid-turn.
    • Whether temporary assist resource is cleared correctly after the turn ends.

    Conclusion

    The technical value of this character model is that damage growth, abnormal status, faction synergy, and conditional assist form a multi-stage feedback system. Its tactical result cannot be read from the stat block alone, or from any single passive. Enemy damage type, status thresholds, action targets, and turn tempo all have to be considered together.

    For developers, the important step is not to translate the description directly into conditionals. It is to define clear event boundaries, distinguish skill scope, target identity, and state fields, and leave unspecified settlement order as items to confirm. Only then can a complex character mechanic stay explainable, testable, and maintainable.