[crossfire] Resistance calculation

Jochen Suckfüll crossfire at suckfuell.net
Sat May 17 10:19:10 CDT 2008


Hello!

I would like to suggest a change to the resistance calculation to treat
every additional protection and vulnerability relative to the current
resistance.

Currently, all positive resistances ("protection") are accumulated, and
the negative resistances ("vulnerability") separately.

Accumulation here means: resist_new = resist_old + (1 - resist_old) *
resist_item, where resist_item is the protection item.
(This means, the resist_item only applies to the remaining damage that
is not absorbed by the other items already in the calculation.)
Vulnerabilities are accumulated the same way with a positive
resist_item value.

The final resistance is the accumulated protection minus the accumulated
vulnerability.

This has several disadvantages in my opinion, e.g.:

* The damage factor from a vulnerability varies extremely, e.g. fire
-10 doesn't hurt a newbie without fire protection (resistance 0) not
much, but even breaks the fire immunity of a fireborn character.
* Characters like the serpentman that start with cold -50 cannot get
more than cold 50 even if they had a Cloak of Cold Immunity, since the
maximum resistance cannot exceed 100-(accumulated vulnerability value).
* In general, even a little vulnerability hurts characters with a high
resistance very much and renders the respective items almost unbearable.
* Potions have to be treated separately, to overcome the penalty by the
vulnerabilities.
* The resistance cannot be less than -100, although there is no
sane reason for this limit.


I suggest to simplify the code and treat every protection or
vulnerability the same by applying the accumulation formula above to
both positive and negative resistance items.

Advantages are:
* An item with resist -100 effectively doubles the damage taken, no
matter if there was any resistance at all. Immune characters remain
immune, a character with resist 30 will end up with resist 60, resist
-10 will become resist -120.
* That's very intuitive, because the resistance on the item tells
exactly how the resulting damage is changed.
* We could have spells that reduce a monster's resistance without
removing immunities. That adds another tactic element.
* Potions can be treated like any other resistance item, e.g. a potion
of resist +90 increases resist 20 to resist 92 and resist -100 to
resist 80.
* We can even have powerful items with resist -1000 (ten times the
current damage!) to counter other very positive features, without
breaking the balance or making the item unusable.
* In general there is a better control over the effects of resistance
values on items.

This change would make the current vulnerability values less painful:
Resist +50 and resist -50 would add up to resist +25. As a rule of
thumb, all vulnerability values should be at least doubled to remain as
effective as intuition tells us that the current values are. (This
probably means that many archetypes have to be fixed, but the task
sounds like a script could do that just fine.)

The current resistance calculation is implemented in
common/living.c:fix_object(). I would volunteer to make the required
changes to the trunk version (2.0) if there is a common agreement.


Jochen

(Brugel/Toarch @ metalforge)




More information about the crossfire mailing list