Help on Kelvintaph Defiler, pretty please

Hi All,

I’m trying to do the Kelvintaph Defiler level, and have tried several things.

My latest thing is to have the last Archer attack the shaman at the start but even after killing him the archer cannot move (because of the ice?). Then everyone else is just floating about and can’t attack and the archer that killed the first shaman can’t help them out because he can’t move.

The soldiers/archers don’t appear to be able to attack while they are floating.

The paladin does get dropped down to the floor but I don’t think I can move her because she is constantly shielding herself to stop being killed by the necromancer.

2 things.

  1. Am I doing the wrong thing with the archer that kills the first shaman? (even if she gets rescued by someone else she’ll be stuck on slippy ice and won’t be able to move, unless I’ve got that wrong and the ice isn’t stopping her moving it’s something in my code?)
  2. Does the paladin have to free the other team mates?
    2.5 Any other advice please, ARRRRGGGG!

(I’ve tried shielding the paladin immediately and she then doesn’t get shot over to the necromancer and neither does anyone else but then they all start sliding into trouble and no one can really move where they want)

Here is my non working code

# The ogres are trapping you with their dark rituals!
# Your hero can't do anything besides command and move without angering the warlocks.
# Beware ice, robots, traps, antigravity fields, and other dark magic.
# Somehow, you'll need to defeat Nalfar and save your paladin.
# The great treasure of Kelvintaph awaits your victory.
def att(enemy):
    if enemy and hero.canCast("chain-lightning", enemy):
        hero.cast("chain-lightning", enemy)
        if hero.isReady("shield"):
            hero.shield()
    elif enemy and hero.isReady("cleave") and hero.distanceTo(enemy)<5:
        hero.cleave(enemy)
        if hero.isReady("shield"):
            hero.shield()
    elif enemy and hero.isReady("bash") and hero.distanceTo(enemy)<3:
        hero.bash(enemy)
        if hero.isReady("shield"):
            hero.shield()
    elif enemy and hero.distanceTo(enemy)<3:
        hero.attack(enemy)
    

def soldierAtt(sPos):
    soldiers=hero.findFriends()
    for soldier in soldiers:
        enemy=soldier.findNearestEnemy()
        if soldier and soldier.type!='paladin' and enemy.type!='yeti':
            hero.command(soldier, 'shield')
            hero.command(soldier, "attack", enemy)
        elif soldier and soldier.type!='paladin':
            hero.command(soldier, "move", sPos)

  
    
def soldierAttNearest(soldier):
    enemy=soldier.findNearest(hero.findByType("shaman", hero.findEnemies()))
    if enemy and soldier and soldier.distanceTo(enemy)<20:
        hero.command(soldier, "attack", enemy)
    elif enemy:
        hero.command(soldier, "move", enemy.pos)    
            
def commandPaladin(eType):
    paladin=hero.findByType("paladin", hero.findFriends())
    enemy=hero.findByType(eType, hero.findEnemies())
    if eType!='' and paladin  and paladin.health < paladin.maxHealth*0.8:
        hero.command(paladin, "cast", "heal", paladin)
    if eType=='' and paladin:
        hero.command(paladin, "shield")
    elif enemy and eType!='' and paladin:
        hero.command(paladin, "attack",enemy)
        hero.command(paladin, "shield")
Hstage1=True #move to position to avoid robot missiles
Pstage1=True
m1=True
A1stage1=True
A2stage1=True
S1stage1=True
S2Stage2=True
archers=hero.findByType('archer',hero.findFriends())
#hero.say('archer 0 is '+archers[0])
soldiers=hero.findByType('soldier',hero.findFriends())
paladins=hero.findByType('paladin',hero.findFriends())
shamans=hero.findByType('shaman',hero.findEnemies())
friends = hero.findFriends()
enemy=archers[1].findNearestEnemy()
#hero.command(paladins[0], "shield")
while True:
    if Hstage1:
        hero.move({'x':33,'y':23})
        if hero and hero.pos.y>=22:
            #hero.say('disabled hstage1')
            Hstage1=False
            #Hstage2=True
            pass    
    if Hstage2: 
        #can't do this as the warlocks go mad
        if hero.canCast("undying-charm", paladins[0]) and paladins[0].health<100 and False:
            hero.cast("undying-charm", paladins[0])
            hero.say('cuc')
            Hstage2=False
            Hstage3=True
    if Pstage1 and hero.time>3.5:
        hero.command(paladins[0], "move", {'x':86,'y':70})
        hero.command(paladins[0], "shield")
        if paladins[0].canCast('heal'):
            hero.command(paladins[0], "cast",'heal', paladins[0])
        #Pstage1=False
        Pstage2=True
    if  A1stage1 and hero.time>=2.7:
        enemy=archers[1].findNearestEnemy()
        #hero.say(archers[1])
        if enemy.type=='shaman':
            hero.say(enemy)
            origEnemy=enemy
            hero.command(archers[1], "attack", enemy)
            if enemy.health<=0:
                A1stage1=False
                A1stage2=True
    if A1stage2:
        #hero.say('a1s2')
        hero.command(archers[1], "move", {'x':26,'y':40})
        A1stage3=False
    if A1stage3:
        newPos=Vector(25,66)
        soldierAtt(newPos)

    


  1. you need to dodge robot missles. check
  2. you need to kill the first shaman with the last archer so that that archer can go and kill the rest of the shamans. not check
    2b. also you need to have your paladin shield and heal while nalfar is casting the health drain spell.
  3. Once you free the rest of your troops, use them to kill nalfar (oh yea nalfar will also turn into a yeti. RUN)
  4. The spell on yourself will end once nalfar leaves. Kill the rest of the ogres, but be careful, you’ll be low on hp
  5. win (i haven’t completed this level but I know what happens lol)

killing the ogres is optional as it is not needed for a success

Thanks for the advice.

I am already killing the first shaman with the last archer but after that the archer can’t move on the ice so I can’t kill the rest of the shamen to release the rest of the troops.
The paladin is already shielding and healing but can’t do anything else and without the troops to take out the necromancer the paladin dies anyway.
The main problem at the moment is how to kill the shamen if my archer can’t move after taking out the first one