From cf3906be94d9c7ca5115d9f83ee82ae2285db7d5 Mon Sep 17 00:00:00 2001 From: xeals Date: Thu, 27 Apr 2023 11:24:17 +1000 Subject: [PATCH] support abilities in calc --- calc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/calc.js b/calc.js index 0fc66d4..f8c64ac 100644 --- a/calc.js +++ b/calc.js @@ -121,7 +121,7 @@ function* iterate(arr) { function unwrapToken(type, token) { assert( token.tokenType.name == type, - `expected token ${type}, got ${token.tokenType.name}` + `expected token ${type}, got ${token.tokenType.name}`, ); return token.image; } @@ -216,6 +216,9 @@ function parseAndCalculate(line) { case "Item": opts().item = unwrapToken("Item", item); break; + case "Ability": + opts().ability = unwrapToken("Ability", item); + break; case "Pokemon": { let name = unwrapToken("Pokemon", item);