Help with getting more armor!


#1

i am at Level 17 in ( Backwoods Forest - munchkin harvest)
my code is correct, but i am still failing because i do not have enough armor. i had faced this problem in my last level, then figured that i can swith swords and get through. in this i am not able to fix the problem and not able to get enough armor. can someone please help me with getting enough armor.
Here is my code-
loop {
var enemy = this.findNearestEnemy();
if (this.isReady(“power-up”)){
this.powerUp();}
else {
this.attack(enemy);
this.attack(enemy);
}

}

thanks.


#2

Please format your code as it says in the FAQ for the sake of the people reading it.


#3

thank you. will do that.


#4

Can you edit your post and format it please?