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

Function _hell_effects

crawl-ref/source/stairs.cc:510–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510static void _hell_effects()
511{
512
513 // 50% chance at max piety
514 if (have_passive(passive_t::resist_hell_effects)
515 && x_chance_in_y(you.piety(), MAX_PIETY * 2))
516 {
517 simple_god_message(" power protects you from the chaos of Hell!", true);
518 return;
519 }
520
521 const bool loud = one_chance_in(6) && !silenced(you.pos());
522 string msg = getMiscString(loud ? "hell_effect_noisy"
523 : "hell_effect_quiet");
524 if (msg.empty())
525 msg = "Something hellishly buggy happens.";
526
527 mprf(MSGCH_HELL_EFFECT, "%s", msg.c_str());
528 if (loud)
529 noisy(15, you.pos());
530
531 switch (random2(3))
532 {
533 case 0:
534 you.doom(20);
535 break;
536 case 1:
537 drain_player(85, true, true);
538 break;
539 default:
540 break;
541 }
542}
543
544static void _vainglory_arrival()
545{

Callers 1

floor_transitionFunction · 0.85

Calls 14

have_passiveFunction · 0.85
x_chance_in_yFunction · 0.85
simple_god_messageFunction · 0.85
one_chance_inFunction · 0.85
silencedFunction · 0.85
getMiscStringFunction · 0.85
mprfFunction · 0.85
noisyFunction · 0.85
random2Function · 0.85
drain_playerFunction · 0.85
pietyMethod · 0.80
posMethod · 0.45

Tested by

no test coverage detected