Code
// Defeat as many ogres as you can.
// Use 'cast' and 'canCast' for spells.
while(true) {
var enemy = hero.findNearestEnemy();
if (enemy) {
hero.attack(enemy);
if (hero.canCast("chain-Lightning")) {
hero.cast("chain-lightning", enemy);
}
if (hero.canCast("regen")) {
hero.cast("regen", hero);
}
}
}
I keep getting the error on line 9, I don’t get the error with any of the other spells either