10 #define CHANCE_FOR_ARTIFACT 20 16 #define DIFFLEVELS 201 19 #define MAX_SPELLITEM_LEVEL 110 95 extern bool chance(
int a,
int b);
When object has been generated, send its information to player.
const char * name
If != NULL, copy this over the original arch name.
sstring name
If non null, name of list to use instead.
int8_t list_magic_adjustment
Adjust difficulty when generating the list pointed by name, ignored if list_magic_value is non zero...
Do minimal adjustments, don't make artifacts, and so on.
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
uint8_t chance
Percent chance for this item.
const char * title
If != NULL, copy this over the original arch title.
when a treasure got cloned from archlist, we want perhaps change some default values.
int16_t total_chance
If non-zero, only 1 item on this list should be generated.
treasure * next_no
If this item was not generated, then continue here.
bool chance(int a, int b)
Return true with a probability of a/b.
treasurelist represents one logical group of items to be generated together.
treasure * next_yes
If this item was generated, use this link instead of ->next.
sstring artifact
If not null, the name of the artifact to apply to item.
treasure * next
Next treasure-item in a linked list.
sstring name
Usually monster-name/combination.
treasure * items
Items in this list, linked.
uint8_t list_magic_value
Set difficulty when generating the list pointed by name.
uint16_t nrof
Random 1 to nrof items are generated.
treasure is one element in a linked list, which together consist of a complete treasure-list.
Don't generate bad/cursed items.
const char * slaying
If != NULL, copy this over the original arch slaying.
uint8_t magic
Max magic bonus to item If the entry is a list transition, 'magic' contains the difficulty required t...
struct archetype * item
Which item this link can be.
Generated items have the FLAG_STARTEQUIP.