Problem with Shield Rush

I’m having a problem with the Shield Rush level. I have the bronze shield equipped, but I can’t get the self.shield() action to work. I’ve tried running the command alone and in a loop, but haven’t seen any difference in the amount of time it takes me to die or any change in hero sprite.

Here is my code:

‘’'python
loop:

if self.isReady("cleave"):
    enemy = self.findNearestEnemy()
    self.cleave(enemy)
    
else:
    self.shield()

‘’'
Any help is appreciated. Thanks.

I can only think this way, or use better shield.
Tried it with bronze and infantry shields, no need to move with second one.
Python

loop:
enemy = self.findNearestEnemy()

if self.isReady("cleave"):
    self.cleave(enemy)
else:
    self.moveXY(36, 10)
    self.shield()
2 Likes

Thanks Rikam, that got me through the level. I still didn’t see the shield command have any effect.

Is it bugged? Am I doing it wrong? Is there no sprite change/sound effect?

Sprite changed, at least for me, so i guess bug with animation.

Try it with Tharin; Anya doesn’t have a shield animation yet. Also, I just adjusted the balance on this level to make it easier, so try again–you may be winning now.

My hero is Tharin,but failed.

Here is my code:

loop:
    enemy = self.findNearestEnemy()
    if self.isReady("cleave"):
        self.cleave(enemy)
    else:
        self.shield()

i can’t see the gear of shield on the screen

Try to don’t move while using shield i had the same problem

How many hit points did you have where that code didn’t let you win?

Solved
Appreciated.@nick

Yeah, looks like somehow the shield didn’t get equipped, so you didn’t have the method. I guess you went to change your inventory and got the shield to equip properly?

I need some help because somehow it won’t cleave. Thanks :smile:
loop:
enemy = self.findNearestEnemy()
self.cleave(enemy)
self.shield()
self.attack(enemy)
self.shield()
self.shield()
self.shield()
self.shield()
self.shield()
self.shield()
self.cleave(enemy)

Never mind. I finally figured it out.

loop:
enemy = self.findNearestEnemy()
if self.isReady(“cleave”)
# Cleave the enemy!
self.cleave(enemy)
else:
# Else (if cleave isn’t ready), do your normal attack.
self.shield()