Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -2330,30 +2330,40 @@ const char *drinks[] = {"water",
"blood",
"salt water",
"clear water",
"juice",
"nectar",
"ambrosia",
"silvanesti wine",
"elvenblossom wine",
"herbal remedy"
"tarbean tea"
"\n"};
CHECK_TABLE_SIZE(drinks, NUM_LIQ_TYPES + 1);

/** Describes a one word alias for each type of liquid.
* @pre Must be in the same order as the defines.
* Must end array with a single newline. */
const char *drinknames[] = {"water", "beer", "wine", "ale", "ale", "whisky",
"lemonade", "firebreather", "local", "juice", "milk", "tea",
"coffee", "blood", "salt", "water", "\n"};
const char *drinknames[] = {"water", "beer", "wine", "ale", "ale", "whisky",
"lemonade", "firebreather", "local", "milk", "tea", "coffee",
"blood", "salt", "water", "juice", "nectar", "silvwine",
"elvenblossom", "healremedy", "tarbean", "\n"};
CHECK_TABLE_SIZE(drinknames, NUM_LIQ_TYPES + 1);

/** Define the effect of liquids on hunger, thirst, and drunkenness, in that
* order. See values.doc for more information.
* @pre Must be in the same order as the defines. */
int drink_aff[][3] = {{0, 1, 10}, {3, 2, 5}, {5, 2, 5}, {2, 2, 5}, {1, 2, 5}, {6, 1, 4},
{0, 1, 8}, {10, 0, 0}, {3, 3, 3}, {0, 4, -8}, {0, 3, 6}, {0, 1, 6},
{0, 1, 6}, {0, 2, -1}, {0, 1, -2}, {0, 0, 13}};
int drink_aff[][3] = {{0, 1, 10}, {3, 2, 5}, {5, 2, 5}, {2, 2, 5}, {1, 2, 5}, {6, 1, 4},
{0, 1, 8}, {10, 0, 0}, {3, 3, 3}, {0, 4, -8}, {0, 3, 6}, {0, 1, 6},
{0, 1, 6}, {0, 2, -1}, {0, 1, -2}, {0, 0, 13}, {0, 1, 10}, {0, 1, 10},
{5, 2, 5}, {0, 1, 4}, {0, 1, 10}, {0, 2, -1}};

/** Describes the color of the various drinks.
* @pre Must be in the same order as the defines.
* Must end array with a single newline. */
const char *color_liquid[] = {"clear", "brown", "clear", "brown", "dark", "golden",
"red", "green", "clear", "light green", "white", "brown",
"black", "red", "clear", "crystal clear", "\n"};
"black", "red", "clear", "crystal clear", "bright", "multicolor",
"silver", "crystal green", "disgusting green", "black", "\n"};
CHECK_TABLE_SIZE(color_liquid, NUM_LIQ_TYPES + 1);

/** Used to describe the level of fullness of a drink container. Not used in
Expand Down
9 changes: 8 additions & 1 deletion src/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4962,8 +4962,15 @@
#define LIQ_BLOOD 13 /**< Liquid type blood */
#define LIQ_SALTWATER 14 /**< Liquid type saltwater */
#define LIQ_CLEARWATER 15 /**< Liquid type clearwater */
#define LIQ_JUICE 16 /**< Liquid type juice */
#define LIQ_NECTAR 17 /**< Liquid type nectar */
#define LIQ_AMBROSIA 18 /**< Liquid type ambrosia */
#define LIQ_SILVWINE 19 /**< Liquid type silvanesti wine */
#define LIQ_ELVBLOSS 20 /**< Liquid type elvenblossom */
#define LIQ_HEALREME 21 /**< Liquid type herbal remedy */
#define LIQ_TARBEAN 22 /**< Liquid type tarbean tea */
/** Total number of liquid types */
#define NUM_LIQ_TYPES 16
#define NUM_LIQ_TYPES 23

/* WEAPON and ARMOR defines */

Expand Down
14 changes: 14 additions & 0 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -10172,6 +10172,20 @@ int get_bonus_from_liquid_type(int liquid)
return APPLY_NONE;
case LIQ_CLEARWATER:
return APPLY_HIT;
case LIQ_JUICE:
return APPLY_DEX;
case LIQ_NECTAR:
return APPLY_STR;
case LIQ_AMBROSIA:
return APPLY_WIS;
case LIQ_SILVWINE:
return APPLY_INT;
case LIQ_ELVBLOSS:
return APPLY_CHA;
case LIQ_HEALREME:
return APPLY_FAST_HEALING;
case LIQ_TARBEAN:
return APPLY_CHA;
default:
return APPLY_HP_REGEN;
}
Expand Down