Why is this not working?

for anomalie in anomalies:
        if anomalie.type=="teleport":
            hero.special("teleport",endX,endY)

I am trying to counter teleports but there not working.
why???
(this stratagy is inspired by @nick )

Try something like this (you have to get endX and endY from the anomaly properties, and it helps to check if your teleport is ready):

for anomalie in hero.findActiveAnomalies():
    if anomalie.type == "teleport" and hero.isReady("teleport"):
        hero.special("teleport", anomalie.endX, anomalie.endY)
3 Likes

it is not working :frowning:
it does not do the teleport :((

Check the documentation of 'findActiveAnomalies". It should be name property.

so should i do anomalie.name or anomalie.type

Read the documentation. However I’ve made both work.