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

Function abuse_dog

src/dog.c:1361–1393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1359}
1360
1361void
1362abuse_dog(struct monst *mtmp)
1363{
1364 if (!mtmp->mtame)
1365 return;
1366
1367 if (Aggravate_monster || Conflict)
1368 mtmp->mtame /= 2;
1369 else
1370 mtmp->mtame--;
1371
1372 if (mtmp->mtame && !mtmp->isminion)
1373 EDOG(mtmp)->abuse++;
1374
1375 if (!mtmp->mtame && mtmp->mleashed)
1376 m_unleash(mtmp, TRUE);
1377
1378 /* don't make a sound if pet is in the middle of leaving the level */
1379 /* newsym isn't necessary in this case either */
1380 if (mtmp->mx != 0) {
1381 if (mtmp->mtame && rn2(mtmp->mtame))
1382 yelp(mtmp);
1383 else
1384 growl(mtmp); /* give them a moment's worry */
1385
1386 if (!mtmp->mtame) {
1387 newsym(mtmp->mx, mtmp->my);
1388 if (mtmp->wormno) {
1389 redraw_worm(mtmp);
1390 }
1391 }
1392 }
1393}
1394
1395/*dog.c*/

Callers 5

hmon_hitmon_petFunction · 0.85
domove_swap_with_petFunction · 0.85
try_disarmFunction · 0.85
bhitmFunction · 0.85
kickdmgFunction · 0.85

Calls 6

m_unleashFunction · 0.85
rn2Function · 0.85
yelpFunction · 0.85
growlFunction · 0.85
newsymFunction · 0.85
redraw_wormFunction · 0.85

Tested by

no test coverage detected