| 467 | } |
| 468 | |
| 469 | bool effect(bool=true, int pow = 40, bool is_potion = true) const override |
| 470 | { |
| 471 | if (you.backlit()) |
| 472 | { |
| 473 | vector<const char *> afflictions; |
| 474 | if (you.haloed() && !you.umbraed()) |
| 475 | afflictions.push_back("halo"); |
| 476 | if (player_harmful_contamination()) |
| 477 | afflictions.push_back("magical contamination"); |
| 478 | if (you.duration[DUR_CORONA]) |
| 479 | afflictions.push_back("corona"); |
| 480 | if (you.duration[DUR_STICKY_FLAME]) |
| 481 | afflictions.push_back("liquid flames"); |
| 482 | if (you.duration[DUR_QUAD_DAMAGE]) |
| 483 | afflictions.push_back("!!!QUAD DAMAGE!!!"); |
| 484 | if (you.form == transformation::flux) |
| 485 | afflictions.push_back("form"); |
| 486 | mprf(MSGCH_DURATION, |
| 487 | "You become %stransparent, but the glow from %s " |
| 488 | "%s prevents you from becoming completely invisible.", |
| 489 | you.duration[DUR_INVIS] ? "more " : "", |
| 490 | you.haloed() && you.halo_radius() == -1 ? "the" : "your", |
| 491 | comma_separated_line(afflictions.begin(), |
| 492 | afflictions.end()).c_str()); |
| 493 | } |
| 494 | else |
| 495 | { |
| 496 | mprf(MSGCH_DURATION, !you.duration[DUR_INVIS] |
| 497 | ? "You fade into invisibility!" |
| 498 | : "You fade further into invisibility."); |
| 499 | } |
| 500 | |
| 501 | const int dur = _scale_pot_duration(15 + random2(pow), is_potion); |
| 502 | you.increase_duration(DUR_INVIS, dur, 100); |
| 503 | return true; |
| 504 | } |
| 505 | |
| 506 | bool check_known_quaff() const override |
| 507 | { |
nothing calls this directly
no test coverage detected