… | |
… | |
36 | my $path = $map->path; |
36 | my $path = $map->path; |
37 | my $player = sprintf "%s/%s/", cf::localdir, cf::playerdir; |
37 | my $player = sprintf "%s/%s/", cf::localdir, cf::playerdir; |
38 | |
38 | |
39 | if ($player eq substr $path, 0, length $player) { |
39 | if ($player eq substr $path, 0, length $player) { |
40 | 1 |
40 | 1 |
41 | } elsif (grep $_->flag (cf::FLAG_UNIQUE) && $_->flag (cf::FLAG_IS_FLOOR), |
41 | } elsif (grep $_->flag (cf::FLAG_UNIQUE) && $_->flag (cf::FLAG_IS_FLOOR), $map->at ($x, $y)) { |
42 | $map->at ($x, $y)) { |
|
|
43 | 2 |
42 | 2 |
44 | } else { |
43 | } else { |
45 | 3 |
44 | 3 |
46 | } |
45 | } |
47 | } |
46 | } |
48 | |
47 | |
49 | my @maplevel = ( |
48 | my @maplevel = ( |
50 | "some mysterious hideout", |
49 | "some mysterious hideout", |
51 | "his home", |
50 | "his home", |
52 | "his guild", # wrong |
51 | "his guild", # wrong, this is any unique place !player-specific |
53 | "a nice place", |
52 | "a nice place", |
54 | "a place with monsters", |
53 | "a place with monsters", |
55 | ); |
54 | ); |
56 | |
55 | |
57 | my %invite; |
56 | my %invite; |
… | |
… | |
93 | |
92 | |
94 | $portal->set_slaying ($map->path); |
93 | $portal->set_slaying ($map->path); |
95 | $portal->set_hp ($x); |
94 | $portal->set_hp ($x); |
96 | $portal->set_sp ($y); |
95 | $portal->set_sp ($y); |
97 | |
96 | |
98 | $portal->apply ($pl, 0); |
97 | $portal->apply ($pl); |
99 | |
98 | |
100 | $portal->free; |
99 | $portal->free; |
101 | } |
100 | } |
102 | |
101 | |
103 | cf::register_command "accept-invitation" => 10, sub { |
102 | cf::register_command "accept-invitation" => 10, sub { |