Cant Beat Village Guard


#1

Hello, i’m new to CodeCombat and i’m stuck on Village Guard (i’m using python) and i’m wondering of anyone can help me.


#2

Hello, Ryan, and welcome.

Phrases like “I need help!” don’t help us solve your problem. Elaborate. Post your code. A screenshot. A description of the error, or what your hero does. Don’t forget to format your code according to the FAQ!


#3

Ok thanks for telling me.
this is my code:
loop:
self.moveXY(35, 34)
leftenemy = self.findNearestEnemy()
if leftenemy:
self.bash(leftenemy)
self.moveXY(60, 31)
rightenemy = self.findNearestEnemy()
if rightenemy:
self.bash(rightenemy)
when i get to this ^^^^^^ bash my warrior will walk up to the orge and then repeat the loop


#4

@ChronistGilver Sorry didnt reply to you directly


#5

Bash has a cooldown. After you bash, your bash action needs time to “recharge” before it can be used again.


#6

Thanks! I never knew that!


#7

…I just told you to format your code as per the FAQ. Please do so in the future.


#8

[redacted, please don’t post solutions]


How to i beat Village Guard?
#9

@Blaze Thanks for contributing. But please avoid posting full solutions, that takes away the whole point of the game which is to learn while writing the code.