… | |
… | |
14 | $portal->stats->sp (0); |
14 | $portal->stats->sp (0); |
15 | |
15 | |
16 | $portal->apply ($ob); |
16 | $portal->apply ($ob); |
17 | |
17 | |
18 | $portal->free; |
18 | $portal->free; |
|
|
19 | |
|
|
20 | 1 |
19 | }; |
21 | }; |
20 | |
22 | |
21 | cf::register_command wizpass => 0, sub { |
23 | cf::register_command wizpass => 0, sub { |
22 | my ($ob, $arg) = @_; |
24 | my ($ob, $arg) = @_; |
23 | |
25 | |
… | |
… | |
30 | $ob->reply (undef, |
32 | $ob->reply (undef, |
31 | $new_val |
33 | $new_val |
32 | ? "You will now walk through walls.\n" |
34 | ? "You will now walk through walls.\n" |
33 | : "You will now be stopped by walls.\n", |
35 | : "You will now be stopped by walls.\n", |
34 | ); |
36 | ); |
|
|
37 | |
|
|
38 | 1 |
35 | }; |
39 | }; |
36 | |
40 | |
37 | cf::register_command wizcast => 0, sub { |
41 | cf::register_command wizcast => 0, sub { |
38 | my ($ob, $arg) = @_; |
42 | my ($ob, $arg) = @_; |
39 | |
43 | |
… | |
… | |
46 | $ob->reply (undef, |
50 | $ob->reply (undef, |
47 | $new_val |
51 | $new_val |
48 | ? "You can now cast spells anywhere." |
52 | ? "You can now cast spells anywhere." |
49 | : "You now cannot cast spells in no-magic areas.", |
53 | : "You now cannot cast spells in no-magic areas.", |
50 | ); |
54 | ); |
|
|
55 | |
|
|
56 | 1 |
51 | }; |
57 | }; |
52 | |
58 | |
53 | cf::register_command wizlook => 0, sub { |
59 | cf::register_command wizlook => 0, sub { |
54 | my ($ob, $arg) = @_; |
60 | my ($ob, $arg) = @_; |
55 | |
61 | |
56 | return unless $ob->may ("command_wizlook"); |
62 | return unless $ob->may ("command_wizlook"); |
57 | |
63 | |
58 | $ob->clear_los; |
64 | $ob->clear_los; |
59 | |
65 | |
60 | $ob->reply (undef, "You can temporarily see through walls."); |
66 | $ob->reply (undef, "You can temporarily see through walls."); |
|
|
67 | |
|
|
68 | 1 |
61 | }; |
69 | }; |
62 | |
70 | |
|
|
71 | for my $command (qw(reset teleport summon arrest kick banish)) { |
|
|
72 | my $method = "command_$command"; |
|
|
73 | |
|
|
74 | cf::register_command $command => 0, sub { |
|
|
75 | my ($ob, $arg) = @_; |
|
|
76 | |
|
|
77 | return unless $ob->may ($method); |
|
|
78 | |
|
|
79 | $ob->$method ($arg) |
|
|
80 | }; |
|
|
81 | } |
|
|
82 | |