1using System.Collections.Generic;
8 food.CheckJustCooked();
10 int num = (food.isCrafted ? ((
EClass.
pc.
Evalue(1650) >= 3) ? 5 : 0) : 0);
11 float num2 = (float)(100 + (
food.HasElement(757) ? 10 : 0) + (flag ? 10 : 0) + num + Mathf.Min(
food.QualityLv * 10, 100)) / 200f;
16 int num3 =
food.Evalue(10);
20 bool flag2 =
food.HasElement(708);
21 bool flag3 =
food.HasElement(709);
23 bool flag5 = food.IsDecayed || flag3;
29 if (num6 < 2 || flag6)
31 if (num6 == 1 || flag6 ||
EClass.
rnd(4) == 0)
36 else if (num6 > 3 &&
EClass.
rnd(num6) >= 3)
91 switch (
food.source._origin)
96 c.
Say(
"food_raw_meat");
106 c.
Say(
"food_raw_fish");
115 c.
Say(
"food_raw_powder");
140 num2 = num2 * num7 / 10f;
145 List<Element> list =
food.ListValidTraits(isCraft:
true, limit:
false);
146 foreach (
Element value
in food.elements.dict.Values)
148 if (value.
source.foodEffect.IsEmpty() || !list.Contains(value))
152 string[] foodEffect = value.
source.foodEffect;
154 float num8 = num2 * (float)value.
Value;
157 bool flag7 = num8 >= 0f;
158 string text = value.
source.GetText(flag7 ?
"textInc" :
"textDec", returnNull:
true);
165 switch (foodEffect[0])
180 c.
Say(
"little_eat", c);
189 int a = (int)(num8 * (
float)((foodEffect.Length > 2) ? foodEffect[2].ToInt() : 4)) * 2 / 3;
198 num9 = num9 * 100 / Mathf.Max(100, vTempPotential * 2 / 3);
229 c.
Say(
"little_eat", c);
231 int v = Mathf.Max(5 - @
int / 2, 1);
232 Debug.Log(
"sister eaten:" + @
int +
"/" + v);
243 c.
Say(
"little_adam", c);
253 num4 += (float)
food.Evalue(70);
254 num4 += (float)(
food.Evalue(72) / 2);
255 num4 += (float)(
food.Evalue(73) / 2);
256 num4 += (float)(
food.Evalue(75) / 2);
257 num4 += (float)(
food.Evalue(76) * 3 / 2);
258 num4 += (float)
food.Evalue(440);
259 num4 += (float)(
food.Evalue(445) / 2);
260 num4 -= (float)
food.Evalue(71);
261 num4 += (float)(num3 / 2);
263 if (idTaste.IsEmpty())
267 idTaste =
"food_great";
271 idTaste =
"food_good";
275 idTaste =
"food_soso";
279 idTaste =
"food_average";
283 idTaste =
"food_bad";
290 c.
Say(flag4 ?
"food_human_pos" :
"food_human_neg");
294 c.
Say(
"food_human_whine");
306 num3 = num3 * (100 + c.
Evalue(1235) * 10) / (100 + c.
Evalue(1234) * 10 + c.
Evalue(1236) * 15);
350 c.
Say(
"fairy_vomit", c, thing);
356 food.trait.OnDrink(c);
363 foreach (
Element value
in t.elements.dict.Values)
369 if (value.
Value >= 0)
374 c.CureCondition<
ConPoison>(value.Value * 2);
377 c.AddCondition<
ConPeace>(value.Value * 5);
383 c.AddCondition<
ConHotspring>(value.Value * 2)?.SetPerfume();
397 Msg.
Say(
"recharge_stamina_fail");
402 c.Say(
"recharge_stamina", c);
403 c.stamina.Mod(c.stamina.max * (value.
Value / 10 + 1) / 100 + value.Value * 2 / 3 +
EClass.
rnd(5));
413 SayTaste(
"food_poison");
414 c.AddCondition<
ConPoison>(-value.Value * 10);
417 SayTaste(
"food_mind");
418 c.AddCondition<
ConConfuse>(-value.Value * 10);
419 c.AddCondition<
ConInsane>(-value.Value * 10);
423 c.Say(
"recharge_stamina_negative", c);
424 c.stamina.
Mod(-c.stamina.max * (-value.
Value / 10 + 1) / 100 + value.
Value);
429 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)
void Mod(int a, bool force=false)
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)
override bool IsPCFaction
SourceThing.Row GetFavFood()
void ModWeight(int a, bool ignoreLimit=false)
void AddFoodHistory(Thing food)
int CountNumEaten(Thing food)
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 void Proc(Chara c, Thing food)
static void ProcTrait(Chara c, Card t)
static bool Has(string id)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
static Thing Create(string id, int idMat=-1, int lv=-1)
static Thing ApplySeed(Thing t, int refval)