The Storm Siege Topic

Talk about anything Storm Siege!

How can you cast a spell on a specific enemy not just a random target?

Whenever i try to cast hero.cast("lightning", enemy.pos.x, enemy.pos.y) this comes up.
`

You can use enemy.x enemy.y. In this level, you can’t use enemy.pos.

What is storm siege?

It is a new arena for a new season.

Yeah I found out I cannot beat your code!

1 Like

Thanks I will try it.

Does heal heal your tower up?

image

No. They are resistant to spells.

When I run if enemy.health < leastHealth and enemy.type != "tower": my code does not respond and casts on a tower anyway. I am getting no error messages.

What kind of spell are you trying to cast? I was confused for a second when I was messing around with fireballs but realized it was targeting the skeletons as they were being summoned and not the towers.

1 Like

I’m using ("lightning", enemy.pos.x, enemy.pos.y)

Lightning can only target the strongest enemy; I don’t know why it would be targeting towers though.

Okay sorry i gave you my outdated code I am using hero.cast("lightning", enemy.x, enemy.y) and I am trying not to target towers. Sorry if my wording was off

Nvm about the strongest enemy; the guide is wrong and you can target positions… I don’t know why it would try to target a tower then.

I am using it in conjunction with if enemy.health < leastHealth and enemy.type != "tower":

what’s the code for casting your spells at the strongest enemy

Hey 123456789 welcome to the discourse! :partying_face: :partying_face: :partying_face:
You can look back at Computer Science 4 the Mad Mazer strikes back and use that code but convert it to attacking the strongest enemy instead of the weakest.