MCPcopy Create free account
hub / github.com/crawl/crawl / effect

Method effect

crawl-ref/source/potion.cc:352–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 // it always prompts. XX maybe add info to the prompt?
351
352 bool effect(bool=true, int pow = 40, bool is_potion = true) const override
353 {
354 const bool was_attractive = you.duration[DUR_ATTRACTIVE] > 0;
355
356 mprf(MSGCH_DURATION, "You feel %sattractive to monsters.",
357 was_attractive ? "more " : "");
358
359 const int dur = _scale_pot_duration((20 + random2(pow)/2), is_potion);
360 you.increase_duration(DUR_ATTRACTIVE, dur);
361 return true;
362 }
363};
364
365

Callers

nothing calls this directly

Calls 4

mprfFunction · 0.85
_scale_pot_durationFunction · 0.85
random2Function · 0.85
increase_durationMethod · 0.80

Tested by

no test coverage detected