Elin Decompiled Documentation EA 23.339.0 Nightly
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.RowListUnrecruitedUniques ()
 
void OnUpdateRecruit (FactionBranch branch)
 
void StartRaid ()
 

Public Attributes

Flags flags = new Flags()
 
List< string > listReward = new List<string>()
 
Zone gateZone
 
List< ZonelistGateZone = 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 339 of file SurvivalManager.cs.

340 {
341 if (EClass.game.cards.globalCharas.Find("loytel") != null && !EClass.game.quests.IsAdded<QuestDebt>())
342 {
343 Quest quest = EClass.game.quests.Add("debt", "loytel");
344 EClass.game.quests.globalList.Remove(quest);
345 EClass.game.quests.Start(quest);
346 }
347 }
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:40

References EClass._zone, and Zone.events.

◆ GetRandomPoint()

Point SurvivalManager.GetRandomPoint ( )
inline

Definition at line 494 of file SurvivalManager.cs.

495 {
497 Point point = ((traitCoreZone != null) ? traitCoreZone.owner.pos : EClass._map.GetCenterPos());
498 List<Cell> list = new List<Cell>();
499 EClass._map.ForeachSphere(point.x, point.z, 50f, delegate(Point p)
500 {
501 if (!p.IsSky && !p.IsBlocked && !p.HasObj && !p.HasThing)
502 {
503 list.Add(p.cell);
504 }
505 });
506 if (list.Count == 0)
507 {
508 return null;
509 }
510 return list.RandomItem().GetPoint();
511 }
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:2669
void ForeachSphere(int _x, int _z, float r, Action< Point > action)
Definition: Map.cs:2437
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 513 of file SurvivalManager.cs.

514 {
515 return EClass.sources.charas.rows.Where(delegate(SourceChara.Row r)
516 {
517 if (r.quality != 4 || r.race == "god" || r.size.Length != 0)
518 {
519 return false;
520 }
521 switch (r.id)
522 {
523 case "fiama":
524 case "loytel":
525 case "nino":
526 case "big_daddy":
527 case "big_daddy2":
528 case "littleOne":
529 case "mamani":
530 return false;
531 default:
532 if (EClass.game.cards.globalCharas.Find(r.id) == null)
533 {
534 return r.LV < flags.raidLv + 10;
535 }
536 return false;
537 }
538 }).ToList();
539 }
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 Meteor(pos, delegate
180 {
182 if (card.id == "rod_wish")
183 {
184 card.SetCharge(1);
185 }
186 if (install)
187 {
188 card.Install();
189 }
190 });
191 }
if(!match.Success)
Definition: Card.cs:11
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Card AddCard(Card t, Point point)
Definition: Zone.cs:2102

References EClass._zone, Zone.AddCard(), card, ThingGen.Create(), if(), and Meteor.

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

◆ MeteorThing() [2/2]

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

Definition at line 193 of file SurvivalManager.cs.

194 {
195 Meteor(pos, delegate
196 {
197 Card card = EClass._zone.AddCard(t, pos);
198 if (install)
199 {
200 card.Install();
201 }
202 });
203 }

References EClass._zone, Zone.AddCard(), card, and Meteor.

◆ OnAdvanceHour()

void SurvivalManager.OnAdvanceHour ( )
inline

Definition at line 205 of file SurvivalManager.cs.

206 {
208 {
209 Point point = new Point(EClass._map.CenterX + 1, EClass._map.CenterZ + 1);
210 if (!point.HasObj)
211 {
212 point.SetObj(46);
213 }
214 }
215 if (EClass.world.date.hour == 0 || EClass.debug.enable)
216 {
218 }
219 }
bool enable
Definition: CoreDebug.cs:301
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 281 of file SurvivalManager.cs.

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

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 349 of file SurvivalManager.cs.

