Difference between revisions of "Alcoholic"

From IvanWiki
Jump to navigation Jump to search
m
m
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
IsAlcoholic as defined in char.dat states whether a character will ignore a [[food]]'s consumeWisdomLimit so long as that food is a [[beverage]].<br>
 
IsAlcoholic as defined in char.dat states whether a character will ignore a [[food]]'s consumeWisdomLimit so long as that food is a [[beverage]].<br>
This causes alcoholic NPCs to consume potentially dangerous liquids (i.e. ones with negative effects) such as [[Vodka]] if they come across them, whereas normally sufficiently smart monsters would ignore them.
+
This causes alcoholic NPCs to consume potentially dangerous liquids (i.e. ones with negative effects) such as [[Vodka]] if they come across them, whereas sufficiently smart monsters would normally ignore them.
  
 
Alcoholic characters include:
 
Alcoholic characters include:
Line 17: Line 17:
 
</pre>
 
</pre>
  
Entertainingly, guards are able to sniff out alcohol on your person. If you try to chat with one, he will ask ''"Do you have something for me?"'' and prompt you to hand over a bottle of alcoholic liquid on your person.<br>
+
Entertainingly, [[guard]]s are able to sniff out alcohol on your person. If you try to chat with one, he will ask ''"Do you have something for me?"'' and prompt you to hand over a bottle of alcoholic liquid on your person.<br>
 
If you comply he will promptly drink it and become confused.
 
If you comply he will promptly drink it and become confused.
  
 
[[category:Game Mechanics]]
 
[[category:Game Mechanics]]

Latest revision as of 01:28, 23 July 2015

Coding: This article contains code which is for experienced users only, and may reveal game secrets


IsAlcoholic as defined in char.dat states whether a character will ignore a food's consumeWisdomLimit so long as that food is a beverage.
This causes alcoholic NPCs to consume potentially dangerous liquids (i.e. ones with negative effects) such as Vodka if they come across them, whereas sufficiently smart monsters would normally ignore them.

Alcoholic characters include:

truth material::CanBeEatenByAI(ccharacter* Eater) const
{
  return ((Eater->GetAttribute(WISDOM) < GetConsumeWisdomLimit()
	   || (Eater->IsAlcoholic() && (GetCategoryFlags() & IS_BEVERAGE)))
	  && !GetSpoilLevel() && !Eater->CheckCannibalism(this));
}

Entertainingly, guards are able to sniff out alcohol on your person. If you try to chat with one, he will ask "Do you have something for me?" and prompt you to hand over a bottle of alcoholic liquid on your person.
If you comply he will promptly drink it and become confused.