#!perl cf::object::attachment "ring_adornment_shop", on_reset => sub { my ($ob) = @_; my $o = cf::object::new 'ring'; $o->flag (cf::FLAG_IDENTIFIED, 1); $o->flag (cf::FLAG_UNPAID, 1); $o->set_animation (cf::rndm $o->num_animations); $o->insert_ob_in_map_at ($ob->map, undef, cf::INS_ABOVE_FLOOR_ONLY, $ob->x, $ob->y); cf::override; 1 }; cf::object::attachment "amulet_adornment_shop", on_reset => sub { my ($ob) = @_; my $arch = ('amulet', 'amulet_gray', 'amulet_white')[cf::rndm 3]; my $o = cf::object::new $arch; $o->flag (cf::FLAG_IDENTIFIED, 1); $o->flag (cf::FLAG_UNPAID, 1); $o->insert_ob_in_map_at ($ob->map, undef, cf::INS_ABOVE_FLOOR_ONLY, $ob->x, $ob->y); cf::override; 1 };