Elin Decompiled Documentation EA 23.130 Nightly
Loading...
Searching...
No Matches
TraitPotionRandom.cs
Go to the documentation of this file.
2{
4 {
5 type = "P",
6 lvMod = 10
7 };
8
10
11 public override string AliasEle => source.aliasRef;
12
13 public override int Power => 200;
14
15 public override EffectId IdEffect
16 {
17 get
18 {
19 if (!source.proc.IsEmpty())
20 {
21 return source.proc[0].ToEnum<EffectId>();
22 }
23 return EffectId.DrinkWaterDirty;
24 }
25 }
26
27 public override string N1 => source.proc.TryGet(1, returnNull: true);
28
29 public override bool IsNeg => source.tag.Contains("neg");
30
31 public override void OnCreate(int lv)
32 {
34 }
35
37 {
38 return source;
39 }
40
41 public override int GetValue()
42 {
43 return source.value * 120 / 100;
44 }
45
46 public override string GetName()
47 {
48 string text;
49 if (owner.refVal != 0)
50 {
51 text = Lang.TryGet("potion_" + source.alias);
52 if (text == null)
53 {
54 return "potion_".lang(source.GetName().ToLower());
55 }
56 }
57 else
58 {
59 text = base.GetName();
60 }
61 return text;
62 }
63}
EffectId
Definition: EffectId.cs:2
int refVal
Definition: Card.cs:190
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
int Select(int lv)
Definition: Lang.cs:6
static string TryGet(string id)
Definition: Lang.cs:105
SourceElement elements
override string GetName()
override string N1
override void OnCreate(int lv)
override bool IsNeg
override SourceElement.Row GetRefElement()
override SourceElement.Row source
override string AliasEle
static ElementSelecter selecter
override EffectId IdEffect
override int GetValue()
static void Create(Card owner, int ele)
Definition: TraitPotion.cs:3
Card owner
Definition: Trait.cs:26