--- deliantra/server/ext/Jeweler.pm 2007/01/31 14:11:02 1.4 +++ deliantra/server/ext/Jeweler.pm 2007/01/31 15:53:17 1.5 @@ -330,6 +330,9 @@ ); for ($self->{cauldron}->inv) { + if ($_->flag (cf::FLAG_CURSED) || $_->flag (cf::FLAG_DAMNED)) { + die "cursed"; + } if (my $k = $type_to_key{$_->type}) { push @{$ingreds->{$k}}, $_; @@ -587,7 +590,6 @@ my $nr; $self->do_grep (sub { $nr += ($_[0]->nrof || 1); 0 }, @grepar); $costs->{$key} -= $nr; - warn "CHECKCOST $key <-> $nr -> $costs->{$key}\n"; } } @@ -647,7 +649,18 @@ my $costs = $self->calc_costs; my $desc = ""; my $lvl = $self->power_to_level (\$desc); - $pl->message ("costs: " . join (', ', map { "$_: " . sprintf "%.2f", $costs->{$_} } keys %$costs)); + my $emarch = cf::arch::find 'emerald'; + my $saarch = cf::arch::find 'sapphire'; + my $pearch = cf::arch::find 'pearl'; + my $ruarch = cf::arch::find 'ruby'; + my $diarch = cf::arch::find 'gem'; + my $scosts = $emarch->clone->value * $costs->{emerald} + + $saarch->clone->value * $costs->{sapphire} + + $pearch->clone->value * $costs->{pearl} + + $ruarch->clone->value * $costs->{ruby} + + $diarch->clone->value * $costs->{gem}; + + $pl->message ("costs: " . (join (', ', map { "$_: " . sprintf "%.2f", $costs->{$_} } keys %$costs)) . " (".($scosts / 5000)." royalties)"); $pl->message ("level: " . $desc); }