From a1cb77a8daceec7d42cc9ac2ae9d0f025cdab836 Mon Sep 17 00:00:00 2001 From: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:52:55 -0500 Subject: [PATCH] Add enum for hit check result Co-authored-by: innerthunder --- src/enums/hit-check-result.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/enums/hit-check-result.ts diff --git a/src/enums/hit-check-result.ts b/src/enums/hit-check-result.ts new file mode 100644 index 00000000000..ec7c089c308 --- /dev/null +++ b/src/enums/hit-check-result.ts @@ -0,0 +1,19 @@ +/** Represent the result of a hit check against a target. */ +export const HitCheckResult = { + /** Hit checks haven't been evaluated yet in this pass */ + PENDING: 0, + /** The move hits the target successfully */ + HIT: 1, + /** The move has no effect on the target */ + NO_EFFECT: 2, + /** The move has no effect on the target, but doesn't proc the default "no effect" message. */ + NO_EFFECT_NO_MESSAGE: 3, + /** The target protected itself against the move */ + PROTECTED: 4, + /** The move missed the target */ + MISS: 5, + /** The move failed unexpectedly */ + ERROR: 6, +} as const; + +export type HitCheckResult = typeof HitCheckResult[keyof typeof HitCheckResult];