350 {
351 if (EClass._zone.events.GetEvent<ZoneEventSurvival>() == null)
352 {
354 }
356 SourceObj.Row sourceObj = point.cell.sourceObj;
357 int searchWreck = EClass.game.survival.flags.searchWreck;
358 string[] array = new string[6] { "log", "rock", "branch", "bone", "grass", "vine" };
359 int chanceChange = 25;
360 int num = searchWreck / 50 + 1;
361 if (searchWreck == 0)
362 {
363 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));
364 Pop(t);
365 }
366 switch (sourceObj.alias)
367 {
368 case "nest_bird":
369 chanceChange = 65;
370 return Pop(ThingGen.Create((EClass.rnd(10) == 0) ? "egg_fertilized" : "_egg").TryMakeRandomItem(num));
371 case "wreck_wood":
372 array = new string[8] { "log", "log", "branch", "grass", "vine", "resin", "leaf", "chunk" };
373 break;
374 case "wreck_junk":
375 chanceChange = 100;
376 return Pop(ThingGen.CreateFromFilter("wreck_junk", num));
377 case "wreck_stone":
378 chanceChange = 30;
379 array = new string[4] { "rock", "rock", "stone", "bone" };
380 break;
381 case "wreck_scrap":
382 chanceChange = 75;
383 array = new string[1] { "scrap" };
384 break;
385 case "wreck_cloth":
386 chanceChange = 75;
387 array = new string[1] { "fiber" };
388 break;
389 case "wreck_precious":
390 chanceChange = 100;
391 return Pop(ThingGen.CreateFromFilter("shop_magic", num));
392 default:
393 return false;
394 }
396 {
399 {
400 case 5:
401 case 6:
402 return Pop(ThingGen.CreateFloor(33, 97).SetNum(3));
403 case 7:
404 case 8:
405 return Pop(ThingGen.CreateFloor(43, 66).SetNum(3));
406 default:
407 return Pop(ThingGen.CreateFloor(40, 45).SetNum(3));
408 }
409 }
410 if (EClass.rnd(20) == 0)
411 {
412 return Pop(TraitSeed.MakeRandomSeed());
413 }
414 if (EClass.rnd(12 + num / 5) == 0)
415 {
416 return Pop(ThingGen.Create("money2"));
417 }
418 if (searchWreck > 10 && EClass.rnd(40 + num) == 0)
419 {
420 TreasureType treasureType = ((EClass.rnd(10) == 0) ? TreasureType.BossNefia : ((EClass.rnd(10) == 0) ? TreasureType.Map : TreasureType.RandomChest));
421 Thing t2 = ThingGen.Create(treasureType switch
422 {
423 TreasureType.Map => "chest_treasure",
424 TreasureType.BossNefia => "chest_boss",
425 _ => "chest3",
426 });
427 ThingGen.CreateTreasureContent(t2, num, treasureType, clearContent: true);
428 MeteorThing(GetRandomPoint(), t2, install: true);
429 }
430 if (EClass.rnd(12) == 0)
431 {
432 Point pos = point.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? point;
433 if (searchWreck < 100 || EClass.rnd(3) != 0)
434 {
436 }
437 else
438 {
439 EClass._zone.SpawnMob(pos, SpawnSetting.HomeEnemy(Mathf.Max(num - 5, 1)));
440 }
441 }
442 return Pop(ThingGen.Create(array.RandomItem()).SetNum(1 + EClass.rnd(3)));
443 bool Next()
444 {
446 int searchWreck2 = EClass.game.survival.flags.searchWreck;
447 Point pos2 = point.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? point;
448 if (searchWreck2 == 20)
449 {
450 Thing container = ThingGen.CreateParcel(null, ThingGen.CreateRecipe("container_shipping"), ThingGen.CreateRecipe("stonecutter"), ThingGen.CreateRecipe("workbench2"), ThingGen.Create("crystal_earth").SetNum(3));
451 Meteor(pos2, delegate
452 {
453 EClass._zone.AddCard(container, pos2);
454 });
455 }
456 if (searchWreck2 > (EClass.debug.enable ? 5 : 100) && !flags.gotTaxChest)
457 {
458 MeteorThing(pos2, "chest_tax", install: true);
459 flags.gotTaxChest = true;
460 }
461 else if (searchWreck2 > (EClass.debug.enable ? 10 : 200) && !flags.gotGaragara)
462 {
463 MeteorThing(pos2, "rolling_fortune", install: true);
464 flags.gotGaragara = true;
465 }
466 else if (EClass.player.stats.days > 1 && !flags.gotSkyWorkbench)
467 {
468 MeteorThing(pos2, ThingGen.CreateRecipe("workbench_sky"));
469 flags.gotSkyWorkbench = true;
470 }
471 NextObj();
472 return true;
473 }
474 void NextObj()
475 {
476 if (EClass.rnd(100) < chanceChange)
477 {
478 string[] source = new string[12]
479 {
480 "nest_bird", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_wood", "wreck_stone", "wreck_stone", "wreck_scrap", "wreck_junk",
481 "wreck_cloth", "wreck_precious"
482 };
483 EClass._map.SetObj(point.x, point.z, EClass.sources.objs.alias[source.RandomItem()].id);
484 }
485 }
486 bool Pop(Thing t3)
487 {
488 EClass._map.TrySmoothPick(point, t3, EClass.pc);
489 Next();
490 return true;
491 }
492 }
TreasureType
Definition: TreasureType.cs:2
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
Definition: Card.cs:5751
Thing SetNum(int a)
Definition: Card.cs:3673
SourceObj.Row sourceObj
Definition: Cell.cs:1096
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:1848
void SetObj(int x, int z, int id=0, int value=1, int dir=0)
Definition: Map.cs:1579
int days
Definition: Player.cs:75
Stats stats
Definition: Player.cs:1083
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:12
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:2914

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 541 of file SurvivalManager.cs.

