… | |
… | |
60 | |
60 | |
61 | my $pl = $ob->contr; |
61 | my $pl = $ob->contr; |
62 | |
62 | |
63 | # save player stats and experience to restore it later |
63 | # save player stats and experience to restore it later |
64 | |
64 | |
|
|
65 | unless ($ob->{in_nimbus}) { |
65 | my $save = { |
66 | my $save = { |
66 | stats => stats_get $ob->stats, |
67 | stats => stats_get $ob->stats, |
67 | orig_stats => stats_get $pl->orig_stats, |
68 | orig_stats => stats_get $pl->orig_stats, |
68 | savebed => [$pl->get_savebed], |
69 | savebed => [$pl->get_savebed], |
69 | skill_exp => skills_get $ob, |
70 | skill_exp => skills_get $ob, |
70 | }; |
71 | }; |
71 | |
72 | |
72 | unless ($ob->{in_nimbus}) { |
|
|
73 | $ob->{in_nimbus} = $save; |
73 | $ob->{in_nimbus} = $save; |
74 | |
74 | |
75 | my $path = sprintf "%s/%s/%s/%s", |
75 | $ob->message ("\n"); |
76 | cf::localdir, cf::playerdir, $ob->name, "nimbus"; |
76 | $ob->message ("You start to feel dizzy.\n"); |
|
|
77 | $ob->message ("The world around you blurs.\n"); |
|
|
78 | $ob->message ("\n"); |
|
|
79 | } |
77 | |
80 | |
|
|
81 | my $path = sprintf "%s/%s/%s/%s", |
|
|
82 | cf::localdir, cf::playerdir, $ob->name, "nimbus"; |
|
|
83 | |
|
|
84 | if ($ob->map->path ne $path) { |
78 | my $nimbus = cf::map::get_map "/schmorp/nimbus"; |
85 | my $nimbus = cf::map::get_map "/schmorp/nimbus"; |
79 | $nimbus->set_path ($path); |
86 | $nimbus->set_path ($path); |
80 | $nimbus->set_unique (1); |
87 | $nimbus->set_unique (1); |
81 | |
88 | |
82 | $pl->set_savebed ($path, 24, 12); |
89 | $pl->set_savebed ($path, 24, 12); |
83 | |
|
|
84 | $ob->message ("\n"); |
|
|
85 | $ob->message ("You start to feel dizzy.\n"); |
|
|
86 | $ob->message ("The world around you blurs.\n"); |
|
|
87 | $ob->message ("\n"); |
|
|
88 | } |
90 | } |
89 | |
91 | |
90 | 0 |
92 | 0 |
91 | } |
93 | } |
92 | |
94 | |