… | |
… | |
328 | cf::POTION => 'potions', |
328 | cf::POTION => 'potions', |
329 | cf::SCROLL => 'scrolls', |
329 | cf::SCROLL => 'scrolls', |
330 | ); |
330 | ); |
331 | |
331 | |
332 | for ($self->{cauldron}->inv) { |
332 | for ($self->{cauldron}->inv) { |
|
|
333 | if (!$_->flag (cf::FLAG_IDENTIFIED) && $_->need_identify) { |
|
|
334 | die "unidentified"; |
333 | if ($_->flag (cf::FLAG_CURSED) || $_->flag (cf::FLAG_DAMNED)) { |
335 | } elsif ($_->flag (cf::FLAG_CURSED) || $_->flag (cf::FLAG_DAMNED)) { |
334 | die "cursed"; |
336 | die "cursed"; |
335 | } |
337 | } |
336 | |
338 | |
337 | if (my $k = $type_to_key{$_->type}) { |
339 | if (my $k = $type_to_key{$_->type}) { |
338 | push @{$ingreds->{$k}}, $_; |
340 | push @{$ingreds->{$k}}, $_; |
… | |
… | |
764 | sub to_object { |
766 | sub to_object { |
765 | my ($self) = @_; |
767 | my ($self) = @_; |
766 | |
768 | |
767 | my $obj = cf::object::new $self->{hash}->{arch}; |
769 | my $obj = cf::object::new $self->{hash}->{arch}; |
768 | |
770 | |
|
|
771 | $obj->item_power ($self->power_to_level); # there have to be strings attached! |
|
|
772 | |
769 | $obj->face ($self->{hash}{face}); |
773 | $obj->face ($self->{hash}{face}); |
770 | |
774 | |
771 | my $stats = $obj->stats; |
775 | my $stats = $obj->stats; |
772 | |
776 | |
773 | $stats->hp ($self->{hash}{spec}{regen}); |
777 | $stats->hp ($self->{hash}{spec}{regen}); |