|
Atrinik Server 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| static void | check_formulae () |
| static archetype * | find_treasure_by_name (treasure *t, char *name, int depth) |
| static long | find_ingred_cost (const char *name) |
| static const char * | ingred_name (const char *name) |
| static int | numb_ingred (const char *buf) |
| static recipelist * | get_random_recipelist () |
| static recipelist * | init_recipelist () |
| static recipe * | get_empty_formula () |
| recipelist * | get_formulalist (int i) |
| static int | check_recipe (recipe *rp) |
| void | init_formulae () |
| void | dump_alchemy () |
| void | dump_alchemy_costs () |
| int | strtoint (const char *buf) |
| artifact * | locate_recipe_artifact (recipe *rp) |
| recipe * | get_random_recipe (recipelist *rpl) |
| void | free_all_recipes () |
Variables | |
| static recipelist * | formulalist |
Basic stuff for use with the alchemy code.
Our definition of 'formula' is any product of an alchemical process. Ingredients are just comma delimited list of archetype (or object) names.
Example 'formula' entry:
Object transparency chance 10 ingred dust of beholdereye,gem arch potion_generic
Definition in file recipe.c.
| static void check_formulae | ( | ) | [static] |
Check if formula doesn't have the same index.
Since we are doing a sequential search on the formulae lists now, we have to be careful that we don't have 2 formula with the exact same index value. Under the new nbatches code, it is possible to have multiples of ingredients in a cauldron which could result in an index formula mismatch. We *don't* check for that possibility here.
| static int check_recipe | ( | recipe * | rp | ) | [static] |
| void dump_alchemy_costs | ( | ) |
| static long find_ingred_cost | ( | const char * | name | ) | [static] |
Try to find an ingredient with specified name.
If several archetypes have the same name, the value of the first one with that name will be returned. This happens for the mushrooms (mushroom_1, mushroom_2 and mushroom_3). For the monsters' body parts, there may be several monsters with the same name. This is not a problem if these monsters have the same level (e.g. sage & c_sage) or if only one of the monsters generates the body parts that we are looking for (e.g. big_dragon and big_dragon_worthless).
Will also search in artifacts.
| name | Ingredient we're searching for. Can start with a number. |
Find a treasure with a matching name. The 'depth' parameter is only there to prevent infinite loops in treasure lists (a list referencing another list pointing back to the first one).
| t | Item of treasure list to search from. |
| name | Name we're trying to find. Doesn't need to be a shared string. |
| depth | Current depth. Function will exit if greater than 10. |
| void free_all_recipes | ( | ) |
| static recipe* get_empty_formula | ( | ) | [static] |
| recipelist* get_formulalist | ( | int | i | ) |
| recipe* get_random_recipe | ( | recipelist * | rpl | ) |
| static recipelist * get_random_recipelist | ( | ) | [static] |
| static const char * ingred_name | ( | const char * | name | ) | [static] |
| void init_formulae | ( | ) |
| static recipelist* init_recipelist | ( | ) | [static] |
| static int numb_ingred | ( | const char * | buf | ) | [static] |
| int strtoint | ( | const char * | buf | ) |
Convert buf into an integer equal to the coadded sum of the (lowercase) character.
ASCII values in buf (times prepended integers).
| buf | Buffer we want to convert. Can contain an initial number. |
recipelist* formulalist [static] |
1.7.4