]> granicus.if.org Git - nethack/commitdiff
experience calculation
authorcohrs <cohrs>
Tue, 18 Jan 2005 15:01:10 +0000 (15:01 +0000)
committercohrs <cohrs>
Tue, 18 Jan 2005 15:01:10 +0000 (15:01 +0000)
fix the bug <Someone> noticed WRT experience calculation for nonphysical damage.

doc/fixes34.4
src/exper.c

index ff854eecd62c48e6b3e498ec6380a0614b5c91a4..ee81d66fc45132a6893bd2c0bd360c91b30ff309 100644 (file)
@@ -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
index f0cbeaeacebcb6e094ddcbf3536677470fdd7ddf..92b87d3c20b3d15ebb9274b4212f6455791f2716 100644 (file)
@@ -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;