Elin Modding Docs Doc
Loading...
Searching...
No Matches
TraitItemProc.cs
1using System;
2using UnityEngine;
3
4// Token: 0x0200041F RID: 1055
5public class TraitItemProc : TraitItem
6{
7 // Token: 0x17000959 RID: 2393
8 // (get) Token: 0x06001DFF RID: 7679 RVA: 0x000AD20C File Offset: 0x000AB40C
9 public EffectId IdEffect
10 {
11 get
12 {
13 return base.GetParam(1, null).ToEnum(true);
14 }
15 }
16
17 // Token: 0x1700095A RID: 2394
18 // (get) Token: 0x06001E00 RID: 7680 RVA: 0x000AD21C File Offset: 0x000AB41C
19 public string n1
20 {
21 get
22 {
23 return base.GetParam(2, null);
24 }
25 }
26
27 // Token: 0x1700095B RID: 2395
28 // (get) Token: 0x06001E01 RID: 7681 RVA: 0x000AD226 File Offset: 0x000AB426
29 public override int CraftNum
30 {
31 get
32 {
33 return this.GetCraftNum();
34 }
35 }
36
37 // Token: 0x06001E02 RID: 7682 RVA: 0x000AD22E File Offset: 0x000AB42E
38 public int GetCraftNum()
39 {
40 if (this.owner.id == "bandage")
41 {
42 return 2 + EClass.rnd(2);
43 }
44 return 0;
45 }
46
47 // Token: 0x06001E03 RID: 7683 RVA: 0x000AD254 File Offset: 0x000AB454
48 public override bool OnUse(Chara c)
49 {
50 int num = this.owner.Power;
51 if (this.IdEffect == EffectId.Buff && this.n1 == "ConBandage")
52 {
53 num += this.owner.Evalue(750) * 5;
54 num = num * (100 + (int)Mathf.Sqrt((float)c.Evalue(300)) * 5) / 100;
55 }
56 ActEffect.Proc(this.IdEffect, base.GetParamInt(3, num), this.owner.blessedState, c, null, new ActRef
57 {
58 n1 = this.n1
59 });
60 if (c.ExistsOnMap)
61 {
62 FoodEffect.ProcTrait(c, this.owner);
63 }
64 if (this.IdEffect == EffectId.RemedyJure)
65 {
66 c.Say("destory_feather", this.owner, null, null);
67 }
68 this.owner.ModNum(-1, true);
69 return true;
70 }
71
72 // Token: 0x06001E04 RID: 7684 RVA: 0x000AD338 File Offset: 0x000AB538
73 public override Action GetHealAction(Chara c)
74 {
75 if (this.IdEffect == EffectId.Buff && this.n1 == "ConBandage" && !c.HasCondition<ConBandage>())
76 {
77 return delegate()
78 {
79 this.OnUse(c);
80 };
81 }
82 return null;
83 }
84}
Definition Chara.cs:12