Manual:DIL Manual/bonusband
Jump to navigation
Jump to search
Contents
bonusband
Field (integer, read-only; on a zoneptr).
z.bonusband : integer
The zone's treasure band, as its header gives it (bonusband, see the zone information section): BONUS_AVERAGE (0) to BONUS_ARTIFACT (7), the scale items' bonuses use, or BONUS_NOT_APPLICABLE (-1) for a zone outside the bands (towns, guilds, the game's machinery), which is also what a zone without the field has.
Notes
- It can't be assigned (vmc: "Illegal lvalue"); it comes from the zone file.
- On a null zoneptr it fails.
Example
dilbegin integer treasure_band(u : unitptr);
var
z : zoneptr;
code
{
z := findzone(u.zoneidx);
if (z == null)
return (BONUS_NOT_APPLICABLE);
return (z.bonusband);
}
dilend
The treasure band of the zone a unit comes from.