Crossfire Server, Trunk
treasurestruct Struct Reference

#include <treasure.h>

+ Collaboration diagram for treasurestruct:

Data Fields

sstring artifact
 
uint8_t chance
 
struct _change_arch change_arch
 
struct archtitem
 
int8_t list_magic_adjustment
 
uint8_t list_magic_value
 
uint8_t magic
 
sstring name
 
struct treasurestructnext
 
struct treasurestructnext_no
 
struct treasurestructnext_yes
 
uint16_t nrof
 

Detailed Description

treasure is one element in a linked list, which together consist of a complete treasure-list. Any arch can point to a treasure-list to get generated standard treasure when an archetype of that type is generated (from a generator)

Definition at line 63 of file treasure.h.

Field Documentation

◆ artifact

sstring treasurestruct::artifact

If not null, the name of the artifact to apply to item

Definition at line 65 of file treasure.h.

Referenced by equal(), generate_random_treasure(), and TreasureWrapper::setArtifact().

◆ chance

uint8_t treasurestruct::chance

Percent chance for this item

Definition at line 73 of file treasure.h.

Referenced by TreasureWrapper::displayName(), equal(), generate_random_treasure(), god_intervention(), and TreasureWrapper::setChance().

◆ change_arch

struct _change_arch treasurestruct::change_arch

Override default arch values if set in treasure list

Definition at line 72 of file treasure.h.

◆ item

◆ list_magic_adjustment

int8_t treasurestruct::list_magic_adjustment

Adjust difficulty when generating the list pointed by name, ignored if list_magic_value is non zero

Definition at line 67 of file treasure.h.

Referenced by equal(), generate_random_treasure(), TreasureWrapper::listMagicAdjustment(), and TreasureWrapper::setListMagicAdjustment().

◆ list_magic_value

uint8_t treasurestruct::list_magic_value

Set difficulty when generating the list pointed by name

Definition at line 68 of file treasure.h.

Referenced by equal(), generate_random_treasure(), TreasureWrapper::listMagicValue(), and TreasureWrapper::setListMagicValue().

◆ magic

uint8_t treasurestruct::magic

Max magic bonus to item If the entry is a list transition, 'magic' contains the difficulty required to go to the new list

Definition at line 74 of file treasure.h.

Referenced by dragon_ability_gain(), equal(), generate_random_treasure(), and TreasureWrapper::setMagic().

◆ name

◆ next

◆ next_no

struct treasurestruct* treasurestruct::next_no

◆ next_yes

struct treasurestruct* treasurestruct::next_yes

◆ nrof

uint16_t treasurestruct::nrof

Random 1 to nrof items are generated

Definition at line 79 of file treasure.h.

Referenced by TreasureWrapper::displayName(), equal(), generate_random_treasure(), pets_summon_object(), and TreasureWrapper::setNrof().


The documentation for this struct was generated from the following file: