![]() |
Crossfire Server, Trunk
1.75.0
|
Go to the source code of this file.
Data Structures | |
struct | _change_arch |
when a treasure got cloned from archlist, we want perhaps change some default values. More... | |
struct | treasure |
treasure is one element in a linked list, which together consist of a complete treasure-list. More... | |
struct | treasurelist |
treasurelist represents one logical group of items to be generated together. More... | |
Macros | |
#define | CHANCE_FOR_ARTIFACT 20 |
Chance an item becomes an artifact if not magic is 1 in this value. More... | |
#define | DIFFLEVELS 201 |
Maximum difficulty for difficulty/magic mapping. More... | |
#define | MAX_SPELLITEM_LEVEL 110 |
Highest level of rods/staves/scrolls to generate. More... | |
#define | MAXMAGIC 4 |
Maximum magic for difficulty/magic mapping. More... | |
Enumerations | |
enum | { GT_ENVIRONMENT = 0x0001, GT_INVISIBLE = 0x0002, GT_STARTEQUIP = 0x0004, GT_ONLY_GOOD = 0x0008, GT_UPDATE_INV = 0x0010, GT_MINIMAL = 0x0020 } |
Flags to generate_treasures(): More... | |
Functions | |
bool | chance (int a, int b) |
Return true with a probability of a/b. More... | |
Defines and variables used by the artifact generation routines.
Definition in file treasure.h.
#define CHANCE_FOR_ARTIFACT 20 |
Chance an item becomes an artifact if not magic is 1 in this value.
Definition at line 10 of file treasure.h.
#define DIFFLEVELS 201 |
Maximum difficulty for difficulty/magic mapping.
Definition at line 16 of file treasure.h.
#define MAX_SPELLITEM_LEVEL 110 |
Highest level of rods/staves/scrolls to generate.
Definition at line 19 of file treasure.h.
#define MAXMAGIC 4 |
Maximum magic for difficulty/magic mapping.
Definition at line 13 of file treasure.h.
anonymous enum |
Flags to generate_treasures():
Enumerator | |
---|---|
GT_ENVIRONMENT | ? |
GT_INVISIBLE | Unused? |
GT_STARTEQUIP | Generated items have the FLAG_STARTEQUIP. |
GT_ONLY_GOOD | Don't generate bad/cursed items. Used for new player's equipment. |
GT_UPDATE_INV | When object has been generated, send its information to player. |
GT_MINIMAL | Do minimal adjustments, don't make artifacts, and so on. |
Definition at line 30 of file treasure.h.
bool chance | ( | int | a, |
int | b | ||
) |
Return true with a probability of a/b.
Definition at line 890 of file treasure.cpp.
Referenced by artifact_describe(), attempt_steal(), create_all_treasures(), dice2(), dragon_eat_flesh(), identify_object_with_skill(), make_formula_book(), resurrection_fails(), shopkeeper_move(), singing(), trap_see(), use_oratory(), and writeRecipe().