1using System.Collections.Generic;
12 if (
food.id ==
"deadbody")
16 if (
food.source._origin !=
"meat" &&
food.source._origin !=
"dish")
20 string[] components =
food.source.components;
21 for (
int i = 0; i < components.Length; i++)
23 if (components[i].Contains(
"egg"))
37 if (
food.source._origin !=
"meat" &&
food.source._origin !=
"dish")
84 food.CheckJustCooked();
86 int num = (food.isCrafted ? ((
EClass.
pc.
Evalue(1650) >= 3) ? 5 : 0) : 0);
87 float num2 = (float)(100 + (
food.HasElement(757) ? 10 : 0) + (flag ? 10 : 0) + num + Mathf.Min(
food.QualityLv * 10, 100)) / 200f;
92 int num3 =
food.Evalue(10);
99 bool flag5 = food.IsDecayed || flag3;
141 c.
Say(
"food_undead");
150 switch (
food.source._origin)
155 c.
Say(
"food_raw_meat");
165 c.
Say(
"food_raw_fish");
174 c.
Say(
"food_raw_powder");
199 num2 = num2 * num6 / 10f;
204 List<Element> list =
food.ListValidTraits(isCraft:
true, limit:
false);
205 foreach (
Element value
in food.elements.dict.Values)
207 if (value.
source.foodEffect.IsEmpty() || !list.Contains(value))
211 string[] foodEffect = value.
source.foodEffect;
213 float num7 = num2 * (float)value.
Value;
216 bool flag6 = num7 >= 0f;
217 string text = value.
source.GetText(flag6 ?
"textInc" :
"textDec", returnNull:
true);
224 switch (foodEffect[0])
239 c.
Say(
"little_eat", c);
248 int a = (int)(num7 * (
float)((foodEffect.Length > 2) ? foodEffect[2].ToInt() : 4)) * 2 / 3;
257 num8 = num8 * 100 / Mathf.Max(100, vTempPotential * 2 / 3);
290 c.
Say(
"little_eat", c);
292 int v = Mathf.Max(5 - @
int / 2, 1);
293 Debug.Log(
"sister eaten:" + @
int +
"/" + v);
303 c.
Say(
"little_adam", c);
313 num4 += (float)
food.Evalue(70);
314 num4 += (float)(
food.Evalue(72) / 2);
315 num4 += (float)(
food.Evalue(73) / 2);
316 num4 += (float)(
food.Evalue(75) / 2);
317 num4 += (float)(
food.Evalue(76) * 3 / 2);
318 num4 += (float)
food.Evalue(440);
319 num4 += (float)(
food.Evalue(445) / 2);
320 num4 -= (float)
food.Evalue(71);
321 num4 += (float)(num3 / 2);
323 if (idTaste.IsEmpty())
327 idTaste =
"food_great";
331 idTaste =
"food_good";
335 idTaste =
"food_soso";
339 idTaste =
"food_average";
343 idTaste =
"food_bad";
350 c.
Say(flag4 ?
"food_human_pos" :
"food_human_neg");
354 c.
Say(
"food_human_whine");
366 num3 = num3 * (100 + c.
Evalue(1235) * 10) / (100 + c.
Evalue(1234) * 10 + c.
Evalue(1236) * 15);
410 c.
Say(
"fairy_vomit", c, thing);
416 food.trait.OnDrink(c);
422 foreach (
Element value
in t.elements.dict.Values)
428 if (value.
Value >= 0)
433 c.CureCondition<
ConPoison>(value.Value * 2);
436 c.AddCondition<
ConPeace>(value.Value * 5);
442 c.AddCondition<
ConHotspring>(value.Value * 2)?.SetPerfume();
451 SayTaste(
"food_poison");
452 c.AddCondition<
ConPoison>(-value.Value * 10);
455 SayTaste(
"food_mind");
456 c.AddCondition<
ConConfuse>(-value.Value * 10);
457 c.AddCondition<
ConInsane>(-value.Value * 10);
463 void SayTaste(
string _id)
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
static void Poison(Chara tc, Chara c, int power)
static void LoveMiracle(Chara tc, Chara c, int power)
int GetInt(int id, int? defaultInt=null)
void SetInt(int id, int value=0)
ElementContainerCard elements
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
void ModExp(string alias, int a)
void Say(string lang, string ref1=null, string ref2=null)
Condition AddCondition(string id, int p=100, bool force=false)
void SetFeat(int id, int value=1, bool msg=false)
bool HasCondition(string alias)
void PickOrDrop(Point p, string idThing, int idMat=-1, int num=1, bool msg=true)
void ModWeight(int a, bool ignoreLimit=false)
int GetRaw(int offsetHours=0)
static SourceManager sources
static int rndHalf(int a)
Dictionary< int, Element > dict
Element ModPotential(int ele, int v)
Element ModTempPotential(int ele, int v, int threshMsg=0)
void ModExp(int ele, int a, bool chain=false)
Element GetElement(string alias)
static bool IsUndeadFlesh(CardRow r)
static bool IsHumanFlesh(CardRow r)
static void Proc(Chara c, Thing food)
static void ProcTrait(Chara c, Card t)
static bool IsUndeadFlesh(Thing food)
static bool IsHumanFlesh(Thing food)
static bool Has(string id)
static Thing Create(string id, int idMat=-1, int lv=-1)
static Thing ApplySeed(Thing t, int refval)