Crit Attack Mechanic

About this model

The diagram models a "Critical Attack Mechanic" for a game, demonstrating how normal and critical attacks are calculated and the total damage they deal. It involves an interactive "Attack" source generating resources (representing the initiation of an attack), which are then distributed through a deterministic gate to two converters that handle normal and critical damage calculations, respectively. The amount of damage dealt in each attack type is influenced by the strength (STR) and attack power (ATK) of the character, which are stored in pools and factored into damage calculations through registers.

The normal damage calculation takes STR and ATK as inputs and multiplies them, while the critical damage calculation also involves these inputs but further doubles the outcome to reflect the increased damage of critical hits. These calculations are fed into another set of pools that accumulate "Total Normal Damage Dealt" and "Total Critical Damage Dealt," respectively. A critical aspect of the mechanic is the probabilistic distribution of attack types; a resource connection diverts a portion of attacks to be treated as critical, significantly altering the damage output. This system allows for dynamic combat mechanics in games, where player attributes directly affect the damage potential in both regular and critical scenarios.

"Crit Attack Mechanic" is a public Machinations diagram shared in the Community by Franz Dar, with 21 components.

It was created in November 2021 and last edited in December 2021.

Open the diagram in the Machinations app and press Play to watch the resources move, adjust its values to test how the system responds, or remix it to make an editable copy in My diagrams.

More from Franz Dar