Elin Modding Docs Doc
Loading...
Searching...
No Matches
AI_Pray.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x0200023C RID: 572
6public class AI_Pray : AIAct
7{
8 // Token: 0x06000FEE RID: 4078 RVA: 0x00072350 File Offset: 0x00070550
9 public static TraitAltar GetAltar(Chara c)
10 {
11 if (c.faith.IsEyth)
12 {
13 return null;
14 }
15 List<TraitAltar> list = EClass._map.props.installed.traits.List<TraitAltar>((TraitAltar t) => t.idDeity == c.faith.id);
16 if (list.Count == 0)
17 {
18 return null;
19 }
20 return list.RandomItem<TraitAltar>();
21 }
22
23 // Token: 0x06000FEF RID: 4079 RVA: 0x000723B4 File Offset: 0x000705B4
24 public bool IsValid()
25 {
26 return this.altar != null && this.altar.ExistsOnMap;
27 }
28
29 // Token: 0x06000FF0 RID: 4080 RVA: 0x000723CB File Offset: 0x000705CB
30 public override IEnumerable<AIAct.Status> Run()
31 {
32 yield return base.DoGoto(this.altar.owner, 1, null);
34 {
35 cancelWhenMoved = false,
36 canProgress = (() => this.IsValid()),
37 onProgressBegin = delegate()
38 {
39 this.owner.Say("pray2", this.owner, this.owner.faith.Name, null);
40 },
41 onProgress = delegate(Progress_Custom p)
42 {
43 this.owner.PlayAnime(AnimeID.Shiver, false);
44 },
45 onProgressComplete = delegate()
46 {
47 this.owner.PlaySound("pray", 1f, true);
48 this.owner.PlayEffect("revive", true, 0f, default(Vector3));
49 AI_Pray.Pray(this.owner);
50 }
51 }.SetDuration(30, 5);
52 yield return base.Do(seq, null);
53 yield break;
54 }
55
56 // Token: 0x06000FF1 RID: 4081 RVA: 0x000723DB File Offset: 0x000705DB
57 public static void Pray(Chara c)
58 {
59 c.ModExp(306, 200);
60 }
61
62 // Token: 0x04000D99 RID: 3481
63 public TraitAltar altar;
64}
Definition AIAct.cs:7
Definition Chara.cs:12