Revision: | 1.4 |
Committed: | Fri Sep 8 17:33:55 2006 UTC (17 years, 9 months ago) by root |
Branch: | MAIN |
Changes since 1.3: | +1 -1 lines |
Log Message: | genaccess, take three |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #! perl |
2 | |||
3 | cf::register_attachment "sockpuppet" => | ||
4 | on_skill_attack => sub { | ||
5 | my ($self, $victim) = @_; | ||
6 | |||
7 | root | 1.3 | if ($victim->type == cf::PLAYER) { |
8 | my $stats = $victim->stats; | ||
9 | root | 1.1 | |
10 | root | 1.3 | $stats->exp ($stats->exp * 0.99999 - 1) |
11 | if $stats->exp > 2; | ||
12 | root | 1.1 | |
13 | root | 1.3 | $self->remove; |
14 | $self->free; | ||
15 | } else { | ||
16 | root | 1.4 | $victim->stats->hp (-1); |
17 | root | 1.3 | $victim->kill_object; |
18 | } | ||
19 | root | 1.1 | |
20 | cf::override; | ||
21 | }, | ||
22 | ; |