15 #define W(x, n) { if (item->x) { stringbuffer_append_printf(buf, "%s" n "\n", indentItems.c_str(), item->x); } } 18 std::string indentItems(indent);
25 W(list_magic_value,
"list_magic_value %d");
26 W(list_magic_adjustment,
"list_magic_adjustment %d");
28 W(change_arch.name,
"change_name %s");
29 W(change_arch.title,
"change_title %s");
30 W(change_arch.slaying,
"change_slaying %s");
static void writeItem(const treasure *item, const std::string &indent, StringBuffer *buf)
virtual void write(const treasurelist *list, StringBuffer *buf)
Write the specified asset to the StringBuffer.
sstring name
More definite name, like "generate_kobold".
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Append a formatted string to a string buffer instance.
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Append a string to a string buffer instance.
uint8_t chance
Percent chance for this item.
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.
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.
treasure * next
Next treasure-item in a linked list.
sstring name
Usually monster-name/combination.
treasure * items
Items in this list, linked.
treasure is one element in a linked list, which together consist of a complete treasure-list.
struct archetype * item
Which item this link can be.
A buffer that will be expanded as content is added to it.
This is one artifact, ie one special item.