Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
AI_PracticeDummy.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2
3public class AI_PracticeDummy : AIAct
4{
5 public Card target;
6
8
9 public bool range;
10
12
13 public override bool HasProgress => true;
14
15 public override bool CanManualCancel()
16 {
17 return true;
18 }
19
20 public override IEnumerable<Status> Run()
21 {
23 yield return DoProgress();
24 }
25
26 public override AIProgress CreateProgress()
27 {
28 return new Progress_Custom
29 {
30 canProgress = () => !isFail(),
31 onProgressBegin = delegate
32 {
33 },
34 onProgress = delegate(Progress_Custom p)
35 {
36 if (p.progress % 10 == 0)
37 {
38 target.animeCounter = 0.01f;
39 }
40 if (throwItem != null)
41 {
43 {
44 p.Cancel();
45 return;
46 }
48 }
49 else if (range && owner.GetCondition<ConReload>() == null)
50 {
52 {
53 p.Cancel();
54 return;
55 }
57 {
58 p.Cancel();
59 }
60 }
61 else
62 {
64 }
65 if (owner != null && EClass.rnd(5) < 2)
66 {
67 owner.stamina.Mod(-1);
68 }
69 if (owner != null && owner.stamina.value < 0)
70 {
71 p.Cancel();
72 }
73 },
74 onProgressComplete = delegate
75 {
76 }
77 }.SetDuration(10000);
78 }
79}
Definition: ACT.cs:6
static ActRanged Ranged
Definition: ACT.cs:17
static ActMelee Melee
Definition: ACT.cs:15
Definition: AIAct.cs:6
virtual Status Cancel()
Definition: AIAct.cs:291
new Chara owner
Definition: AIAct.cs:14
Func< bool > isFail
Definition: AIAct.cs:28
Status DoProgress()
Definition: AIAct.cs:517
int progress
Definition: AIProgress.cs:5
override IEnumerable< Status > Run()
override CursorInfo CursorIcon
override bool HasProgress
override AIProgress CreateProgress()
override bool CanManualCancel()
override bool Perform()
Definition: ActMelee.cs:87
override bool Perform()
Definition: ActRanged.cs:65
override bool CanPerform()
Definition: ActRanged.cs:44
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:93
static bool CanThrow(Chara c, Thing t, Card target, Point p=null)
Definition: ActThrow.cs:60
Definition: Card.cs:11
Point pos
Definition: Card.cs:55
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2003
Stats stamina
Definition: Chara.cs:955
static CursorInfo IconMelee
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Chara pc
Definition: EClass.cs:14
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int value
Definition: Stats.cs:56
Definition: Thing.cs:8