Elin Decompiled Documentation EA 23.321 Nightly Patch 1
Loading...
Searching...
No Matches
ReligionManager Class Reference
Inheritance diagram for ReligionManager:
EClass

Public Member Functions

void SetOwner ()
 
void OnCreateGame ()
 
void OnLoad ()
 
Religion Find (string id)
 
Religion GetRandomReligion (bool onlyJoinable=true, bool includeMinor=false)
 
bool ジュアさまの薄い本をください ()
 
Religion GetArtifactDeity (string id)
 
Thing Reforge (string id, Point pos=null, bool first=true)
 

Public Attributes

Dictionary< string, ReligiondictAll = new Dictionary<string, Religion>()
 
List< Religionlist = new List<Religion>()
 
ReligionEyth Eyth = new ReligionEyth()
 
ReligionWind Wind = new ReligionWind()
 
ReligionEarth Earth = new ReligionEarth()
 
ReligionHealing Healing = new ReligionHealing()
 
ReligionLuck Luck = new ReligionLuck()
 
ReligionMachine Machine = new ReligionMachine()
 
ReligionElement Element = new ReligionElement()
 
ReligionHarvest Harvest = new ReligionHarvest()
 
ReligionOblivion Oblivion = new ReligionOblivion()
 
ReligionHarmony Harmony = new ReligionHarmony()
 
ReligionTrickery Trickery = new ReligionTrickery()
 
ReligionMoonShadow MoonShadow = new ReligionMoonShadow()
 
ReligionStrife Strife = new ReligionStrife()
 

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
 
- 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 6 of file ReligionManager.cs.

Member Function Documentation

◆ ジュアさまの薄い本をください()

bool ReligionManager.ジュアさまの薄い本をください ( )
inline

Definition at line 93 of file ReligionManager.cs.

94 {
95 foreach (Chara item in EClass._map.charas.Concat(EClass.game.cards.globalCharas.Values))
96 {
97 if (item.faith != Healing)
98 {
100 item.AddCard(thing);
101 if (item.ExistsOnMap)
102 {
103 item.TryUse(thing);
104 }
105 }
106 }
107 Debug.Log("hai");
108 return true;
109 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
Definition: Chara.cs:10
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Map _map
Definition: EClass.cs:19
CardManager cards
Definition: Game.cs:156
List< Chara > charas
Definition: Map.cs:81
ReligionHealing Healing
static Thing Createジュアさまの薄い本()
Definition: ThingGen.cs:197
Definition: Thing.cs:8

References EClass._map, Game.cards, Map.charas, ThingGen.Createジュアさまの薄い本(), Debug, EClass.game, CardManager.globalCharas, Healing, and item.

◆ Find()

Religion ReligionManager.Find ( string  id)
inline

Definition at line 83 of file ReligionManager.cs.

84 {
85 return dictAll.TryGetValue(id);
86 }
Dictionary< string, Religion > dictAll

References dictAll.

Referenced by if_faith(), and Thing.WriteNote().

◆ GetArtifactDeity()

Religion ReligionManager.GetArtifactDeity ( string  id)
inline

Definition at line 111 of file ReligionManager.cs.

112 {
113 return list.LastOrDefault((Religion a) => a.IsValidArtifact(id));
114 }
List< Religion > list
virtual bool IsValidArtifact(string id)
Definition: Religion.cs:311

References Religion.IsValidArtifact(), and list.

Referenced by Card.PurgeDuplicateArtifact(), and Reforge().

◆ GetRandomReligion()

Religion ReligionManager.GetRandomReligion ( bool  onlyJoinable = true,
bool  includeMinor = false 
)
inline

Definition at line 88 of file ReligionManager.cs.

89 {
90 return list.Where((Religion a) => (!onlyJoinable || a.CanJoin) && (includeMinor || !a.IsMinorGod)).RandomItem();
91 }
virtual bool IsMinorGod
Definition: Religion.cs:64
virtual bool CanJoin
Definition: Religion.cs:66

References Religion.CanJoin, Religion.IsMinorGod, and list.

Referenced by GameLang.ConvertDrama(), Chara.OnCreate(), TraitAltar.OnCreate(), TraitAltar.OnImportMap(), and Zone.SpawnAltar().

◆ OnCreateGame()

void ReligionManager.OnCreateGame ( )
inline

Definition at line 65 of file ReligionManager.cs.

66 {
67 SetOwner();
68 foreach (Religion item in list)
69 {
70 item.Init();
71 }
72 }

References item, list, and SetOwner().

Referenced by Game._Create().

◆ OnLoad()

void ReligionManager.OnLoad ( )
inline

Definition at line 74 of file ReligionManager.cs.

75 {
76 SetOwner();
77 foreach (Religion value in dictAll.Values)
78 {
79 value.OnLoad();
80 }
81 }
virtual void OnLoad()
Definition: Religion.cs:78

References dictAll, Religion.OnLoad(), and SetOwner().

Referenced by Game.OnLoad().

◆ Reforge()

Thing ReligionManager.Reforge ( string  id,
Point  pos = null,
bool  first = true 
)
inline

Definition at line 116 of file ReligionManager.cs.

117 {
118 if (pos == null)
119 {
120 pos = EClass.pc.pos.Copy();
121 }
122 pos.Set(pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false, ignoreCenter: true) ?? pos);
123 Thing thing = ThingGen.Create(id);
124 GetArtifactDeity(id)?.OnReforge(thing);
125 EClass._zone.AddCard(thing, pos);
126 pos.PlayEffect("aura_heaven");
127 if (first)
128 {
129 pos.PlaySound("godbless");
130 }
131 return thing;
132 }
Point pos
Definition: Card.cs:60
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6612
static Zone _zone
Definition: EClass.cs:21
static Chara pc
Definition: EClass.cs:15
Point Copy()
Definition: Point.cs:491
Point Set(int _x, int _z)
Definition: Point.cs:503
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
Religion GetArtifactDeity(string id)
virtual void OnReforge(Thing t)
Definition: Religion.cs:289
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Card AddCard(Card t, Point point)
Definition: Zone.cs:2086

