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

Method effect

crawl-ref/source/potion.cc:377–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 }
376
377 bool effect(bool=true, int pow = 40, bool is_potion = true) const override
378 {
379 fly_player(pow);
380 // Try to sync up the flying and the enlightenment.
381 // ...sorry about this.
382 const int dur = max(you.duration[DUR_FLIGHT],
383 max(you.duration[DUR_ENLIGHTENED],
384 _scale_pot_duration(25 + random2(pow), is_potion)));
385
386 you.duration[DUR_ENLIGHTENED] = dur;
387 return true;
388 }
389};
390
391class PotionCancellation : public PotionEffect

Callers

nothing calls this directly

Calls 3

fly_playerFunction · 0.85
_scale_pot_durationFunction · 0.85
random2Function · 0.85

Tested by

no test coverage detected