542 {
544 for (int i = 0; i < (EClass.debug.enable ? 10 : 2); i++)
545 {
546 SourceChara.Row row = list.RandomItem();
547 if (row != null)
548 {
549 Chara chara = CharaGen.Create(row.id);
550 chara.RemoveEditorTag(EditorTag.AINoMove);
551 branch.AddRecruit(chara);
552 list.Remove(row);
553 }
554 }
555 }
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< SourceChara.Row > ListUnrecruitedUniques()

References FactionBranch.AddRecruit(), CharaGen.Create(), CardRow.id, and Card.RemoveEditorTag().

◆ RefreshGateZones()

void SurvivalManager.RefreshGateZones ( )
inline

Definition at line 221 of file SurvivalManager.cs.

222 {
223 listGateZone.ForeachReverse(delegate(Zone z)
224 {
225 if (z == null || z.destryoed)
226 {
227 listGateZone.Remove(z);
228 }
229 });
230 if (listGateZone.Count == 0)
231 {
232 for (int num = 0; num < 3; num++)
233 {
234 if (EClass.rnd(4) == 0)
235 {
236 IEnumerable<Spatial> enumerable = EClass.game.spatials.map.Values.Where((Spatial a) => a.source.costSkyTravel > 0 && !listGateZone.Contains(a) && a != gateZone);
237 if (enumerable.Count() > 0)
238 {
239 listGateZone.Add(enumerable.RandomItem() as Zone);
240 }
241 }
242 else
243 {
244 Zone item = EClass.world.region.CreateRandomSite(new Point(1, 1), (EClass.rnd(5) == 0) ? "dungeon_water" : null, updateMesh: false);
245 listGateZone.Add(item);
246 }
247 }
248 }
249 foreach (Zone item2 in listGateZone)
250 {
251 if (item2.dateExpire > 0)
252 {
253 item2.dateExpire = EClass.world.date.GetRaw() + 10080;
254 }
255 }
256 }
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:140
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 258 of file SurvivalManager.cs.

259 {
260 if (listReward.Count <= 0)
261 {
262 Add(new string[7] { "659", "758", "759", "806", "828", "1190", "1191" });
263 if (flags.raidLv < 50)
264 {
265 Add(new string[7] { "pillow_jure", "pillow_ehekatl", "pillow_opatos", "pillow_kumiromi", "pillow_lulwy", "pillow_mani", "pillow_itzpalt" });
266 }
267 else
268 {
269 Add(new string[1] { "rod_wish" });
270 }
271 }
272 void Add(string[] ids)
273 {
274 foreach (string item in ids)
275 {
276 listReward.Add(item);
277 }
278 }
279 }
List< string > listReward

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

Referenced by ZoneEventRaid.OnKill().

◆ StartRaid()

void SurvivalManager.StartRaid ( )
inline

Definition at line 557 of file SurvivalManager.cs.

558 {
559 flags.raid = true;
560 Point pos = EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? EClass.pc.pos;
561 Meteor(pos, delegate
562 {
563 EClass._zone.AddCard(ThingGen.Create("teleporter_demon"), pos).Install();
564 });
565 flags.dateNextRaid = EClass.world.date.GetRaw(72);
566 }

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: