NAME

NetHack::Item - parse and interact with a NetHack item

VERSION

Version 0.01 released 04 Jul 08

SYNOPSIS

use NetHack::Item;
my $item = NetHack::Item->new("f - a wand of wishing (0:3) named SWEET");

$item->slot           # f
$item->type           # wand
$item->specific_name  # SWEET
$item->charges        # 3

$item->spend_charge;
$item->wield;
$item->buc("blessed");

$item->charges        # 2
$item->is_wielded     # 1
$item->is_blessed     # 1
$item->is_cursed      # 0

DESCRIPTION

NetHack's items are complex beasts. This library attempts to control that complexity.

More doc soon.. in the meantime, use NetHack::Item->new("...")->meta->compute_all_applicable_methods to see what you can do with items. Note that items are automatically blessed into whichever subclass the item is (e.g. NetHack::Item::Weapon).

This library provides spoilers for all the items. However, they are not well-integrated into the rest of the code, since we need to add possibility tracking before that is useful. This is also why you can't see the identity of items just yet..

The code is a slight redesign of TAEB's item code.

SEE ALSO

http://sartak.org/code/TAEB/

AUTHOR

Shawn M Moore, <sartak@gmail.com>

Jesse Luehrs, <jluehrs2@uiuc.edu>

BUGS

No known bugs.

Please report any bugs through RT: email bug-nethack-item at rt.cpan.org, or browse http://rt.cpan.org/NoAuth/ReportBug.html?Queue=NetHack-Item.

COPYRIGHT AND LICENSE

Copyright 2008 Shawn M Moore and Jesse Luehrs.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.