Elin Modding Docs Doc
Loading...
Searching...
No Matches
ActItem.cs
1using System;
2
3// Token: 0x020001C2 RID: 450
4public class ActItem : Act
5{
6 // Token: 0x06000D06 RID: 3334 RVA: 0x00067104 File Offset: 0x00065304
7 public override bool CanPerform()
8 {
9 return this._act != null;
10 }
11
12 // Token: 0x06000D07 RID: 3335 RVA: 0x00067110 File Offset: 0x00065310
13 public int BuildAct(Chara c)
14 {
15 this._act = null;
16 int p = 110 - 110 * c.hp / c.MaxHP;
17 if (c.hp < c.MaxHP * 2 / 3)
18 {
19 foreach (Thing thing in c.things)
20 {
21 if (thing.IsIdentified)
22 {
23 Action healAction = thing.trait.GetHealAction(c);
24 if (healAction != null)
25 {
26 return this.ReturnAct(healAction, p);
27 }
28 }
29 }
30 return 0;
31 }
32 return 0;
33 }
34
35 // Token: 0x06000D08 RID: 3336 RVA: 0x000671B4 File Offset: 0x000653B4
36 public int ReturnAct(Action a, int p)
37 {
38 this._act = new DynamicAct("ActItem", delegate()
39 {
40 a();
41 return true;
42 }, false);
43 return p;
44 }
45
46 // Token: 0x06000D09 RID: 3337 RVA: 0x000671EC File Offset: 0x000653EC
47 public override bool Perform()
48 {
49 return this._act.Perform(Act.CC, null, null);
50 }
51
52 // Token: 0x04000D00 RID: 3328
53 public Act _act;
54}
Definition Act.2.cs:7
Definition Chara.cs:12
Definition Thing.cs:10