In Reading Rumble(Cloudrip Mountains), there’s one ogre whose name has an apostrophe(Grul’Thock). I don’t think there’s supposed to be an apostrophe. Here’s my code if it helps:
// Defeat all incoming ogres. while(true) {
// Find the nearest enemy.
var enemy = hero.findNearest(hero.findEnemies());
// If there is an enemy, and it is a “brawler”:
if(enemy) {
if(enemy.type == “brawler”) {
// Then say its name (.id) in UPPERCASE.
var id = enemy.id.toUpperCase();
hero.say(id);
}
// For other enemies, just fight.
else {
while(enemy.health >= 0) {
hero.attack(enemy);
}
}
}
}
Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
Sorry, I can’t help you right now, I must go eat lunch!
Hi, I will not be able to help, because I am not a subscriber yet, but It would help all of us if you would format your code using the </> buttons above your writing space. Thanks! It goes from this:
// Defeat all incoming ogres. while(true) {
// Find the nearest enemy.
var enemy = hero.findNearest(hero.findEnemies());
// If there is an enemy, and it is a “brawler”:
if(enemy) {
if(enemy.type == “brawler”) {
// Then say its name (.id) in UPPERCASE.
var id = enemy.id.toUpperCase();
hero.say(id);
}
// For other enemies, just fight.
else {
while(enemy.health >= 0) {
hero.attack(enemy);
}
}
}
}
It turns out that my hero wasn’t close enough to the wizards for them to hear, so I had to move closer to them. I solved the level now; thanks for the help
can you press the tick box next to the comment that helped most to lock this topic in? its supposed to mark the comment that solved your problem so click the tick box.