Difference between revisions of "Talk:Cold resistance"

From NetHackWiki
Jump to navigation Jump to search
(Mistakes in cold resist calc. saving)
 
(saving)
Line 37: Line 37:
 
  1538. M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS,
 
  1538. M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS,
 
  1539. M3_INFRAVISIBLE|M3_INFRAVISION, CLR_WHITE),
 
  1539. M3_INFRAVISIBLE|M3_INFRAVISION, CLR_WHITE),
 +
 +
So we have a frost giant corpse with mlevel 10.
 +
Line 676 above states that if we

Revision as of 16:04, 5 September 2007

I just dove through the source code for two hours and conducted a small trial and I think this [1] is wrong. Here is the basis for my argument:

The relevant portion of eat.c#640

654.  	switch (type) {
655.  		case POISON_RES:
656.  			if ((ptr == &mons[PM_KILLER_BEE] ||
657.  					ptr == &mons[PM_SCORPION]) && !rn2(4))
658.  				chance = 1;
659.  			else
660.  				chance = 15;
661.  			break;
662.  		case TELEPORT:
663.  			chance = 10;
664.  			break;
665.  		case TELEPORT_CONTROL:
666.  			chance = 12;
667.  			break;
668.  		case TELEPAT:
669.  			chance = 1;
670.  			break;
671.  		default:
672.  			chance = 15;
673.  			break;
674.  	}
675.  
676.  	if (ptr->mlevel <= rn2(chance))
677.  		return;		/* failed die roll */

And an example from Monst.c#1532

1532.     MON("frost giant", S_GIANT,
1533. 	LVL(10, 12, 3, 10, -3), (G_NOHELL|G_GENO|G_SGROUP|1),
1534. 	A(ATTK(AT_WEAP, AD_PHYS, 2,12),
1535. 	  NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
1536. 	SIZ(2250, 750, 0, MS_BOAST, MZ_HUGE), MR_COLD, MR_COLD,
1537. 	M1_HUMANOID|M1_CARNIVORE,
1538. 	M2_GIANT|M2_STRONG|M2_ROCKTHROW|M2_NASTY|M2_COLLECT|M2_JEWELS,
1539. 	M3_INFRAVISIBLE|M3_INFRAVISION, CLR_WHITE),

So we have a frost giant corpse with mlevel 10. Line 676 above states that if we