Elin Decompiled Documentation EA 23.258 Nightly
Loading...
Searching...
No Matches
ConPeaky.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using UnityEngine;
3
4public class ConPeaky : Condition
5{
6 [JsonProperty]
8
9 public override int GetPhase()
10 {
11 return 0;
12 }
13
15 {
16 return ec;
17 }
18
19 public override void Tick()
20 {
21 if (EClass.rnd(2) == 0)
22 {
23 return;
24 }
25 int num = ec.Value(79);
26 int num2 = owner.Evalue(1423) * 10;
27 if (num < num2)
28 {
29 ec.ModBase(79, Mathf.Clamp(num2 / 10, 1, num2 - num));
30 if (ec.Value(79) == num2)
31 {
32 owner.PlaySound("bike_kick");
33 }
34 }
35 }
36
37 public void OnHit()
38 {
39 ec.SetBase(79, ec.Value(79) / 2);
40 }
41
42 public override void SetOwner(Chara _owner, bool onDeserialize = false)
43 {
44 base.SetOwner(_owner);
46 }
47
48 public override void OnRemoved()
49 {
50 ec.SetParent();
51 }
52}
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6219
int Evalue(int ele)
Definition: Card.cs:2574
Definition: Chara.cs:10
ElementContainer ec
Definition: ConPeaky.cs:7
void OnHit()
Definition: ConPeaky.cs:37
override void SetOwner(Chara _owner, bool onDeserialize=false)
Definition: ConPeaky.cs:42
override int GetPhase()
Definition: ConPeaky.cs:9
override void Tick()
Definition: ConPeaky.cs:19
override ElementContainer GetElementContainer()
Definition: ConPeaky.cs:14
override void OnRemoved()
Definition: ConPeaky.cs:48
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
void SetParent(Card c)
int Value(int ele)
Element ModBase(int ele, int v)
Element SetBase(string alias, int v, int potential=0)