| 2608 | } |
| 2609 | |
| 2610 | bool vampire_mesmerism_check(monster& mon) |
| 2611 | { |
| 2612 | if (you.form == transformation::vampire && you.can_see(mon) && mon.can_see(you) |
| 2613 | && (mon.holiness() & (MH_NATURAL | MH_DEMONIC | MH_HOLY)) |
| 2614 | && !one_chance_in(4)) |
| 2615 | { |
| 2616 | if (mon.check_willpower(&you, get_form()->get_effect_chance()) <= 0) |
| 2617 | { |
| 2618 | mprf("%s loses %s in your eye%s.", |
| 2619 | mon.name(DESC_THE).c_str(), |
| 2620 | mon.pronoun(PRONOUN_REFLEXIVE).c_str(), |
| 2621 | you.has_mutation(MUT_MISSING_EYE) ? "" : "s"); |
| 2622 | mon.daze(random_range(3, 5)); |
| 2623 | } |
| 2624 | else |
| 2625 | { |
| 2626 | mprf("%s is briefly mesmerised by your gaze.", mon.name(DESC_THE).c_str()); |
| 2627 | // This works even if called during the stealth check, whereas a 1-turn daze |
| 2628 | // would wear off with no effect and produce extra messages on top of that. |
| 2629 | mon.speed_increment -= 10; |
| 2630 | } |
| 2631 | |
| 2632 | return true; |
| 2633 | } |
| 2634 | |
| 2635 | return false; |
| 2636 | } |
no test coverage detected