Attack Damage

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

Attack Damage

Post by Paul Stevens »

While testing my new 'Game Version/Information' capability
I was using ConfluxII (I think). I entered the teleporter and
wound up in a place where Demons and Lord Chaos appeared.
No problem because I had no Heros selected and could walk all
over them. Then I chose 'Curse'. I kicked a Demon to death
and then kicked Lord Chaos. This caused an Assertion failure.
You won't see it because you are using the Release rather than
the Debug version of CSBwin. The Release version proceeds
as if no problem existed.

The error is caused by a problem in the original Atari code.
I saw it years ago and put in code to detect if it ever happened.
It finally has happened. A modifier to the Attack Damage is
used before being assigned a value. It only happens if a
variable that I call 'ThrowingDistance' is zero. Perhaps because
Curse's Dexterity is low or something.

So.....I added some diagrams of the Attack Damage Computation
to my documentation folder at dianneandpaul.net/CSBwin.
It will help answer questions (usually from newbies, who think
it should be easy to explain) about how damage is calculated.
If you take a peek at the diagram labeled 'DetermineAttackDamage'
you will see on the right side about one-third down a computation
that says D6 <- D6 + D1. But if the 'throwingDistance' was
zero then no value has been assigned to D6. If anyone can
provide a reasonable argument for how D6 should have been
computed I will will put it in the code. Otherwise, I will set
D6 to zero and put in lots of comments about how it was just
a guess.
Post Reply

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