[grim determination] my paladin is always blew up and ruin all the mines

> def commandPaladin(paladin):
>     target = lowestHealthPaladin()
>     enemies = paladin.findEnemies()
>     if paladin.pos.x < 75:
>         hero.command(paladin, "move", {"x":75, "y":paladin.pos.y})
>     if target:
>         if paladin.canCast("heal"):
>             hero.command(paladin, "cast","heal", target)
>     if enemies:
>         hero.command(paladin, "shield")

no alarms in my code but they don’t move to the position i required. they were attacked by the warlock and touch the minefield.
need help~

Your paladins don’t attack the enemies and I don’t think it’s a good idea checking for three conditions and doing them all. The structure of my function is:

def commandPaladin(paladin):
    if condition1:
        # do smth
    elif condition2:
        # do smth
        if condition3:
            # do smth
            # do smth

… and I think “y”:paladin.pos.y is no good choice…

@xython Thank you.
I changed my code then my paladins could move to the position i wanted, but there is one paladin who turn his direction to my minefield(see the first picture). He is the one which attacked by warlock and blow up all my mines…(see the second picture):joy:

Have you passed the level? When trying to replay the level I encountered the same case: "one paladin turns his direction to the minefield and blows it up ".
There can be only 2 plausible explanations:

  1. The warlock has some wicked magic
  2. This is a bug
    I think I restarted the level with another hero and then all problems have gone and I replay it without problems.

Yes, i have changed the strategy and put 4 paladins together instead of use paladin.pos.y, then i passed the level. Thank you very much. @xython