and add rotting resistance for rotting-flavored very ugly things.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10741 c06c8d41-db1a-0410-9941-cceddc491573
CUWG6VMY5WJRKAMJDFMKPPSMFWS6AEYV3JJRGVIV3QLJNJBK752QC
LV6V7V62RQUOXYH2ZL7P5VHLXZOFMAMUSYRBEDIVPP27ISCEHFWAC
4OKEEU32EGHIDAJ75GH3USSQHQPZBDZVC7TOP7ALMHZRUFPE5WEQC
7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC
resists.rotting = false;
int base_rand = 6; if (resists.sticky_flame) base_rand--;
int base_rand = 6;
if (resists.sticky_flame)
base_rand--;
int res = 0;
switch (random2(base_rand))
do
case 0: resists.elec++; break;
case 0:
resists.elec++;
break;
switch (random2(7)) { case 0: resists.elec++; res++; break;
switch (random2(7))
{
res++;
case 1: resists.poison++; break;
case 1:
resists.poison++;
case 1: resists.poison++; res++; break;
case 2: resists.fire++; break;
case 2:
resists.fire++;
case 2: resists.fire++; res++; break;
case 3: resists.cold++; break;
case 3:
resists.cold++;
case 3: resists.cold++; res++; break; case 4: resists.acid++; res++; break;
case 4:
resists.acid++;
case 4: resists.acid++; break;
case 5: if (!resists.sticky_flame) { resists.sticky_flame = true; res++; } break;
case 5:
if (!resists.sticky_flame)
resists.sticky_flame = true;
}
case 5: resists.sticky_flame = true; break;
case 6: if (!resists.rotting) { resists.rotting = true; res++; } break; }
case 6:
if (!resists.rotting)
resists.rotting = true;
while (res == 0);
// Guarantee certain resistances for certain attack flavours, // including the upgraded ones.
// Guarantee certain resistances for certain attack flavours,
// including the upgraded ones.
// Guarantee certain resistances for upgraded attack flavours.
else if (att_flav == AF_ACID && !resists.acid) resists.acid++;
else if (att_flav == AF_ACID && !resists.acid)
else if (att_flav == AF_ROT && !resists.rotting) resists.rotting = true;
else if (att_flav == AF_ROT && !resists.rotting)