Elin Decompiled Documentation EA 23.344.1 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 }
 
enum  PunishType { Wrath , Takeover , Pervert }
 

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, Card c, 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 (Chara chara=null)
 
virtual bool TryGetGift (Chara chara=null)
 
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 PunishPerverseWretch (Chara c)
 
void DoPunish (Chara c, PunishType type)
 
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.

◆ PunishType

Enumerator
Wrath 
Takeover 
Pervert 

Definition at line 13 of file Religion.cs.

Member Function Documentation

◆ DoPunish()

void Religion.DoPunish ( Chara  c,
PunishType  type 
)
inline

Definition at line 452 of file Religion.cs.

453 {
454 if (c.mimicry != null)
455 {
456 c.mimicry.Kill();
457 }
458 Talk((type == PunishType.Takeover) ? "takeoverFail" : "wrath");
459 if ((type == PunishType.Wrath || type == PunishType.Takeover) && c.Evalue(1228) > 0)
460 {
462 return;
463 }
464 if (type == PunishType.Wrath)
465 {
466 c.hp = 1;
467 if (c.mana.value > 0)
468 {
469 c.mana.value = 1;
470 }
471 if (c.stamina.value > 0)
472 {
473 c.stamina.value = 1;
474 }
475 }
476 else
477 {
478 c.hp /= 2;
479 if (c.mana.value > 0)
480 {
481 c.mana.value = c.mana.value / 2;
482 }
483 if (c.stamina.value > 0)
484 {
485 c.stamina.value = c.stamina.value / 2;
486 }
487 }
488 if (c.HasCondition<ConWrath>())
489 {
490 recentWrath = this;
491 c.DamageHP(99999999L, AttackSource.Wrath);
492 recentWrath = null;
493 return;
494 }
495 Thing thing = ThingGen.Create("punish_ball");
496 int p = 100;
497 switch (type)
498 {
499 case PunishType.Wrath:
500 {
501 p = 2000 + (c.IsPC ? (EClass.pc.c_daysWithGod * 20) : 0);
502 if (type != PunishType.Wrath)
503 {
504 break;
505 }
506 int num = 0;
508 {
509 if (item.giftRank > 0)
510 {
511 num++;
512 }
513 }
514 if (num >= 4)
515 {
516 thing.idSkin = 1;
517 }
518 break;
519 }
520 case PunishType.Takeover:
521 case PunishType.Pervert:
522 p = 200;
523 break;
524 }
525 thing.ChangeWeight(c.WeightLimit / 4 + 1000);
526 c.AddThing(thing);
528 }
AttackSource
Definition: AttackSource.cs:2
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3280
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4276
void ChangeWeight(int a)
Definition: Card.cs:2697
void SayNothingHappans()
Definition: Card.cs:7318
int Evalue(int ele)
Definition: Card.cs:2704
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9839
bool HasCondition(string alias)
Definition: Chara.cs:10011
override int WeightLimit
Definition: Chara.cs:728
Stats mana
Definition: Chara.cs:1213
Stats stamina
Definition: Chara.cs:1205
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
void Kill(bool silent=false)
Definition: Condition.cs:108
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
ReligionManager religions
Definition: Game.cs:159
List< Religion > list
static Religion recentWrath
Definition: Religion.cs:29
virtual void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:175
PunishType
Definition: Religion.cs:14
virtual int value
Definition: Stats.cs:56
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8

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

Referenced by Punish(), PunishPerverseWretch(), and PunishTakeOver().

◆ GetFeat()

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

Definition at line 75 of file Religion.cs.

76 {
77 return EClass.sources.elements.alias["featGod_" + id + i];
78 }
static SourceManager sources
Definition: EClass.cs:43
SourceElement elements

References SourceManager.elements, and EClass.sources.

◆ GetGiftRank()

virtual int Religion.GetGiftRank ( Chara  chara = null)
inlinevirtual

Definition at line 241 of file Religion.cs.

242 {
243 if (IsEyth || source.rewards.Length == 0)
244 {
245 return -1;
246 }
247 int num = (chara ?? EClass.pc).Evalue(85);
248 if (giftRank == 0 && (num >= 15 || EClass.debug.enable))
249 {
250 return 1;
251 }
252 if (source.rewards.Length >= 2 && giftRank == 1 && (num >= 30 || EClass.debug.enable))
253 {
254 return 2;
255 }
256 return -1;
257 }
bool enable
Definition: CoreDebug.cs:302
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
bool IsEyth
Definition: Religion.cs:65
SourceReligion.Row source
Definition: Religion.cs:40
int giftRank
Definition: Religion.cs:24

References EClass.debug, CoreDebug.enable, giftRank, IsEyth, EClass.pc, and source.

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

◆ GetGodTalk()

virtual string Religion.GetGodTalk ( string  idTalk)
inlinevirtual

Definition at line 181 of file Religion.cs.

182 {
183 return MOD.listGodTalk.GetTalk(id, idTalk);
184 }
string GetTalk(string id, string idTopic)
Definition: MOD.cs:7
static GodTalkDataList listGodTalk
Definition: MOD.cs:16

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

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

◆ GetOfferingMtp()

virtual int Religion.GetOfferingMtp ( Thing  t)
inlinevirtual

Reimplemented in ReligionCustom, ReligionLuck, ReligionMoonShadow, and ReligionTrickery.

Definition at line 186 of file Religion.cs.

187 {
188 return 0;
189 }

Referenced by GetOfferingValue().

◆ GetOfferingValue()

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

Reimplemented in ReligionCustom.

Definition at line 191 of file Religion.cs.

192 {
193 t.CheckJustCooked();
194 if (num == -1)
195 {
196 num = t.Num;
197 }
198 long v = 0L;
199 if (t.source._origin == "meat")
200 {
201 v = Mathf.Clamp(t.SelfWeight / 10, 1, 1000);
202 if (t.refCard == null)
203 {
204 v /= 10L;
205 }
206 }
207 else if (GetOfferingMtp(t) > 0)
208 {
209 SetValue(t.category, GetOfferingMtp(t));
210 }
211 else
212 {
213 string[] cat_offer = source.cat_offer;
214 foreach (string key in cat_offer)
215 {
216 if (t.category.IsChildOf(key))
217 {
218 SetValue(EClass.sources.categories.map[key], 1);
219 break;
220 }
221 }
222 }
223 if (v == 0L)
224 {
225 return 0;
226 }
227 if (t.IsDecayed)
228 {
229 v /= 10L;
230 }
231 v = v * (100 + Mathf.Min(t.LV * 2, 100) + (t.HasElement(757) ? 50 : 0)) / 100;
232 v = (int)Mathf.Clamp(Mathf.Max(v, 1f) * (float)num, 1f, 214748370f);
233 return (int)v;
234 void SetValue(SourceCategory.Row cat, int mtp)
235 {
236 v = Mathf.Clamp(t.SelfWeight / 10, 50, 1000);
237 v = v * cat.offer * mtp / 100;
238 }
239 }
bool IsDecayed
Definition: Card.cs:2357
CardRow refCard
Definition: Card.cs:2019
void CheckJustCooked()
Definition: Card.cs:7108
int Num
Definition: Card.cs:161
SourceCategory.Row category
Definition: Card.cs:2101
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
int LV
Definition: Card.cs:389
virtual int GetOfferingMtp(Thing t)
Definition: Religion.cs:186
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 93 of file Religion.cs.

94 {
95 return ResourceCache.Load<Sprite>("Media/Graphics/Image/Faction/" + source.id) ?? ResourceCache.Load<Sprite>("Media/Graphics/Image/Faction/eyth");
96 }

References source.

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

◆ GetTextBenefit()

virtual string Religion.GetTextBenefit ( )
inlinevirtual

Definition at line 114 of file Religion.cs.

115 {
116 string text = "<color=green>";
117 for (int i = 0; i < source.elements.Length; i += 2)
118 {
119 if (i != 0)
120 {
121 text = text + Lang.words.comma + Lang.space;
122 }
123 text += EClass.sources.elements.map[source.elements[i]].GetName();
124 }
125 text += "</color>";
126 return source.GetText("textBenefit") + Environment.NewLine + Environment.NewLine + (IsEyth ? "" : "textBenefit".lang(text));
127 }
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 129 of file Religion.cs.

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

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 332 of file Religion.cs.

333 {
334 return Array.Empty<string>();
335 }

◆ Init()

virtual void Religion.Init ( )
inlinevirtual

Definition at line 80 of file Religion.cs.

81 {
82 relation = source.relation;
83 }
int relation
Definition: Religion.cs:21

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 317 of file Religion.cs.

318 {
319 return false;
320 }

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 341 of file Religion.cs.

