| 508 | } |
| 509 | |
| 510 | static 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 | |
| 544 | static void _vainglory_arrival() |
| 545 | { |
no test coverage detected