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

Public Member Functions

override void OnInit ()
 
override Point GetSpawnPos ()
 
override void OnKill ()
 
- Public Member Functions inherited from ZoneEventSiege
virtual Chara CreateChara (Point p, bool boss=false)
 
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 ()
 

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)
 
- Public Attributes inherited from ZoneEventSiege
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
 
- Static Public Attributes inherited from EClass
static Core core
 
- Properties inherited from ZoneEventSiege
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]
 

Detailed Description

Definition at line 3 of file ZoneEventRaid.cs.

Member Function Documentation

◆ GetSpawnPos()

override Point ZoneEventRaid.GetSpawnPos ( )
inlinevirtual

Reimplemented from ZoneEventSiege.

Definition at line 12 of file ZoneEventRaid.cs.

13 {
15 if (trait != null)
16 {
17 trait.Toggle(on: true, silent: true);
18 }
19 else
20 {
22 }
23 Point point = ((trait != null) ? trait.owner.pos : EClass.pc.pos);
24 return point.GetNearestPoint(allowBlock: false, allowChara: false) ?? point;
25 }
Point pos
Definition: Card.cs:57
Definition: EClass.cs:5
static Map _map
Definition: EClass.cs:18
static Chara pc
Definition: EClass.cs:14
Thing FindThing(Func< Thing, bool > func)
Definition: Map.cs:2592
Definition: Point.cs:9
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:607
Definition: Trait.cs:7
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1147
Card owner
Definition: Trait.cs:27

References EClass._map, Map.FindThing(), Point.GetNearestPoint(), Trait.owner, EClass.pc, Card.pos, and Trait.Toggle().

◆ OnInit()

override void ZoneEventRaid.OnInit ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 5 of file ZoneEventRaid.cs.

6 {
7 lv = Mathf.Max(1, EClass.game.survival.flags.raidLv);
8 max = 5 + lv / 5;
9 base.OnInit();
10 }
static Game game
Definition: EClass.cs:8
SurvivalManager survival
Definition: Game.cs:224

References SurvivalManager.flags, EClass.game, ZoneEventSiege.lv, ZoneEventSiege.max, SurvivalManager.Flags.raidLv, and Game.survival.

◆ OnKill()

override void ZoneEventRaid.OnKill ( )
inlinevirtual

Reimplemented from ZoneEvent.

Definition at line 27 of file ZoneEventRaid.cs.

28 {
29 base.OnKill();
31 EClass.game.survival.flags.raidLv += 5;
32 EClass.game.survival.flags.dateNextRaid = EClass.world.date.GetRaw(168);
34 string text = ((EClass.game.survival.flags.raidLv >= 50 && EClass.rnd(3) == 0) ? "statue_god" : ((EClass.game.survival.flags.raidLv >= 25 && EClass.rnd(2) == 0) ? "statue_power" : "altar"));
35 EClass.game.survival.MeteorThing(pos, text, install: true);
36 }
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
static World world
Definition: EClass.cs:40
static int rnd(long a)
Definition: EClass.cs:58
void MeteorThing(Point pos, string id, bool install=false)
GameDate date
Definition: World.cs:6

References World.date, SurvivalManager.flags, EClass.game, SurvivalManager.GetRandomPoint(), Date.GetRaw(), SurvivalManager.MeteorThing(), EClass.pc, Card.pos, SurvivalManager.Flags.raidLv, SurvivalManager.Flags.raidRound, EClass.rnd(), Game.survival, and EClass.world.


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