ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/Jeweler.pm
(Generate patch)

Comparing deliantra/maps/perl/Jeweler.pm (file contents):
Revision 1.8 by elmex, Tue Sep 12 17:03:02 2006 UTC vs.
Revision 1.9 by root, Tue Dec 12 16:59:34 2006 UTC

7The Jeweler skill helper module. 7The Jeweler skill helper module.
8 8
9=cut 9=cut
10 10
11package Jeweler; 11package Jeweler;
12
12use strict; 13use strict;
13use YAML; 14use YAML;
14 15
15=over 4 16=over 4
16 17
205 warn "WARNING: xp gain isn't > 0 in convesion '$outarch'\n"; 206 warn "WARNING: xp gain isn't > 0 in convesion '$outarch'\n";
206 return; 207 return;
207 } 208 }
208 209
209 unless ($outarchvalfact) { 210 unless ($outarchvalfact) {
210 warn "ERROR: source-arch-value-multiplier == 0 in convesion '$outarch'\n"; 211 warn "ERROR: source-arch-value-multiplier == 0 in conversion '$outarch'\n";
211 return; 212 return;
212 } 213 }
213 214
214 unless ($outarchvalfact >= 1) { 215 unless ($outarchvalfact >= 1) {
215 warn "WARNING: source-arch-value-multiplier < 1 in convesion '$outarch', results in more valuable output!\n"; 216 warn "WARNING: source-arch-value-multiplier < 1 in conversion '$outarch', results in more valuable output!\n";
216 } 217 }
217 218
218 my $archvalsum = $ingred->value ($ingr_grp, $srcarchname); 219 my $archvalsum = $ingred->value ($ingr_grp, $srcarchname);
219 $ingred->remove ($ingr_grp, $srcarchname); 220 $ingred->remove ($ingr_grp, $srcarchname);
220 221
234 } 235 }
235} 236}
236 237
237 238
238package Jeweler::CauldronHandler; 239package Jeweler::CauldronHandler;
240
239use strict; 241use strict;
240 242
241=head2 CauldronHandler 243=head2 CauldronHandler
242 244
243The Jeweler::CauldronHandler package, that helps you with handling the 245The Jeweler::CauldronHandler package, that helps you with handling the
718 720
719 $stats->$_ ($self->{hash}{stat}{lc $_}) 721 $stats->$_ ($self->{hash}{stat}{lc $_})
720 for qw/Str Dex Con Wis Cha Int Pow/; 722 for qw/Str Dex Con Wis Cha Int Pow/;
721 723
722 for (@Jeweler::RESISTS) { 724 for (@Jeweler::RESISTS) {
723 $obj->set_resistance ($_, $self->{hash}->{resist}->{$_}); 725 $obj->resistance ($_, $self->{hash}->{resist}->{$_});
724 } 726 }
725 727
726 $obj->flag (cf::FLAG_IDENTIFIED, 1); 728 $obj->flag (cf::FLAG_IDENTIFIED, 1);
727 729
728 return $obj; 730 return $obj;
925 $cost->{pearl} += ceil $sumvalue * $stat_split->[2] / max 1, $pearch->clone->value; 927 $cost->{pearl} += ceil $sumvalue * $stat_split->[2] / max 1, $pearch->clone->value;
926 $cost->{ruby} += ceil $sumvalue * $stat_split->[3] / max 1, $ruarch->clone->value; 928 $cost->{ruby} += ceil $sumvalue * $stat_split->[3] / max 1, $ruarch->clone->value;
927 $cost->{gem} += ceil $sumvalue * $stat_split->[4] / max 1, $diarch->clone->value; 929 $cost->{gem} += ceil $sumvalue * $stat_split->[4] / max 1, $diarch->clone->value;
928} 930}
929 931
930
931
932package Jeweler::Util; 932package Jeweler::Util;
933
933use strict; 934use strict;
934 935
935=head2 Util 936=head2 Util
936 937
937Some utility functions for the Jeweler skill. 938Some utility functions for the Jeweler skill.
959 return 0; 960 return 0;
960 } 961 }
961 } 962 }
962 963
963 remove ($_) for $obj->inv; 964 remove ($_) for $obj->inv;
964 $obj->remove; 965 $obj->destroy;
965 $obj->free;
966 return $cnt; 966 return $cnt;
967} 967}
968 968
969sub grep_for_match { 969sub grep_for_match {
970 my ($thing, @matchar) = @_; 970 my ($thing, @matchar) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines