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

Function num_horns

src/mondata.c:677–695  ·  view source on GitHub ↗

number of horns this type of monster has on its head */

Source from the content-addressed store, hash-verified

675
676/* number of horns this type of monster has on its head */
677int
678num_horns(struct permonst *ptr)
679{
680 switch (monsndx(ptr)) {
681 case PM_HORNED_DEVIL: /* ? "more than one" */
682 case PM_MINOTAUR:
683 case PM_ASMODEUS:
684 case PM_BALROG:
685 return 2;
686 case PM_WHITE_UNICORN:
687 case PM_GRAY_UNICORN:
688 case PM_BLACK_UNICORN:
689 case PM_KI_RIN:
690 return 1;
691 default:
692 break;
693 }
694 return 0;
695}
696
697/* does monster-type deal out a particular type of damage from a particular
698 type of attack? */

Callers 2

canwearobjFunction · 0.85
break_armorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected