0.10.2.1 Background corruption

Areas with no corruption flag set: Otherwise, the corruption points (CP's) gained depend on a Danger Level (DL) in particular area. Refer to section 0.13.15 for the list of areas and their DL's.

Thanks to Vladimir Panteleev for the following information.

No other corruption occurs if:

The background corruption is applied once every N turns. If the PC is doomed, that's TWICE every N turns:

if (TurnNumber mod N=0) or (Doomed and (TurnNumber mod N=1)) then

(this is how mathematicians/programmers say once normally and twice with doomed intrinsic per N turns)

N is calculated based on the DL the PC is on.

CorruptionSpeed is a 5-element array

Put in words, N can be 2, 5, 10, 15 or 20. The smaller N, the faster the corruption. In the Infinite dungeon, N is 20 for levels 10-29, 15 for levels 30-49, 10 for levels 50-69, 5 for levels 70-89, and 2 for levels 90 and above. The exception is level I: 67 (the special level with MaLaKaI) where N is 20. For other areas, N is 20 for DL 10-19, 15 for DL 20-29, 10 for DL 30-39, 5 for DL 40-44, and 2 for DL 45 and above.

If the background corruption is to be applied on this turn:

Function Random(max) generates a whole random number between 1 and max.

Now, there's a bug in the corrupting code. This is how it SHOULD have worked.

However, only the first line is executed - the 90-day limit.

Being L+ decreases corruption by -20%, C- enhances corruption by +30%, lawful Unicorn-borns get another -10%.

Note that since background corruption is applied only by 1-2 points, the above do not affect its speed, but major corruptions, such as eating chaotic corpses etc. The "crowned as champion" status does not affect corruption speed. By the way, 1 corruption = 1000 CP's.