I need help with this level I have tried everything
here is my code
hero.moveXY(38, 92)
while True:
enemy = hero.findNearestEnemy()
hero.cleave(enemy)
hero.attack(enemy)
hero.moveXY(30, 31)
hero.shield()
I need help with this level I have tried everything
here is my code
hero.moveXY(38, 92)
while True:
enemy = hero.findNearestEnemy()
hero.cleave(enemy)
hero.attack(enemy)
hero.moveXY(30, 31)
hero.shield()
Welcome to the forum! This is a family-friendly place where coders can share bugs, ask for help on any CodeCombat level (don’t forget to post your code correctly 1), or just hang out with other coders. But before you proceed, please check out our guidelines: this topic.
Have a great time!
Thanks I have been working at this level for a year now and have gone through lots of variations of the code and i just cant beat the level
hero.moveXY(38, 92)
while True:
enemy = hero.findNearestEnemy()
hero.cleave(enemy)
hero.attack(enemy)
hero.moveXY(30, 31)
hero.shield()
Firstly, you might be attacking yaks. Secondly, your hero will try to cleave even if he is not ready, making the hero wait. Instead, try this:
hero.moveXY(38, 92)
while True:
enemy = hero.findNearestEnemy()
if enemy and hero.isReady("cleave") and enemy.type != "sand-yak":
hero.cleave(enemy)
else:
if enemy and enemy.type != "sand-yak":
hero.attack(enemy)
hero.shield()
hero.moveXY(30, 31)
Note, you might have to add more code.
I beat it with
Thats what I had when I beat it too, but with the Rune-sword, emperors glove, and fine leather boots. (and not boss star)
Try equiping what i have circled.
i cant see the image
Equip the
Boots of Jumping
Sapphire Sense Stone
Twilight Glasses
Boss Star IV
Emperors Gloves
Ezeroths Timepiece
That’s what I used to beat the level
also, level link again, please, i cannot find the level
nevermind, i found it bui beat the level using Javascript, that was my most recent go through.
I am doing this in python
https://codecombat.com/play/level/clash-of-clones?
I lost my correct code when i started it in javascript. But @MarmiteOnToast or @Anonym would be some other people who could help you.
I’d love to help but I solved this level with good gear yet again
Yeah… I used a wizard so I can’t really help either…
Maybe @Aya could help.
Im gonna look into it a while later.
For now can you post your current code
There’s the current code
get read gloves, use runesword, remove sheild code and most important make sure you are not attacking
sand yaks and one more tip use gordan
use ned and run into the enemy’s archer line then cleave start heart shielding and shielding to draw attention but taking very little damage once you can cleave again and start attacking and bashing and cleaving. but if you run low on health run back to your archers and let your soldiers fight for you.