Elin Decompiled Documentation EA 23.355 Stable
Loading...
Searching...
No Matches
SurvivalManager Class Reference
Inheritance diagram for SurvivalManager:
EClass

Classes

class  Flags
 

Public Member Functions

ZoneEventRaid GetRaidEvent ()
 
void Meteor (Point pos, Action action)
 
void MeteorThing (Point pos, string id, bool install=false)
 
void MeteorThing (Point pos, Thing t, bool install=false)
 
void OnAdvanceHour ()
 
void RefreshGateZones ()
 
void RefreshRewards ()
 
void OnExpandFloor (Point pos)
 
void CheckLoytelDebt ()
 
bool OnMineWreck (Point point)
 
Point GetRandomPoint ()
 
List< SourceChara.Row > ListUnrecruitedUniques ()
 
void OnUpdateRecruit (FactionBranch branch)
 
void StartRaid ()
 

Public Attributes

Flags flags = new Flags()
 
List< string > listReward = new List<string>()
 
Zone gateZone
 
List< Zone > listGateZone = new List<Zone>()
 

Properties

bool IsInRaid [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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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 8 of file SurvivalManager.cs.

Member Function Documentation

◆ CheckLoytelDebt()

void SurvivalManager.CheckLoytelDebt ( )
inline

Definition at line 347 of file SurvivalManager.cs.

348 {
349 if (EClass.game.cards.globalCharas.Find("loytel") != null && !EClass.game.quests.IsAdded<QuestDebt>())
350 {
351 Quest quest = EClass.game.quests.Add("debt", "loytel");
352 EClass.game.quests.globalList.Remove(quest);
353 EClass.game.quests.Start(quest);
354 }
355 }
Chara Find(string id)
Definition: CardManager.cs:20
GlobalCharaList globalCharas
Definition: CardManager.cs:46
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
CardManager cards
Definition: Game.cs:156
QuestManager quests
Definition: Game.cs:183
bool IsAdded(string id)
Quest Add(string id, string idGlobalChara=null)
Definition: QuestManager.cs:29
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
List< Quest > globalList
Definition: QuestManager.cs:14
Definition: Quest.cs:7

References QuestManager.Add(), Game.cards, CardManager.GlobalCharaList.Find(), EClass.game, CardManager.globalCharas, QuestManager.globalList, QuestManager.IsAdded(), Game.quests, and QuestManager.Start().

Referenced by OnExpandFloor(), and OnMineWreck().

◆ GetRaidEvent()

ZoneEventRaid SurvivalManager.GetRaidEvent ( )
inline

Definition at line 164 of file SurvivalManager.cs.

165 {
166 return EClass._zone.events.GetEvent<ZoneEventRaid>();
167 }
static Zone _zone
Definition: EClass.cs:21
ZoneEventManager events
Definition: Zone.cs:43

References EClass._zone, and Zone.events.

◆ GetRandomPoint()

Point SurvivalManager.GetRandomPoint ( )
inline

Definition at line 502 of file SurvivalManager.cs.

503 {
505 Point point = ((traitCoreZone != null) ? traitCoreZone.owner.pos : EClass._map.GetCenterPos());
506 List<Cell> list = new List<Cell>();
507 EClass._map.ForeachSphere(point.x, point.z, 50f, delegate(Point p)
508 {
509 if (!p.IsSky && !p.IsBlocked && !p.HasObj && !p.HasThing)
510 {
511 list.Add(p.cell);
512 }
513 });
514 if (list.Count == 0)
515 {
516 return null;
517 }
518 return list.RandomItem().GetPoint();
519 }
Point pos
Definition: Card.cs:60
static Map _map
Definition: EClass.cs:19
Point GetCenterPos()
Definition: MapBounds.cs:52
Thing FindThing(Func< Thing, bool > func)
Definition: Map.cs:2778
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
Definition: Map.cs:2546
Definition: Point.cs:9
bool IsSky
Definition: Point.cs:224
bool IsBlocked
Definition: Point.cs:363
bool HasThing
Definition: Point.cs:251
bool HasObj
Definition: Point.cs:137
Card owner
Definition: Trait.cs:28

References EClass._map, Map.FindThing(), Map.ForeachSphere(), MapBounds.GetCenterPos(), Point.HasObj, Point.HasThing, Point.IsBlocked, Point.IsSky, Trait.owner, and Card.pos.

Referenced by ZoneEventRaid.OnKill(), and OnMineWreck().

◆ ListUnrecruitedUniques()

List< SourceChara.Row > SurvivalManager.ListUnrecruitedUniques ( )
inline

Definition at line 521 of file SurvivalManager.cs.

522 {
523 return EClass.sources.charas.rows.Where(delegate(SourceChara.Row r)
524 {
525 if (r.quality != 4 || r.race == "god" || r.size.Length != 0)
526 {
527 return false;
528 }
529 switch (r.id)
530 {
531 case "fiama":
532 case "loytel":
533 case "nino":
534 case "big_daddy":
535 case "big_daddy2":
536 case "littleOne":
537 case "mamani":
538 return false;
539 default:
540 if (EClass.game.cards.globalCharas.Find(r.id) == null)
541 {
542 return r.LV < flags.raidLv + 10;
543 }
544 return false;
545 }
546 }).ToList();
547 }
static SourceManager sources
Definition: EClass.cs:43
SourceChara charas

References SourceManager.charas, and EClass.sources.

◆ Meteor()

void SurvivalManager.Meteor ( Point  pos,
Action  action 
)
inline

Definition at line 169 of file SurvivalManager.cs.

170 {
171 EffectMeteor.Create(pos, 0, 1, delegate
172 {
173 action();
174 });
175 }
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
Definition: EffectMeteor.cs:40

References EffectMeteor.Create().

◆ MeteorThing() [1/2]

void SurvivalManager.MeteorThing ( Point  pos,
string  id,
bool  install = false 
)
inline

Definition at line 177 of file SurvivalManager.cs.

178 {
179 if (pos == null)
180 {
181 pos = EClass.pc.pos.Copy();
182 }
183 Meteor(pos, delegate
184 {
186 if (card.id == "rod_wish")
187 {
188 card.SetCharge(1);
189 }
190 if (install)
191 {
192 card.Install();
193 }
194 });
195 }
if(!match.Success)
Definition: Card.cs:11
static Chara pc
Definition: EClass.cs:15
Point Copy()
Definition: Point.cs:491
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Card AddCard(Card t, Point point)
Definition: Zone.cs:2159

References EClass._zone, Zone.AddCard(), card, Point.Copy(), ThingGen.Create(), if(), Meteor, EClass.pc, and Card.pos.

Referenced by ZoneEventRaid.OnKill(), and OnMineWreck().

◆ MeteorThing() [2/2]

void SurvivalManager.MeteorThing ( Point  pos,
Thing  t,
bool  install = false 
)
inline

Definition at line 197 of file SurvivalManager.cs.

198 {
199 if (pos == null)
200 {
201 pos = EClass.pc.pos.Copy();
202 }
203 Meteor(pos, delegate
204 {
205 Card card = EClass._zone.AddCard(t, pos);
206 if (install)
207 {
208 card.Install();
209 }
210 });
211 }

References EClass._zone, Zone.AddCard(), card, Point.Copy(), Meteor, EClass.pc, and Card.pos.

◆ OnAdvanceHour()

void SurvivalManager.OnAdvanceHour ( )
inline

Definition at line 213 of file SurvivalManager.cs.

214 {
216 {
217 Point point = new Point(EClass._map.CenterX + 1, EClass._map.CenterZ + 1);
218 if (!point.HasObj)
219 {
220 point.SetObj(46);
221 }
222 }
223 if (EClass.world.date.hour == 0 || EClass.debug.enable)
224 {
226 }
227 }
bool enable
Definition: CoreDebug.cs:302
int hour
Definition: Date.cs:74
static World world
Definition: EClass.cs:41
static CoreDebug debug
Definition: EClass.cs:49
int CenterZ
Definition: MapBounds.cs:24
int CenterX
Definition: MapBounds.cs:22
void SetObj(int id=0, int value=1, int dir=0)
Definition: Point.cs:934
GameDate date
Definition: World.cs:6

References EClass._map, EClass._zone, MapBounds.CenterX, MapBounds.CenterZ, World.date, EClass.debug, CoreDebug.enable, Point.HasObj, Date.hour, RefreshGateZones(), Point.SetObj(), and EClass.world.

Referenced by GameDate.AdvanceHour().

◆ OnExpandFloor()

void SurvivalManager.OnExpandFloor ( Point  pos)
inline

Definition at line 289 of file SurvivalManager.cs.

290 {
291 int n = 0;
292 bool done = false;
293 EClass._map.ForeachCell(delegate(Cell c)
294 {
295 if (!c.sourceFloor.tileType.IsSkipFloor)
296 {
297 n++;
298 }
299 });
300 Check(6, delegate
301 {
302 EClass._zone.ClaimZone(debug: false, pos);
303 });
304 Check(9, delegate
305 {
307 });
308 Check(20, delegate
309 {
310 AddMemeber("fiama");
311 });
312 Check(40, delegate
313 {
314 AddMemeber("nino");
315 });
316 Check(60, delegate
317 {
318 AddMemeber("loytel");
320 });
321 Check(80, delegate
322 {
323 AddMemeber("farris");
324 });
325 Check(100, delegate
326 {
327 EClass._zone.AddCard(ThingGen.Create("core_defense"), pos).Install();
328 });
329 void AddMemeber(string id)
330 {
331 if (EClass.game.cards.globalCharas.Find(id) == null)
332 {
334 }
335 }
336 void Check(int a, Action action)
337 {
338 if (!done && flags.floors < a && n >= a)
339 {
340 Meteor(pos, action);
341 EClass.game.survival.flags.floors = a;
342 done = true;
343 }
344 }
345 }
virtual Chara Chara
Definition: Card.cs:2122
Card Install()
Definition: Card.cs:3922
Definition: Cell.cs:7
SourceFloor.Row sourceFloor
Definition: Cell.cs:1092
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
FactionBranch homeBranch
Definition: Chara.cs:1115
Definition: Check.cs:5
void AddMemeber(Chara c)
new void ForeachCell(Action< Cell > action)
Definition: Map.cs:2512
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
void ClaimZone(bool debug=false, Point pos=null)
Definition: Zone.cs:1888

References EClass._map, EClass._zone, Zone.AddCard(), FactionBranch.AddMemeber(), Game.cards, Card.Chara, CheckLoytelDebt(), Zone.ClaimZone(), ThingGen.Create(), CharaGen.Create(), EClass.debug, CardManager.GlobalCharaList.Find(), flags, SurvivalManager.Flags.floors, Map.ForeachCell(), EClass.game, CardManager.globalCharas, Chara.homeBranch, Card.Install(), Meteor, EClass.pc, Cell.sourceFloor, Point.x, and Point.z.

◆ OnMineWreck()

bool SurvivalManager.OnMineWreck ( Point  point)
inline

Definition at line 357 of file SurvivalManager.cs.

358 {
359 if (EClass._zone.events.GetEvent<ZoneEventSurvival>() == null)
360 {
362 }
364 SourceObj.Row sourceObj = point.cell.sourceObj;
365 int searchWreck = EClass.game.survival.flags.searchWreck;
366 string[] array = new string[6] { "log", "rock", "branch", "bone", "grass", "vine" };
367 int chanceChange = 25;
368 int num = searchWreck / 50 + 1;
369 if (searchWreck == 0)
370 {
371 Thing t = ThingGen.CreateParcel(null, ThingGen.Create("log").SetNum(6), ThingGen.Create("rock").SetNum(4), ThingGen.Create("resin").SetNum(2), ThingGen.Create("money2").SetNum(10), ThingGen.Create("1267"), ThingGen.CreateRod(50311, 8));
372 Pop(t);
373 }
374 switch (sourceObj.alias)
375 {
376 case "nest_bird":
377 chanceChange = 65;
378 return Pop(ThingGen.Create((EClass.rnd(10) == 0) ? "egg_fertilized" : "_egg").TryMakeRandomItem(num));
379 case "wreck_wood":
380 array = new string[8] { "log", "log", "branch", "grass", "vine", "resin", "leaf", "chunk" };
381 break;
382 case "wreck_junk":
383 chanceChange = 100;
384 return Pop(ThingGen.CreateFromFilter("wreck_junk", num));
385 case "wreck_stone":
386 chanceChange = 30;
387 array = new string[4] { "rock", "rock", "stone", "bone" };
388 break;
389 case "wreck_scrap":
390 chanceChange = 75;
391 array = new string[1] { "scrap" };
392 break;
393 case "wreck_cloth":
394 chanceChange = 75;
395 array = new string[1] { "fiber" };
396 break;
397 case "wreck_precious":
398 chanceChange = 100;
399 return Pop(ThingGen.CreateFromFilter("shop_magic", num));
400 default:
401 return false;
402 }
404 {
407 {
408 case 5:
409 case 6:
410 return Pop(ThingGen.CreateFloor(33, 97).SetNum(3));
411 case 7:
412 case 8:
413 return Pop(ThingGen.CreateFloor(43, 66).SetNum(3));
414 default:
415 return Pop(ThingGen.CreateFloor(40, 45).SetNum(3));
416 }
417 }
418 if (EClass.rnd(20) == 0)
419 {
420 return Pop(TraitSeed.MakeRandomSeed());
421 }
422 if (EClass.rnd(12 + num / 5) == 0)
423 {
424 return Pop(ThingGen.Create("money2"));
425 }
426 if (searchWreck > 10 && EClass.rnd(40 + num) == 0)
427 {
428 TreasureType treasureType = ((EClass.rnd(10) == 0) ? TreasureType.BossNefia : ((EClass.rnd(10) == 0) ? TreasureType.Map : TreasureType.RandomChest));
429 Thing t2 = ThingGen.Create(treasureType switch
430 {
431 TreasureType.Map => "chest_treasure",
432 TreasureType.BossNefia => "chest_boss",
433 _ => "chest3",
434 });
435 ThingGen.CreateTreasureContent(t2, num, treasureType, clearContent: true);
436 MeteorThing(GetRandomPoint(), t2, install: true);
437 }
438 if (EClass.rnd(12) == 0)
439 {
440 Point pos = point.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? point;
441 if (searchWreck < 100 || EClass.rnd(3) != 0)
442 {
444 }
445 else
446 {
447 EClass._zone.SpawnMob(pos, SpawnSetting.HomeEnemy(Mathf.Max(num - 5, 1)));
448 }
449 }
450 return Pop(ThingGen.Create(array.RandomItem()).SetNum(1 + EClass.rnd(3)));
451 bool Next()
452 {
454 int searchWreck2 = EClass.game.survival.flags.searchWreck;
455 Point pos2 = point.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? point;
456 if (searchWreck2 == 20)
457 {
458 Thing container = ThingGen.CreateParcel(null, ThingGen.CreateRecipe("container_shipping"), ThingGen.CreateRecipe("stonecutter"), ThingGen.CreateRecipe("factory_stone"), ThingGen.CreateRecipe("workbench2"), ThingGen.Create("crystal_earth").SetNum(3));
459 Meteor(pos2, delegate
460 {
461 EClass._zone.AddCard(container, pos2);
462 });
463 }
464 if (searchWreck2 > (EClass.debug.enable ? 5 : 100) && !flags.gotTaxChest)
465 {
466 MeteorThing(pos2, "chest_tax", install: true);
467 flags.gotTaxChest = true;
468 }
469 else if (searchWreck2 > (EClass.debug.enable ? 10 : 200) && !flags.gotGaragara)
470 {
471 MeteorThing(pos2, "rolling_fortune", install: true);
472 flags.gotGaragara = true;
473 }
474 else if (EClass.player.stats.days > 1 && !flags.gotSkyWorkbench)
475 {
476 MeteorThing(pos2, ThingGen.CreateRecipe("workbench_sky"));
477 flags.gotSkyWorkbench = true;
478 }
479 NextObj();
480 return true;
481 }
482 void NextObj()
483 {
484 if (EClass.rnd(100) < chanceChange)
485 {
486 string[] source = new string[12]
487 {
488 "nest_bird", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_stone", "wreck_stone", "wreck_scrap", "wreck_junk",
489 "wreck_cloth", "wreck_precious"
490 };
491 EClass._map.SetObj(point.x, point.z, EClass.sources.objs.alias[source.RandomItem()].id);
492 }
493 }
494 bool Pop(Thing t3)
495 {
496 EClass._map.TrySmoothPick(point, t3, EClass.pc);
497 Next();
498 return true;
499 }
500 }
TreasureType
Definition: TreasureType.cs:2
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
Definition: Card.cs:5758
Thing SetNum(int a)
Definition: Card.cs:3676
SourceObj.Row sourceObj
Definition: Cell.cs:1112
static int rnd(long a)
Definition: EClass.cs:59
static Player player
Definition: EClass.cs:13
SurvivalManager survival
Definition: Game.cs:228
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1944
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
Definition: Map.cs:1675
int days
Definition: Player.cs:75
Stats stats
Definition: Player.cs:1086
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
Cell cell
Definition: Point.cs:51
SourceObj objs
static SpawnSetting HomeWild(int lv)
static SpawnSetting HomeEnemy(int lv)
void MeteorThing(Point pos, string id, bool install=false)
static Thing CreateFromFilter(string id, int lv=-1)
Definition: ThingGen.cs:63
static Thing CreateParcel(string idLang=null, params Thing[] things)
Definition: ThingGen.cs:42
static void CreateTreasureContent(Thing t, int lv, TreasureType type, bool clearContent)
Definition: ThingGen.cs:271
static Thing CreateFloor(int id, int idMat, bool platform=false)
Definition: ThingGen.cs:108
static Thing CreateRecipe(string id)
Definition: ThingGen.cs:152
static Thing CreateRod(int ele, int charge=-1)
Definition: ThingGen.cs:217
Definition: Thing.cs:8
string alias
Definition: TileRow.cs:13
static Thing MakeRandomSeed(bool enc=false)
Definition: TraitSeed.cs:97
void Add(ZoneEvent e, bool allowDuplicate=false)
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2988

References EClass._map, EClass._zone, ZoneEventManager.Add(), Zone.AddCard(), TileRow.alias, Point.cell, CheckLoytelDebt(), ThingGen.Create(), ThingGen.CreateFloor(), ThingGen.CreateFromFilter(), ThingGen.CreateParcel(), ThingGen.CreateRecipe(), ThingGen.CreateRod(), ThingGen.CreateTreasureContent(), Player.Stats.days, EClass.debug, CoreDebug.enable, Zone.events, flags, EClass.game, Point.GetNearestPoint(), GetRandomPoint(), SurvivalManager.Flags.gotGaragara, SurvivalManager.Flags.gotSkyWorkbench, SurvivalManager.Flags.gotTaxChest, SpawnSetting.HomeEnemy(), SpawnSetting.HomeWild(), TraitSeed.MakeRandomSeed(), Meteor, MeteorThing(), Next, SourceManager.objs, EClass.pc, EClass.player, EClass.rnd(), SurvivalManager.Flags.searchWreck, Card.SetNum(), Map.SetObj(), Cell.sourceObj, EClass.sources, SurvivalManager.Flags.spawnedFloor, Zone.SpawnMob(), Player.stats, Game.survival, Card.TryMakeRandomItem(), Map.TrySmoothPick(), Point.x, and Point.z.

Referenced by Map.MineObj().

◆ OnUpdateRecruit()

void SurvivalManager.OnUpdateRecruit ( FactionBranch  branch)
inline

Definition at line 549 of file SurvivalManager.cs.

550 {
552 for (int i = 0; i < (EClass.debug.enable ? 10 : 2); i++)
553 {
554 SourceChara.Row row = list.RandomItem();
555 if (row == null)
556 {
557 continue;
558 }
559 bool flag = true;
560 foreach (HireInfo item in branch.listRecruit)
561 {
562 if (item.chara.id == row.id)
563 {
564 flag = false;
565 }
566 }
567 if (flag)
568 {
569 Chara chara = CharaGen.Create(row.id);
570 chara.RemoveEditorTag(EditorTag.AINoMove);
571 branch.AddRecruit(chara);
572 list.Remove(row);
573 }
574 }
575 }
EditorTag
Definition: EditorTag.cs:2
string id
Definition: CardRow.cs:7
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2743
Definition: Chara.cs:10
void AddRecruit(Chara c)
List< HireInfo > listRecruit
List< SourceChara.Row > ListUnrecruitedUniques()

References FactionBranch.AddRecruit(), CharaGen.Create(), item, FactionBranch.listRecruit, and Card.RemoveEditorTag().

◆ RefreshGateZones()

void SurvivalManager.RefreshGateZones ( )
inline

Definition at line 229 of file SurvivalManager.cs.

230 {
231 listGateZone.ForeachReverse(delegate(Zone z)
232 {
233 if (z == null || z.destryoed)
234 {
235 listGateZone.Remove(z);
236 }
237 });
238 if (listGateZone.Count == 0)
239 {
240 for (int num = 0; num < 3; num++)
241 {
242 if (EClass.rnd(4) == 0)
243 {
244 IEnumerable<Spatial> enumerable = EClass.game.spatials.map.Values.Where((Spatial a) => a.source.costSkyTravel > 0 && !listGateZone.Contains(a) && a != gateZone);
245 if (enumerable.Count() > 0)
246 {
247 listGateZone.Add(enumerable.RandomItem() as Zone);
248 }
249 }
250 else
251 {
252 Zone item = EClass.world.region.CreateRandomSite(new Point(1, 1), (EClass.rnd(5) == 0) ? "dungeon_water" : null, updateMesh: false);
253 listGateZone.Add(item);
254 }
255 }
256 }
257 foreach (Zone item2 in listGateZone)
258 {
259 if (item2.dateExpire > 0)
260 {
261 item2.dateExpire = EClass.world.date.GetRaw() + 10080;
262 }
263 }
264 }
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
SpatialManager spatials
Definition: Game.cs:153
Zone CreateRandomSite(Zone center, int radius=8, string idSource=null, bool updateMesh=true, int lv=0)
Definition: Region.cs:141
GlobalSpatialList map
SourceZone.Row source
Definition: Spatial.cs:453
bool destryoed
Definition: Spatial.cs:45
int dateExpire
Definition: Spatial.cs:166
List< Zone > listGateZone
Region region
Definition: World.cs:23
Definition: Zone.cs:12

References Region.CreateRandomSite(), World.date, Spatial.dateExpire, Spatial.destryoed, EClass.game, gateZone, Date.GetRaw(), item, listGateZone, SpatialManager.map, World.region, EClass.rnd(), Spatial.source, Game.spatials, and EClass.world.

Referenced by OnAdvanceHour(), and TraitSkyHelm.OnUse().

◆ RefreshRewards()

void SurvivalManager.RefreshRewards ( )
inline

Definition at line 266 of file SurvivalManager.cs.

267 {
268 if (listReward.Count <= 0)
269 {
270 Add(new string[7] { "659", "758", "759", "806", "828", "1190", "1191" });
271 if (flags.raidLv < 50)
272 {
273 Add(new string[7] { "pillow_jure", "pillow_ehekatl", "pillow_opatos", "pillow_kumiromi", "pillow_lulwy", "pillow_mani", "pillow_itzpalt" });
274 }
275 else
276 {
277 Add(new string[1] { "rod_wish" });
278 }
279 }
280 void Add(string[] ids)
281 {
282 foreach (string item in ids)
283 {
284 listReward.Add(item);
285 }
286 }
287 }
List< string > listReward

References flags, item, listReward, and SurvivalManager.Flags.raidLv.

Referenced by ZoneEventRaid.OnKill().

◆ StartRaid()

void SurvivalManager.StartRaid ( )
inline

Definition at line 577 of file SurvivalManager.cs.

578 {
579 flags.raid = true;
580 Point pos = EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? EClass.pc.pos;
581 Meteor(pos, delegate
582 {
583 EClass._zone.AddCard(ThingGen.Create("teleporter_demon"), pos).Install();
584 });
585 flags.dateNextRaid = EClass.world.date.GetRaw(72);
586 }

References EClass._zone, Zone.AddCard(), ThingGen.Create(), World.date, Point.GetNearestPoint(), Date.GetRaw(), Card.Install(), Meteor, EClass.pc, Card.pos, and EClass.world.

Referenced by TraitCoreDefense.TrySetAct().

Member Data Documentation

◆ flags

◆ gateZone

Zone SurvivalManager.gateZone

◆ listGateZone

List<Zone> SurvivalManager.listGateZone = new List<Zone>()

Definition at line 160 of file SurvivalManager.cs.

Referenced by TraitSkyHelm.OnUse(), and RefreshGateZones().

◆ listReward

List<string> SurvivalManager.listReward = new List<string>()

Definition at line 154 of file SurvivalManager.cs.

Referenced by ZoneEventRaid.OnKill(), and RefreshRewards().

Property Documentation

◆ IsInRaid

bool SurvivalManager.IsInRaid
get

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