[SOLVED] Kithgard Apprentice is crazy!

I’m using Usara Master Wizard with best gear and I still can’t beat this darned level.
Can someone help me?
Here is my code:

def killTheWarlock():
    warlocks = hero.findByType("warlock")
    for warlock in warlocks:
        if warlock:
            hero.attack(warlock)

#def killTheWitch():
#    witches = hero.findByType("witch")
#    for witch in witches:
#        if witch:
#            hero.attack(witch)

def commandAttack():
    riders = hero.findByType("griffin-rider")
    for rider in riders:
        enemy = rider.findNearestEnemy()
        if enemy:
            hero.command(rider, "attack", enemy)

while True:
    #killTheWitch() #it's hopeless to kill the witch, she gets huge if i try to attack her.
    #killTheWarlock() #I put this in later
    commandAttack()
    enemy = hero.findNearestEnemy()
    if hero.gold > hero.costOf("griffin-rider"):
        hero.summon("griffin-rider")
    if enemy:
        if hero.isReady("summon-burl"):
            hero.cast("summon-burl", enemy)
        elif hero.isReady("summon-undead"):
            hero.cast("summon-undead", enemy)
        elif hero.isReady("summon-robobomb"):
            hero.cast("summon-robobomb", enemy)
        elif hero.isReady("summon-yeti"):
            hero.cast("summon-yeti", enemy)
        elif hero.isReady("magnet-field"):
            hero.cast("magnet-field", Vector(45, 31))
        elif hero.isReady("poison-cloud"):
            hero.cast("poison-cloud", enemy)
        elif hero.isReady("fear"):
            hero.cast("fear", enemy)
        elif hero.isReady("raise-dead"):
            hero.cast("raise-dead", enemy)
        elif hero.isReady("chain-lightning"):
            hero.cast("chain-lightning", enemy)
        elif hero.isReady("time-travel"):
            hero.cast("time-travel", hero)
        else:
            killTheWarlock()

my gear:


this level is crazy hard! Even with this gear I just die!

1 Like

Try picking a simple hero, barricading yourself in with fences and shielding. After all, the goal is to survive, not to defeat all the enemies… I mean, there are just too many there, especially the skeletons. The witch and the warlock should be easy compared to them. Try thinking outside of the box!

ok, that’s one way to win, and a good one! However, I do want to kill at least the warlock, because I have never killed one before…
if all else fails I will most definitely use your tactic, it doesn’t involve fighting but it’s very effective.
Got any fighting solutions? :slight_smile: (I really wanna kill that warlock)

Do you have Ritic? You could blink behind the warlock, backstab him (say with the Dragontooth) and then phase shift into the room with the gems in it. Otherwise, I would get a warrior, and target the warlock without paying attention to the witch and the skeletons. Actually, on second thoughts, you might want to take out the witch so that she doesn’t heal the other nuisances. You could do all this with code like:

warlock = hero.findByType("warlock")[0]
# Attack it here:
witch = hero.findByType("witch")[0]
# Attack it here:
1 Like

Wait, couldn’t I command my robobomb to target the warlock?

Wow… it almost got the warlock, but then it killed the bomb and re-summoned it for his team, then I re-summoned it for my team, and THEN… it exploded the warlock, and the whole of my forces, into a thousand tiny pieces. Thank you so much for your help! I needed to use the warlock = hero.findByType(“warlock”) thing for it to work. :smile:

By the way I do not have ritic, although I am saving for him, currently I have ~6000 gems

1 Like

Congrats :partying_face:! It sounds like that poor robobomb became an epic double agent! Legends of that robobomb will be passed down through the ages! That sounds like an epic story though - if only you could take a gif or record it somehow so we could see it!

2 Likes

And Ritic is the sole reason why I only have 5627 gems - believe it or not, I used to have ~27000 gems before I had to buy him.

Wow!!
OK, I screen recorded it, gotta figure out how to get it on here
I have seen videos posted before so it’s possible

Here it is:
Processing: Play CodeCombat Levels - Learn Python, JavaScript, and HTML _ CodeCombat - Google Chrome 2021-09-19 12-06-44.mp4…

Never mind it is restricted, so here are some screenshots instead:
image
(my team)
image
(First explosion)
image
(Warlock resummoned the bomb for his team)
image
(I used summon-dead on an already-summoned-dead enemy robobomb and it joined my team :smile: )


(Explosion killed warlock and nearly killed witch)
Then my guys finished the witch off.
You’re so right, it’s such an epic story!

2 Likes

Heh heh, talk about total carnage :laughing:!

Great! You can also try using your belt(trap many enemies) and glove(electrify them). Also, do try Drain Life, they give you health.

1 Like

Also try the findCorpse meathod given by Unholy Tome. This can help you to target a good place for raise dead.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.