Elin Modding Docs Doc
Loading...
Searching...
No Matches
ActZap.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000327 RID: 807
5public class ActZap : Act
6{
7 // Token: 0x17000775 RID: 1909
8 // (get) Token: 0x060019C9 RID: 6601 RVA: 0x000A35A1 File Offset: 0x000A17A1
9 public override int MaxRadius
10 {
11 get
12 {
13 return 2;
14 }
15 }
16
17 // Token: 0x17000776 RID: 1910
18 // (get) Token: 0x060019CA RID: 6602 RVA: 0x000A35A4 File Offset: 0x000A17A4
19 public override int PerformDistance
20 {
21 get
22 {
23 return 99;
24 }
25 }
26
27 // Token: 0x17000777 RID: 1911
28 // (get) Token: 0x060019CB RID: 6603 RVA: 0x000A35A8 File Offset: 0x000A17A8
29 public override TargetType TargetType
30 {
31 get
32 {
33 return TargetType.Ground;
34 }
35 }
36
37 // Token: 0x060019CC RID: 6604 RVA: 0x000A35B0 File Offset: 0x000A17B0
38 public override bool Perform()
39 {
40 Act.CC.Say("zapRod", Act.CC, this.trait.owner.Name, null);
41 if (this.trait.owner.c_charges > 0)
42 {
43 this.trait.owner.ModCharge(-1, false);
44 Act.CC.PlayEffect("rod", true, 0f, default(Vector3));
45 Act.CC.PlaySound("rod", 1f, true);
46 Act.TC = Act.CC;
47 EffectId idEffect = this.trait.IdEffect;
48 int power = this.trait.Power * (100 + Act.CC.Evalue(305) * 10 + Act.CC.MAG / 2 + Act.CC.PER / 2) / 100;
49 ActEffect.ProcAt(idEffect, power, this.trait.owner.blessedState, Act.CC, null, Act.TP, this.trait.IsNegative, new ActRef
50 {
51 aliasEle = this.trait.aliasEle,
52 n1 = this.trait.N1,
53 act = ((this.trait.source != null) ? ACT.Create(this.trait.source) : null)
54 });
55 if (Act.CC.IsPC && (idEffect == EffectId.Identify || idEffect == EffectId.GreaterIdentify))
56 {
57 this.trait.owner.Thing.Identify(Act.CC.IsPCParty, IDTSource.Identify);
58 }
59 Act.CC.ModExp(305, 50);
60 return true;
61 }
62 Act.CC.Say("nothingHappens", null, null);
63 Act.CC.PlaySound("rod_empty", 1f, true);
64 return true;
65 }
66
67 // Token: 0x040010B3 RID: 4275
68 public TraitRod trait;
69}
Definition Act.2.cs:7