Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Created March 9, 2021 13:03
Show Gist options
  • Save AllGistsEqual/707690feba02da40e9aee27bd6b2a628 to your computer and use it in GitHub Desktop.
Save AllGistsEqual/707690feba02da40e9aee27bd6b2a628 to your computer and use it in GitHub Desktop.
const processBehaviourChain = (units: Unit[], gambits: Gambit[]): void => {
// check all gambits in the behaviour chain for a match
}
const getAvailableTargets =(units: Unit[], targetType:ConditionTarget): Unit[] | null => {
// get all targets matching the target type
}
const getMatchingTarget = (targets: Unit[], comparison: TargetComparison): Unit | null => {
// return only targets matching the selection criteria
}
const isActionAvailable = (actor: Unit, action: Action): boolean => {
// check if the action is possible
// (enough resources, material and so on)
}
const compareTargetHP = (target: Unit, comparison: TargetComparison): boolean => {
// check if the current target matches the hitpoint condition
}
const compareTargetStatus = (target: Unit, comparison: TargetComparison): boolean => {
// check if the current target matches the status condition
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment