diff options
author | gammafunk <gammafunk@gmail.com> | 2014-08-05 19:46:48 -0500 |
---|---|---|
committer | gammafunk <gammafunk@gmail.com> | 2014-08-05 19:56:32 -0500 |
commit | 28e3730145ef18d613acfa864b65aaffd953440d (patch) | |
tree | e94fce2527a84f6695bb389444e8a37dbba30b81 /crawl-ref/source/fight.cc | |
parent | 57b3fc90fd53850f7dc4e0e4fb6dd3d0ed48fedb (diff) | |
download | crawl-ref-28e3730145ef18d613acfa864b65aaffd953440d.tar.gz crawl-ref-28e3730145ef18d613acfa864b65aaffd953440d.zip |
Simplify out a function
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 37667323a8..5f4f71f6cd 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -528,7 +528,10 @@ static inline int get_resistible_fraction(beam_type flavour) * * FIXME: Does not (yet) handle draining (?), miasma, and other exotic attacks. * XXX: which other attacks? - * + * Damage is reduced to 1/2, 1/3, or 1/5 if res has values 1, 2, and 3, + * respectively. For "boolean" attacks like electricity and sticky flame, the + * damage is instead reduced to 1/3, 1/4, and 1/6 at resist levels 1, 2, and 3 + * respectively. * @param defender The victim of the attack. * @param flavour The type of attack having its damage adjusted. * (Does not necessarily imply the attack is a beam.) @@ -573,7 +576,7 @@ int resist_adjust_damage(const actor* defender, beam_type flavour, int res, else if (flavour == BEAM_NEG) resistible /= res * 2; else - resistible /= resist_fraction(res, bonus_res); + resistible /= (3 * res + 1) / 2 + bonus_res; } } else if (res < 0) |