Elin Modding Docs Doc
All Classes Namespaces
AI_PracticeDummy.cs
1using System;
2using System.Collections.Generic;
3
4// Token: 0x02000205 RID: 517
5public class AI_PracticeDummy : AIAct
6{
7 // Token: 0x170003C7 RID: 967
8 // (get) Token: 0x06000EBD RID: 3773 RVA: 0x0006DCA9 File Offset: 0x0006BEA9
9 public override CursorInfo CursorIcon
10 {
11 get
12 {
13 return CursorSystem.IconMelee;
14 }
15 }
16
17 // Token: 0x170003C8 RID: 968
18 // (get) Token: 0x06000EBE RID: 3774 RVA: 0x0006DCB0 File Offset: 0x0006BEB0
19 public override bool HasProgress
20 {
21 get
22 {
23 return true;
24 }
25 }
26
27 // Token: 0x06000EBF RID: 3775 RVA: 0x0006DCB3 File Offset: 0x0006BEB3
28 public override bool CanManualCancel()
29 {
30 return true;
31 }
32
33 // Token: 0x06000EC0 RID: 3776 RVA: 0x0006DCB6 File Offset: 0x0006BEB6
34 public override IEnumerable<AIAct.Status> Run()
35 {
36 this.isFail = (() => !this.target.IsAliveInCurrentZone);
37 yield return base.DoProgress();
38 yield break;
39 }
40
41 // Token: 0x06000EC1 RID: 3777 RVA: 0x0006DCC8 File Offset: 0x0006BEC8
42 public override AIProgress CreateProgress()
43 {
44 Progress_Custom progress_Custom = new Progress_Custom();
45 progress_Custom.canProgress = (() => !this.isFail());
46 progress_Custom.onProgressBegin = delegate()
47 {
48 };
49 progress_Custom.onProgress = delegate(Progress_Custom p)
50 {
51 if (this.range && this.owner.GetCondition<ConReload>() == null)
52 {
53 if (!ACT.Ranged.CanPerform(this.owner, this.target, this.target.pos))
54 {
55 p.Cancel();
56 return;
57 }
58 if (!ACT.Ranged.Perform(this.owner, this.target, this.target.pos))
59 {
60 p.Cancel();
61 }
62 }
63 else
64 {
65 ACT.Melee.Perform(this.owner, this.target, null);
66 }
67 if (this.owner != null && EClass.rnd(5) < 2)
68 {
69 this.owner.stamina.Mod(-1);
70 }
71 if (this.owner != null && this.owner.stamina.value < 0)
72 {
73 p.Cancel();
74 }
75 };
76 progress_Custom.onProgressComplete = delegate()
77 {
78 };
79 return progress_Custom.SetDuration(10000, 2);
80 }
81
82 // Token: 0x04000D60 RID: 3424
83 public Card target;
84
85 // Token: 0x04000D61 RID: 3425
86 public bool range;
87}
Definition ACT.cs:6
Definition AIAct.cs:7
Definition Card.cs:13