Go to the documentation of this file.
48 sizeof(
who->contr->killer));
51 "Eck!...that was poisonous!");
55 "You begin to feel better.");
58 "Eck!...that was poisonous!");
65 "You are drained of mana!");
67 if (
who->stats.sp < 0)
71 "You feel a rush of magical energy!");
82 if (capacity_remaining < food->
stats.food)
83 applier->
stats.
hp += capacity_remaining / 50;
90 const int wasted_food = food->
stats.
food - capacity_remaining;
91 if (wasted_food > 0) {
94 if (wasted_food > thresh) {
101 snprintf(
buf,
sizeof(
buf),
102 "%s the %s makes you %s full. You feel yourself moving %s "
105 wasted_food > thresh ?
"very" :
"rather",
106 wasted_food > thresh ?
"much" :
"somewhat");
148 snprintf(
buf,
sizeof(
buf),
"You have been dead for too long to taste %s, ", food->
name);
152 "and seem to have obtained a taste for living flesh.");
157 snprintf(
buf,
sizeof(
buf),
"You can no longer taste %s, and do not feel less hungry after %s it.", food->
name, food->
type ==
DRINK ?
"drinking" :
"eating");
166 snprintf(
buf,
sizeof(
buf),
"Ahhh...that %s tasted good.", food->
name);
168 snprintf(
buf,
sizeof(
buf),
"The %s tasted %s", food->
name, food->
type ==
FLESH ?
"terrible!" :
"good.");
171 snprintf(
buf,
sizeof(
buf),
"The %s tasted terrible!", food->
name);
220 if (food->
resist[i] > 0) {
263 double totalchance = 1;
283 if (skin == NULL || abil == NULL)
308 chance = (chance < -12) ? 0. : 1./pow(2., -chance);
311 chance *= ((double)(
MIN(meal->
resist[i], 50)))/50.;
315 chance =
MIN(100., chance*2.);
318 if (
RANDOM()%10000 < (
unsigned int)(chance*100)) {
319 atnr_winner[winners] = i;
324 totalchance *= 1-chance/100;
331 totalchance = 100-totalchance*100;
333 if (totalchance > 50.)
334 snprintf(
buf,
sizeof(
buf),
"Hmm! The %s tasted delicious!", meal->
name);
335 else if (totalchance > 10.)
336 snprintf(
buf,
sizeof(
buf),
"The %s tasted very good.", meal->
name);
337 else if (totalchance > 1.)
338 snprintf(
buf,
sizeof(
buf),
"The %s tasted good.", meal->
name);
339 else if (totalchance > 0.1)
340 snprintf(
buf,
sizeof(
buf),
"The %s tasted bland.", meal->
name);
341 else if (totalchance >= 0.01)
342 snprintf(
buf,
sizeof(
buf),
"The %s had a boring taste.", meal->
name);
344 snprintf(
buf,
sizeof(
buf),
"The %s tasted strange.", meal->
name);
346 snprintf(
buf,
sizeof(
buf),
"The %s had no taste.", meal->
name);
353 i = atnr_winner[
RANDOM()%winners];
355 if (i >= 0 && i < NROFATTACKS && skin->resist[i] < 95) {
361 "Your skin is now more resistant to %s!",
375 "Your metabolism prepares to focus on %s!",
378 "The change will happen at level %d",
382 "Your metabolism will continue to focus on %s.",
void init_type_food(void)
void LOG(LogLevel logLevel, const char *format,...)
#define QUERY_FLAG(xyz, p)
static int dragon_eat_flesh(object *op, object *meal)
void register_apply(int ob_type, apply_func method)
object * give_skill_by_name(object *op, const char *skill_name)
#define MSG_TYPE_APPLY_CURSED
#define MSG_TYPE_ATTRIBUTE
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
void fix_object(object *op)
object * object_insert_in_ob(object *op, object *where)
static void eat_special_food(object *who, object *food)
int16_t resist[NROFATTACKS]
static method_ret food_type_apply(object *food, object *applier, int aflags)
void object_free_drop_inventory(object *ob)
int slow_living_by(object *op, const int speed_penalty)
#define object_decrease_nrof_by_one(xyz)
#define MSG_TYPE_ATTRIBUTE_RACE
#define MSG_TYPE_ATTRIBUTE_BAD_EFFECT_START
#define MSG_TYPE_APPLY_SUCCESS
#define MSG_TYPE_ATTRIBUTE_PROTECTION_GAIN
void set_attr_value(living *stats, int attr, int8_t value)
const char *const change_resist_msg[NROFATTACKS]
void object_update_speed(object *op)
static void eat_common(object *applier, object *food)
#define FLAG_CAN_USE_SKILL
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
struct archetype * other_arch
int is_wraith_pl(object *op)
object * create_archetype(const char *name)
int change_abil(object *op, object *tmp)
void apply_handle_yield(object *tmp)
int is_dragon_pl(const object *op)
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
int atnr_is_dragon_enabled(int attacknr)
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
object * arch_to_object(archetype *at)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various stats
#define MSG_TYPE_APPLY_FAILURE
static void check_heal_and_mana(object *who, object *food)
int is_old_wraith_pl(object *op)
int8_t get_attr_value(const living *stats, int attr)
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters as well as how often the character can attack this affects the prices when buying and selling items if this drops the player will start losing hit points wd Cleric or Dwarf sm Elf wd Fireborn ft Human ra Mage C Monk se Ninja hi Priest C Quetzalcoatl mw Swashbuckler si Thief st Viking ba Warrior or Wizard C Wraith C Class Prof Str Dex Con Wis Cha Int Pow Net Skills Enclosed are codes used for the skills above The ones in and fighting should all be pretty self explanatory For the other a brief description is for a more detailed look at the skills doc file Skill remove use magic items phys no fire cold Fireborns are supposed to be fire spirits They re closely in tune with magic and are powerful and learn magic easily Being fire they are immune to fire and and vulnerable to cold They are vulnerable to ghosthit and drain because being mostly non anything which strikes directly at the spirit hits them harder race attacktype restrictions immunities prot vuln Quetzalcoatl physical no armour fire cold Quetzalcoatl s are now born knowing the spell of burning but because of their negative wisdom bonus
void link_player_skills(object *op)
static const float MOVE_PER_SECOND
static const int32_t MAX_FOOD