Hey Guys! On CodeCombat, I’m currently stuck on this level. I need help!
This is my code:
// Ask the healer for help when you're under half health.
// Buy the Polished Sense Stone for health documentation.
loop {
var enemy = this.findNearestEnemy();
currentHealth = this.health;
healingThreshold = this.maxHealth / 2;
this.moveXY(66, 46);
this.say("heal me!");
// If your current health is less than the threshold,
// move to the healing point and say, "heal me"
.
// Otherwise, just attack enemies.
'else';
this.moveXY(55, 35);
this.findNearestEnemy();
this.attack(enemy);