Elin Modding Docs Doc
Loading...
Searching...
No Matches
Condition.cs
1using System;
2
3// Token: 0x020002B3 RID: 691
4public class Condition : BaseCondition
5{
6 // Token: 0x17000650 RID: 1616
7 // (get) Token: 0x06001691 RID: 5777 RVA: 0x00096B18 File Offset: 0x00094D18
8 public virtual bool IsKilled
9 {
10 get
11 {
12 return base.value <= 0;
13 }
14 }
15
16 // Token: 0x06001692 RID: 5778 RVA: 0x00096B26 File Offset: 0x00094D26
17 public override BaseNotification CreateNotification()
18 {
19 return new NotificationCondition
20 {
21 condition = this
22 };
23 }
24
25 // Token: 0x06001693 RID: 5779 RVA: 0x00096B34 File Offset: 0x00094D34
26 public static T Create<T>(int power = 100, Action<T> onCreate = null) where T : Condition
27 {
28 return (T)((object)Condition.Create(typeof(T).Name, power, delegate(Condition c)
29 {
30 onCreate(c as T);
31 }));
32 }
33
34 // Token: 0x06001694 RID: 5780 RVA: 0x00096B74 File Offset: 0x00094D74
35 public static Condition Create(string alias, int power = 100, Action<Condition> onCreate = null)
36 {
37 SourceStat.Row row = EClass.sources.stats.alias[alias];
38 Condition condition = ClassCache.Create<Condition>(row.type.IsEmpty(alias), "Elin");
39 condition.power = power;
40 condition.id = row.id;
41 condition._source = row;
42 if (onCreate != null)
43 {
44 onCreate(condition);
45 }
46 return condition;
47 }
48
49 // Token: 0x17000651 RID: 1617
50 // (get) Token: 0x06001695 RID: 5781 RVA: 0x00096BD4 File Offset: 0x00094DD4
51 public virtual string TextDuration
52 {
53 get
54 {
55 string result;
56 if (!base.isPerfume)
57 {
58 if ((result = base.value.ToString()) == null)
59 {
60 return "";
61 }
62 }
63 else
64 {
65 result = "";
66 }
67 return result;
68 }
69 }
70
71 // Token: 0x06001696 RID: 5782 RVA: 0x00096C06 File Offset: 0x00094E06
72 public virtual void OnStacked(int p)
73 {
74 base.value += this.EvaluateTurn(p);
75 base.SetPhase();
76 }
77
78 // Token: 0x06001697 RID: 5783 RVA: 0x00096C22 File Offset: 0x00094E22
79 public Condition SetPerfume(int duration = 3)
80 {
81 base.isPerfume = true;
82 base.value = duration;
83 return this;
84 }
85
86 // Token: 0x06001698 RID: 5784 RVA: 0x00096C33 File Offset: 0x00094E33
87 public override void Tick()
88 {
89 base.Mod(-1, false);
90 }
91
92 // Token: 0x06001699 RID: 5785 RVA: 0x00096C3D File Offset: 0x00094E3D
93 public virtual void OnCalculateFov(Fov fov, ref int radius, ref float power)
94 {
95 }
96
97 // Token: 0x0600169A RID: 5786 RVA: 0x00096C3F File Offset: 0x00094E3F
98 public virtual void OnCreateFov(Fov fov)
99 {
100 }
101
102 // Token: 0x0600169B RID: 5787 RVA: 0x00096C41 File Offset: 0x00094E41
103 public override void OnValueChanged()
104 {
105 if (base.value <= 0)
106 {
107 this.Kill(false);
108 }
109 }
110
111 // Token: 0x0600169C RID: 5788 RVA: 0x00096C54 File Offset: 0x00094E54
112 public void Kill(bool silent = false)
113 {
114 base.value = 0;
115 this.owner.conditions.Remove(this);
116 if (!silent && !this.owner.isDead && !base.source.textEnd.IsEmpty())
117 {
118 this.owner.Say(base.source.GetText("textEnd", false), this.owner, this.RefString1, null);
119 }
120 this.PlayEndEffect();
121 this.OnRemoved();
122 if (this.elements != null)
123 {
124 this.elements.SetParent(null);
125 }
126 this.owner.SetDirtySpeed();
127 if (this.ShouldRefresh)
128 {
129 this.owner.Refresh(false);
130 }
131 }
132
133 // Token: 0x04001067 RID: 4199
134 public static bool ignoreEffect;
135}
Definition Fov.cs:7