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