Compare commits
No commits in common. "6d92cb4deba9e3107d14aad65b6e3d99ac8e94a4" and "c6249b1b9b90559a3cdb34e2df5ff131cd275de4" have entirely different histories.
6d92cb4deb
...
c6249b1b9b
8
calc.js
8
calc.js
@ -8,8 +8,6 @@ import calc, {
|
||||
import assert from "assert";
|
||||
import chev, { Lexer } from "chevrotain";
|
||||
|
||||
const gen = Generations.get(9);
|
||||
|
||||
/**
|
||||
* Creates a lexer.
|
||||
*
|
||||
@ -268,11 +266,7 @@ function parseAndCalculate(line) {
|
||||
}
|
||||
}
|
||||
|
||||
// Pre-checking before the calculator throws unreadable errors.
|
||||
if (!gen.species.get(attacker)) throw Error(`No species ${attacker}`);
|
||||
if (!gen.species.get(defender)) throw Error(`No species ${attacker}`);
|
||||
if (!gen.moves.get(move)) throw Error(`No move ${move}`);
|
||||
|
||||
const gen = Generations.get(8);
|
||||
return calculate(
|
||||
gen,
|
||||
new Pokemon(gen, attacker, attackerOpts),
|
||||
|
Loading…
Reference in New Issue
Block a user