Its just all over the place, I am not actually sure what to do I dont need help, just a rough idea of what I actually need to do.
We have a beautiful magic tool ))
Ah, sorry did not think of that
Starting to get it. Trying to get past the part with the warlocks but the following code does not prioritse like it should
while enemyIndex<len(enemies): enemy = enemies[enemyIndex] if enemy.type == 'warlock' or enemy.type == "witch" or enemy.type == "cheiftain" or enemy.type == "tower": while enemy.health > 0: hero.attack(enemy) else: enemy = hero.findNearestEnemy() if enemy: hero.attack(enemy)
I am starting to get it, thanks @Alexbrand
So for this level you have to command troops or else you will die.
I would recommend summoning troops and commanding them. For example when you get to the towers shield and command you archers to attack the towers from a distance.
So I did a strategy of first summoning and commanding troops to attack their nearest enemy. And for the first part, I only attacked the enemies near me and let my troops take care of the other. Then I went for the catapults and the first door. Then you’ll want to still stay in the doorway where the lighting-things can’t hit you while you get rid of the ogres in the second part. Once all the ogres are killed, you’ll want to attack the lighting-things. Here, you’ll want to stand very close to one lighting-thing and attack that one, because if you stand near one then one of the two lighting-things won’t hit you. Once you got rid of one, do the other. Then break the door. Then the your other troops will meet up with you, so you’ll want to command the paladins to heal you. Then go to the area where there are two warlocks. You’ll want to lure the big skeletons to the area where it is really narrow so the skeleton will get stuck and you’ll be able to attack. And attack the warlocks and witches. Then you’re done!
P.S. Sorry about this quite long post, but this is a strategy of one of the many. So I hope this will help you.
Yeah you might want to break it down for him step by step and let hi write /improve his code.
well I did something similar to this except I didnt summon any troops till I saw the warlocks
so when I saw the warlocks I wen back to the lightning towers and then summoned a lot of troops with like 200 coins. then commanded all of them to go and destroy the ogres and skeletons while a paladin healed my and while I was just consecrating and regaining health really fast. for me mostly my troops took out most of the skeletons and ogres while I only helped when I got a lot of health back
I did it like that, but I targeted the warlocks first. Once that area was cleared out, I broke the door and targeted the witch.
When you get to the last sanctom you have to kill the witch first or else she will keep healing the chieftain
If you use someone with lots of health you can just take out everything by your self without summoning anything and then when you are ready to face the warlocks summon like a million troops at once and kill all the enemies
but maybe use like a flag or something that targets the warlocks so that your hero can kill them first
your troops should take care of the skeletons so I would recommend you to summon a lot of archers so that they can kill from a distance. I didnt use my paladin to attack but I used it to just to keep on healing me.
I used a flag to summon troops so when i placed the flag, my hero summoned troops till he was broke , so basically a lot of troops
if enmy.type == "walock" and if hero.isReady("Throw"):
or find nearest enemy after a flag is placed (what I did)
then place the flag by the warlock. After her picks up flag her attacks the nearest enemy so that would be the warlock