MCPcopy Index your code
hub / github.com/NetHack/NetHack / carry_obj_effects

Function carry_obj_effects

src/invent.c:1186–1196  ·  view source on GitHub ↗

* Some objects are affected by being carried. * Make those adjustments here. Called _after_ the object * has been added to the hero's or monster's inventory, * and after hero's intrinsics have been updated. */

Source from the content-addressed store, hash-verified

1184 * and after hero's intrinsics have been updated.
1185 */
1186void
1187carry_obj_effects(struct obj *obj)
1188{
1189 /* Cursed figurines can spontaneously transform when carried. */
1190 if (obj->otyp == FIGURINE) {
1191 if (obj->cursed && obj->corpsenm != NON_PM
1192 && !dead_species(obj->corpsenm, TRUE)) {
1193 attach_fig_transform_timeout(obj);
1194 }
1195 }
1196}
1197
1198DISABLE_WARNING_FORMAT_NONLITERAL
1199

Callers 2

mpickobjFunction · 0.85
addinv_core0Function · 0.85

Calls 2

dead_speciesFunction · 0.85

Tested by

no test coverage detected