… | |
… | |
54 | } |
54 | } |
55 | |
55 | |
56 | # called when the player will likely die (modulo explore mode) |
56 | # called when the player will likely die (modulo explore mode) |
57 | # but before any stats/exp is changed |
57 | # but before any stats/exp is changed |
58 | sub on_player_death { |
58 | sub on_player_death { |
59 | my ($event) = @_; |
59 | my ($ob) = @_; |
60 | |
60 | |
61 | my $ob = $event->{who}; |
|
|
62 | my $pl = $ob->contr; |
61 | my $pl = $ob->contr; |
63 | |
62 | |
64 | # save player stats and experience to restore it later |
63 | # save player stats and experience to restore it later |
65 | |
64 | |
66 | my $save = { |
65 | my $save = { |