Elin Decompiled Documentation EA 23.153 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 => GetPower();
8
9 public int GetPower()
10 {
11 int num = 200;
12 int num2 = 100;
13 switch (owner.refVal)
14 {
15 case 8400:
16 case 8401:
17 case 8402:
18 case 8403:
19 case 8404:
20 case 8405:
21 num2 = 150;
22 break;
23 case 8470:
24 case 8471:
25 num2 = 100 + owner.encLV * 50;
26 break;
27 }
28 return num * (100 + owner.encLV * num2) / 100;
29 }
30
31 public override void OnCrafted(Recipe recipe)
32 {
33 owner.refVal = 0;
34 List<Element> list = owner.elements.dict.Values.Where((Element e) => e.IsTrait).ToList();
35 list.Sort((Element a, Element b) => Mathf.Abs(b.Value) - Mathf.Abs(a.Value));
36 int num = 0;
37 foreach (Element item in list)
38 {
39 int num2 = item.Value / 10;
40 switch (item.id)
41 {
42 case 750:
43 case 753:
44 num = ((num2 >= 6) ? 8402 : ((num2 >= 4) ? 8401 : 8400));
45 break;
46 case 754:
47 num = 8471;
48 break;
49 case 755:
50 num = 8470;
51 break;
52 case 751:
53 num = 8501;
54 break;
55 case 752:
56 num = 8791;
57 break;
58 case 760:
59 num = 8704;
60 break;
61 case 756:
62 num = 8506;
63 break;
64 case 763:
65 num = 8507;
66 break;
67 }
68 if (num != 0)
69 {
70 break;
71 }
72 }
73 owner.refVal = num;
74 owner.SetEncLv(Mathf.Min(EClass.pc.Evalue(257) / 10, EClass.debug.enable ? 1000 : owner.QualityLv));
75 }
76}
ElementContainerCard elements
Definition: Card.cs:37
int refVal
Definition: Card.cs:190
void SetEncLv(int a)
Definition: Card.cs:3709
int Evalue(int ele)
Definition: Card.cs:2507
int QualityLv
Definition: Card.cs:2363
Definition: EClass.cs:5
static Chara pc
Definition: EClass.cs:14
Dictionary< int, Element > dict
int Value
Definition: ELEMENT.cs:290
bool IsTrait
Definition: ELEMENT.cs:360
Definition: Recipe.cs:7
override void OnCrafted(Recipe recipe)
Card owner
Definition: Trait.cs:26