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

Function has_aggravatables

src/wizard.c:470–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470RESTORE_WARNINGS
471
472/* are there any monsters mon could aggravate? */
473boolean
474has_aggravatables(struct monst *mon)
475{
476 struct monst *mtmp;
477 boolean in_w_tower = In_W_tower(mon->mx, mon->my, &u.uz);
478
479 if (in_w_tower != In_W_tower(u.ux, u.uy, &u.uz))
480 return FALSE;
481
482 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
483 if (DEADMONSTER(mtmp))
484 continue;
485 if (in_w_tower != In_W_tower(mtmp->mx, mtmp->my, &u.uz))
486 continue;
487 if ((mtmp->mstrategy & STRAT_WAITFORU) != 0 || helpless(mtmp))
488 return TRUE;
489 }
490 return FALSE;
491}
492
493void
494aggravate(void)

Callers 1

spell_would_be_uselessFunction · 0.85

Calls 1

In_W_towerFunction · 0.85

Tested by

no test coverage detected