Elin Decompiled Documentation EA 23.225 Nightly Patch 3
Loading...
Searching...
No Matches
ReligionManager.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using System.Linq;
3using Newtonsoft.Json;
4using UnityEngine;
5
6public class ReligionManager : EClass
7{
8 public Dictionary<string, Religion> dictAll = new Dictionary<string, Religion>();
9
10 public List<Religion> list = new List<Religion>();
11
12 [JsonProperty]
14
15 [JsonProperty]
17
18 [JsonProperty]
20
21 [JsonProperty]
23
24 [JsonProperty]
26
27 [JsonProperty]
29
30 [JsonProperty]
32
33 [JsonProperty]
35
36 [JsonProperty]
38
39 [JsonProperty]
41
42 [JsonProperty]
44
45 [JsonProperty]
47
48 [JsonProperty]
50
51 public void SetOwner()
52 {
53 list = new List<Religion>
54 {
57 };
58 foreach (Religion item in list)
59 {
60 dictAll.Add(item.id, item);
61 }
62 }
63
64 public void OnCreateGame()
65 {
66 SetOwner();
67 foreach (Religion item in list)
68 {
69 item.Init();
70 }
71 }
72
73 public void OnLoad()
74 {
75 SetOwner();
76 foreach (Religion value in dictAll.Values)
77 {
78 value.OnLoad();
79 }
80 }
81
82 public Religion Find(string id)
83 {
84 foreach (Religion value in dictAll.Values)
85 {
86 if (value.id == id)
87 {
88 return value;
89 }
90 }
91 return null;
92 }
93
94 public Religion GetRandomReligion(bool onlyJoinable = true, bool includeMinor = false)
95 {
96 return list.Where((Religion a) => (!onlyJoinable || a.CanJoin) && (includeMinor || !a.IsMinorGod)).RandomItem();
97 }
98
100 {
101 foreach (Chara item in EClass._map.charas.Concat(EClass.game.cards.globalCharas.Values))
102 {
103 if (item.faith != Healing)
104 {
106 item.AddCard(thing);
107 if (item.ExistsOnMap)
108 {
109 item.TryUse(thing);
110 }
111 }
112 }
113 Debug.Log("hai");
114 return true;
115 }
116}
GlobalCharaList globalCharas
Definition: CardManager.cs:46
Definition: Chara.cs:10
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Map _map
Definition: EClass.cs:18
CardManager cards
Definition: Game.cs:155
List< Chara > charas
Definition: Map.cs:81
ReligionWind Wind
ReligionOblivion Oblivion
ReligionHarvest Harvest
Religion Find(string id)
ReligionMachine Machine
ReligionEyth Eyth
ReligionLuck Luck
bool ジュアさまの薄い本をください()
ReligionStrife Strife
Dictionary< string, Religion > dictAll
ReligionHarmony Harmony
ReligionMoonShadow MoonShadow
ReligionTrickery Trickery
ReligionElement Element
List< Religion > list
ReligionEarth Earth
ReligionHealing Healing
Religion GetRandomReligion(bool onlyJoinable=true, bool includeMinor=false)
virtual bool IsMinorGod
Definition: Religion.cs:50
virtual string id
Definition: Religion.cs:26
void OnLoad()
Definition: Religion.cs:64
virtual bool CanJoin
Definition: Religion.cs:52
static Thing Createジュアさまの薄い本()
Definition: ThingGen.cs:189
Definition: Thing.cs:8