Elin Modding Docs Doc
Loading...
Searching...
No Matches
ActPray.cs
1using System;
2using System.Collections.Generic;
3using System.Runtime.CompilerServices;
4using UnityEngine;
5
6// Token: 0x020001D1 RID: 465
7public class ActPray : Act
8{
9 // Token: 0x17000356 RID: 854
10 // (get) Token: 0x06000D3C RID: 3388 RVA: 0x00067696 File Offset: 0x00065896
11 public override TargetType TargetType
12 {
13 get
14 {
15 return TargetType.Self;
16 }
17 }
18
19 // Token: 0x17000357 RID: 855
20 // (get) Token: 0x06000D3D RID: 3389 RVA: 0x0006769D File Offset: 0x0006589D
21 public override bool LocalAct
22 {
23 get
24 {
25 return false;
26 }
27 }
28
29 // Token: 0x06000D3E RID: 3390 RVA: 0x000676A0 File Offset: 0x000658A0
30 public override bool Perform()
31 {
32 return ActPray.TryPray(Act.CC, false);
33 }
34
35 // Token: 0x06000D3F RID: 3391 RVA: 0x000676B0 File Offset: 0x000658B0
36 public static bool TryPray(Chara c, bool passive = false)
37 {
38 if (!c.HasCondition<ConWrath>())
39 {
40 Thing thing = c.things.Find<TraitPunishBall>();
41 if (thing != null)
42 {
43 thing.Destroy();
44 c.PlaySound("pray", 1f, true);
45 c.PlayEffect("revive", true, 0f, default(Vector3));
46 c.Say("piety2", c, null, null);
47 return true;
48 }
49 }
50 if (c.faith.IsEyth)
51 {
52 if (passive)
53 {
54 if (c.Evalue(1655) >= 2 && EClass.pc.party.members.Count > 1)
55 {
56 using (List<Chara>.Enumerator enumerator = EClass.pc.party.members.GetEnumerator())
57 {
58 while (enumerator.MoveNext())
59 {
60 Chara chara = enumerator.Current;
61 if (chara != EClass.pc)
62 {
63 chara.Say("pray2", chara, chara.faith.Name, null);
64 chara.ModExp(306, 200);
65 }
66 }
67 return true;
68 }
69 }
70 return true;
71 }
72 c.Say("pray", c, null, null);
73 c.PlaySound("pray_ignore", 1f, true);
74 return true;
75 }
76 foreach (Chara chara2 in EClass.pc.party.members)
77 {
78 if (chara2 == EClass.pc || (passive && c.Evalue(1655) >= 2))
79 {
80 chara2.Say("pray2", chara2, chara2.faith.Name, null);
81 }
82 }
83 if (passive || !c.faith.TryGetGift())
84 {
85 if (c.IsPC && EClass.player.prayed)
86 {
87 if (!passive)
88 {
89 c.Say("pray_ignore", c, c.faith.Name, null);
90 c.PlaySound("pray_ignore", 1f, true);
91 }
92 }
93 else
94 {
95 ActPray.Pray(c, passive && EClass._zone.IsRegion);
96 }
97 }
98 return true;
99 }
100
101 // Token: 0x06000D40 RID: 3392 RVA: 0x000678D4 File Offset: 0x00065AD4
102 public static void Pray(Chara c, bool passive)
103 {
104 if (c.IsPC)
105 {
106 EClass.player.prayed = true;
107 }
108 if (!passive)
109 {
110 c.Say("pray_answer", c, Act.CC.faith.Name, null);
111 c.faith.Revelation((EClass.rnd(2) == 0) ? "random" : "chat", 100);
112 }
113 foreach (Chara chara in EClass.pc.party.members)
114 {
115 if (chara == EClass.pc || (passive && c.Evalue(1655) >= 2))
116 {
117 chara.ModExp(306, 200);
118 }
119 }
120 if (!passive)
121 {
122 c.PlaySound("pray", 1f, true);
123 c.Say("pray_heal", c, null, null);
124 }
125 if (c.IsPC)
126 {
127 using (List<Chara>.Enumerator enumerator = c.party.members.GetEnumerator())
128 {
129 while (enumerator.MoveNext())
130 {
131 Chara c2 = enumerator.Current;
132 ActPray.<Pray>g__Heal|6_0(c2);
133 }
134 return;
135 }
136 }
137 ActPray.<Pray>g__Heal|6_0(c);
138 }
139
140 // Token: 0x06000D42 RID: 3394 RVA: 0x00067A24 File Offset: 0x00065C24
141 [CompilerGenerated]
142 internal static void <Pray>g__Heal|6_0(Chara _c)
143 {
144 _c.PlayEffect("revive", true, 0f, default(Vector3));
145 _c.HealHP(999999, HealSource.None);
146 _c.mana.Mod(999999);
147 _c.Cure(CureType.Prayer, 999999, BlessedState.Normal);
148 }
149}
Definition Act.2.cs:7
Definition Chara.cs:12
Definition Thing.cs:10