[Bugged] Gas Attack, Sarven Desert and see through walls

Opinions can’t be wrong. And BTW it’s true

Opinions can be wrong. I bet you could think of a lot of wrong opinions if you tried.

And if it were true, I never would have made it through Calc II. Tutors showing me what I did wrong and me learning from it is the only reason I ever learned anything from that course. Otherwise I would have just been overwhelmed.

Anyway, I didn’t make this thread to get into an argument over this. I just wanted it here for people who may have the same problem I had.

I know that you don’t learn math by looking at the solution. There is a difference between showing someone what’s wrong and just looking at the solution.

Looking at the solution won’t let you learn anything. Showing someone what’s wrong let them know how to fix their mistake and not make it in the future. That’s what the forum is for. It’s for pointing out mistakes, not for giving solutions.

1 Like

Looking at the solution has it’s place in math as well. They even sell solutions manuals for math and physics textbooks, and believe me when I tell you those can be a life saver.

If you guys don’t learn from looking at solutions, that’s fine. Some of us do though, so you either have to accept that or agree to disagree with me about it.

And I don’t think any of this is even relevant to the reason I made this thread anyway.

I know that, but learning from your own solution can be twice as important than learning from other’s solutions. I prefer learning from my solution, but it can be sometimes useful when learning from solutions when you really don’t know the answer and how to solve it. But laziness, no that’s not good for you.

Cool, but no one asked.

Can you name the problem glasses?

Any glasses that allow you to see through walls. Can’t remember which ones I was using at the time.

only twilight glasses will allow you to see through walls.

Oh then that must be them.

I used them and it was fine

My bad, the problem glasses are any glasses that DON’T allow you to see through walls.

I think you had a problem with your code. It’s strange, but you can complete the level with any glasses from Mahogany to Twilight.
I used this code to display friends in the console:

var friends = hero.findFriends();
for (var i in friends)
    console.log(friends[i].id);

Mahogany glasses:

Twilight glasses:

Right you can see the console log. So the designer intentionally modified all glasses to see through walls ( and in the process broke them :wink: ) It’s for me some kind of bug…

If I take off all glasses, it tells me to equip the twilight glasses.

The bug is that the game doesn’t tell you to equip the twilight glasses if you already have a different pair of glasses equipped. My code is fine, here it is for clarity:

# Calculate the total health of all the ogres.

def sumHealth(enemies):
    totalHealth = 0
    index = 0
    enemies = hero.findEnemies()
    while index < len(enemies):
        totalHealth += enemies[index].health
        index += 1
    return totalHealth

# Use the cannon to defeat the ogres.
cannon = hero.findNearest(hero.findFriends())
# The cannon can see through the walls.
enemies = cannon.findEnemies()
# Calculate the sum of the ogres' health.
ogreSummaryHealth = sumHealth(enemies)
hero.say("Use " + ogreSummaryHealth + " grams.")

Please post the code you used to beat it without the twilight glasses.

@xython is saying the glasses have bugs not the code, so knowing the code doesn’t help.

Who is finding the enemies? Your hero or the canon? Comment

enemies = hero.findEnemies()

in the function.

1 Like

Thank you xython! I’m dumb for not realizing that before. Makes me wonder why the game tells you to equip the twilight glasses though.

You can replace [solved] with [ bugged ] :grinning:

Actually I can’t test this right now, but I think the game might automatically tell you to equip your best pair of glasses, which for me happens to be the twilight glasses. Could just be a confusing coincidence.

I’m glad I made this thread now. I beat that level on accident using the wrong method and now I’ve learned the correct way.