Elin Decompiled Documentation EA 23.200 Stable
Loading...
Searching...
No Matches
ZoneEventSiege Class Reference
Inheritance diagram for ZoneEventSiege:
ZoneEvent EClass ZoneEventRaid ZoneEventSiegeGuard

Public Member Functions

virtual Chara CreateChara (Point p)
 
override void OnInit ()
 
override void OnVisit ()
 
void SpawnMob ()
 
virtual Point GetSpawnPos ()
 
override void OnTickRound ()
 
override void OnCharaDie (Chara c)
 
bool ShouldEnd ()
 
override void OnKill ()
 
- Public Member Functions inherited from ZoneEvent
virtual string GetText ()
 
void Tick (float delta)
 
void Init ()
 
void OnSimulateHour ()
 
virtual void OnVisit ()
 
virtual void OnInit ()
 
virtual void OnFirstTick ()
 
virtual void OnTick ()
 
virtual void OnTickRound ()
 
virtual void OnKill ()
 
virtual void OnCharaDie (Chara c)
 
virtual void OnLeaveZone ()
 
virtual void OnLoad ()
 
void Kill ()
 

Public Attributes

List< int > uids = new List<int>()
 
int lv = 10
 
int idx
 
int max = 10
 
List< Charamembers = new List<Chara>()
 
- Public Attributes inherited from ZoneEvent
float time
 
int rounds
 
int hoursElapsed
 
int minElapsed
 
Zone zone
 
bool firstTick = true
 

Properties

override string id [get]
 
override float roundInterval [get]
 
override Playlist playlist [get]
 
- Properties inherited from ZoneEvent
SourceQuest.Row source [get]
 
virtual string id [get]
 
virtual string TextWidgetDate [get]
 
virtual float roundInterval [get]
 
virtual Playlist playlist [get]
 
virtual bool debugSkip [get]
 
virtual string RefStr2 [get]
 
virtual string RefStr3 [get]
 
virtual int hoursToKill [get]
 
virtual bool HasReport [get]
 
