Difference between revisions of "Eating"

From IvanWiki
Jump to navigation Jump to search
(Some of this is probably wrong, I'm trying to get my head around the spoil code and I cannot brain today.)
 
Line 87: Line 87:
  
 
Some food items possess special properties and grant various effects when eaten.
 
Some food items possess special properties and grant various effects when eaten.
 +
 +
'''Meats:'''
 +
*All rotten meat can cause parasites, poison, and confusion.
 +
*Acidic flesh (e.g. dark frogs) will cause internal acid burns.
 +
*[[Blink Dog]] flesh will grant [[telecontrol]].
 +
*[[Chameleon]] flesh will inflict [[polymorph|polymorphitis]].
 +
*Human meat will shift the player's alignment toward chaotic.
 +
*Leper meat will cause leprosy (e.g. [[Zombie]] flesh.)
 +
*[[Giant Mushroom|Mushroom]] and Magical Mushroom flesh will grant a random status effect.
 +
*Mutant flesh (e.g. [[mutant rabbit]], [[Mutant Ass|mutant ass]]) will inflict [[polymorph|polymorphitis]].
 +
*Poisonous flesh (e.g. spiders, [[Snake|snakes]]) will inflict poison.
 +
*Unicorn corpses cause a variety of effects:
 +
**Black unicorn flesh grants every ''single status effect in the game''.
 +
**Gray unicorn flesh removes all non-permanent status effects and grants [[Teleport|teleportitis]].
 +
**White unicorn flesh removes all negative status effects except for [[Teleport|teleportitis]], [[polymorph|polymorphitis]] and confusion.
 +
*Werewolf flesh will cause [[Polymorph#Lycanthropy|lycanthropy]].
 +
 +
'''Ommel Materials:'''<br>
 +
* [[Ommel Bone]] and [[Ommel Tooth]] will buff ALL of your stats, with particular focus on AGI, PER and CHA.
 +
* [[Ommel Cerumen]] will boost your INT and WIS.
 +
* [[Ommel Snot]] increases your END.
 +
* [[Ommel Sweat]] grants a bonus to your AGI and DEX.
 +
* [[Ommel Tears]] raises your PER and CHA.
 +
* [[Ommel Urine]] improves your ASTR and LSTR.
 +
 +
'''Unique:'''
 +
*[[Carrot|Carrots]] raise your PER.
 
*The [[Holy Banana of Oily Orpiv]] buffs all of your stats by 1 and maximizes your fullness.
 
*The [[Holy Banana of Oily Orpiv]] buffs all of your stats by 1 and maximizes your fullness.
*Ommel materials will buff stats:
+
*[[School food]] raises your END at the cost of poisoning you.
** [[Ommel Bone]] and [[Ommel Tooth]] will buff ALL of your stats, with particular focus on AGI, PER and CHA.
+
** [[Ommel Cerumen]] will boost your INT and WIS.
+
'''Liquids:'''
** [[Ommel Snot]] increases your END.
+
*[[Antidote liquid]] cures poison and parasites.
** [[Ommel Sweat]] grants a bonus to your AGI and DEX.
+
*[[Healing liquid]] will restore HP and has a chance to re-grow lost limbs.
** [[Ommel Tears]] raises your PER and CHA.
 
** [[Ommel Urine]] improves your ASTR and LSTR.
 
 
*[[Pea soup]] produces a puff of [[Brown Gas|brown gas]] on the tile where you stand.
 
*[[Pea soup]] produces a puff of [[Brown Gas|brown gas]] on the tile where you stand.
 +
*[[Pepsi]] causes a small amount of damage, but raises PER.
 +
*[[Sulphuric acid]] causes internal acid burns.
 +
*[[Troll blood]] restores HP.
 +
*[[Water]] relieves exhaustion.
 +
*[[Vodka]] and [[Valdemar]] inflict confusion.

Revision as of 07:15, 12 August 2014

Spoiler Warning: This page contains spoilers which may affect your IVAN experience negatively


Eating is the act of (e)ating any kind of food available in the game. Eating anything provides nourishment, changing your "fullness" status for better or worse. Eating certain types of food can also bestow various effects upon the player.

For a food item to be edible, it must be tagged with a compatible ConsumeType in materials.dat for whatever is doing the eating (e.g. humans can eat CT_FRUIT, CT_MEAT, CT_PROCESSED and CT_LIQUID but not CT_BONE like canines can.)
Currently, only liquids and organic materials have a nutrition value that dictates how filling they are.

The amount of nutrition one receives upon eating a food item is determined by the item's edible volume and its nutritional value divided by its spoil level.
That is to say a food item will fill up the player more if it is high is volume and/or nutritional value, and will fill you up less if it is spoiled.

material* organic::EatEffect(character* Eater, long Amount)
{
  Amount = Volume > Amount ? Amount : Volume;
  GetMotherEntity()->SpecialEatEffect(Eater, Amount);
  Effect(Eater, TORSO_INDEX, Amount);
  Eater->ReceiveNutrition(GetNutritionValue() * Amount * 20 / (1000 * (GetSpoilLevel() + 1)));

  if(IsInfectedByLeprosy() && Amount && !RAND_N(25000 / Amount))
    Eater->GainIntrinsic(LEPROSY);

  if(GetSpoilLevel() > 0)
  {
    Eater->BeginTemporaryState(CONFUSED, int(Amount * GetSpoilLevel() * sqrt(GetNutritionValue()) / 1000));

    if(GetBodyFlags() & CAN_HAVE_PARASITE
       && !(RAND() % (250 / GetSpoilLevel())))
      Eater->GainIntrinsic(PARASITIZED);
  }

  if(GetSpoilLevel() > 4)
    Eater->BeginTemporaryState(POISONED, int(Amount * (GetSpoilLevel() - 4) * sqrt(GetNutritionValue()) / 1000));

  if(Volume != Amount)
  {
    EditVolume(-Amount);
    return 0;
  }
  else
    return MotherEntity->RemoveMaterial(this);
}

Spoiling

Every organic material in the game rots away at a steady pace influenced by its SpoilModifier. Initially, every food item has a small grace period before it can start spoiling. After this the game will start checking against its spoil modifier in order to add to the item's spoil level. The higher the item's SpoilModifier, the slower it will rot. When an item reaches the maximum spoil level, it will rot away to nothing.

Eating a spoiled item comes with some risks - particularly with meats. Firstly, spoiled food is less nutritious. Second and much more important is that any food that has even a single level of spoiling can inflict confusion upon the eater for a period influenced by its volume and spoil level divided by its nutritional value. In addition, if the item can contain parasites (e.g. most meats) there is a chance that the eater will also gain a tapeworm or broad tapeworm which will inflict damage over time and can only be removed via vomiting.
Finally, if the item's spoil level is beyond 4 it will instantly poison the eater for a period influenced by its volume, spoil level and nutritional value.

void organic::Be(ulong Flags)
{
  if(SpoilCheckCounter++ >= 50)
  {
    if(MotherEntity->AllowSpoil())
    {
      if(Flags & HASTE)
	SpoilCounter += 125;
      else if(Flags & SLOW)
	SpoilCounter += 5;
      else
	SpoilCounter += 25;

      if(SpoilCounter < GetSpoilModifier())
      {
	if(SpoilCounter << 1 >= GetSpoilModifier())
	{
	  int NewSpoilLevel = ((SpoilCounter << 4) / GetSpoilModifier()) - 7;

	  if(NewSpoilLevel != SpoilLevel)
	  {
	    SpoilLevel = NewSpoilLevel;
	    MotherEntity->SignalSpoilLevelChange(this);
	  }
	}
      }
      else
      {
	SpoilLevel = 8;
	MotherEntity->SignalSpoil(this);
      }
    }

    SpoilCheckCounter = 0;
  }
}


Special Effects

//(work in progress)

Some food items possess special properties and grant various effects when eaten.

Meats:

  • All rotten meat can cause parasites, poison, and confusion.
  • Acidic flesh (e.g. dark frogs) will cause internal acid burns.
  • Blink Dog flesh will grant telecontrol.
  • Chameleon flesh will inflict polymorphitis.
  • Human meat will shift the player's alignment toward chaotic.
  • Leper meat will cause leprosy (e.g. Zombie flesh.)
  • Mushroom and Magical Mushroom flesh will grant a random status effect.
  • Mutant flesh (e.g. mutant rabbit, mutant ass) will inflict polymorphitis.
  • Poisonous flesh (e.g. spiders, snakes) will inflict poison.
  • Unicorn corpses cause a variety of effects:
    • Black unicorn flesh grants every single status effect in the game.
    • Gray unicorn flesh removes all non-permanent status effects and grants teleportitis.
    • White unicorn flesh removes all negative status effects except for teleportitis, polymorphitis and confusion.
  • Werewolf flesh will cause lycanthropy.

Ommel Materials:

Unique:

Liquids: