Difference between revisions of "Talk:Domestic animal"

From NetHackWiki
Jump to navigation Jump to search
(EDOG(mtmp)->hungrytime seems to be zero for non-tame monsters. why?)
 
(wrong line)
Line 1: Line 1:
 
==What food tames animals?==
 
==What food tames animals?==
 
The article claims hostile animals are not "hungry", and therefore accept only treats DOGFOOD (and not "acceptable food" ACCFOOD). However, I routinely tame cats and dogs with food rations. Somehow, [[Source:Dog.c#line781]] seems to evaluate EDOG(mtmp)->hungrytime as zero for non-tame monsters. Why? --[[User:Tjr|Tjr]]
 
The article claims hostile animals are not "hungry", and therefore accept only treats DOGFOOD (and not "acceptable food" ACCFOOD). However, I routinely tame cats and dogs with food rations. Somehow, [[Source:Dog.c#line781]] seems to evaluate EDOG(mtmp)->hungrytime as zero for non-tame monsters. Why? --[[User:Tjr|Tjr]]
 +
 +
:Looks like that branch is only taken if the monster is tame to begin with (line 776).  The relevant check for taming new pets seems to be on line 808 (don't tame if <code>dogfood(mtmp, obj) >= MANFOOD</code>, or equivalently tame if code>dogfood(mtmp, obj) <= ACCFOOD</code>).  --[[User:Ilmari Karonen|Ilmari Karonen]] 18:08, 6 January 2011 (UTC)

Revision as of 18:08, 6 January 2011

What food tames animals?

The article claims hostile animals are not "hungry", and therefore accept only treats DOGFOOD (and not "acceptable food" ACCFOOD). However, I routinely tame cats and dogs with food rations. Somehow, Source:Dog.c#line781 seems to evaluate EDOG(mtmp)->hungrytime as zero for non-tame monsters. Why? --Tjr

Looks like that branch is only taken if the monster is tame to begin with (line 776). The relevant check for taming new pets seems to be on line 808 (don't tame if dogfood(mtmp, obj) >= MANFOOD, or equivalently tame if code>dogfood(mtmp, obj) <= ACCFOOD). --Ilmari Karonen 18:08, 6 January 2011 (UTC)