Elin Decompiled Documentation EA 23.130 Nightly
Loading...
Searching...
No Matches
TraitPotionAlchemy.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3using UnityEngine;
4
6{
7 public override int Power => owner.Power;
8
9 public override void OnCrafted(Recipe recipe)
10 {
11 owner.refVal = 0;
12 List<Element> list = owner.elements.dict.Values.Where((Element e) => e.IsTrait).ToList();
13 list.Sort((Element a, Element b) => Mathf.Abs(b.Value) - Mathf.Abs(a.Value));
14 int num = 0;
15 foreach (Element item in list)
16 {
17 int num2 = item.Value / 10;
18 switch (item.id)
19 {
20 case 750:
21 case 753:
22 num = ((num2 >= 6) ? 8402 : ((num2 >= 4) ? 8401 : 8400));
23 Debug.Log(num.ToString() + num2);
24 break;
25 case 754:
26 num = 8471;
27 break;
28 case 755:
29 num = 8470;
30 break;
31 case 751:
32 num = 8501;
33 break;
34 case 752:
35 num = 8791;
36 break;
37 case 760:
38 num = 8704;
39 break;
40 case 756:
41 num = 8506;
42 break;
43 }
44 if (num != 0)
45 {
46 break;
47 }
48 }
49 owner.refVal = num;
50 }
51}
ElementContainerCard elements
Definition: Card.cs:37
virtual int Power
Definition: Card.cs:2195
Dictionary< int, Element > dict
int Value
Definition: ELEMENT.cs:288
bool IsTrait
Definition: ELEMENT.cs:358
Definition: Recipe.cs:7
override void OnCrafted(Recipe recipe)
Card owner
Definition: Trait.cs:26