Elin Modding Docs Doc
Loading...
Searching...
No Matches
ZoneEventSiege.cs
1using System;
2using System.Collections.Generic;
3using Newtonsoft.Json;
4
5// Token: 0x02000747 RID: 1863
7{
8 // Token: 0x1700109B RID: 4251
9 // (get) Token: 0x06003608 RID: 13832 RVA: 0x001256D2 File Offset: 0x001238D2
10 public override string id
11 {
12 get
13 {
14 return "trial_siege";
15 }
16 }
17
18 // Token: 0x1700109C RID: 4252
19 // (get) Token: 0x06003609 RID: 13833 RVA: 0x001256D9 File Offset: 0x001238D9
20 public override Playlist playlist
21 {
22 get
23 {
24 return EClass.Sound.playlistBattle;
25 }
26 }
27
28 // Token: 0x0600360A RID: 13834 RVA: 0x001256E5 File Offset: 0x001238E5
29 public virtual Chara CreateChara()
30 {
31 return CharaGen.CreateFromFilter("c_wilds", -1, -1);
32 }
33
34 // Token: 0x0600360B RID: 13835 RVA: 0x001256F4 File Offset: 0x001238F4
35 public override void OnFirstTick()
36 {
37 EClass.player.stats.sieges++;
38 Msg.Say("startSiege");
39 EClass._zone.RefreshBGM();
40 Point randomEdge = EClass._map.GetRandomEdge(3);
41 for (int i = 0; i < 10; i++)
42 {
43 Chara chara = this.CreateChara();
44 EClass._zone.AddCard(chara, EClass._map.GetRandomSurface(randomEdge.x, randomEdge.z, 6, true, false));
45 chara.hostility = Hostility.Enemy;
46 this.members.Add(chara);
47 this.uids.Add(chara.uid);
48 }
49 Thing t = ThingGen.Create("torch", -1, -1);
50 EClass._zone.AddCard(t, randomEdge);
51 if (this.members.Count == 0)
52 {
53 foreach (int num in this.uids)
54 {
55 foreach (Chara chara2 in EClass._map.charas)
56 {
57 if (chara2.uid == num)
58 {
59 this.members.Add(chara2);
60 }
61 }
62 }
63 }
64 }
65
66 // Token: 0x0600360C RID: 13836 RVA: 0x00125858 File Offset: 0x00123A58
67 public override void OnTickRound()
68 {
69 bool flag = true;
70 foreach (Chara chara in this.members)
71 {
72 if (chara.IsAliveInCurrentZone)
73 {
74 if (chara.ai is GoalIdle)
75 {
76 chara.SetAI(new GoalSiege());
77 }
78 flag = false;
79 }
80 }
81 if (flag || EClass.Branch.IsAllDead())
82 {
83 base.Kill();
84 }
85 }
86
87 // Token: 0x0600360D RID: 13837 RVA: 0x001258E0 File Offset: 0x00123AE0
88 public override void OnKill()
89 {
90 Msg.Say("endSiege");
91 EClass._zone.RefreshBGM();
92 }
93
94 // Token: 0x04001C98 RID: 7320
95 [JsonProperty]
96 public List<int> uids = new List<int>();
97
98 // Token: 0x04001C99 RID: 7321
99 public List<Chara> members = new List<Chara>();
100}
Definition Chara.cs:12
Definition Msg.cs:7
Definition Point.cs:11
Definition Thing.cs:10