From: cohrs Date: Tue, 18 Jan 2005 15:01:10 +0000 (+0000) Subject: experience calculation X-Git-Tag: MOVE2GIT~1349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0a1a6e5b6c51e7b67514d98dae7444f334d3a1b;p=nethack experience calculation fix the bug noticed WRT experience calculation for nonphysical damage. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index ff854eecd..ee81d66fc 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -80,6 +80,7 @@ finding "something" posing as a statue while Blind should map_invisible() adding more candles than required to total 7 to a candelabrum which already had between 1 and 6 gave an ungrammatical message give correct message when a spellcasting monster summons other monsters +correct experience calculation for monsters that cause nonphysical damage Platform- and/or Interface-Specific Fixes diff --git a/src/exper.c b/src/exper.c index f0cbeaeac..92b87d3c2 100644 --- a/src/exper.c +++ b/src/exper.c @@ -74,7 +74,7 @@ experience(mtmp, nk) /* return # of exp points for mtmp after nk killed */ if(tmp2 > AD_PHYS && tmp2 < AD_BLND) tmp += 2*mtmp->m_lev; else if((tmp2 == AD_DRLI) || (tmp2 == AD_STON) || (tmp2 == AD_SLIM)) tmp += 50; - else if(tmp != AD_PHYS) tmp += mtmp->m_lev; + else if(tmp2 != AD_PHYS) tmp += mtmp->m_lev; /* extra heavy damage bonus */ if((int)(ptr->mattk[i].damd * ptr->mattk[i].damn) > 23) tmp += mtmp->m_lev;