342 {
343 if (!c.IsPC)
344 {
345 c.faith = this;
347 EClass.Sound.Play("worship");
348 Msg.Say("changeFaith", c, Name);
349 return;
350 }
351 if (c.faith != this)
352 {
353 c.faith.LeaveFaith(c, this, type);
354 }
355 if (type != ConvertType.Campaign)
356 {
357 c.c_daysWithGod = 0;
358 }
359 Msg.Say("worship", Name);
360 Talk("worship", c);
361 EClass.Sound.Play("worship");
362 c.PlayEffect("aura_heaven");
363 c.faith = this;
364 OnJoinFaith();
365 if (IsEyth)
366 {
367 mood = 0;
368 }
369 else
370 {
371 mood = 50;
372 }
374 if (!c.HasElement(306))
375 {
376 c.elements.Learn(306);
377 }
378 if (!c.IsPC)
379 {
380 return;
381 }
383 if (EClass._zone.lv == 0)
384 {
385 if (EClass._zone is Zone_Mifu)
386 {
387 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.Trickery;
389 }
390 if (EClass._zone is Zone_Nefu)
391 {
392 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.MoonShadow;
394 }
395 if (EClass._zone is Zone_Aquli)
396 {
397 EClass._map.config.fixedCondition = ((EClass.pc.faith == EClass.game.religions.Strife) ? Weather.Condition.Ether : Weather.Condition.None);
399 }
400 }
402 if (this is ReligionHealing)
403 {
404 Steam.GetAchievement(ID_Achievement.FAITH_HEALING);
405 }
406 }
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:6679
void PurgeEythArtifact()
Definition: Card.cs:3459
Faction faction
Definition: Chara.cs:431
override bool IsPC
Definition: Chara.cs:630
void RefreshFaithElement()
Definition: Chara.cs:10851
Religion faith
Definition: Chara.cs:443
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
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:530
ConvertType
Definition: Religion.cs:8
virtual void LeaveFaith(Chara c, Religion newFaith, ConvertType type)
Definition: Religion.cs:408
virtual string Name
Definition: Religion.cs:37
int lv
Definition: Spatial.cs:142
Definition: Steam.cs:12
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:53
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 408 of file Religion.cs.

409 {
410 bool flag = (newFaith == EClass.game.religions.Trickery && this == EClass.game.religions.MoonShadow) || (newFaith == EClass.game.religions.MoonShadow && this == EClass.game.religions.Trickery);
411 if (c.IsPC)
412 {
413 Msg.Say("worship2");
414 if (!flag && type != ConvertType.Campaign)
415 {
416 Punish(c);
417 }
418 }
419 if (flag)
420 {
421 Talk("regards");
422 c.elements.SetBase(85, c.Evalue(85) / 2);
423 }
424 else
425 {
426 c.elements.SetBase(85, 0);
427 }
429 if (c.IsPC)
430 {
432 }
433 OnLeaveFaith();
435 }
void RemoveAllStances()
Definition: Chara.cs:10240
Element SetBase(string alias, int v, int potential=0)
virtual void OnLeaveFaith()
Definition: Religion.cs:534

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, Chara.RemoveAllStances(), Msg.Say(), ElementContainer.SetBase(), Talk(), and ReligionManager.Trickery.

Referenced by if_faith(), and JoinFaith().

◆ OnAdvanceDay()

virtual void Religion.OnAdvanceDay ( )
inlinevirtual

Definition at line 89 of file Religion.cs.

90 {
91 }

◆ OnBecomeBranchFaith()

virtual void Religion.OnBecomeBranchFaith ( )
inlinevirtual

Reimplemented in ReligionEarth, ReligionHealing, and ReligionLuck.

Definition at line 337 of file Religion.cs.

338 {
339 }

◆ OnChangeHour()

virtual void Religion.OnChangeHour ( )
inlinevirtual

Definition at line 538 of file Religion.cs.

539 {
540 if (IsEyth)
541 {
542 mood = 0;
543 }
544 else
545 {
546 mood = EClass.rnd(200) - 100;
547 }
548 }
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 530 of file Religion.cs.

531 {
532 }

Referenced by JoinFaith().

◆ OnLeaveFaith()

virtual void Religion.OnLeaveFaith ( )
inlinevirtual

Definition at line 534 of file Religion.cs.

535 {
536 }

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

◆ OnLoad()

virtual void Religion.OnLoad ( )
inlinevirtual

Definition at line 85 of file Religion.cs.

86 {
87 }

Referenced by ReligionManager.OnLoad().

◆ OnReforge()

virtual void Religion.OnReforge ( Thing  t)
inlinevirtual

Definition at line 300 of file Religion.cs.

301 {
302 t.c_idDeity = id;
303 if (IsIgnoreReforge(t))
304 {
305 return;
306 }
307 foreach (Element value in t.elements.dict.Values)
308 {
309 int num = value.id;
310 if ((uint)(num - 64) > 3u && num != 92 && IsFaithElement(value))
311 {
312 value.vExp = -1;
313 }
314 }
315 }
Dictionary< int, Element > dict
int id
Definition: ELEMENT.cs:259
virtual string id
Definition: Religion.cs:33
virtual bool IsFaithElement(Element e)
Definition: Religion.cs:327
virtual bool IsIgnoreReforge(Thing t)
Definition: Religion.cs:317

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 437 of file Religion.cs.

438 {
439 DoPunish(c, PunishType.Wrath);
440 }
void DoPunish(Chara c, PunishType type)
Definition: Religion.cs:452

References DoPunish().

◆ PunishPerverseWretch()

virtual void Religion.PunishPerverseWretch ( Chara  c)
inlinevirtual

Definition at line 447 of file Religion.cs.

448 {
449 DoPunish(c, PunishType.Pervert);
450 }

References DoPunish().

◆ PunishTakeOver()

virtual void Religion.PunishTakeOver ( Chara  c)
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 442 of file Religion.cs.

443 {
444 DoPunish(c, PunishType.Takeover);
445 }

References DoPunish().

Referenced by TraitAltar.OnOffer().

◆ Revelation()

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

Definition at line 167 of file Religion.cs.

168 {
169 if (!IsEyth && EClass.rnd(100) <= chance)
170 {
171 Talk(idTalk, c);
172 }
173 }

References IsEyth, 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 98 of file Religion.cs.

99 {
100 if (relation > 100)
101 {
102 text.SetText("reFriend".lang(), FontColor.Good);
103 }
104 else if (relation < -100)
105 {
106 text.SetText("reEnemy".lang(), FontColor.Bad);
107 }
108 else
109 {
110 text.SetText("reNone".lang(), FontColor.Passive);
111 }
112 }
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 175 of file Religion.cs.

176 {
178 Msg.Say("<i>" + GetGodTalk(idTalk) + " </i>", c ?? EClass.pc);
179 }
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:181

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

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

◆ TryGetGift()

virtual bool Religion.TryGetGift ( Chara  chara = null)
inlinevirtual

Definition at line 259 of file Religion.cs.

260 {
261 if (chara == null)
262 {
263 chara = EClass.pc;
264 }
265 int num = GetGiftRank(chara);
266 if (num == -1)
267 {
268 return false;
269 }
270 Point point = chara.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: false) ?? chara.pos;
271 switch (num)
272 {
273 case 1:
274 {
275 Talk("pet");
276 Chara chara2 = CharaGen.Create(source.rewards[0]);
277 EClass._zone.AddCard(chara2, point);
278 chara2.MakeAlly();
279 chara2.PlayEffect("aura_heaven");
280 giftRank = 1;
281 return true;
282 }
283 case 2:
284 {
285 Talk("gift");
286 string[] array = source.rewards[1].Split('|');
287 string[] array2 = array;
288 foreach (string text in array2)
289 {
290 EClass.game.religions.Reforge(text, point, text == array[0]);
291 }
292 giftRank = 2;
293 return true;
294 }
295 default:
296 return false;
297 }
298 }
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:2493
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(Chara chara=null)
Definition: Religion.cs:241
Card AddCard(Card t, Point point)
Definition: Zone.cs:2148

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

Member Data Documentation

◆ _source

SourceReligion.Row Religion._source
private

Definition at line 31 of file Religion.cs.

◆ giftRank

int Religion.giftRank

Definition at line 24 of file Religion.cs.

Referenced by GetGiftRank(), and TryGetGift().

◆ mood

int Religion.mood

Definition at line 27 of file Religion.cs.

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

◆ recentWrath

Religion Religion.recentWrath
static

Definition at line 29 of file Religion.cs.

Referenced by Chara.Die(), and DoPunish().

◆ relation

int Religion.relation

Definition at line 21 of file Religion.cs.

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

Property Documentation

◆ CanJoin

virtual bool Religion.CanJoin
get

Definition at line 73 of file Religion.cs.

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

◆ id

◆ IsAvailable

virtual bool Religion.IsAvailable
get

Definition at line 35 of file Religion.cs.

Referenced by LayerFaith.AddReligion().

◆ IsEhekatl

bool Religion.IsEhekatl
get

Definition at line 67 of file Religion.cs.

◆ IsEyth

◆ IsMinorGod

virtual bool Religion.IsMinorGod
get

◆ IsOpatos

bool Religion.IsOpatos
get

Definition at line 69 of file Religion.cs.

◆ Name

◆ NameDomain

virtual string Religion.NameDomain
get

Definition at line 57 of file Religion.cs.

◆ NameShort

virtual string Religion.NameShort
get

Definition at line 55 of file Religion.cs.

Referenced by Chara.Die().

◆ source

SourceReligion.Row Religion.source
get

Definition at line 39 of file Religion.cs.

40 {
41 get
42 {
44 if (row == null)
45 {
46 SourceReligion.Row obj = EClass.sources.religions.map.TryGetValue(id) ?? EClass.sources.religions.map["eyth"];
47 SourceReligion.Row row2 = obj;
48 _source = obj;
49 row = row2;
50 }
51 return row;
52 }
53 }
SourceReligion.Row _source
Definition: Religion.cs:31
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 61 of file Religion.cs.

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

◆ TextMood

virtual string Religion.TextMood
get

Definition at line 63 of file Religion.cs.

Referenced by WidgetStatsBar.Build().

◆ TextType

virtual string Religion.TextType
get

Definition at line 59 of file Religion.cs.

Referenced by ContentFaction.RefreshFactions().


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