Coding issue with backwoods standoff


#1

I am playing codecombats and I’m on backwood standoff (where you use cleave) and the else command doesn’t work I have seen others and how they put it and I am doing the same thing , my code is
While True:
Ready =.isReady(“cleave”)
Hero.cleave(hero.findNearestEnemy())
Else:
Hero.say(“boo”)
I know I’m not a paid member or anything but can I get some help and if not at least tell me that. Thank you


#2

1st of all get rid of the Ready variable
and use an if statement that says

if(hero.isReady(“cleave”)){
hero.cleave(enemy);
}else{
say(“Boo!”);
}

Note: This Is In Javascript your code may be a bit different


#3
While True:
enemy = hero.findNearestEnemy()
Ready = isReady("cleave")
if hero.isReady("cleave"):
    hero.("cleave")
else:
    hero.say("boo")

You forgot the if is ready


#4

I tried that and I still receive issues this is what I have


#5

Sorry you need to do
if enemy:
between the find enemy and is ready.


#6

Nope still doesn’t work


#7

you forgot the : at the end of the if hero.isReady cleave


#8

My won’t work and I use Python. Please Help.


#9

That’s so weird. I got on it and no matter what my character says the munchkin still attacks me. Probably a bug.
My code is completely right though.


#10

We’ve recently changed this level so players don’t need to say anymore.

Just cleave if it is ready, and attack the stray munchkins while cleave is on cooldown.


#11

Oh thanks.
20 characters


#12

Hello! I cannot pass this level with such equipment while using this guidance: [quote=“Serg, post:10, topic:10339”]
Just cleave if it is ready, and attack the stray munchkins while cleave is on cooldown.
[/quote]

Is it expected to buy new extra equipment to pass it?


#13

Yes, part of the game is upgrading your equipment as needed :wink:


#14

OK, thank you, @Serg .