References EClass._zone, Zone.AddCard(), Point.Copy(), ThingGen.Create(), GetArtifactDeity(), Religion.OnReforge(), EClass.pc, Card.PlayEffect(), Card.pos, and Point.Set().

Referenced by TraitAltar.OnOffer(), Religion.TryGetGift(), and ActEffect.Wish().

◆ SetOwner()

void ReligionManager.SetOwner ( )
inline

Definition at line 51 of file ReligionManager.cs.

52 {
53 list = new List<Religion>
54 {
57 };
58 BaseModManager.PublishEvent("elin.religion_importing", list);
59 foreach (Religion item in list)
60 {
61 dictAll[item.id] = item;
62 }
63 }
static void PublishEvent(string eventId, object data=null)
ReligionWind Wind
ReligionOblivion Oblivion
ReligionHarvest Harvest
ReligionMachine Machine
ReligionEyth Eyth
ReligionLuck Luck
ReligionStrife Strife
ReligionHarmony Harmony
ReligionMoonShadow MoonShadow
ReligionTrickery Trickery
ReligionElement Element
ReligionEarth Earth

References dictAll, Earth, Element, Eyth, Harmony, Harvest, Healing, item, list, Luck, Machine, MoonShadow, Oblivion, BaseModManager.PublishEvent(), Strife, Trickery, and Wind.

Referenced by OnCreateGame(), and OnLoad().

Member Data Documentation

◆ dictAll

◆ Earth

ReligionEarth ReligionManager.Earth = new ReligionEarth()

Definition at line 19 of file ReligionManager.cs.

Referenced by SetOwner().

◆ Element

ReligionElement ReligionManager.Element = new ReligionElement()

Definition at line 31 of file ReligionManager.cs.

Referenced by ActEffect.Proc(), and SetOwner().

◆ Eyth

◆ Harmony

ReligionHarmony ReligionManager.Harmony = new ReligionHarmony()

Definition at line 40 of file ReligionManager.cs.

Referenced by AI_Idle.Run(), and SetOwner().

◆ Harvest

ReligionHarvest ReligionManager.Harvest = new ReligionHarvest()

Definition at line 34 of file ReligionManager.cs.

Referenced by Card.GetPrice(), and SetOwner().

◆ Healing

◆ list

◆ Luck

ReligionLuck ReligionManager.Luck = new ReligionLuck()

Definition at line 25 of file ReligionManager.cs.

Referenced by Card.GetPrice(), FactionBranch.OnSimulateDay(), and SetOwner().

◆ Machine

ReligionMachine ReligionManager.Machine = new ReligionMachine()

Definition at line 28 of file ReligionManager.cs.

Referenced by SetOwner().

◆ MoonShadow

◆ Oblivion

ReligionOblivion ReligionManager.Oblivion = new ReligionOblivion()

Definition at line 37 of file ReligionManager.cs.

Referenced by SetOwner().

◆ Strife

ReligionStrife ReligionManager.Strife = new ReligionStrife()

Definition at line 49 of file ReligionManager.cs.

Referenced by Religion.JoinFaith(), Zone_Aquli.OnActivate(), and SetOwner().

◆ Trickery

◆ Wind

ReligionWind ReligionManager.Wind = new ReligionWind()

Definition at line 16 of file ReligionManager.cs.

Referenced by ActEffect.Proc(), and SetOwner().


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