… | |
… | |
48 | |
48 | |
49 | my @ring = $ingred->get_ring; |
49 | my @ring = $ingred->get_ring; |
50 | my @rings = map { Jeweler::Object->new (object => $_) } @ring; |
50 | my @rings = map { Jeweler::Object->new (object => $_) } @ring; |
51 | |
51 | |
52 | @rings >= 2 |
52 | @rings >= 2 |
53 | or return $pl->reply (undef, "You slap yourself, you forgot to put at least 2 jewels in!"); |
53 | or return $pl->message ("You slap yourself, you forgot to put at least 2 jewels in!"); |
54 | |
54 | |
55 | my $input_level = 0; |
55 | my $input_level = 0; |
56 | my $value; |
56 | my $value; |
57 | for (@rings) { |
57 | for (@rings) { |
58 | $input_level = max ($_->power_to_level, $input_level); |
58 | $input_level = max ($_->power_to_level, $input_level); |
… | |
… | |
61 | |
61 | |
62 | my $ring = shift @rings; |
62 | my $ring = shift @rings; |
63 | $ring->improve_by_ring (@rings); |
63 | $ring->improve_by_ring (@rings); |
64 | |
64 | |
65 | if ($do_analyze) { |
65 | if ($do_analyze) { |
66 | $pl->reply (undef, "You want to make a " . $ring->to_string . ": " . $ring->analyze ($sk, $pl, $input_level)); |
66 | $pl->message ("You want to make a " . $ring->to_string . ": " . $ring->analyze ($sk, $pl, $input_level)); |
67 | $ring->wiz_analyze ($pl) |
67 | $ring->wiz_analyze ($pl) |
68 | if $pl->flag (cf::FLAG_WIZ); |
68 | if $pl->flag (cf::FLAG_WIZ); |
69 | return; |
69 | return; |
70 | } |
70 | } |
71 | |
71 | |
… | |
… | |
89 | |
89 | |
90 | if ($r <= $ch or $pl->flag (cf::FLAG_WIZ)) { |
90 | if ($r <= $ch or $pl->flag (cf::FLAG_WIZ)) { |
91 | $exp = $ring->projected_exp ($input_level); |
91 | $exp = $ring->projected_exp ($input_level); |
92 | |
92 | |
93 | $pl->change_exp ($exp, "jeweler", cf::SK_EXP_SKILL_ONLY); |
93 | $pl->change_exp ($exp, "jeweler", cf::SK_EXP_SKILL_ONLY); |
|
|
94 | $pl->message ( |
94 | $pl->message ("You succeed and get $exp experience points."); |
95 | "You succeed and get " . int ($exp) . " experience points."); |
95 | $make_status = "succeeded"; |
96 | $make_status = "succeeded"; |
96 | |
97 | |
97 | $ring->set_value ($value * 0.8); # 20% of the input values will vanish |
98 | $ring->set_value ($value * 0.8); # 20% of the input values will vanish |
98 | |
99 | |
99 | } else { |
100 | } else { |
… | |
… | |
149 | if ($ringo->has_resist ($1)) { |
150 | if ($ringo->has_resist ($1)) { |
150 | $self->map->trigger ( |
151 | $self->map->trigger ( |
151 | $cfg->{connection}, |
152 | $cfg->{connection}, |
152 | $cfg->{state} |
153 | $cfg->{state} |
153 | ); |
154 | ); |
|
|
155 | $obj->decrease (1); |
154 | cf::override; |
156 | cf::override; |
155 | } |
157 | } |
156 | } |
158 | } |
157 | } |
159 | } |
158 | } |
160 | } |
… | |
… | |
193 | unless ($Jeweler::CFG->{conversions}->{lc $1}) { |
195 | unless ($Jeweler::CFG->{conversions}->{lc $1}) { |
194 | $pl->message ("You don't know how to make '$1', is does such a thing even exist?"); |
196 | $pl->message ("You don't know how to make '$1', is does such a thing even exist?"); |
195 | return |
197 | return |
196 | } |
198 | } |
197 | |
199 | |
198 | Jeweler::simple_converter ($player, $ingred, $chdl, $1); |
200 | Jeweler::simple_converter ( |
|
|
201 | $player, $ingred, $chdl, $1, |
|
|
202 | cf::exp_to_level ($sk->stats->exp)); |
199 | |
203 | |
200 | } elsif ($msg =~ m/^\s*merge\s*analy[sz]e\s*$/i) { |
204 | } elsif ($msg =~ m/^\s*merge\s*analy[sz]e\s*$/i) { |
201 | merge ($chdl, $sk, $pl, 1); |
205 | merge ($chdl, $sk, $pl, 1); |
202 | |
206 | |
203 | } elsif ($msg =~ m/^\s*merge\s*$/i) { |
207 | } elsif ($msg =~ m/^\s*merge\s*$/i) { |