Page 1 of 1
Invisibility
Posted: Thu Mar 13, 2008 6:19 am
by Zyx
Did anyone study the code of CSBwin to understand the effects of the invisibility spell?
Posted: Thu Mar 13, 2008 5:17 pm
by Sophia
Well, somewhat. When the spell is cast, it increments a variable called d.Invisible, and sets a timer (TT_71) that decrements this variable later on, so it has a limited effect.
As long as d.Invisible is set, the function Blocked(), which (as best as I can tell) tests if the monster can see the party, will automatically return 0 (that is, false) without peforming any further tests.
So, basically it does exactly what it would appear to: it prevents the monster from registering that it sees the party. The actual usage of Blocked() is buried in the AI functions, and I don't understand those at all, but you probably get the idea...

Posted: Thu Mar 13, 2008 7:59 pm
by Zyx
Thank you Sophia.
So if you keep at a distance of 2, monsters shouldn't attack you. I'll test it.
Posted: Thu Apr 10, 2008 10:16 pm
by TyGuy6
I just did a test with invisibility:
I was in a room with some wasps. They would attack me every few seconds and never leave the square next to me. When I cast 6326 (strong invisibility) they all stopped attacking, and randomly moved about. After a few seconds they returned and started attacking again. 1326 worked for much less time.
Apparently invisibility monsters at all ranges, even 1 square away, from seeing you, but it works for only a very short time.
Posted: Thu Apr 10, 2008 10:23 pm
by beowuuf
Does the timing stack with multiple spells or is each a separate instance?
Posted: Thu Apr 10, 2008 10:36 pm
by TyGuy6
The same test works for rock monsters, stone golems, vexirks, but not black flames (they see invisible). Sometimes the monster will move toward you if you are invisible, but it will never attack you.
Posted: Thu Apr 10, 2008 10:47 pm
by TyGuy6
I compared time of invisibility for 1 spell and about 7 quickly repeated spells, and it seems to be about the same. I think I would have worked up enough time to tell the difference, but in any case, my 900 mana wasn't enough to get more than a few seconds.
Posted: Thu Apr 10, 2008 11:24 pm
by Paul Stevens
beowuuf wrote:Does the timing stack with multiple spells or is each a separate instance?
Sophia says that it increments the variable.
So they should add up, sorta, kinda.
Unforturtunately, If you cast several spells
at the same time, they will all expire at
the same time. This could be (easily??)
changed so that they expire in series rather
than in parallel. I vote we do it.
The length of time the spell lasts is equal
to the 'Mastery' of the skill specified by the
spell. That is the logarithm (sorta) of the
experience. Units of 1/6th second. Perhaps
this should be multiplied by 2 or something.