Elin Decompiled Documentation EA 23.317 Nightly
Loading...
Searching...
No Matches
Religion Class Reference
Inheritance diagram for Religion:
EClass ReligionCustom ReligionEarth ReligionElement ReligionEyth ReligionHarmony ReligionHarvest ReligionHealing ReligionLuck ReligionMachine ReligionMinor ReligionOblivion ReligionWind

Public Types

enum  ConvertType { Default , Campaign }
 

Public Member Functions

virtual SourceElement.Row GetFeat (int i)
 
virtual void Init ()
 
virtual void OnLoad ()
 
virtual void OnAdvanceDay ()
 
virtual Sprite GetSprite ()
 
virtual void SetTextRelation (UIText text)
 
virtual string GetTextBenefit ()
 
virtual string GetTextTemper (int _temper=-99999)
 
virtual void Revelation (string idTalk, int chance=100)
 
virtual void Talk (string idTalk, Card c=null, Card agent=null)
 
virtual string GetGodTalk (string idTalk)
 
virtual int GetOfferingMtp (Thing t)
 
virtual int GetOfferingValue (Thing t, int num=-1)
 
virtual int GetGiftRank ()
 
virtual bool TryGetGift ()
 
virtual void OnReforge (Thing t)
 
virtual bool IsIgnoreReforge (Thing t)
 
virtual bool IsValidArtifact (string id)
 
virtual bool IsFaithElement (Element e)
 
virtual string[] GetValidArtifacts ()
 
virtual void OnBecomeBranchFaith ()
 
virtual void JoinFaith (Chara c, ConvertType type=ConvertType.Default)
 
virtual void LeaveFaith (Chara c, Religion newFaith, ConvertType type)
 
virtual void Punish (Chara c)
 
virtual void PunishTakeOver (Chara c)
 
virtual void OnJoinFaith ()
 
virtual void OnLeaveFaith ()
 
virtual void OnChangeHour ()
 

Public Attributes

int relation
 
int giftRank
 
int mood
 

Static Public Attributes

static Religion recentWrath
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

virtual string id [get]
 
virtual bool IsAvailable [get]
 
virtual string Name [get]
 
SourceReligion.Row source [get]
 
virtual string NameShort [get]
 
virtual string NameDomain [get]
 
virtual string TextType [get]
 
virtual string TextGodGender [get]
 
virtual string TextMood [get]
 
bool IsEyth [get]
 
bool IsEhekatl [get]
 
bool IsOpatos [get]
 
virtual bool IsMinorGod [get]
 
virtual bool CanJoin [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]
 

Private Attributes

SourceReligion.Row _source
 

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)
 

Detailed Description

Definition at line 5 of file Religion.cs.

Member Enumeration Documentation

◆ ConvertType

Enumerator
Default 
Campaign 

Definition at line 7 of file Religion.cs.

Member Function Documentation

◆ GetFeat()

virtual SourceElement.Row Religion.GetFeat ( int  i)
inlinevirtual

Definition at line 68 of file Religion.cs.

69 {
70 return EClass.sources.elements.alias["featGod_" + id + i];
71 }
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
SourceElement elements

References SourceManager.elements, and EClass.sources.

◆ GetGiftRank()

virtual int Religion.GetGiftRank ( )
inlinevirtual

Definition at line 234 of file Religion.cs.

235 {
236 if (IsEyth || source.rewards.Length == 0)
237 {
238 return -1;
239 }
240 int num = EClass.pc.Evalue(85);
241 if (giftRank == 0 && (num >= 15 || EClass.debug.enable))
242 {
243 return 1;
244 }
245 if (source.rewards.Length >= 2 && giftRank == 1 && (num >= 30 || EClass.debug.enable))
246 {
247 return 2;
248 }
249 return -1;
250 }
int Evalue(int ele)
Definition: Card.cs:2688
bool enable
Definition: CoreDebug.cs:301
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
bool IsEyth
Definition: Religion.cs:58
SourceReligion.Row source
Definition: Religion.cs:33
int giftRank
Definition: Religion.cs:17

References EClass.debug, CoreDebug.enable, Card.Evalue(), giftRank, IsEyth, EClass.pc, and source.

Referenced by TraitAltar._OnOffer(), and TryGetGift().

◆ GetGodTalk()

