ritchie/engine/reaction_resolve
Resolution of an action plus all registered reactions into the outcome of the turn.
Types
pub type ResolvedReaction {
ResolvedReaction(
action_result: action_result.ActionResult,
reactor_reaction: option.Option(
#(player.Player, reaction.Reaction),
),
rons: List(player.Player),
)
}
Constructors
-
ResolvedReaction( action_result: action_result.ActionResult, reactor_reaction: option.Option( #(player.Player, reaction.Reaction), ), rons: List(player.Player), )Arguments
- reactor_reaction
-
The highest-priority reaction, if any. For multi-ron this is the first ron in turn order after the actor.
- rons
-
Every player who declared ron, in turn order after the actor.
Values
pub fn resolve_reaction(
rules: rules.Ruleset,
current: state.State,
act: action.Action,
reactions: List(option.Option(reaction.Reaction)),
) -> ResolvedReaction
Resolves the action and the reactions registered by each player.