Invisibility
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Invisibility
Did anyone study the code of CSBwin to understand the effects of the invisibility spell?
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
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...
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...
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.
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.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Sophia says that it increments the variable.beowuuf wrote:Does the timing stack with multiple spells or is each a separate instance?
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.