View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Shawn M Moore > TAEB > TAEB::World::Level



Annotate this POD


New  2
Open  1
View/Report Bugs

radiate CODE[, ARGS] -> (Str | (Str, Int))

This method will radiate in the eight NetHack directions. It will call the coderef for each tile encountered. The coderef will receive the tile as its argument. Once the coderef returns a true value, then the radiating stops and something will be returned:

If called in scalar context, the vi-key direction will be returned. If called in list context, the vi-key direction and distance will be returned.

The optional arguments are:

max (default: 80)

How far to radiate outwards. You probably can't throw a dagger all the way across the level, so you may want to decrease it to something more realistic. Like 3, har har. You're weak.

bouncy (default: false)

If true, the item will be assumed capable of bouncing.

stopper (default: sub { 0 })

If a path intersects a tile with this set, we will not allow that path.

allowself (default: 0)

Like stopper, but for our own tile (a common special case).

glyph_to_type str[, str] -> str

This will look up the given glyph (and if given color) and return a tile type for it. Note that monsters and items (and any other miss) will return "obscured".

glyph_is_monster str -> bool

Returns whether the given glyph is that of a monster.

glyph_is_item str -> bool

Returns whether the given glyph is that of an item.

syntax highlighting: