Invisibility

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Invisibility

Post by Zyx »

Did anyone study the code of CSBwin to understand the effects of the invisibility spell?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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... :)
User avatar
Zyx
DSA Master
Posts: 2592
Joined: Mon Jun 05, 2000 1:53 pm
Location: in the mind
Contact:

Post by Zyx »

Thank you Sophia.
So if you keep at a distance of 2, monsters shouldn't attack you. I'll test it.
User avatar
TyGuy6
Craftsman
Posts: 140
Joined: Mon Aug 01, 2005 8:20 pm
Location: U.S.

Post 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.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Does the timing stack with multiple spells or is each a separate instance?
User avatar
TyGuy6
Craftsman
Posts: 140
Joined: Mon Aug 01, 2005 8:20 pm
Location: U.S.

Post 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.
User avatar
TyGuy6
Craftsman
Posts: 140
Joined: Mon Aug 01, 2005 8:20 pm
Location: U.S.

Post 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.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post 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.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”