Reactionary counter
About this model
This diagram represents a combat system where a player character faces enemy attacks and has a chance to recover health. The system includes mechanisms for calculating hits and misses based on a random chance ('Chance to hit'), affecting the player's health points (HP) accordingly. When an enemy attack occurs, it triggers a process that determines whether the attack hits or is dodged, with each outcome leading to different consequences for the player's HP. Additionally, the player has the option to 'recover' HP interactively, showcasing a gameplay mechanic where timely player reactions can mitigate damage received from enemy actions.
Resources flow from the sources representing enemy attacks and player recovery actions towards gates and delays that simulate the chance of an attack hitting or missing and the effect of successful recovery attempts. Drains are used to reset the state of the system, ensuring that each attack and recovery action can be processed cleanly without accumulation of past actions' effects. This dynamic interplay between sources, gates, and drains, alongside the player's health pool, creates a simple yet effective model of a combat system where player actions directly influence the outcome of engagements with enemies.
“Reactionary counter” is a public Machinations diagram by Cezar Cocias, shared in the Machinations Community.
You can open the original diagram in the Machinations app, press Play to watch how resources move through it, and change its values to see how the system responds. Machinations is a visual tool for designing, simulating and balancing game economies and other systems, where resources flow through sources, pools, drains, converters and gates. In a diagram, a source creates resources, a pool stores them, a drain removes them, a converter changes one resource into another and a gate decides where they go next.