virtual string Religion.GetGodTalk ( string  idTalk)
inlinevirtual

Definition at line 174 of file Religion.cs.

175 {
176 return MOD.listGodTalk.GetTalk(id, idTalk);
177 }
string GetTalk(string id, string idTopic)
Definition: MOD.cs:7
static GodTalkDataList listGodTalk
Definition: MOD.cs:12

References GodTalkDataList.GetTalk(), and MOD.listGodTalk.

Referenced by DramaActor.ConvertAdv(), and Talk().

◆ GetOfferingMtp()

virtual int Religion.GetOfferingMtp ( Thing  t)
inlinevirtual

Reimplemented in ReligionCustom, ReligionMoonShadow, and ReligionTrickery.

Definition at line 179 of file Religion.cs.

180 {
181 return 0;
182 }

Referenced by GetOfferingValue().

◆ GetOfferingValue()

virtual int Religion.GetOfferingValue ( Thing  t,
int  num = -1 
)
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 184 of file Religion.cs.

185 {
186 t.CheckJustCooked();
187 if (num == -1)
188 {
189 num = t.Num;
190 }
191 long v = 0L;
192 if (t.source._origin == "meat")
193 {
194 v = Mathf.Clamp(t.SelfWeight / 10, 1, 1000);
195 if (t.refCard == null)
196 {
197 v /= 10L;
198 }
199 }
200 else if (GetOfferingMtp(t) > 0)
201 {
202 SetValue(t.category, GetOfferingMtp(t));
203 }
204 else
205 {
206 string[] cat_offer = source.cat_offer;
207 foreach (string key in cat_offer)
208 {
209 if (t.category.IsChildOf(key))
210 {
211 SetValue(EClass.sources.categories.map[key], 1);
212 break;
213 }
214 }
215 }
216 if (v == 0L)
217 {
218 return 0;
219 }
220 if (t.IsDecayed)
221 {
222 v /= 10L;
223 }
224 v = v * (100 + Mathf.Min(t.LV * 2, 100) + (t.HasElement(757) ? 50 : 0)) / 100;
225 v = (int)Mathf.Clamp(Mathf.Max(v, 1f) * (float)num, 1f, 214748370f);
226 return (int)v;
227 void SetValue(SourceCategory.Row cat, int mtp)
228 {
229 v = Mathf.Clamp(t.SelfWeight / 10, 50, 1000);
230 v = v * cat.offer * mtp / 100;
231 }
232 }
bool IsDecayed
Definition: Card.cs:2341
CardRow refCard
Definition: Card.cs:2019
void CheckJustCooked()
Definition: Card.cs:7024
int Num
Definition: Card.cs:161
SourceCategory.Row category
Definition: Card.cs:2101
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6303
int LV
Definition: Card.cs:389
virtual int GetOfferingMtp(Thing t)
Definition: Religion.cs:179
SourceCategory categories
SourceThing.Row source
Definition: Thing.cs:11
override int SelfWeight
Definition: Thing.cs:64

References SourceManager.categories, Card.category, Card.CheckJustCooked(), GetOfferingMtp(), Card.HasElement(), Card.IsDecayed, Card.LV, Card.Num, Card.refCard, Thing.SelfWeight, source, Thing.source, and EClass.sources.

Referenced by TraitAltar._OnOffer(), TraitAltar.CanOffer(), and TraitAltar.OnOffer().

◆ GetSprite()

virtual Sprite Religion.GetSprite ( )
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 86 of file Religion.cs.

87 {
88 return ResourceCache.Load<Sprite>("Media/Graphics/Image/Faction/" + source.id) ?? ResourceCache.Load<Sprite>("Media/Graphics/Image/Faction/eyth");
89 }

References source.

Referenced by UIHomeInfo.RefreshInfo(), Portrait.SetChara(), and UIFactionInfo.SetReligion().

◆ GetTextBenefit()

virtual string Religion.GetTextBenefit ( )
inlinevirtual

Definition at line 107 of file Religion.cs.

108 {
109 string text = "<color=green>";
110 for (int i = 0; i < source.elements.Length; i += 2)
111 {
112 if (i != 0)
113 {
114 text = text + Lang.words.comma + Lang.space;
115 }
116 text += EClass.sources.elements.map[source.elements[i]].GetName();
117 }
118 text += "</color>";
119 return source.GetText("textBenefit") + Environment.NewLine + Environment.NewLine + (IsEyth ? "" : "textBenefit".lang(text));
120 }
Definition: Lang.cs:7
static string space
Definition: Lang.cs:33

