Elin Modding Docs Doc
Loading...
Searching...
No Matches
ConSuffocation.cs
1using System;
2
3// Token: 0x020002B8 RID: 696
5{
6 // Token: 0x17000656 RID: 1622
7 // (get) Token: 0x060016AE RID: 5806 RVA: 0x00096E0E File Offset: 0x0009500E
8 public override bool PreventRegen
9 {
10 get
11 {
12 return true;
13 }
14 }
15
16 // Token: 0x060016AF RID: 5807 RVA: 0x00096E11 File Offset: 0x00095011
17 public override int GetPhase()
18 {
19 if (base.value < 50)
20 {
21 return 0;
22 }
23 if (base.value >= 100)
24 {
25 return 2;
26 }
27 return 1;
28 }
29
30 // Token: 0x060016B0 RID: 5808 RVA: 0x00096E2C File Offset: 0x0009502C
31 public override void OnStart()
32 {
33 if (this.owner.IsPC)
34 {
35 Tutorial.Reserve("water", delegate
36 {
37 EClass.player.haltMove = true;
38 EInput.Consume(true, 1);
39 });
40 }
41 }
42
43 // Token: 0x060016B1 RID: 5809 RVA: 0x00096E64 File Offset: 0x00095064
44 public override void Tick()
45 {
46 if (base.value >= 200)
47 {
48 base.value = 200;
49 }
50 if (base.value >= 100 && !EClass._zone.IsRegion)
51 {
52 this.owner.DamageHP(10 + this.owner.MaxHP / 20, AttackSource.Condition, null);
53 }
54 if (this.owner == null || !this.owner.IsAliveInCurrentZone)
55 {
56 return;
57 }
58 if (!this.owner.Cell.CanSuffocate())
59 {
60 base.Mod(-20, false);
61 return;
62 }
63 if (!EClass._zone.IsRegion)
64 {
65 this.owner.ModExp(200, 4 + this.phase * 4);
66 }
67 }
68}