Damage is now reduced to 50% (level 1, unchanged), 33% (level 2, was 20%), and 20% (level 3, was 10%), respectively.
This only applies to players, monster resists are unchanged. The purpose of this change is to make the mid and late game harder without unduly affecting the early game.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10554 c06c8d41-db1a-0410-9941-cceddc491573
KSOMJEXKNADB2QBITX7U4TGRO77WHVPMLPWUOERAUNJCRQKWJMXAC
NB6V3BVTHHYSSFYUDODAXEOWI2GOR54DSQ6O5NJBHPQTS3B4SG7QC
ZUC3U5KUXZOC2B2WWYGEZRVNLNJEJ7KL56UUMZY44VOOBG2H6ETAC
SUIDQIK6BZDJSYSFG6AK5A6K76EKGPKBKGGRCIU2AN6XOTCUHOBAC
46I36AWFYIFDOUPKFEMJSJTPQ27CQP7FNKOLT3ZOBUI6SF4EL7RQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
KBNY5FWKTEAKABFCLPC3QFKFSVZKAGXINPCIFV6WDSWFO4VCKNTAC
PWY4VZVHDLYL7UVNCCOW7BM7LYK2BOGTL23P75HXUJ33MHJPEJPQC
3EUPIYJNWOMOQBP2Z5SGSMWK453BXJD6KL2WFTR3NM565MEBYASAC
PR42BCP5BPRFD2MP5H6CIJP7E57Q6TKL6SOXZWFKMFVR2OZWHT7AC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
RM2JXW3ATVYRYHF3NMG5ALGI64OJ7IP2F3MDUDPUT5TBKSSN4KVQC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
ATDAT2AONG2BDLZFBJZB4WVNRUFQAU7RDIVUBAZ6STAV62NX5R4AC
RWCCZ64BG3HSOTM54ANIGENC3F3AIR42LJFRYSAKMCPCIUSOZY5QC
// Check if this is a resist that pretends to be boolean for damage
// purposes. Only electricity and sticky flame (napalm) do this at
// the moment; raw poison damage uses the normal formula.
int res_base = (is_boolean_resist(flavour) ? 2 : 1);
resistible /= res_base + res * res;
{
// Check if this is a resist that pretends to be boolean for damage
// purposes. Only electricity and sticky flame (napalm) do this at
// the moment; raw poison damage uses the normal formula.
const int bonus_res = (is_boolean_resist(flavour) ? 1 : 0);
// Use a new formula for players, but keep the old, more effective
// for monsters.
if (monster)
resistible /= 1 + bonus_res + res * res;
else
resistible /= resist_fraction(res, bonus_res);
}
// Returns by how much damage gets divided due to elemental resistances.
// Damage is reduced to, level 1 -> 1/2, level 2 -> 1/3, level 3 -> 1/5, or
// for "boolean" attacks (which use bonus_res = 1, sticky flame/electricity)
// to level 1 -> 1/3, level 2 -> 1/4, or level 3 -> 1/6.
// With the old formula (1 + resist * resist) this used to be
// 1/2, 1/5, 1/10 (normal) and 1/3, 1/6, 1/11 (boolean), respectively.
int resist_fraction(int resist, int bonus_res)
{
return ((3*resist + 1)/2 + bonus_res);
}