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()
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.
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
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)
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()