/* * Item generator 2, a simpler approch to the creation system * * File: Generator.Gold.c * Descr: This file holds the generation of Gold. * nothing special =) * */ #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <ctype.h> #include <stdio.h> #include <string.h> #include <time.h> #include "merc.h" #include "interp.h" #include "magic.h" #include "recycle.h" #include "tables.h" OBJ_DATA * new_gen_gold (OBJ_DATA * obj, int level) { char prefix_full[MSL]; int gold_num; gold_num = level * number_range(1, 100); obj = create_object (get_obj_index (990), 0); sprintf (prefix_full, "%d silver pieces", gold_num); obj->short_descr = str_dup (prefix_full); obj->value[0] = gold_num; return(obj); }