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

Function find_damage

src/shk.c:4490–4506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4488
4489/* find any damage shopkeeper shkp could repair. returns NULL is none found */
4490staticfn struct damage *
4491find_damage(struct monst *shkp)
4492{
4493 struct damage *dam = svl.level.damagelist;
4494
4495 if (shk_impaired(shkp))
4496 return NULL;
4497
4498 while (dam) {
4499 if (repairable_damage(dam, shkp))
4500 return dam;
4501
4502 dam = dam->next;
4503 }
4504
4505 return NULL;
4506}
4507
4508staticfn void
4509discard_damage_struct(struct damage *dam)

Callers 1

shk_fixes_damageFunction · 0.85

Calls 2

shk_impairedFunction · 0.85
repairable_damageFunction · 0.85

Tested by

no test coverage detected