Crossfire Server  1.75.0
treasure Struct Reference

treasure is one element in a linked list, which together consist of a complete treasure-list. More...

#include <treasure.h>

Data Fields

sstring artifact
 If not null, the name of the artifact to apply to item. More...
 
uint8_t chance
 Percent chance for this item. More...
 
struct _change_arch change_arch
 Override default arch values if set in treasure list. More...
 
struct archetypeitem
 Which item this link can be. More...
 
int8_t list_magic_adjustment
 Adjust difficulty when generating the list pointed by name, ignored if list_magic_value is non zero. More...
 
uint8_t list_magic_value
 Set difficulty when generating the list pointed by name. More...
 
uint8_t magic
 Max magic bonus to item If the entry is a list transition, 'magic' contains the difficulty required to go to the new list. More...
 
sstring name
 If non null, name of list to use instead. More...
 
treasurenext
 Next treasure-item in a linked list. More...
 
treasurenext_no
 If this item was not generated, then continue here. More...
 
treasurenext_yes
 If this item was generated, use this link instead of ->next. More...
 
uint16_t nrof
 Random 1 to nrof items are generated. More...
 

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 do_single_item(), TreasureLoader::loadTreasure(), and treasure_free().

◆ chance

◆ 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.

Referenced by change_treasure(), and TreasureLoader::loadTreasure().

◆ 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 create_all_treasures(), create_one_treasure(), and TreasureLoader::loadTreasure().

◆ 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 create_all_treasures(), create_one_treasure(), and TreasureLoader::loadTreasure().

◆ 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 create_all_treasures(), create_one_treasure(), do_single_item(), dragon_ability_gain(), get_empty_treasure(), and TreasureLoader::loadTreasure().

◆ name

◆ next

◆ 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 cast_raise_dead_spell(), create_one_treasure(), do_single_item(), get_empty_treasure(), TreasureLoader::loadTreasure(), and pets_summon_object().


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