string Name [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 5 of file ZoneEventSiege.cs.

Member Function Documentation

◆ CreateChara()

virtual Chara ZoneEventSiege.CreateChara ( Point  p)
inlinevirtual

Definition at line 27 of file ZoneEventSiege.cs.

28 {
29 bool flag = idx == max - 1;
30 int num;
31 object obj;
32 if (lv >= 50)
33 {
34 num = ((idx == max - 2) ? 1 : 0);
35 if (num != 0)
36 {
37 obj = SpawnSetting.Evolved(lv);
38 goto IL_005a;
39 }
40 }
41 else
42 {
43 num = 0;
44 }
46 goto IL_005a;
47 IL_005a:
48 SpawnSetting spawnSetting = (SpawnSetting)obj;
49 spawnSetting.dangerLv = lv + 1;
50 if (num == 0)
51 {
52 return EClass._zone.SpawnMob(p, spawnSetting);
53 }
54 return EClass._zone.TryGenerateEvolved(force: true, p);
55 }
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static SpawnSetting Boss(int filterLv, int fixedLv=-1)
Definition: SpawnSetting.cs:47
static SpawnSetting DefenseEnemy(int lv)
static SpawnSetting Evolved(int fixedLv=-1)
Definition: SpawnSetting.cs:35
Chara TryGenerateEvolved(bool force=false, Point p=null)
Definition: Zone.cs:2571
Chara SpawnMob(Point pos=null, SpawnSetting setting=null)
Definition: Zone.cs:2697

References EClass._zone, SpawnSetting.Boss(), SpawnSetting.DefenseEnemy(), SpawnSetting.Evolved(), idx, lv, max, Zone.SpawnMob(), and Zone.TryGenerateEvolved().

Referenced by SpawnMob().

◆ GetSpawnPos()

virtual Point ZoneEventSiege.GetSpawnPos ( )
inlinevirtual

Reimplemented in ZoneEventRaid.

Definition at line 92 of file ZoneEventSiege.cs.

93 {
94 return EClass._map.GetRandomEdge();
95 }
static Map _map
Definition: EClass.cs:18
new Point GetRandomEdge(int r=3)
Definition: Map.cs:2233

References EClass._map, and Map.GetRandomEdge().

Referenced by OnKill(), and SpawnMob().

◆ OnCharaDie()

override void ZoneEventSiege.OnCharaDie ( Chara  c)
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 109 of file ZoneEventSiege.cs.

110 {
111 if (ShouldEnd())
112 {
113 Kill();
114 }
115 }
void Kill()
Definition: ZoneEvent.cs:114

References ZoneEvent.Kill(), and ShouldEnd().

◆ OnInit()

override void ZoneEventSiege.OnInit ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 57 of file ZoneEventSiege.cs.

58 {
60 Msg.Say("startSiege");
62 }
static Player player
Definition: EClass.cs:12
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
int sieges
Definition: Player.cs:81
Stats stats
Definition: Player.cs:972
void RefreshBGM()
Definition: Zone.cs:2903

References EClass._zone, EClass.player, Zone.RefreshBGM(), Msg.Say(), Player.Stats.sieges, and Player.stats.

◆ OnKill()

override void ZoneEventSiege.OnKill ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 134 of file ZoneEventSiege.cs.

135 {
136 Msg.Say("endSiege");
137 SE.Play("kill_boss");
139 EClass._zone.AddCard(ThingGen.CreateTreasure("chest_boss", lv, TreasureType.SurvivalRaid), GetSpawnPos().GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? EClass.pc.pos).Install();
140 }
TreasureType
Definition: TreasureType.cs:2
Point pos
Definition: Card.cs:57
Card Install()
Definition: Card.cs:3639
static Chara pc
Definition: EClass.cs:14
static Thing CreateTreasure(string id, int lv, TreasureType type=TreasureType.Map)
Definition: ThingGen.cs:244
virtual Point GetSpawnPos()
Card AddCard(Card t, Point point)
Definition: Zone.cs:1943

References EClass._zone, Zone.AddCard(), ThingGen.CreateTreasure(), GetSpawnPos(), Card.Install(), lv, EClass.pc, Card.pos, Zone.RefreshBGM(), and Msg.Say().

◆ OnTickRound()

override void ZoneEventSiege.OnTickRound ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 97 of file ZoneEventSiege.cs.

98 {
99 if (idx < max)
100 {
101 SpawnMob();
102 }
103 if (ShouldEnd())
104 {
105 Kill();
106 }
107 }

References idx, ZoneEvent.Kill(), max, ShouldEnd(), and SpawnMob().

◆ OnVisit()

override void ZoneEventSiege.OnVisit ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 64 of file ZoneEventSiege.cs.

65 {
67 members.Clear();
68 foreach (int uid in uids)
69 {
70 foreach (Chara chara in EClass._map.charas)
71 {
72 if (chara.uid == uid)
73 {
74 members.Add(chara);
75 }
76 }
77 }
78 }
int uid
Definition: Card.cs:120
Definition: Chara.cs:10
List< Chara > charas
Definition: Map.cs:81
List< Chara > members
List< int > uids

References EClass._map, EClass._zone, Map.charas, members, Zone.RefreshBGM(), Card.uid, and uids.

◆ ShouldEnd()

bool ZoneEventSiege.ShouldEnd ( )
inline

Definition at line 117 of file ZoneEventSiege.cs.

118 {
119 bool result = idx >= max;
120 foreach (Chara member in members)
121 {
122 if (!member.IsPCFactionOrMinion && member.IsAliveInCurrentZone)
123 {
124 if (member.ai is GoalIdle)
125 {
126 member.SetAI(new GoalSiege());
127 }
128 result = false;
129 }
130 }
131 return result;
132 }
bool IsPCFactionOrMinion
Definition: Card.cs:2234
override bool IsAliveInCurrentZone
Definition: Chara.cs:559
AIAct ai
Definition: Chara.cs:200
AIAct SetAI(AIAct g)
Definition: Chara.cs:8527

References Chara.ai, idx, Chara.IsAliveInCurrentZone, Card.IsPCFactionOrMinion, max, members, and Chara.SetAI().

Referenced by OnCharaDie(), and OnTickRound().

◆ SpawnMob()

void ZoneEventSiege.SpawnMob ( )
inline

Definition at line 80 of file ZoneEventSiege.cs.

81 {
82 Point spawnPos = GetSpawnPos();
83 Chara chara = CreateChara(spawnPos);
84 chara.hostility = Hostility.Enemy;
85 members.Add(chara);
86 uids.Add(chara.uid);
87 chara.PlayEffect("teleport");
88 chara.PlaySound("spell_funnel");
89 idx++;
90 }
Hostility
Definition: Hostility.cs:2
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5939
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5973
Definition: Point.cs:9
virtual Chara CreateChara(Point p)

References CreateChara(), GetSpawnPos(), idx, members, Card.PlayEffect(), Card.PlaySound(), Card.uid, and uids.

Referenced by OnTickRound().

Member Data Documentation

◆ idx

int ZoneEventSiege.idx

Definition at line 14 of file ZoneEventSiege.cs.

Referenced by CreateChara(), OnTickRound(), ShouldEnd(), and SpawnMob().

◆ lv

int ZoneEventSiege.lv = 10

Definition at line 11 of file ZoneEventSiege.cs.

Referenced by CreateChara(), ZoneEventRaid.OnInit(), and OnKill().

◆ max

int ZoneEventSiege.max = 10

Definition at line 17 of file ZoneEventSiege.cs.

Referenced by CreateChara(), ZoneEventRaid.OnInit(), OnTickRound(), and ShouldEnd().

◆ members

List<Chara> ZoneEventSiege.members = new List<Chara>()

Definition at line 19 of file ZoneEventSiege.cs.

Referenced by OnVisit(), ShouldEnd(), and SpawnMob().

◆ uids

List<int> ZoneEventSiege.uids = new List<int>()

Definition at line 8 of file ZoneEventSiege.cs.

Referenced by OnVisit(), and SpawnMob().

Property Documentation

◆ id

override string ZoneEventSiege.id
get

Definition at line 21 of file ZoneEventSiege.cs.

◆ playlist

override Playlist ZoneEventSiege.playlist
get

Definition at line 25 of file ZoneEventSiege.cs.

◆ roundInterval

override float ZoneEventSiege.roundInterval
get

Definition at line 23 of file ZoneEventSiege.cs.


The documentation for this class was generated from the following file: