Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ZoneEventPhone.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2
4{
5 [JsonProperty]
6 public int uidPhone;
7
8 [JsonProperty]
9 public int ring;
10
11 public override int hoursToKill => 24;
12
13 public TraitPhone Phone => EClass._map.things.Find((Thing a) => a.uid == uidPhone)?.trait as TraitPhone;
14
15 public override void OnInit()
16 {
17 ring = EClass.rnd(4) + 3;
18 }
19
20 public override void OnTickRound()
21 {
22 TraitPhone phone = Phone;
23 if (phone == null)
24 {
25 Kill();
26 return;
27 }
28 ring--;
29 phone.owner.TalkRaw(Lang.Game.Get("phone_boss"));
30 phone.owner.PlayAnime(AnimeID.Shiver);
31 phone.ev = this;
32 if (ring < 0)
33 {
34 Kill();
35 }
36 }
37
38 public override void OnKill()
39 {
40 if (Phone != null)
41 {
42 Phone.ev = null;
43 }
44 }
45}
AnimeID
Definition: AnimeID.cs:2
int uid
Definition: Card.cs:118
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:5423
void TalkRaw(string text, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:5988
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Map _map
Definition: EClass.cs:18
Definition: Lang.cs:6
static LangGame Game
Definition: Lang.cs:48
List< Thing > things
Definition: Map.cs:49
string Get(string id)
Definition: SourceLang.cs:12
Definition: Thing.cs:8
Card owner
Definition: Trait.cs:26
override void OnInit()
override int hoursToKill
override void OnTickRound()
override void OnKill()
TraitPhone Phone
void Kill()
Definition: ZoneEvent.cs:115