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

Function extra_pref

src/worn.c:1338–1349  ·  view source on GitHub ↗

bias a monster's preferences towards armor that has special benefits. */

Source from the content-addressed store, hash-verified

1336
1337/* bias a monster's preferences towards armor that has special benefits. */
1338staticfn int
1339extra_pref(struct monst *mon, struct obj *obj)
1340{
1341 /* currently only does speed boots, but might be expanded if monsters
1342 * get to use more armor abilities
1343 */
1344 if (obj) {
1345 if (obj->otyp == SPEED_BOOTS && mon->permspeed != MFAST)
1346 return 20;
1347 }
1348 return 0;
1349}
1350
1351/*
1352 * Exceptions to things based on race.

Callers 1

m_dowear_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected