Elin Decompiled Documentation EA 23.319 Nightly Patch 1
Loading...
Searching...
No Matches
ELEMENT.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4using UnityEngine.UI;
5
6public class ELEMENT
7{
8 public const int difficulty = 765;
9
10 public const int air = 763;
11
12 public const int roasted = 762;
13
14 public const int rare = 751;
15
16 public const int cute = 752;
17
18 public const int antidote = 753;
19
20 public const int nerve = 754;
21
22 public const int blood = 755;
23
24 public const int hotspring = 756;
25
26 public const int purity = 759;
27
28 public const int stimulant = 760;
29
30 public const int recharge = 761;
31
32 public const int effectRange = 770;
33
34 public const int comfort = 750;
35
36 public const int _void = 0;
37
38 public const int nutrition = 10;
39
40 public const int lv = 1;
41
42 public const int quality = 2;
43
44 public const int d = 3;
45
46 public const int socket = 5;
47
48 public const int weight = 11;
49
50 public const int size = 12;
51
52 public const int hardness = 13;
53
54 public const int growth = 14;
55
56 public const int water = 15;
57
58 public const int decay = 17;
59
60 public const int taste = 18;
61
62 public const int poison = 20;
63
64 public const int heat = 16;
65
66 public const int cut = 22;
67
68 public const int old_detox = 23;
69
70 public const int old_heal = 24;
71
72 public const int old_antidote = 25;
73
74 public const int cure = 26;
75
76 public const int race = 29;
77
78 public const int piety = 85;
79
80 public const int fire = 21;
81
82 public static readonly int[] IDS = new int[37]
83 {
84 765, 763, 762, 751, 752, 753, 754, 755, 756, 759,
85 760, 761, 770, 750, 0, 10, 1, 2, 3, 5,
86 11, 12, 13, 14, 15, 17, 18, 20, 16, 22,
87 23, 24, 25, 26, 29, 85, 21
88 };
89}
90public class Element : EClass
91{
92 public class BonusInfo
93 {
94 public Element ele;
95
96 public UINote n;
97
98 public Chara c;
99
100 public bool first = true;
101
102 public long total;
103
104 public void CheckFirst()
105 {
106 if (first)
107 {
108 first = false;
109 n.Space(8);
110 }
111 }
112
113 public void AddText(string text, FontColor col = FontColor.Warning)
114 {
115 CheckFirst();
116 n.AddText("_bullet".lang() + text, col);
117 }
118
119 public void AddText(long v, string text, string textBad = null)
120 {
121 if (v != 0L)
122 {
123 string text2 = text;
124 if (!textBad.IsEmpty() && v < 0)
125 {
126 text2 = textBad;
127 }
128 CheckFirst();
129 total += v;
130 n.AddText("_bullet".lang() + text2 + " " + ((v > 0) ? "+" : "") + v, (v > 0) ? FontColor.Good : FontColor.Bad);
131 }
132 }
133
134 public void AddFix(int v, string text)
135 {
136 if (v != 0)
137 {
138 CheckFirst();
139 n.AddText("_bullet".lang() + text + " " + ((v > 0) ? "+" : "") + v + "%", (v > 0) ? FontColor.Good : FontColor.Bad);
140 }
141 }
142
143 public void WriteNote()
144 {
145 int id = ele.id;
146 int num = 0;
147 foreach (BodySlot slot in c.body.slots)
148 {
149 if (slot.elementId != 44 && slot.thing != null && ((id != 67 && id != 66) || slot.elementId != 35))
150 {
151 Element orCreateElement = slot.thing.elements.GetOrCreateElement(id);
152 if (orCreateElement != null && !orCreateElement.IsGlobalElement)
153 {
154 num += orCreateElement.Value;
155 }
156 }
157 }
158 AddText(num, "equipment".lang());
159 if (c.IsPCFaction)
160 {
162 if (element != null)
163 {
164 AddText(element.Value, "sub_faction".lang());
165 }
166 }
167 foreach (Condition condition in c.conditions)
168 {
169 if (condition.GetElementContainer() != null)
170 {
171 AddText(condition.GetElementContainer().Value(id), condition.Name);
172 }
173 }
174 if (c.tempElements != null)
175 {
176 AddText(c.tempElements.Value(id), "tempStrengthen".lang(), "tempWeaken".lang());
177 }
178 try
179 {
180 if (c.faithElements != null)
181 {
182 int num2 = c.faithElements.Value(id);
183 Element element2 = c.elements.GetElement("featGod_" + c.faith.id + "1");
184 if (element2 != null)
185 {
186 AddText(num2, element2.Name);
187 }
188 else if (num2 != 0)
189 {
190 AddText(num2, EClass.sources.elements.map[1228].GetName());
191 }
192 }
193 }
194 catch
195 {
196 }
197 _ = ele.Value;
198 _ = ele.ValueWithoutLink + total;
199 foreach (Element value in c.elements.dict.Values)
200 {
201 if (value.HasTag("multiplier") && value.source.aliasRef == ele.source.alias)
202 {
203 AddFix(value.Value, value.Name);
204 }
205 }
206 if (id == 79)
207 {
208 c.RefreshSpeed(this);
209 }
210 if (id == 78 && c.IsPCFactionOrMinion)
211 {
212 int num3 = EClass.player.CountKeyItem("lucky_coin");
213 if (num3 > 0)
214 {
215 AddText(EClass.sources.keyItems.alias["lucky_coin"].GetName() + " (+" + num3 * 2 + ")", FontColor.Great);
216 }
218 {
219 AddFix(100, EClass.sources.elements.map[663].GetName());
220 }
221 }
222 if (!c.IsMachine && !(c.id == "android"))
223 {
224 return;
225 }
226 int num4 = c.Evalue(664);
227 if (num4 > 0)
228 {
229 switch (id)
230 {
231 case 64:
232 case 65:
233 AddFix(num4 / 2, EClass.sources.elements.map[664].GetName());
234 break;
235 case 79:
236 AddFix(num4, EClass.sources.elements.map[664].GetName());
237 break;
238 }
239 }
240 }
241 }
242
243 public const int Div = 5;
244
245 public static Element Void = new Element();
246
247 public static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 };
248
249 public static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 };
250
251 public static int[] List_Body = new int[4] { 70, 72, 71, 77 };
252
253 public static int[] List_Mind = new int[4] { 74, 75, 76, 73 };
254
256
257 public int id;
258
259 public int vBase;
260
261 public int vExp;
262
263 public int vPotential;
264
265 public int vTempPotential;
266
267 public int vLink;
268
269 public int vSource;
270
272
274
275 public static List<SourceElement.Row> ListElements = new List<SourceElement.Row>();
276
277 public static List<SourceElement.Row> ListAttackElements = new List<SourceElement.Row>();
278
280 {
281 get
282 {
284 if (row == null)
285 {
286 SourceElement.Row obj = ((id == 0) ? GetSource() : Get(id)) ?? EClass.sources.elements.rows[0];
287 SourceElement.Row row2 = obj;
288 _source = obj;
289 row = row2;
290 }
291 return row;
292 }
293 }
294
295 public virtual int DisplayValue => Value;
296
297 public virtual int MinValue => -100;
298
299 public int Value => ValueWithoutLink + vLink + ((owner != null) ? owner.ValueBonus(this) : 0);
300
302
303 public virtual int MinPotential => 100;
304
306
307 public virtual bool CanGainExp => ValueWithoutLink > 0;
308
309 public bool IsFlag => source.tag.Contains("flag");
310
311 public virtual string Name => source.GetName();
312
313 public virtual string FullName => Name;
314
315 public virtual int ExpToNext => 1000;
316
317 public virtual bool UseExpMod => true;
318
319 public virtual int CostTrain => Mathf.Max((ValueWithoutLink / 10 + 5) * (100 + vTempPotential) / 500, 1);
320
321 public virtual int CostLearn => 5;
322
323 public virtual bool ShowXP
324 {
325 get
326 {
328 {
329 return source.category != "attribute";
330 }
331 return true;
332 }
333 }
334
335 public virtual bool ShowMsgOnValueChanged => true;
336
337 public virtual bool ShowValue => true;
338
339 public virtual bool ShowPotential => true;
340
341 public virtual bool UsePotential => true;
342
343 public virtual bool PotentialAsStock => false;
344
345 public virtual bool ShowRelativeAttribute => false;
346
347 public virtual bool ShowBonuses => true;
348
349 public virtual string ShortName => Name;
350
351 public bool IsGlobalElement
352 {
353 get
354 {
355 if (vExp != -1)
356 {
357 return vExp == -2;
358 }
359 return true;
360 }
361 }
362
363 public bool IsFactionWideElement => vExp == -1;
364
365 public bool IsPartyWideElement => vExp == -2;
366
367 public virtual bool ShowEncNumber => true;
368
369 public bool IsTrait => source.tag.Contains("trait");
370
371 public bool IsFoodTrait => !source.foodEffect.IsEmpty();
372
373 public bool IsFoodTraitMain
374 {
375 get
376 {
377 if (IsFoodTrait)
378 {
379 if (!source.tag.Contains("primary"))
380 {
381 return source.tag.Contains("foodpot");
382 }
383 return true;
384 }
385 return false;
386 }
387 }
388
389 public bool IsMainAttribute
390 {
391 get
392 {
393 if (source.category == "attribute")
394 {
395 return source.tag.Contains("primary");
396 }
397 return false;
398 }
399 }
400
401 public Act act => (this as Act) ?? ACT.Create(id);
402
403 public static string GetName(string alias)
404 {
405 return EClass.sources.elements.alias[alias].GetName();
406 }
407
408 public static SourceElement.Row Get(int id)
409 {
410 return EClass.sources.elements.map[id];
411 }
412
414 {
415 return EClass.sources.elements.alias.TryGetValue(GetType().ToString());
416 }
417
418 public virtual int GetSourcePotential(int v)
419 {
420 return 0;
421 }
422
423 public virtual Sprite GetSprite()
424 {
425 return null;
426 }
427
428 public int GetMaterialSourceValue(Thing t, int v)
429 {
430 if (id == 2 || v < 0)
431 {
432 return v;
433 }
434 if (IsTrait)
435 {
436 if (t.IsFurniture)
437 {
438 return v;
439 }
440 return Mathf.Min(v + t.encLV * 10, 60);
441 }
442 return v * (100 + t.encLV * 10) / 100;
443 }
444
445 public virtual long GetSourceValue(long v, int lv, SourceValueType type)
446 {
447 return type switch
448 {
449 SourceValueType.Chara => v * (100 + (lv - 1 + EClass.rnd(lv / 2 + 1)) * source.lvFactor / 10) / 100 + (long)EClass.rnd(lv / 3) * (long)source.lvFactor / 100,
450 SourceValueType.Fixed => v,
451 _ => v * ((source.encFactor == 0) ? 100 : (50 + EClass.rnd(100) + (long)EClass.rnd((int)Mathf.Sqrt(lv * 100)) * (long)source.encFactor / 100)) / 100,
452 };
453 }
454
455 public virtual Sprite GetIcon(string suffix = "")
456 {
457 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_" + source.alias + suffix) ?? SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_" + source.aliasParent + suffix) ?? SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "cat_" + source.category);
458 }
459
460 public bool IsActive(Card c)
461 {
462 if (IsGlobalElement && c != null && !c.c_idDeity.IsEmpty() && c.c_idDeity != EClass.pc.idFaith)
463 {
464 return false;
465 }
466 return Value != 0;
467 }
468
469 public int SortVal(bool charaSheet = false)
470 {
471 int num = ((source.sort != 0) ? source.sort : id);
472 return (IsFlag ? 100000 : 0) + ((!charaSheet && IsGlobalElement) ? (-1000000) : 0) + (((IsFoodTrait || IsTrait) && owner != null && owner.Card != null && owner.Card.ShowFoodEnc) ? 10000 : 0) + num;
473 }
474
475 public virtual bool CanLink(ElementContainer owner)
476 {
477 return false;
478 }
479
480 public bool HasTag(string tag)
481 {
482 return source.tag.Contains(tag);
483 }
484
485 public void SetImage(Image i)
486 {
487 Sprite icon = GetIcon();
488 if ((bool)icon)
489 {
490 i.sprite = icon;
491 i.SetNativeSize();
492 }
493 }
494
495 public virtual string GetDetail()
496 {
497 return source.GetDetail();
498 }
499
500 public bool IsFactionElement(Chara c)
501 {
502 if (c == null)
503 {
504 return false;
505 }
506 if (c.IsPCFaction)
507 {
508 foreach (Element value in EClass.pc.faction.charaElements.dict.Values)
509 {
510 if (value.id == id && value.Value > 0)
511 {
512 return true;
513 }
514 }
515 }
516 if (c.faithElements != null)
517 {
518 foreach (Element value2 in c.faithElements.dict.Values)
519 {
520 if (value2.id == id && value2.Value > 0)
521 {
522 return true;
523 }
524 }
525 }
526 return false;
527 }
528
530 {
531 if (!source.aliasParent.IsEmpty())
532 {
533 return c.elements.GetOrCreateElement(source.aliasParent);
534 }
535 return null;
536 }
537
538 public static Dictionary<int, int> GetElementMap(int[] list)
539 {
540 Dictionary<int, int> dictionary = new Dictionary<int, int>();
541 if (list != null)
542 {
543 for (int i = 0; i < list.Length / 2; i++)
544 {
545 dictionary[list[i * 2]] = list[i * 2 + 1];
546 }
547 }
548 return dictionary;
549 }
550
551 public static Dictionary<int, int> GetElementMap(int[] list, Dictionary<int, int> map)
552 {
553 if (list != null)
554 {
555 for (int i = 0; i < list.Length / 2; i++)
556 {
557 map[list[i * 2]] = list[i * 2 + 1];
558 }
559 }
560 return map;
561 }
562
563 public static SourceElement.Row GetRandomElement(int lv = 1, bool useWeight = true)
564 {
565 if (lv > 100)
566 {
567 lv = 100;
568 }
569 if (ListElements.Count == 0)
570 {
571 foreach (SourceElement.Row row in EClass.sources.elements.rows)
572 {
573 if (row.categorySub == "eleAttack" && row.chance > 0)
574 {
575 ListElements.Add(row);
576 }
577 }
578 }
579 List<Tuple<SourceElement.Row, int>> list = new List<Tuple<SourceElement.Row, int>>();
580 foreach (SourceElement.Row listElement in ListElements)
581 {
582 int num = 40 * (listElement.eleP - 100) / 100;
583 if (list.Count == 0 || num < lv)
584 {
585 list.Add(new Tuple<SourceElement.Row, int>(listElement, num));
586 }
587 }
588 return (useWeight ? list.RandomItemWeighted((Tuple<SourceElement.Row, int> a) => 10000 / (100 + (lv - a.Item2) * 25)) : list.RandomItem()).Item1;
589 }
590
591 public void WriteNote(UINote n, ElementContainer owner = null, Action<UINote> onWriteNote = null)
592 {
593 n.Clear();
594 _WriteNote(n, owner, onWriteNote, isRef: false);
595 n.Build();
596 }
597
598 public void WriteNoteWithRef(UINote n, ElementContainer owner, Action<UINote> onWriteNote, Element refEle)
599 {
600 n.Clear();
601 _WriteNote(n, owner, onWriteNote, isRef: false);
602 if (refEle.Value > 0)
603 {
604 refEle._WriteNote(n, owner, onWriteNote, isRef: true);
605 }
607 {
609 }
610 n.Build();
611 }
612
613 public void _WriteNote(UINote n, Chara c, Act act)
614 {
616 Act.Cost cost = e.GetCost(c);
617 int p = e.GetPower(c);
618 n.Space(6);
619 string text = source.GetText("textExtra");
620 if (!text.IsEmpty())
621 {
622 string[] array = text.Split(',');
623 foreach (string text2 in array)
624 {
625 if (text2.StartsWith("@"))
626 {
627 Condition condition = Condition.Create(text2.Replace("@", ""), p);
628 condition.owner = c;
629 if (condition is ConWeapon conWeapon)
630 {
631 conWeapon.cha = c.CHA;
632 }
633 if (!source.aliasRef.IsEmpty())
634 {
635 condition.SetElement(EClass.sources.elements.alias[source.aliasRef].id);
636 }
637 switch (act.id)
638 {
639 case 6902:
640 condition.SetRefVal(79, 268);
641 break;
642 case 8510:
643 case 8710:
644 condition.SetRefVal(79, (act.id == 8710) ? 222 : 221);
645 break;
646 }
647 n.AddText("_bullet".lang() + (condition.HasDuration ? "hintCon" : "hintCon2").lang(condition.Name, condition.EvaluateTurn(p).ToString() ?? "") + ((condition.HasDuration && condition.MaxDuration != 0 && condition.MaxDuration < 999) ? "hintCon3".lang(condition.MaxDuration.ToString() ?? "") : ""));
648 condition._WriteNote(n, asChild: true);
649 }
650 else
651 {
652 string text3 = text2.Replace("#calc", Calc()).Replace(";", ",");
653 if (!source.aliasRef.IsEmpty())
654 {
655 text3 = text3.Replace("#ele", EClass.sources.elements.alias[source.aliasRef].GetName().ToLower());
656 }
657 n.AddText("_bullet".lang() + text3);
658 }
659 }
660 }
661 if (source.tag.Contains("syncRide"))
662 {
663 n.AddText("_bullet".lang() + "hintSyncRide".lang());
664 }
665 if (EClass.pc.HasElement(1274) && source.tag.Contains("dontForget"))
666 {
667 n.AddText("_bullet".lang() + "hintDontForget".lang());
668 }
670 {
671 int i = id;
672 if (i != 8230 && i != 8232)
673 {
674 n.AddText("_bullet".lang() + "hintPartyAbility".lang());
675 }
676 }
677 if (!act.LocalAct)
678 {
679 n.Space();
680 n.AddText("isGlobalAct".lang());
681 }
682 if (cost.type == Act.CostType.None || cost.cost == 0 || act.owner is ElementContainerField)
683 {
684 return;
685 }
686 n.Space(4);
687 UIItem uIItem = n.AddExtra<UIItem>("costPrice");
688 int num = cost.cost;
689 if (cost.type == Act.CostType.MP)
690 {
691 if (c.Evalue(483) > 0)
692 {
693 num = cost.cost * 100 / (100 + (int)Mathf.Sqrt(c.Evalue(483) * 10) * 3);
694 }
695 if (c.IsPC && c.HasCondition<StanceManaCost>())
696 {
697 int num2 = c.Evalue(1657);
698 if (num2 > 0 && (vPotential >= 2 || c.ability.Has(act.id)))
699 {
700 num = num * (100 - num2 * 20) / 100;
701 }
702 }
703 }
704 string text4 = cost.cost.ToString() ?? "";
705 if (num != cost.cost)
706 {
707 text4 = num + " (" + text4 + ")";
708 }
709 uIItem.text1.SetText(text4, (((cost.type == Act.CostType.MP) ? c.mana.value : c.stamina.value) >= num) ? FontColor.Good : FontColor.Bad);
710 uIItem.image1.sprite = ((cost.type == Act.CostType.MP) ? EClass.core.refs.icons.mana : EClass.core.refs.icons.stamina);
711 uIItem.image1.SetNativeSize();
712 string Calc()
713 {
714 Dice dice = Dice.Create(e, c);
715 if (dice == null)
716 {
717 return p.ToString() ?? "";
718 }
719 return dice.ToString();
720 }
721 }
722
724 {
725 UIItem uIItem = n.AddHeader("HeaderAbility", FullName.ToTitleCase(wholeText: true), GetSprite());
726 uIItem.text2.text = ((this is Spell) ? (vPotential.ToString() ?? "") : "-");
727 (this as Act)?.SetImage(uIItem.image1);
728 }
729
730 public void _WriteNote(UINote n, ElementContainer owner, Action<UINote> onWriteNote, bool isRef, bool addHeader = true)
731 {
732 bool flag = this is FieldEffect && owner.Chara == null;
733 if (addHeader)
734 {
735 if (isRef)
736 {
737 UIText.globalSizeMod = -2;
738 n.AddHeader("prevElement".lang(FullName));
739 }
740 else if (this is Act && !flag)
741 {
743 n.Space(8);
744 }
745 else
746 {
747 n.AddHeader(FullName.ToTitleCase(wholeText: true));
748 }
749 }
750 string detail = GetDetail();
751 if (!detail.IsEmpty())
752 {
753 n.AddText("NoteText_flavor_element", detail);
754 n.Space(6);
755 }
756 int num = vLink;
757 if (owner.Chara != null && owner.Chara.IsPCFaction)
758 {
760 }
761 bool flag2 = ShowValue;
762 bool flag3 = ShowRelativeAttribute && !flag;
763 if (source.category == "landfeat")
764 {
765 flag2 = false;
766 flag3 = false;
767 }
768 if (!flag)
769 {
770 if (this is Act)
771 {
772 Act act = ACT.Create(source.id);
773 UIItem uIItem = n.AddItem("ItemAbility");
774 uIItem.text1.text = "vValue".lang(DisplayValue.ToString() ?? "", ValueWithoutLink + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num))));
775 uIItem.text2.text = act.TargetType.ToString().lang();
776 uIItem.text3.text = ((this is Spell && owner.Chara != null) ? (owner.Chara.CalcCastingChance(owner.GetOrCreateElement(act.source.id)) + "%") : "-") ?? "";
777 }
778 else if (flag2)
779 {
780 n.AddTopic("TopicLeft", "vCurrent".lang(), "vValue".lang(DisplayValue.ToString() ?? "", ValueWithoutLink + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num)))));
781 if (ShowPotential)
782 {
783 num = vTempPotential;
784 n.AddTopic("TopicLeft", "vPotential".lang(), "vValue".lang(Potential.ToString() ?? "", vPotential + vSourcePotential + MinPotential + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num)))));
785 }
787 }
788 }
789 if (flag3 && !source.aliasParent.IsEmpty())
790 {
791 Element element = Create(source.aliasParent);
792 UIItem uIItem2 = n.AddItem("ItemRelativeAttribute");
793 uIItem2.text1.SetText(element.Name);
794 element.SetImage(uIItem2.image1);
795 bool flag4 = source.lvFactor > 0 && this is Act;
796 uIItem2.text2.SetActive(flag4);
797 uIItem2.text3.SetActive(flag4);
798 if (flag4)
799 {
800 uIItem2.text2.SetText(GetPower(EClass.pc).ToString() ?? "");
801 }
802 }
803 OnWriteNote(n, owner);
805 {
806 n.AddTopic("TopicLeft", "Class:", GetType()?.ToString() ?? "");
807 n.AddTopic("TopicLeft", "vExp".lang(), vExp.ToString() ?? "");
808 n.AddTopic("TopicLeft", "vSource", vSource.ToString() ?? "");
809 n.AddTopic("TopicLeft", "vSourcePotential", vSourcePotential.ToString() ?? "");
810 n.AddTopic("TopicLeft", "vPotential", vPotential.ToString() ?? "");
811 n.AddTopic("TopicLeft", "Potential", Potential.ToString() ?? "");
812 }
814 onWriteNote?.Invoke(n);
815 if (ShowBonuses && owner.Chara != null)
816 {
817 BonusInfo bonusInfo = new BonusInfo();
818 bonusInfo.ele = this;
819 bonusInfo.n = n;
820 bonusInfo.c = owner.Chara;
821 bonusInfo.WriteNote();
822 }
823 UIText.globalSizeMod = 0;
824 }
825
826 public void AddEncNote(UINote n, Card Card, ElementContainer.NoteMode mode = ElementContainer.NoteMode.Default, Func<Element, string, string> funcText = null, Action<UINote, Element> onAddNote = null)
827 {
828 string text = "";
829 switch (mode)
830 {
831 case ElementContainer.NoteMode.Domain:
832 n.AddText(Name, FontColor.Default);
833 return;
834 case ElementContainer.NoteMode.Default:
835 case ElementContainer.NoteMode.BonusTrait:
836 {
837 bool flag = source.tag.Contains("common");
838 string categorySub = source.categorySub;
839 bool flag2 = false;
840 bool flag3 = (source.tag.Contains("neg") ? (Value > 0) : (Value < 0));
841 int num = Mathf.Abs(Value);
842 bool flag4 = Card?.ShowFoodEnc ?? false;
843 bool flag5 = Card != null && this is Ability && (Card.IsWeapon || Card.IsThrownWeapon || Card.IsAmmo || Card.category.slot == 35);
844 if (IsTrait || (flag4 && IsFoodTrait))
845 {
846 string[] textArray = source.GetTextArray("textAlt");
847 int num2 = Mathf.Clamp(Value / 10 + 1, (Value < 0 || textArray.Length <= 2) ? 1 : 2, textArray.Length - 1);
848 text = "altEnc".lang(textArray[0].IsEmpty(Name), textArray[num2], EClass.debug.showExtra ? (Value + " " + Name) : "");
849 flag3 = num2 <= 1 || textArray.Length <= 2;
850 flag2 = true;
851 }
852 else if (flag5)
853 {
854 text = "isProc".lang(Name);
855 flag3 = false;
856 }
857 else if (categorySub == "resist" || this is Feat)
858 {
859 text = ("isResist" + (flag3 ? "Neg" : "")).lang(Name);
860 }
861 else if (categorySub == "eleAttack")
862 {
863 text = "isEleAttack".lang(Name);
864 }
865 else if (!source.textPhase.IsEmpty() && Value > 0)
866 {
867 text = source.GetText("textPhase");
868 }
869 else
870 {
871 string name = Name;
872 bool flag6 = source.category == "skill" || (source.category == "attribute" && !source.textPhase.IsEmpty());
873 bool flag7 = source.category == "enchant";
874 if (source.tag.Contains("multiplier"))
875 {
876 flag6 = (flag7 = false);
877 name = EClass.sources.elements.alias[source.aliasRef].GetName();
878 }
879 flag2 = !(flag6 || flag7);
880 text = (flag6 ? "textEncSkill" : (flag7 ? "textEncEnc" : "textEnc")).lang(name, num + (source.tag.Contains("ratio") ? "%" : ""), ((Value > 0) ? "encIncrease" : "encDecrease").lang());
881 }
882 int num3 = ((!(this is Resistance)) ? 1 : 0);
883 int num4 = 5;
884 if (id == 484)
885 {
886 num3 = 0;
887 num4 = 1;
888 }
889 if (!flag && !flag2 && !source.tag.Contains("flag"))
890 {
891 text = text + " [" + "*".Repeat(Mathf.Clamp(num * source.mtp / num4 + num3, 1, 5)) + ((num * source.mtp / num4 + num3 > 5) ? "+" : "") + "]";
892 }
893 if (HasTag("hidden") && mode != ElementContainer.NoteMode.BonusTrait)
894 {
895 text = "(debug)" + text;
896 }
897 FontColor color = (flag ? FontColor.Default : (flag3 ? FontColor.Bad : FontColor.Good));
898 if (IsGlobalElement)
899 {
900 text = text + " " + (IsFactionWideElement ? "_factionWide" : "_partyWide").lang();
901 if (!IsActive(Card))
902 {
903 return;
904 }
905 color = FontColor.Myth;
906 }
907 if (flag4 && IsFoodTrait && !IsFoodTraitMain)
908 {
909 color = FontColor.FoodMisc;
910 }
911 if (id == 2 && Value >= 0)
912 {
913 color = FontColor.FoodQuality;
914 }
915 if (id == 484 && owner != null && owner.Card != null && owner.Card.CountRune(countFree: false) >= owner.Card.MaxRune())
916 {
917 color = FontColor.Gray;
918 }
919 if (funcText != null)
920 {
921 text = funcText(this, text);
922 }
923 UIItem uIItem = n.AddText("NoteText_enc", text, color);
924 Sprite sprite = EClass.core.refs.icons.enc.enc;
925 Thing thing = Card?.Thing;
926 if (thing != null)
927 {
928 if (thing.material.HasEnc(id))
929 {
930 sprite = EClass.core.refs.icons.enc.mat;
931 }
932 foreach (int key in thing.source.elementMap.Keys)
933 {
934 if (key == id)
935 {
936 sprite = EClass.core.refs.icons.enc.card;
937 }
938 }
939 if (thing.ShowFoodEnc && IsFoodTrait)
940 {
942 }
943 if (id == thing.GetInt(107))
944 {
945 sprite = EClass.core.refs.icons.enc.cat;
946 }
947 if (thing.GetRuneEnc(id) != null)
948 {
949 sprite = EClass.core.refs.icons.enc.rune;
950 }
951 }
952 if ((bool)sprite)
953 {
954 uIItem.image1.SetActive(enable: true);
955 uIItem.image1.sprite = sprite;
956 }
957 uIItem.image2.SetActive(source.IsWeaponEnc || source.IsShieldEnc);
958 uIItem.image2.sprite = (source.IsWeaponEnc ? EClass.core.refs.icons.enc.weaponEnc : EClass.core.refs.icons.enc.shieldEnc);
959 onAddNote?.Invoke(n, this);
960 return;
961 }
962 }
963 UIItem uIItem2 = n.AddTopic("TopicAttribute", Name, "".TagColor((ValueWithoutLink > 0) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad, ValueWithoutLink.ToString() ?? ""));
964 if ((bool)uIItem2.button1)
965 {
966 uIItem2.button1.tooltip.onShowTooltip = delegate(UITooltip t)
967 {
969 };
970 }
971 SetImage(uIItem2.image1);
972 Image image = uIItem2.image2;
973 int value = (Potential - 80) / 20;
974 image.enabled = Potential != 80;
975 image.sprite = EClass.core.refs.spritesPotential[Mathf.Clamp(Mathf.Abs(value), 0, EClass.core.refs.spritesPotential.Count - 1)];
976 image.color = ((Potential - 80 >= 0) ? Color.white : new Color(1f, 0.7f, 0.7f));
977 }
978
979 public virtual void OnWriteNote(UINote n, ElementContainer owner)
980 {
981 }
982
983 public virtual void OnChangeValue()
984 {
985 }
986
988 {
989 if (owner == null || source.levelBonus.IsEmpty())
990 {
991 return;
992 }
993 bool flag = n == null;
994 string[] array = (source.GetText("levelBonus", returnNull: true) ?? source.levelBonus).Split(Environment.NewLine.ToCharArray());
995 if (!flag)
996 {
997 n.Space(10);
998 }
999 string[] array2 = array;
1000 foreach (string obj in array2)
1001 {
1002 string[] array3 = obj.Split(',');
1003 int lv = array3[0].ToInt();
1004 SourceElement.Row row = (EClass.sources.elements.alias.ContainsKey(array3[1]) ? EClass.sources.elements.alias[array3[1]] : null);
1005 if (flag)
1006 {
1007 if (lv > ValueWithoutLink)
1008 {
1009 break;
1010 }
1011 if (row != null && !owner.Has(row.id) && owner is ElementContainerZone)
1012 {
1013 owner.Learn(row.id);
1014 }
1015 }
1016 else
1017 {
1018 string s = ((row != null) ? row.GetName() : array3[1]);
1019 n.AddText((" Lv " + lv).TagColor(FontColor.Topic) + " " + s.TagColorGoodBad(() => (row != null) ? owner.Has(row.id) : (lv <= ValueWithoutLink), () => false));
1020 }
1021 }
1022 if (!flag)
1023 {
1024 n.Space(4);
1025 }
1026 }
1027
1029 {
1030 switch (m)
1031 {
1032 case UIList.SortMode.ByCategory:
1033 return source.id + ((!source.aliasParent.IsEmpty()) ? (EClass.sources.elements.alias[source.aliasParent].id * 10000) : 0);
1034 case UIList.SortMode.ByNumber:
1035 return -vPotential * 10000 + source.id;
1036 case UIList.SortMode.ByElementParent:
1037 if (!source.aliasParent.IsEmpty())
1038 {
1039 return EClass.sources.elements.alias[source.aliasParent].sort;
1040 }
1041 return id;
1042 default:
1043 if (source.sort == 0)
1044 {
1045 return source.id;
1046 }
1047 return source.sort;
1048 }
1049 }
1050
1051 public virtual Act.Cost GetCost(Chara c)
1052 {
1053 if (source.cost[0] == 0)
1054 {
1055 Act.Cost result = default(Act.Cost);
1056 result.type = Act.CostType.None;
1057 return result;
1058 }
1059 Act.Cost result2 = default(Act.Cost);
1060 if (this is Spell)
1061 {
1062 result2.type = Act.CostType.MP;
1063 int num = EClass.curve(Value, 50, 10);
1064 result2.cost = source.cost[0] * (100 + ((!source.tag.Contains("noCostInc")) ? (num * 3) : 0)) / 100;
1065 }
1066 else
1067 {
1068 result2.type = Act.CostType.SP;
1069 result2.cost = source.cost[0];
1070 switch (source.id)
1071 {
1072 case 6020:
1073 result2.cost = Mathf.Min(c.stamina.max / 3 + 10, 30);
1074 break;
1075 case 6663:
1076 case 6664:
1077 case 6665:
1078 {
1079 int num2 = -2 + c.body.CountWeapons();
1080 result2.cost += num2 * 2;
1081 break;
1082 }
1083 }
1084 }
1085 if (!c.IsPC && result2.cost > 2)
1086 {
1087 result2.cost /= 2;
1088 }
1089 return result2;
1090 }
1091
1092 public virtual int GetPower(Card c)
1093 {
1094 return 100;
1095 }
1096
1097 public virtual void SetTextValue(UIText text, bool shorten = false)
1098 {
1099 string text2 = DisplayValue.ToString() ?? "";
1100 if (ShowXP)
1101 {
1102 text2 += ".".TagSize((vExp / 10).ToString("D2") ?? "", 11);
1103 }
1104 if (vLink != 0)
1105 {
1106 string text3 = ((vLink > 0) ? "+" : "") + (shorten ? vLink.ToShortNumber() : ((object)vLink));
1107 text2 = "<color=" + ((DisplayValue > ValueWithoutLink) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad).ToHex() + ">" + text2 + (" (" + text3 + ")").TagSize(13) + "</color>";
1108 }
1109 text.text = text2;
1110 }
1111
1112 public virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv = -1)
1113 {
1114 return false;
1115 }
1116
1117 public virtual void WritePurchaseReq(UINote n, int lv = 1)
1118 {
1119 }
1120
1121 public static Element Create(int id, int v = 0)
1122 {
1123 SourceElement.Row row = EClass.sources.elements.map.TryGetValue(id);
1124 if (row == null)
1125 {
1126 return null;
1127 }
1128 Element obj = ClassCache.Create<Element>(row.type.IsEmpty("Element"), "Elin") ?? new Element();
1129 obj.id = id;
1130 obj.vBase = v;
1131 obj._source = row;
1132 return obj;
1133 }
1134
1135 public static Element Create(string id, int v = 1)
1136 {
1137 return Create(EClass.sources.elements.alias[id].id, v);
1138 }
1139
1140 public static int GetId(string alias)
1141 {
1142 return EClass.sources.elements.alias[alias].id;
1143 }
1144
1145 public static int GetResistLv(int v)
1146 {
1147 int num = v / 5;
1148 if (num < -2)
1149 {
1150 num = -2;
1151 }
1152 if (num > 4)
1153 {
1154 num = 4;
1155 }
1156 return num;
1157 }
1158
1159 public static long GetResistDamage(long dmg, int v, int power = 0)
1160 {
1161 int num = GetResistLv(v);
1162 if (power > 0 && num > 0)
1163 {
1164 num = Mathf.Max(num - power, 0);
1165 }
1166 if (num >= 4)
1167 {
1168 return 0L;
1169 }
1170 return num switch
1171 {
1172 3 => dmg / 4,
1173 2 => dmg / 3,
1174 1 => dmg / 2,
1175 0 => dmg,
1176 -1 => dmg * 3 / 2,
1177 -2 => dmg * 2,
1178 _ => dmg * 2,
1179 };
1180 }
1181}
float Calc(float lhs)
FontColor
Definition: FontColor.cs:2
SourceValueType
Definition: ACT.cs:6
static Act Create(int id)
Definition: ACT.cs:36
Definition: ACT.cs:62
CostType
Definition: ACT.cs:64
virtual bool LocalAct
Definition: ACT.cs:173
virtual TargetType TargetType
Definition: ACT.cs:144
virtual bool HaveLongPressAction
Definition: ACT.cs:135
virtual ElementContainer GetElementContainer()
void SetElement(int id)
virtual bool HasDuration
virtual int MaxDuration
virtual string Name
override void _WriteNote(UINote n, bool asChild=false)
virtual int EvaluateTurn(int p)
void SetRefVal(int a, int b)
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
Definition: Card.cs:11
int CountRune(bool countFree=true)
Definition: Card.cs:3798
bool IsPCFactionOrMinion
Definition: Card.cs:2326
ElementContainerCard elements
Definition: Card.cs:42
string id
Definition: Card.cs:36
SourceMaterial.Row material
Definition: Card.cs:2103
string c_idDeity
Definition: Card.cs:1621
int CHA
Definition: Card.cs:2401
bool IsFurniture
Definition: Card.cs:2305
int MaxRune()
Definition: Card.cs:3814
int encLV
Definition: Card.cs:329
SocketData GetRuneEnc(int idEle)
Definition: Card.cs:3783
virtual Thing Thing
Definition: Card.cs:2110
int Evalue(int ele)
Definition: Card.cs:2688
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2551
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6304
bool ShowFoodEnc
Definition: Card.cs:2244
bool Has(int id)
List< BodySlot > slots
Definition: CharaBody.cs:8
int CountWeapons()
Definition: CharaBody.cs:560
Definition: Chara.cs:10
CharaBody body
Definition: Chara.cs:94
string idFaith
Definition: Chara.cs:235
Faction faction
Definition: Chara.cs:431
override bool IsPC
Definition: Chara.cs:630
ElementContainer tempElements
Definition: Chara.cs:36
List< Condition > conditions
Definition: Chara.cs:215
bool HasCondition(string alias)
Definition: Chara.cs:9811
int CalcCastingChance(Element e, int num=1)
Definition: Chara.cs:6352
override bool IsPCFaction
Definition: Chara.cs:689
Stats stamina
Definition: Chara.cs:1181
ElementContainer faithElements
Definition: Chara.cs:38
void RefreshSpeed(Element.BonusInfo info=null)
Definition: Chara.cs:1954
Religion faith
Definition: Chara.cs:443
CharaAbility ability
Definition: Chara.cs:428
bool IsMachine
Definition: Chara.cs:926
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
Definition: Condition.cs:47
bool showExtra
Definition: CoreDebug.cs:183
Sprite traitFood
Definition: CoreRef.cs:72
Sprite shieldEnc
Definition: CoreRef.cs:78
Sprite mana
Definition: CoreRef.cs:125
Sprite stamina
Definition: CoreRef.cs:127
List< Sprite > spritesPotential
Definition: CoreRef.cs:376
Icons icons
Definition: CoreRef.cs:356
CoreRef refs
Definition: Core.cs:51
Definition: Dice.cs:5
override string ToString()
Definition: Dice.cs:115
static Dice Create(Element ele, Card c)
Definition: Dice.cs:120
Definition: EClass.cs:6
static int curve(long _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static Core core
Definition: EClass.cs:7
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
const int air
Definition: ELEMENT.cs:10
const int stimulant
Definition: ELEMENT.cs:28
const int effectRange
Definition: ELEMENT.cs:32
const int antidote
Definition: ELEMENT.cs:18
const int weight
Definition: ELEMENT.cs:48
const int growth
Definition: ELEMENT.cs:54
const int old_heal
Definition: ELEMENT.cs:70
const int race
Definition: ELEMENT.cs:76
const int comfort
Definition: ELEMENT.cs:34
const int cute
Definition: ELEMENT.cs:16
const int decay
Definition: ELEMENT.cs:58
const int purity
Definition: ELEMENT.cs:26
const int nutrition
Definition: ELEMENT.cs:38
const int difficulty
Definition: ELEMENT.cs:8
const int _void
Definition: ELEMENT.cs:36
const int heat
Definition: ELEMENT.cs:64
const int rare
Definition: ELEMENT.cs:14
const int taste
Definition: ELEMENT.cs:60
const int size
Definition: ELEMENT.cs:50
const int quality
Definition: ELEMENT.cs:42
const int piety
Definition: ELEMENT.cs:78
const int nerve
Definition: ELEMENT.cs:20
const int poison
Definition: ELEMENT.cs:62
static readonly int[] IDS
Definition: ELEMENT.cs:82
const int hotspring
Definition: ELEMENT.cs:24
const int cure
Definition: ELEMENT.cs:74
const int roasted
Definition: ELEMENT.cs:12
const int water
Definition: ELEMENT.cs:56
const int fire
Definition: ELEMENT.cs:80
const int recharge
Definition: ELEMENT.cs:30
const int lv
Definition: ELEMENT.cs:40
const int old_detox
Definition: ELEMENT.cs:68
const int socket
Definition: ELEMENT.cs:46
const int old_antidote
Definition: ELEMENT.cs:72
const int blood
Definition: ELEMENT.cs:22
const int d
Definition: ELEMENT.cs:44
const int hardness
Definition: ELEMENT.cs:52
const int cut
Definition: ELEMENT.cs:66
Dictionary< int, Element > dict
void Learn(int ele, int v=1)
bool Has(int ele)
virtual Card Card
int Value(int ele)
virtual int ValueBonus(Element e)
Element GetOrCreateElement(Element ele)
virtual Chara Chara
Element GetElement(string alias)
void AddText(string text, FontColor col=FontColor.Warning)
Definition: ELEMENT.cs:113
void WriteNote()
Definition: ELEMENT.cs:143
void AddFix(int v, string text)
Definition: ELEMENT.cs:134
void AddText(long v, string text, string textBad=null)
Definition: ELEMENT.cs:119
Element ele
Definition: ELEMENT.cs:94
void CheckFirst()
Definition: ELEMENT.cs:104
bool IsFactionElement(Chara c)
Definition: ELEMENT.cs:500
virtual bool ShowPotential
Definition: ELEMENT.cs:339
virtual bool ShowMsgOnValueChanged
Definition: ELEMENT.cs:335
virtual bool CanGainExp
Definition: ELEMENT.cs:307
virtual Sprite GetSprite()
Definition: ELEMENT.cs:423
virtual int DisplayValue
Definition: ELEMENT.cs:295
virtual void OnChangeValue()
Definition: ELEMENT.cs:983
virtual long GetSourceValue(long v, int lv, SourceValueType type)
Definition: ELEMENT.cs:445
static Element Create(string id, int v=1)
Definition: ELEMENT.cs:1135
int ValueWithoutLink
Definition: ELEMENT.cs:301
static int[] List_Body
Definition: ELEMENT.cs:251
static SourceElement.Row GetRandomElement(int lv=1, bool useWeight=true)
Definition: ELEMENT.cs:563
virtual bool ShowXP
Definition: ELEMENT.cs:324
virtual bool UseExpMod
Definition: ELEMENT.cs:317
int Potential
Definition: ELEMENT.cs:305
int GetMaterialSourceValue(Thing t, int v)
Definition: ELEMENT.cs:428
virtual SourceElement.Row GetSource()
Definition: ELEMENT.cs:413
int id
Definition: ELEMENT.cs:257
int vBase
Definition: ELEMENT.cs:259
virtual void WritePurchaseReq(UINote n, int lv=1)
Definition: ELEMENT.cs:1117
SourceElement.Row source
Definition: ELEMENT.cs:280
int vExp
Definition: ELEMENT.cs:261
virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
Definition: ELEMENT.cs:1112
void _WriteNote(UINote n, Chara c, Act act)
Definition: ELEMENT.cs:613
int vPotential
Definition: ELEMENT.cs:263
static SourceElement.Row Get(int id)
Definition: ELEMENT.cs:408
virtual int GetSourcePotential(int v)
Definition: ELEMENT.cs:418
ElementContainer owner
Definition: ELEMENT.cs:273
virtual Sprite GetIcon(string suffix="")
Definition: ELEMENT.cs:455
static int GetResistLv(int v)
Definition: ELEMENT.cs:1145
virtual int MinValue
Definition: ELEMENT.cs:297
bool HasTag(string tag)
Definition: ELEMENT.cs:480
virtual int CostTrain
Definition: ELEMENT.cs:319
int vTempPotential
Definition: ELEMENT.cs:265
static List< SourceElement.Row > ListAttackElements
Definition: ELEMENT.cs:277
static int[] List_MainAttributes
Definition: ELEMENT.cs:247
static int GetId(string alias)
Definition: ELEMENT.cs:1140
virtual string FullName
Definition: ELEMENT.cs:313
void AddHeaderAbility(UINote n)
Definition: ELEMENT.cs:723
static Dictionary< int, int > GetElementMap(int[] list, Dictionary< int, int > map)
Definition: ELEMENT.cs:551
void AddEncNote(UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
Definition: ELEMENT.cs:826
int GetSortVal(UIList.SortMode m)
Definition: ELEMENT.cs:1028
virtual int GetPower(Card c)
Definition: ELEMENT.cs:1092
void SetImage(Image i)
Definition: ELEMENT.cs:485
int Value
Definition: ELEMENT.cs:299
void CheckLevelBonus(ElementContainer owner, UINote n=null)
Definition: ELEMENT.cs:987
virtual bool ShowRelativeAttribute
Definition: ELEMENT.cs:345
void WriteNoteWithRef(UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
Definition: ELEMENT.cs:598
bool IsFoodTrait
Definition: ELEMENT.cs:371
virtual string Name
Definition: ELEMENT.cs:311
static Dictionary< int, int > GetElementMap(int[] list)
Definition: ELEMENT.cs:538
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1121
virtual bool CanLink(ElementContainer owner)
Definition: ELEMENT.cs:475
int vLink
Definition: ELEMENT.cs:267
virtual Act.Cost GetCost(Chara c)
Definition: ELEMENT.cs:1051
virtual bool ShowEncNumber
Definition: ELEMENT.cs:367
static string GetName(string alias)
Definition: ELEMENT.cs:403
static List< SourceElement.Row > ListElements
Definition: ELEMENT.cs:275
virtual bool ShowBonuses
Definition: ELEMENT.cs:347
virtual bool PotentialAsStock
Definition: ELEMENT.cs:343
int vSource
Definition: ELEMENT.cs:269
void WriteNote(UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
Definition: ELEMENT.cs:591
static Element Void
Definition: ELEMENT.cs:245
virtual bool UsePotential
Definition: ELEMENT.cs:341
int vSourcePotential
Definition: ELEMENT.cs:271
void _WriteNote(UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
Definition: ELEMENT.cs:730
bool IsGlobalElement
Definition: ELEMENT.cs:352
bool IsPartyWideElement
Definition: ELEMENT.cs:365
bool IsTrait
Definition: ELEMENT.cs:369
bool IsFactionWideElement
Definition: ELEMENT.cs:363
static int[] List_Mind
Definition: ELEMENT.cs:253
virtual void OnWriteNote(UINote n, ElementContainer owner)
Definition: ELEMENT.cs:979
virtual string GetDetail()
Definition: ELEMENT.cs:495
Element GetParent(Card c)
Definition: ELEMENT.cs:529
virtual int MinPotential
Definition: ELEMENT.cs:303
virtual int CostLearn
Definition: ELEMENT.cs:321
SourceElement.Row _source
Definition: ELEMENT.cs:255
virtual void SetTextValue(UIText text, bool shorten=false)
Definition: ELEMENT.cs:1097
static int[] List_MainAttributesMajor
Definition: ELEMENT.cs:249
static long GetResistDamage(long dmg, int v, int power=0)
Definition: ELEMENT.cs:1159
const int Div
Definition: ELEMENT.cs:243
Act act
Definition: ELEMENT.cs:401
bool IsFoodTraitMain
Definition: ELEMENT.cs:374
bool IsFlag
Definition: ELEMENT.cs:309
virtual bool ShowValue
Definition: ELEMENT.cs:337
bool IsMainAttribute
Definition: ELEMENT.cs:390
virtual int ExpToNext
Definition: ELEMENT.cs:315
bool IsActive(Card c)
Definition: ELEMENT.cs:460
virtual string ShortName
Definition: ELEMENT.cs:349
int SortVal(bool charaSheet=false)
Definition: ELEMENT.cs:469
ElementContainerFaction charaElements
Definition: FACTION.cs:146
Definition: FEAT.cs:333
int CountKeyItem(string alias)
Definition: Player.cs:2240
virtual string id
Definition: Religion.cs:26
static SkinColorProfile CurrentColors
Definition: SkinManager.cs:84
override string GetName()
SourceKeyItem keyItems
SourceElement elements
Definition: SPELL.cs:630
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
Definition: UIItem.cs:5
Image image2
Definition: UIItem.cs:16
UIText text3
Definition: UIItem.cs:10
UIButton button1
Definition: UIItem.cs:18
Image image1
Definition: UIItem.cs:14
UIText text2
Definition: UIItem.cs:8
UIText text1
Definition: UIItem.cs:6
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27
Definition: UINote.cs:6
void Clear()
Definition: UINote.cs:35
UIItem AddItem(string id)
Definition: UINote.cs:139
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddTopic(string id, string text, string value=null)
Definition: UINote.cs:144
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62
void Build()
Definition: UINote.cs:49
Definition: UIText.cs:6
void SetText(string s)
Definition: UIText.cs:163
UINote note
Definition: UITooltip.cs:21
Definition: ACT.cs:71
CostType type
Definition: ACT.cs:74
int cost
Definition: ACT.cs:72