// This spell runs once per frame.
var enemy = this.getNearestEnemy();
if (!enemy) return;
this.say("Die, " + enemy.id + "!");
this.setTarget(enemy);
//this.setAction("attack"); // Charge!
if (this.distanceTo(enemy)>this.attackRange)
this.setAction("move");
else
this.setAction("attack");
游戏截图: