| 2628 | } |
| 2629 | |
| 2630 | unique_ptr<targeter> find_ability_targeter(ability_type ability) |
| 2631 | { |
| 2632 | switch (ability) |
| 2633 | { |
| 2634 | // Limited radius: |
| 2635 | case ABIL_ZIN_SANCTUARY: |
| 2636 | case ABIL_YRED_FATHOMLESS_SHACKLES: |
| 2637 | return make_unique<targeter_radius>(&you, LOS_DEFAULT, 4); |
| 2638 | case ABIL_TSO_CLEANSING_FLAME: |
| 2639 | case ABIL_WU_JIAN_HEAVENLY_STORM: |
| 2640 | return make_unique<targeter_radius>(&you, LOS_SOLID, 2); |
| 2641 | case ABIL_CHEIBRIADOS_TIME_BEND: |
| 2642 | case ABIL_USKAYAW_STOMP: |
| 2643 | return make_unique<targeter_maybe_radius>(&you, LOS_NO_TRANS, 1, 0, 1); |
| 2644 | |
| 2645 | // Multiposition: |
| 2646 | case ABIL_SPIDER_JUMP: |
| 2647 | case ABIL_EVOKE_BLINK: |
| 2648 | return make_unique<targeter_multiposition>(&you, find_blink_targets()); |
| 2649 | case ABIL_WATERY_GRAVE: |
| 2650 | return make_unique<targeter_watery_grave>(); |
| 2651 | case ABIL_BESTIAL_TAKEDOWN: |
| 2652 | return make_unique<targeter_bestial_takedown>(); |
| 2653 | case ABIL_WORD_OF_CHAOS: |
| 2654 | return make_unique<targeter_multiposition>(&you, find_chaos_targets(true)); |
| 2655 | case ABIL_ZIN_RECITE: |
| 2656 | return make_unique<targeter_multiposition>(&you, find_recite_targets()); |
| 2657 | case ABIL_FEDHAS_WALL_OF_BRIARS: |
| 2658 | return make_unique<targeter_multiposition>(&you, find_briar_spaces(true), AFF_YES); |
| 2659 | case ABIL_QAZLAL_ELEMENTAL_FORCE: |
| 2660 | return make_unique<targeter_multiposition>(&you, find_elemental_targets()); |
| 2661 | case ABIL_JIYVA_OOZEMANCY: |
| 2662 | return make_unique<targeter_walls>(&you, find_slimeable_walls()); |
| 2663 | case ABIL_SIPHON_ESSENCE: |
| 2664 | return make_unique<targeter_siphon_essence>(); |
| 2665 | case ABIL_DITHMENOS_SHADOWSLIP: |
| 2666 | return make_unique<targeter_multiposition>(&you, _find_shadowslip_affected(), AFF_YES); |
| 2667 | |
| 2668 | // Full LOS: |
| 2669 | case ABIL_QAZLAL_DISASTER_AREA: // Doesn't account for explosions hitting |
| 2670 | // areas behind glass. |
| 2671 | case ABIL_RU_APOCALYPSE: |
| 2672 | return make_unique<targeter_maybe_radius>(&you, LOS_NO_TRANS, LOS_RADIUS); |
| 2673 | case ABIL_LUGONU_CORRUPT: |
| 2674 | return make_unique<targeter_maybe_radius>(&you, LOS_DEFAULT, LOS_RADIUS); |
| 2675 | |
| 2676 | // Summons: |
| 2677 | case ABIL_TSO_SUMMON_DIVINE_WARRIOR: |
| 2678 | case ABIL_TROG_BROTHERS_IN_ARMS: |
| 2679 | case ABIL_KIKU_UNEARTH_WRETCHES: |
| 2680 | return make_unique<targeter_maybe_radius>(&you, LOS_NO_TRANS, 2, 0, 1); |
| 2681 | case ABIL_IGNIS_FOXFIRE: |
| 2682 | return make_unique<targeter_radius>(&you, LOS_NO_TRANS, 2, 0, 1); |
| 2683 | case ABIL_MAKHLEB_INFERNAL_SERVANT: |
| 2684 | if (you.has_mutation(MUT_MAKHLEB_MARK_CARNAGE)) |
| 2685 | return make_unique<targeter_multiposition>(&you, _find_carnage_servant_targets(), AFF_MAYBE); |
| 2686 | else |
| 2687 | return make_unique<targeter_maybe_radius>(&you, LOS_NO_TRANS, 2, 0, 1); |
no test coverage detected