Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ConSuffocation.cs
Go to the documentation of this file.
2{
3 public override bool PreventRegen => true;
4
5 public override int GetPhase()
6 {
7 if (base.value >= 50)
8 {
9 if (base.value >= 100)
10 {
11 return 2;
12 }
13 return 1;
14 }
15 return 0;
16 }
17
18 public override void OnStart()
19 {
20 if (owner.IsPC)
21 {
22 Tutorial.Reserve("water", delegate
23 {
24 EClass.player.haltMove = true;
25 EInput.Consume(consumeAxis: true);
26 });
27 }
28 }
29
30 public override void Tick()
31 {
32 if (owner.HasElement(429))
33 {
34 Kill();
35 return;
36 }
37 if (base.value >= 200)
38 {
39 base.value = 200;
40 }
41 if (base.value >= 100 && !EClass._zone.IsRegion)
42 {
43 owner.DamageHP((base.value - 100) / 10 + owner.MaxHP / 20, AttackSource.Condition);
44 }
45 if (owner != null && owner.IsAliveInCurrentZone)
46 {
47 if (!owner.Cell.CanSuffocate())
48 {
49 Mod(-25);
50 }
51 else if (!EClass._zone.IsRegion)
52 {
53 owner.ModExp(200, 4 + phase * 4);
54 }
55 }
56 }
57}
AttackSource
Definition: AttackSource.cs:2
void Mod(int a, bool force=false)
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:3735
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
Cell Cell
Definition: Card.cs:1931
void ModExp(string alias, int a)
Definition: Card.cs:2508
bool CanSuffocate()
Definition: Cell.cs:1111
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
override bool IsPC
Definition: Chara.cs:597
override int MaxHP
Definition: Chara.cs:693
override bool PreventRegen
override void Tick()
override int GetPhase()
override void OnStart()
void Kill(bool silent=false)
Definition: Condition.cs:91
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
virtual bool IsRegion
Definition: Spatial.cs:501
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55