OSDN Git Service

Merge branch 'master' of git.osdn.net:/gitroot/hengband/hengband
[hengband/hengband.git] / src / object-activation / activation-charm.c
1 #include "object-activation/activation-charm.h"
2 #include "spell-kind/spells-charm.h"
3 #include "spell-kind/spells-sight.h"
4 #include "target/target-getter.h"
5
6 bool activate_charm_animal(player_type *user_ptr)
7 {
8     DIRECTION dir;
9     if (!get_aim_dir(user_ptr, &dir))
10         return FALSE;
11
12     (void)charm_animal(user_ptr, dir, user_ptr->lev);
13     return TRUE;
14 }
15
16 bool activate_charm_undead(player_type *user_ptr)
17 {
18     DIRECTION dir;
19     if (!get_aim_dir(user_ptr, &dir))
20         return FALSE;
21
22     (void)control_one_undead(user_ptr, dir, user_ptr->lev);
23     return TRUE;
24 }
25
26 bool activate_charm_other(player_type *user_ptr)
27 {
28     DIRECTION dir;
29     if (!get_aim_dir(user_ptr, &dir))
30         return FALSE;
31
32     (void)charm_monster(user_ptr, dir, user_ptr->lev * 2);
33     return TRUE;
34 }
35
36 bool activate_charm_animals(player_type *user_ptr)
37 {
38     (void)charm_animals(user_ptr, user_ptr->lev * 2);
39     return TRUE;
40 }
41
42 bool activate_charm_others(player_type *user_ptr)
43 {
44     (void)charm_monsters(user_ptr, user_ptr->lev * 2);
45     return TRUE;
46 }