Elin Decompiled Documentation EA 23.227 Nightly Patch 1
Loading...
Searching...
No Matches
Zone_CurryRuinDungeon.cs
Go to the documentation of this file.
1using UnityEngine;
2
4{
5 public const int LvBoss = -5;
6
7 public bool IsBossLv => base.lv == -5;
8
9 public override int DangerLv => 33 + Mathf.Abs(base.lv);
10
11 public override bool LockExit => base.lv <= -1;
12
13 public override bool CanUnlockExit => EClass.game.quests.IsStarted<QuestCurry>();
14
15 public override string idExport
16 {
17 get
18 {
19 if (base.lv != -5)
20 {
21 return base.idExport;
22 }
23 return "curry_boss";
24 }
25 }
26
27 public override bool HasLaw => IsBossLv;
28
29 public override bool SetAlarmOnBreakLaw => IsBossLv;
30
31 public override void OnGenerateMap()
32 {
33 if (IsBossLv)
34 {
35 SetAlarm(enable: false);
36 FindChara("doga").SetHostility(Hostility.Enemy);
37 return;
38 }
39 PlaceRail();
40 EClass._map.ForeachCell(delegate(Cell c)
41 {
42 if (EClass.rnd(5) != 0 && c._block != 0 && !c.HasObj && !c.isSurrounded && !c.hasDoor)
43 {
44 c.GetSharedPoint().SetObj(24, 1, EClass.rnd(3));
45 }
46 });
47 base.OnGenerateMap();
48 }
49
50 public override void SetAlarm(bool enable)
51 {
52 base.SetAlarm(enable);
53 if (!enable)
54 {
55 return;
56 }
57 foreach (Thing thing in EClass._map.things)
58 {
59 if (thing.IsInstalled && thing.id == "candle3")
60 {
61 thing.c_lightColor = 30720;
62 thing.RecalculateFOV();
63 }
64 }
65 SetBGM(110);
66 }
67}
Hostility
Definition: Hostility.cs:2
string id
Definition: Card.cs:35
void RecalculateFOV()
Definition: Card.cs:6250
bool IsInstalled
Definition: Card.cs:2369
Definition: Cell.cs:7
byte _block
Definition: Cell.cs:30
bool isSurrounded
Definition: Cell.cs:234
bool HasObj
Definition: Cell.cs:641
bool hasDoor
Definition: Cell.cs:258
Chara SetHostility(Hostility h)
Definition: Chara.cs:1432
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Map _map
Definition: EClass.cs:18
static int rnd(long a)
Definition: EClass.cs:58
QuestManager quests
Definition: Game.cs:179
new void ForeachCell(Action< Cell > action)
Definition: Map.cs:2346
List< Thing > things
Definition: Map.cs:49
Definition: Thing.cs:8
override void SetAlarm(bool enable)
void PlaceRail(RailType railType=RailType.Mine)
void SetBGM(List< int > ids, bool refresh=true, float fadeDuration=0f)
Definition: Zone.cs:2917
Chara FindChara(string id)
Definition: Zone.cs:3038