progressive diseases

Technical and coding related questions.

Moderator: Board moderators

Post Reply
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

progressive diseases

Post by SilverNexus »

I was taking a look at disease.c, since I remembered thinking I had seen a logic error back in 1.11.0 (but that was before I knew much of anything about programming), and found what I remembered seeing

The description header in disease.c tells me this about lethargy:

Code: Select all

 * last_sp is the lethargy imposed on the player by the disease.  A lethargy
 *        of "1" reduces the players speed to 1% of its normal value.
Yet, later on in the code, to account for progressive diseases, this is used:

Code: Select all

symptom->last_sp = (int)(scale*disease->last_sp);
Since scale is used by all scaling factors, and since most factors are direct penalties, the percentage remaining of speed is scaled with the stat penalties, rather than the percent reduction.

I'm not sure of a quick fix: transposing disease->last_sp and scale, and dividing, rather than multiplying, took speed down really quickly, and was much too great a penalty, particularly for a persisting progressive disease.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Post Reply