References SourceManager.elements, IsEyth, source, EClass.sources, and Lang.space.

Referenced by DramaActor.ConvertAdv().

◆ GetTextTemper()

virtual string Religion.GetTextTemper ( int  _temper = -99999)
inlinevirtual

Definition at line 122 of file Religion.cs.

123 {
124 if (IsEyth)
125 {
126 return "-";
127 }
128 if (_temper == -99999)
129 {
130 _temper = mood;
131 }
132 string[] list = Lang.GetList("temper");
133 if (_temper <= -15)
134 {
135 if (_temper > -85)
136 {
137 if (_temper <= -45)
138 {
139 return list[1].ToTitleCase().TagColor(FontColor.Bad);
140 }
141 return list[2].ToTitleCase();
142 }
143 return list[0].ToTitleCase().TagColor(FontColor.Bad);
144 }
145 if (_temper < 45)
146 {
147 if (_temper < 15)
148 {
149 return list[3].ToTitleCase();
150 }
151 return list[4].ToTitleCase();
152 }
153 if (_temper < 85)
154 {
155 return list[5].ToTitleCase().TagColor(FontColor.Great);
156 }
157 return list[6].ToTitleCase().TagColor(FontColor.Good);
158 }
FontColor
Definition: FontColor.cs:2
static string[] GetList(string id)
Definition: Lang.cs:117
int mood
Definition: Religion.cs:20

References Lang.GetList(), IsEyth, and mood.

Referenced by UIHomeInfo.RefreshInfo().

◆ GetValidArtifacts()

virtual string[] Religion.GetValidArtifacts ( )
inlinevirtual

Reimplemented in ReligionCustom, ReligionEarth, ReligionElement, ReligionHarvest, ReligionHealing, ReligionLuck, ReligionMachine, ReligionMoonShadow, ReligionStrife, ReligionTrickery, and ReligionWind.

Definition at line 321 of file Religion.cs.

322 {
323 return Array.Empty<string>();
324 }

◆ Init()

virtual void Religion.Init ( )
inlinevirtual

Definition at line 73 of file Religion.cs.

74 {
75 relation = source.relation;
76 }
int relation
Definition: Religion.cs:14

References relation, and source.

◆ IsFaithElement()

virtual bool Religion.IsFaithElement ( Element  e)
inlinevirtual

◆ IsIgnoreReforge()

virtual bool Religion.IsIgnoreReforge ( Thing  t)
inlinevirtual

Reimplemented in ReligionMachine, and ReligionWind.

Definition at line 306 of file Religion.cs.

307 {
308 return false;
309 }

Referenced by OnReforge().

◆ IsValidArtifact()

virtual bool Religion.IsValidArtifact ( string  id)
inlinevirtual

◆ JoinFaith()

virtual void Religion.JoinFaith ( Chara  c,
ConvertType  type = ConvertType::Default 
)
inlinevirtual

Definition at line 330 of file Religion.cs.

331 {
332 if (!c.IsPC)
333 {
334 c.faith = this;
336 EClass.Sound.Play("worship");
337 Msg.Say("changeFaith", c, Name);
338 return;
339 }
340 if (c.faith != this)
341 {
342 c.faith.LeaveFaith(c, this, type);
343 }
344 if (type != ConvertType.Campaign)
345 {
346 EClass.pc.c_daysWithGod = 0;
347 }
348 Msg.Say("worship", Name);
349 Talk("worship", c);
350 EClass.Sound.Play("worship");
351 c.PlayEffect("aura_heaven");
352 c.faith = this;
353 OnJoinFaith();
354 if (IsEyth)
355 {
356 mood = 0;
357 }
358 else
359 {
360 mood = 50;
361 }
363 if (!c.HasElement(306))
364 {
365 c.elements.Learn(306);
366 }
367 if (!c.IsPC)
368 {
369 return;
370 }
372 if (EClass._zone.lv == 0)
373 {
374 if (EClass._zone is Zone_Mifu)
375 {
376 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.Trickery;
378 }
379 if (EClass._zone is Zone_Nefu)
380 {
381 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.MoonShadow;
383 }
384 if (EClass._zone is Zone_Aquli)
385 {
386 EClass._map.config.fixedCondition = ((EClass.pc.faith == EClass.game.religions.Strife) ? Weather.Condition.Ether : Weather.Condition.None);
388 }
389 }
391 if (this is ReligionHealing)
392 {
393 Steam.GetAchievement(ID_Achievement.FAITH_HEALING);
394 }
395 }
ID_Achievement
virtual void RefreshWeather()
ElementContainerCard elements
Definition: Card.cs:42
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6595
void PurgeEythArtifact()
Definition: Card.cs:3436
Faction faction
Definition: Chara.cs:431
override bool IsPC
Definition: Chara.cs:630
void RefreshFaithElement()
Definition: Chara.cs:10604
Religion faith
Definition: Chara.cs:443
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
static BaseGameScreen screen
Definition: EClass.cs:33
static SoundManager Sound
Definition: EClass.cs:47
void Learn(int ele, int v=1)
ElementContainerFaction charaElements
Definition: FACTION.cs:146
ReligionManager religions
Definition: Game.cs:159
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
ReligionStrife Strife
ReligionMoonShadow MoonShadow
ReligionTrickery Trickery
virtual void OnJoinFaith()
Definition: Religion.cs:501
ConvertType
Definition: Religion.cs:8
virtual void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:168
virtual void LeaveFaith(Chara c, Religion newFaith, ConvertType type)
Definition: Religion.cs:397
virtual string Name
Definition: Religion.cs:30
int lv
Definition: Spatial.cs:142
Definition: Steam.cs:10
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:51
Condition
Definition: Weather.cs:16

References EClass._zone, Faction.charaElements, Card.elements, Chara.faction, Chara.faith, EClass.game, Steam.GetAchievement(), Card.HasElement(), IsEyth, Chara.IsPC, ElementContainer.Learn(), LeaveFaith(), Spatial.lv, mood, ReligionManager.MoonShadow, Name, ElementContainerFaction.OnJoinFaith(), OnJoinFaith(), EClass.pc, Card.PlayEffect(), Card.PurgeEythArtifact(), Chara.RefreshFaithElement(), BaseGameScreen.RefreshWeather(), Game.religions, Msg.Say(), EClass.screen, EClass.Sound, ReligionManager.Strife, Talk(), and ReligionManager.Trickery.

Referenced by DramaOutcome.convert_Jure(), and if_faith().

◆ LeaveFaith()

virtual void Religion.LeaveFaith ( Chara  c,
Religion  newFaith,
ConvertType  type 
)
inlinevirtual

Reimplemented in ReligionEyth.

Definition at line 397 of file Religion.cs.

398 {
399 bool flag = (newFaith == EClass.game.religions.Trickery && this == EClass.game.religions.MoonShadow) || (newFaith == EClass.game.religions.MoonShadow && this == EClass.game.religions.Trickery);
400 if (c.IsPC)
401 {
402 Msg.Say("worship2");
403 if (!flag && type != ConvertType.Campaign)
404 {
405 Punish(c);
406 }
407 }
408 if (flag)
409 {
410 Talk("regards");
411 c.elements.SetBase(85, c.Evalue(85) / 2);
412 }
413 else
414 {
415 c.elements.SetBase(85, 0);
416 }
417 if (c.IsPC)
418 {
420 }
421 OnLeaveFaith();
423 }
Element SetBase(string alias, int v, int potential=0)
virtual void OnLeaveFaith()
Definition: Religion.cs:505

References Faction.charaElements, Card.elements, Card.Evalue(), Chara.faction, EClass.game, Chara.IsPC, ReligionManager.MoonShadow, ElementContainerFaction.OnLeaveFaith(), OnLeaveFaith(), EClass.pc, Punish, Chara.RefreshFaithElement(), Game.religions, Msg.Say(), ElementContainer.SetBase(), Talk(), and ReligionManager.Trickery.

Referenced by if_faith(), and JoinFaith().

◆ OnAdvanceDay()

virtual void Religion.OnAdvanceDay ( )
inlinevirtual

Definition at line 82 of file Religion.cs.

83 {
84 }

◆ OnBecomeBranchFaith()

virtual void Religion.OnBecomeBranchFaith ( )
inlinevirtual

Reimplemented in ReligionEarth, ReligionHealing, and ReligionLuck.

Definition at line 326 of file Religion.cs.

327 {
328 }

◆ OnChangeHour()

virtual void Religion.OnChangeHour ( )
inlinevirtual

Definition at line 509 of file Religion.cs.

510 {
511 if (IsEyth)
512 {
513 mood = 0;
514 }
515 else
516 {
517 mood = EClass.rnd(200) - 100;
518 }
519 }
static int rnd(long a)
Definition: EClass.cs:59

References IsEyth, mood, and EClass.rnd().

Referenced by Player.OnAdvanceHour().

◆ OnJoinFaith()

virtual void Religion.OnJoinFaith ( )
inlinevirtual

Definition at line 501 of file Religion.cs.

502 {
503 }

Referenced by JoinFaith().

◆ OnLeaveFaith()

virtual void Religion.OnLeaveFaith ( )
inlinevirtual

Definition at line 505 of file Religion.cs.

506 {
507 }

Referenced by LeaveFaith(), and ReligionEyth.LeaveFaith().

◆ OnLoad()

virtual void Religion.OnLoad ( )
inlinevirtual

Definition at line 78 of file Religion.cs.

79 {
80 }

Referenced by ReligionManager.OnLoad().

◆ OnReforge()

virtual void Religion.OnReforge ( Thing  t)
inlinevirtual

Definition at line 289 of file Religion.cs.

290 {
291 t.c_idDeity = id;
292 if (IsIgnoreReforge(t))
293 {
294 return;
295 }
296 foreach (Element value in t.elements.dict.Values)
297 {
298 int num = value.id;
299 if ((uint)(num - 64) > 3u && num != 92 && IsFaithElement(value))
300 {
301 value.vExp = -1;
302 }
303 }
304 }
Dictionary< int, Element > dict
int id
Definition: ELEMENT.cs:257
virtual string id
Definition: Religion.cs:26
virtual bool IsFaithElement(Element e)
Definition: Religion.cs:316
virtual bool IsIgnoreReforge(Thing t)
Definition: Religion.cs:306

References Element.id, id, IsFaithElement(), and IsIgnoreReforge().

Referenced by ReligionManager.Reforge().

◆ Punish()

virtual void Religion.Punish ( Chara  c)
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 425 of file Religion.cs.

426 {
427 if (c.mimicry != null)
428 {
429 c.mimicry.Kill();
430 }
431 Talk("wrath");
432 if (c.Evalue(1228) > 0)
433 {
435 return;
436 }
437 c.hp = 1;
438 c.mana.value = 1;
439 c.stamina.value = 1;
440 if (c.HasCondition<ConWrath>())
441 {
442 recentWrath = this;
443 c.DamageHP(999999L, AttackSource.Wrath);
444 recentWrath = null;
445 return;
446 }
447 Thing thing = ThingGen.Create("punish_ball");
448 int num = 0;
450 {
451 if (item.giftRank > 0)
452 {
453 num++;
454 }
455 }
456 if (num >= 4)
457 {
458 thing.idSkin = 1;
459 }
460 thing.ChangeWeight(EClass.pc.WeightLimit / 4 + 1000);
461 c.AddThing(thing);
462 c.AddCondition<ConWrath>(2000 + (c.IsPC ? (EClass.pc.c_daysWithGod * 20) : 0));
463 }
AttackSource
Definition: AttackSource.cs:2
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3257
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4255
void ChangeWeight(int a)
Definition: Card.cs:2681
void SayNothingHappans()
Definition: Card.cs:7234
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9647
bool HasCondition(string alias)
Definition: Chara.cs:9812
override int WeightLimit
Definition: Chara.cs:728
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
void Kill(bool silent=false)
Definition: Condition.cs:108
List< Religion > list
static Religion recentWrath
Definition: Religion.cs:22
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8

References Card.ChangeWeight(), ThingGen.Create(), Card.DamageHP(), Card.Evalue(), EClass.game, Chara.HasCondition(), item, Condition.Kill(), ReligionManager.list, Chara.mimicry, EClass.pc, recentWrath, Game.religions, Card.SayNothingHappans(), Talk(), and Chara.WeightLimit.

◆ PunishTakeOver()

virtual void Religion.PunishTakeOver ( Chara  c)
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 465 of file Religion.cs.

466 {
467 if (c.mimicry != null)
468 {
469 c.mimicry.Kill();
470 }
471 Talk("takeoverFail");
472 if (c.Evalue(1228) > 0)
473 {
475 return;
476 }
477 c.hp /= 2;
478 if (c.mana.value > 0)
479 {
480 c.mana.value = c.mana.value / 2;
481 }
482 if (c.stamina.value > 0)
483 {
484 c.stamina.value = c.stamina.value / 2;
485 }
486 if (c.HasCondition<ConWrath>())
487 {
488 recentWrath = this;
489 c.DamageHP(999999L, AttackSource.Wrath);
490 recentWrath = null;
491 return;
492 }
493 Thing thing = ThingGen.Create("punish_ball");
494 thing.c_weight = EClass.pc.WeightLimit / 4 + 1000;
495 thing.isWeightChanged = true;
496 thing.SetDirtyWeight();
497 c.AddThing(thing);
498 c.AddCondition<ConWrath>(200);
499 }
void SetDirtyWeight()
Definition: Card.cs:2671
Stats mana
Definition: Chara.cs:1189
Stats stamina
Definition: Chara.cs:1181
virtual int value
Definition: Stats.cs:56

References Chara.AddCondition(), Card.AddThing(), ThingGen.Create(), Card.DamageHP(), Card.Evalue(), Chara.HasCondition(), Condition.Kill(), Chara.mana, Chara.mimicry, recentWrath, Card.SayNothingHappans(), Card.SetDirtyWeight(), Chara.stamina, Talk(), and Stats.value.

Referenced by TraitAltar.OnOffer().

◆ Revelation()

virtual void Religion.Revelation ( string  idTalk,
int  chance = 100 
)
inlinevirtual

Definition at line 160 of file Religion.cs.

161 {
162 if (!IsEyth && EClass.rnd(100) <= chance)
163 {
164 Talk(idTalk, EClass.pc);
165 }
166 }

References IsEyth, EClass.pc, EClass.rnd(), and Talk().

Referenced by Chara.Die(), Scene.Init(), ActPray.Pray(), and LayerSleep.Sleep().

◆ SetTextRelation()

virtual void Religion.SetTextRelation ( UIText  text)
inlinevirtual

Definition at line 91 of file Religion.cs.

92 {
93 if (relation > 100)
94 {
95 text.SetText("reFriend".lang(), FontColor.Good);
96 }
97 else if (relation < -100)
98 {
99 text.SetText("reEnemy".lang(), FontColor.Bad);
100 }
101 else
102 {
103 text.SetText("reNone".lang(), FontColor.Passive);
104 }
105 }
void SetText(string s)
Definition: UIText.cs:163

References relation, and UIText.SetText().

Referenced by ContentFaction.RefreshFactions().

◆ Talk()

virtual void Religion.Talk ( string  idTalk,
Card  c = null,
Card  agent = null 
)
inlinevirtual

Definition at line 168 of file Religion.cs.

169 {
171 Msg.Say("<i>" + GetGodTalk(idTalk) + " </i>", c ?? EClass.pc);
172 }
Color TalkGod
Definition: MsgColors.cs:9
static MsgColors colors
Definition: Msg.cs:20
static void SetColor()
Definition: Msg.cs:22
virtual string GetGodTalk(string idTalk)
Definition: Religion.cs:174

References Msg.colors, GetGodTalk(), EClass.pc, Msg.Say(), Msg.SetColor(), and MsgColors.TalkGod.

Referenced by TraitAltar._OnOffer(), TraitGodStatue._OnUse(), JoinFaith(), LeaveFaith(), ActEffect.Proc(), Punish(), PunishTakeOver(), Revelation(), TraitAltar.TakeOver(), CoreDebug.Test_GodTalk(), TryGetGift(), and DramaOutcome.wedding_success().

◆ TryGetGift()

virtual bool Religion.TryGetGift ( )
inlinevirtual

Definition at line 252 of file Religion.cs.

