Go Dice API Genesys Plugin Hooks
This is an addon for the Go Dice API Wrapper and React hooks packages maintained by Zeragamba and myself adding support for Genesys dice types.
Genesys is a generic version of Fantasy Flight's Edge of the Empire game utilizing symbol based dice values:
- Success
- Triumph (critical success)
- Advantage
- Failure
- Despair (critical failure)
- Threat
Successes and failures cancel each other out to determine the roll's success, while advantage and threat cancel each other to determine potential side effects separate to the intended roll outcome.
This package contains two hooks:
This replaces the useDieValue hook, listens for the die's "value" event and returns an array of genesys die face values, e.g. ["success", "advantage"], ["triumph"], ["failure", "threat"].
function useGenesysDie(die: Die): dieFaceValues[]
This returns an object containing a variety of state and setState functions used to calculate the final result of the dice pool.
function useGenesysResults(die: Die): {
success: number,
triumph: number,
advantage: number,
rolled: boolean,
setRolled: (newState: boolean) => void,
outcome: string,
sideEffects: string,
crit: string,
inputResult: (genesysDieValue: string[]) => void,
resetResults: () => void
};