Can The Precious ring cast invisibility on self?

With the provided example on The Precious ring, invisibility is cast on an enemy, but this doesn’t seem intuitive. Is it possibe to cast invisibility on self? If so, what is the syntax?

if (this.canCast(“invisibility”))
this.cast(“invisibility”, this.???);

I do agree that casting on an enemy seems a strange way to get yourself and your minions to attack other units first… :stuck_out_tongue_winking_eye:

It wouldn’t be “this.???” unless it is “enemy.???” :blush:

But yes, it should work as:

this.cast("invisibility", this);

or it might default to the caster in which case the following would also work:

this.cast("invisibility");

This worked, thanks! I highly recommend coupling this ring with a wristband that has the wait() function…

BTW, some sort of transparency effect to 50% would be great for this invisibility effect. Currently, there’s no indication that invisibility is cast.

Yeah, that’s the main idea. I’ll update the docs to make the example more illustrative. You usually do want to avoid attacking until the invisibility has worn off by checking if (this.hasEffect("hide") so that you don’t attack and cancel it early.

We did used to have it make the hero partially transparent, but the new WebGL graphics didn’t let us do that, so I got some new art that shows an invisibility eye above the target while it’s on. It’s ready now, I just have to put it in; it’ll be there soon, which will help a lot.

2 Likes