Crossfire Server, Trunk
treasure Struct Reference

#include <treasure.h>

+ Collaboration diagram for treasure:

Data Fields

sstring artifact
 
uint8_t chance
 
struct _change_arch change_arch
 
struct archetypeitem
 
int8_t list_magic_adjustment
 
uint8_t list_magic_value
 
uint8_t magic
 
sstring name
 
treasurenext
 
treasurenext_no
 
treasurenext_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 treasure::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 treasure::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 treasure::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 treasure::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 treasure::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 treasure::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

treasure* treasure::next_no

◆ next_yes

treasure* treasure::next_yes

◆ nrof

uint16_t treasure::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: