Jump to content

Elin:Code Analysis/Unclassified: Difference between revisions

Line 227: Line 227:
* The nutrition value (num3) of food is loaded, and the actual nutrition can be absorbed by a character cannot exceed its current hunger value.
* The nutrition value (num3) of food is loaded, and the actual nutrition can be absorbed by a character cannot exceed its current hunger value.
* If the character is hungry, then the actual nutrition is increased by 10%.
* If the character is hungry, then the actual nutrition is increased by 10%.
** A reminder, what is increased is not efficiency, but nutrition amount. I.e. the food becomes more filling.
** A reminder, this is an independent 10% modifier.
* If the food is rot and the character cannot take rotten food, each of the characters main attribute will be heavily penalized, except Will, which will have a heavy increase.
* If the food is rot and the character cannot take rotten food, each of the characters main attribute will be heavily penalized, except Will, which will have a heavy increase.
** Guess eating rotten food train your will.
** Guess eating rotten food train your will.
Line 288: Line 288:
** For potential increase, the increase is a value between 50% and 100% of (overall modifier (num2)) *  (actual nutrition (num6)) / 10 * dish exp level / 5 + 1.
** For potential increase, the increase is a value between 50% and 100% of (overall modifier (num2)) *  (actual nutrition (num6)) / 10 * dish exp level / 5 + 1.
*** However the value will be further penalized if the temporal potential is already over 150.
*** However the value will be further penalized if the temporal potential is already over 150.
<syntaxhighlight lang="c#" line="1">
num3 = num3 * (100 + c.Evalue(1235) * 10) / (100 + c.Evalue(1234) * 10 + c.Evalue(1236) * 15);
c.hunger.Mod(-num3);
</syntaxhighlight>
* After calculation of nutrition, the fillingness of the food is increased by 10% for light eater, decreased by 10% for heavy eater, and 15% for Norlanders.


=== Is this food tasty? ===
=== Is this food tasty? ===
<syntaxhighlight lang="c#" line="1">
float num4 = 40f;
float num5 = 1f;
num4 += (float)food.Evalue(70);
num4 += (float)(food.Evalue(72) / 2);
num4 += (float)(food.Evalue(73) / 2);
num4 += (float)(food.Evalue(75) / 2);
num4 += (float)(food.Evalue(76) * 3 / 2);
num4 += (float)food.Evalue(440);
num4 += (float)(food.Evalue(445) / 2);
num4 -= (float)food.Evalue(71);
num4 -= (float)(num3 / 2);
num4 *= num5;
if (idTaste.IsEmpty())
{
if (num4 > 100f)
{
idTaste = "food_great";
}
else if (num4 > 70f)
{
idTaste = "food_good";
}
else if (num4 > 50f)
{
idTaste = "food_soso";
}
else if (num4 > 30f)
{
idTaste = "food_average";
}
else
{
idTaste = "food_bad";
}
</syntaxhighlight>
* The base tastiness of food start at 40, and is heavily related with the exp level of food involved.
* For each value of STR, tastiness increase by 1.
* For each value of PER, DEX, WIL, tastiness increase by 0.5.
* For each value of MAG, tastiness increase by 1.5.
* For each value of STR2 (potential of strength?), tastiness increase by 1.
* For each value of WIL2 (potential of will?), tastiness increase by 0.5.
* For each value of END, tastiness decrease by 1. (The description is the size of the dish...)
* For each on paper nutrition value, the tastiness decrease by 0.5. (The more filling, the less delicious)
* If food is raw, -50%.
* If human flesh, with canniblism, +100%, without canniblism, -50%.
* If food is raw, -100%.
* The final value will be the tastfulness of a dish, >100 great, 70-100 good, 50-70, so so, 30-50 average, <30 bad.




[[Category:EN]]
[[Category:EN]]
[[Category:Elin Spoiler]]
[[Category:Elin Spoiler]]
399

edits