Atrinik Server  4.0
Data Fields
treasure Struct Reference

#include <treasure.h>

Data Fields

struct archetypeitem
 
shstr * name
 
struct treasurenext
 
struct treasurenext_yes
 
struct treasurenext_no
 
treasure_affinity_t * affinity
 
int magic_chance
 
int magic_fix
 
int artifact_chance
 
int magic
 
int difficulty
 
uint16_t nrof
 
int16_t chance_fix
 
uint8_t chance
 
struct treasure_attrs attrs
 

Detailed Description

Treasure is one element in a linked list, which together consists 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.

Definition at line 111 of file treasure.h.

Field Documentation

treasure_affinity_t* treasure::affinity

Treasure affinity.

Definition at line 128 of file treasure.h.

int treasure::artifact_chance

Chance to generate artifact from this.

Possible values of artifact chance:

  • -1: Ignore this value (default)
  • 0: NEVER make an artifact for this treasure.
  • 1 - 100: % chance of making an artifact from this treasure.

Definition at line 149 of file treasure.h.

struct treasure_attrs treasure::attrs

Override default arch values if set in treasure list

Definition at line 171 of file treasure.h.

uint8_t treasure::chance

Percent chance for this item

Definition at line 168 of file treasure.h.

int16_t treasure::chance_fix

Will overrule chance: if set (not -1) it will create 1 / chance_single

Definition at line 165 of file treasure.h.

int treasure::difficulty

If the entry is a list transition, it contains the difficulty required to go to the new list

Definition at line 158 of file treasure.h.

struct archetype* treasure::item

Which item this link can be

Definition at line 113 of file treasure.h.

int treasure::magic

Max magic bonus to item

Definition at line 152 of file treasure.h.

int treasure::magic_chance

Value from 0 - 1000. Chance of item is magic.

Definition at line 131 of file treasure.h.

int treasure::magic_fix

If this value is not 0, use this as fixed magic value. if it 0, look at magic to generate perhaps a random magic value

Definition at line 137 of file treasure.h.

shstr* treasure::name

If not NULL, name of list to use instead

Definition at line 116 of file treasure.h.

struct treasure* treasure::next

Next treasure item in a linked list

Definition at line 119 of file treasure.h.

struct treasure* treasure::next_no

If this item was not generated, then continue here

Definition at line 125 of file treasure.h.

struct treasure* treasure::next_yes

If this item was generated, use this link instead of ->next

Definition at line 122 of file treasure.h.

uint16_t treasure::nrof

Random 1 to nrof items are generated

Definition at line 161 of file treasure.h.


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