Mind the Trap

Don't take the bait!
餌を取ってはならない!

目標

ロングソードを装備する

kill ogres on your side of the mines
鉱山のあなたの側の怪物を殺せ

use flags and distanceTo() so you don't run over the mines!
フラグとdistanceTo()使いなさい そう、あなたは鉱山から溢れない!

ヒント

If you try to attack a distant enemy, your hero will charge toward it, ignoring all flags.
You'll need to make sure you only attack enemies who are close to you!
もしあなたが遠い敵を攻撃しようとするならば、あなたのヒーローはそれに料金を請求し、すべてのフラグを無視する。
あなたが確かめる必要がある あなたはあなたに近い敵を攻撃するだけである!

解答

a
while(true) {
var flag = hero.findFlag();
var enemy = hero.findNearestEnemy();
if(flag) {
hero.pickUpFlag(flag);
hero.say("I should pick up the flag.");
} else if(hero.distanceTo(enemy)<10) {
hero.attack(enemy);
a

  • 最終更新:2016-04-30 08:29:56

このWIKIを編集するにはパスワード入力が必要です

認証パスワード