MCPcopy Create free account
hub / github.com/NetHack/NetHack / innately

Function innately

src/attrib.c:863–877  ·  view source on GitHub ↗

check whether particular ability has been obtained via innate attribute */

Source from the content-addressed store, hash-verified

861
862/* check whether particular ability has been obtained via innate attribute */
863staticfn int
864innately(long *ability)
865{
866 const struct innate *iptr;
867
868 if ((iptr = check_innate_abil(ability, FROMEXPER)) != 0)
869 return (iptr->ulevel == 1) ? FROM_ROLE : FROM_EXP;
870 if ((iptr = check_innate_abil(ability, FROMRACE)) != 0)
871 return FROM_RACE;
872 if ((*ability & FROMOUTSIDE) != 0L)
873 return FROM_INTR;
874 if ((*ability & FROMFORM) != 0L)
875 return FROM_FORM;
876 return FROM_NONE;
877}
878
879int
880is_innate(int propidx)

Callers 1

is_innateFunction · 0.85

Calls 1

check_innate_abilFunction · 0.85

Tested by

no test coverage detected