Elin Decompiled Documentation EA 23.343 Nightly
Loading...
Searching...
No Matches
Zone_WindRest.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3
4public class Zone_WindRest : Zone
5{
6 public override bool IsSnowCovered => false;
7
8 public override void OnGenerateMap()
9 {
10 base.OnGenerateMap();
11 List<Dictionary<string, string>> list = new ExcelData("Data/Raw/dagger_graves", 1).BuildList();
12 list.RemoveAt(0);
13 int num = 0;
14 foreach (Thing thing in EClass._map.things)
15 {
16 if (thing.id != "grave_dagger1" && thing.id != "grave_dagger2")
17 {
18 continue;
19 }
20 thing.isOn = false;
21 if (num < list.Count)
22 {
23 Dictionary<string, string> dictionary = list[num];
24 int num2 = dictionary["id"].ToInt();
25 num++;
26 if (num2 != 0)
27 {
28 thing.c_note = dictionary["First_" + (Lang.isJP ? "JP" : "EN")];
29 thing.c_context = dictionary["Full"];
30 thing.c_idBacker = num2;
31 thing.isModified = true;
32 }
33 }
34 }
35 Debug.Log(num + "/" + list.Count);
36 }
37
38 public override void OnAfterSimulate()
39 {
40 base.OnAfterSimulate();
41 if (base.HourSinceLastActive >= 168)
42 {
43 TryRevive("eureka", 60, 61);
44 TryRevive("billy", 35, 64);
45 }
46 List<Thing> list = EClass._map.ListThing<TraitDaggerGrave>();
47 foreach (Thing item in list)
48 {
49 if (item.pos.x != 52 || item.pos.z != 46)
50 {
51 continue;
52 }
53 {
54 foreach (Thing item2 in list)
55 {
56 if (item2.c_idBacker == 1239)
57 {
58 item.MoveImmediate(item2.pos);
59 item2.MoveImmediate(new Point(52, 46));
60 break;
61 }
62 }
63 break;
64 }
65 }
66 static void TryRevive(string id, int x, int y)
67 {
68 if (EClass.game.cards.globalCharas.Find(id) == null)
69 {
70 bool flag = false;
71 foreach (Chara chara in EClass._map.charas)
72 {
73 if (chara.id == id)
74 {
75 flag = true;
76 }
77 }
78 if (!flag)
79 {
81 }
82 }
83 }
84 }
85}
Chara Find(string id)
Definition: CardManager.cs:20
GlobalCharaList globalCharas
Definition: CardManager.cs:46
string id
Definition: Card.cs:36
Point pos
Definition: Card.cs:60
int c_idBacker
Definition: Card.cs:1477
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:6164
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
CardManager cards
Definition: Game.cs:156
List< Thing > things
Definition: Map.cs:49
List< Chara > charas
Definition: Map.cs:81
Definition: Point.cs:9
int y
Definition: Spatial.cs:106
int x
Definition: Spatial.cs:94
Definition: Thing.cs:8
override bool IsSnowCovered
Definition: Zone_WindRest.cs:6
override void OnGenerateMap()
Definition: Zone_WindRest.cs:8
override void OnAfterSimulate()
Definition: Zone.cs:12
Card AddCard(Card t, Point point)
Definition: Zone.cs:2142