253 {
254 int num = GetGiftRank();
255 if (num == -1)
256 {
257 return false;
258 }
259 Point point = EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false) ?? EClass.pc.pos;
260 switch (num)
261 {
262 case 1:
263 {
264 Talk("pet");
265 Chara chara = CharaGen.Create(source.rewards[0]);
266 EClass._zone.AddCard(chara, point);
267 chara.MakeAlly();
268 chara.PlayEffect("aura_heaven");
269 giftRank = 1;
270 return true;
271 }
272 case 2:
273 {
274 Talk("gift");
275 string[] array = source.rewards[1].Split('|');
276 string[] array2 = array;
277 foreach (string text in array2)
278 {
279 EClass.game.religions.Reforge(text, point, text == array[0]);
280 }
281 giftRank = 2;
282 return true;
283 }
284 default:
285 return false;
286 }
287 }
Point pos
Definition: Card.cs:60
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
void MakeAlly(bool msg=true)
Definition: Chara.cs:2396
Definition: Point.cs:9
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
Thing Reforge(string id, Point pos=null, bool first=true)
virtual int GetGiftRank()
Definition: Religion.cs:234
Card AddCard(Card t, Point point)
Definition: Zone.cs:2066

References EClass._zone, Zone.AddCard(), CharaGen.Create(), EClass.game, GetGiftRank(), Point.GetNearestPoint(), giftRank, Chara.MakeAlly(), EClass.pc, Card.PlayEffect(), Card.pos, ReligionManager.Reforge(), Game.religions, source, and Talk().

Member Data Documentation

◆ _source

SourceReligion.Row Religion._source
private

Definition at line 24 of file Religion.cs.

◆ giftRank

int Religion.giftRank

Definition at line 17 of file Religion.cs.

Referenced by GetGiftRank(), and TryGetGift().

◆ mood

int Religion.mood

Definition at line 20 of file Religion.cs.

Referenced by GetTextTemper(), JoinFaith(), and OnChangeHour().

◆ recentWrath

Religion Religion.recentWrath
static

Definition at line 22 of file Religion.cs.

Referenced by Chara.Die(), Punish(), and PunishTakeOver().

◆ relation

int Religion.relation

Definition at line 14 of file Religion.cs.

Referenced by Init(), UIFactionInfo.SetReligion(), and SetTextRelation().

Property Documentation

◆ CanJoin

virtual bool Religion.CanJoin
get

Definition at line 66 of file Religion.cs.

Referenced by ReligionManager.GetRandomReligion(), and TraitAltar.TrySetAct().

◆ id

◆ IsAvailable

virtual bool Religion.IsAvailable
get

Definition at line 28 of file Religion.cs.

Referenced by LayerFaith.AddReligion().

◆ IsEhekatl

bool Religion.IsEhekatl
get

Definition at line 60 of file Religion.cs.

◆ IsEyth

◆ IsMinorGod

virtual bool Religion.IsMinorGod
get

◆ IsOpatos

bool Religion.IsOpatos
get

Definition at line 62 of file Religion.cs.

◆ Name

◆ NameDomain

virtual string Religion.NameDomain
get

Definition at line 50 of file Religion.cs.

◆ NameShort

virtual string Religion.NameShort
get

Definition at line 48 of file Religion.cs.

Referenced by Chara.Die().

◆ source

SourceReligion.Row Religion.source
get

Definition at line 32 of file Religion.cs.

33 {
34 get
35 {
37 if (row == null)
38 {
39 SourceReligion.Row obj = EClass.sources.religions.map.TryGetValue(id) ?? EClass.sources.religions.map["eyth"];
40 SourceReligion.Row row2 = obj;
41 _source = obj;
42 row = row2;
43 }
44 return row;
45 }
46 }
SourceReligion.Row _source
Definition: Religion.cs:24
SourceReligion religions

Referenced by LayerFaith.AddReligion(), DramaActor.ConvertAdv(), GetGiftRank(), GetOfferingValue(), FactionBranch.GetResidentTax(), GetSprite(), GetTextBenefit(), Init(), TraitAltar.SetDeity(), UIFactionInfo.SetReligion(), and TryGetGift().

◆ TextGodGender

virtual string Religion.TextGodGender
get

Definition at line 54 of file Religion.cs.

Referenced by TraitAltar._OnOffer(), and TraitAltar.OnOffer().

◆ TextMood

virtual string Religion.TextMood
get

Definition at line 56 of file Religion.cs.

Referenced by WidgetStatsBar.Build().

◆ TextType

virtual string Religion.TextType
get

Definition at line 52 of file Religion.cs.

Referenced by ContentFaction.RefreshFactions().


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