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