Elin Decompiled Documentation EA 23.331 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, 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 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 448 of file Religion.cs.

449 {
450 if (c.mimicry != null)
451 {
452 c.mimicry.Kill();
453 }
454 Talk((type == PunishType.Takeover) ? "takeoverFail" : "wrath");
455 if (type == PunishType.Wrath && c.Evalue(1228) > 0)
456 {
458 return;
459 }
460 if (type == PunishType.Wrath)
461 {
462 c.hp = 1;
463 if (c.mana.value > 0)
464 {
465 c.mana.value = 1;
466 }
467 if (c.stamina.value > 0)
468 {
469 c.stamina.value = 1;
470 }
471 }
472 else
473 {
474 c.hp /= 2;
475 if (c.mana.value > 0)
476 {
477 c.mana.value = c.mana.value / 2;
478 }
479 if (c.stamina.value > 0)
480 {
481 c.stamina.value = c.stamina.value / 2;
482 }
483 }
484 if (c.HasCondition<ConWrath>())
485 {
486 recentWrath = this;
487 c.DamageHP(99999999L, AttackSource.Wrath);
488 recentWrath = null;
489 return;
490 }
491 Thing thing = ThingGen.Create("punish_ball");
492 int p = 100;
493 switch (type)
494 {
495 case PunishType.Wrath:
496 {
497 p = 2000 + (c.IsPC ? (EClass.pc.c_daysWithGod * 20) : 0);
498 if (type != 0)
499 {
500 break;
501 }
502 int num = 0;
504 {
505 if (item.giftRank > 0)
506 {
507 num++;
508 }
509 }
510 if (num >= 4)
511 {
512 thing.idSkin = 1;
513 }
514 break;
515 }
516 case PunishType.Takeover:
517 case PunishType.Pervert:
518 p = 200;
519 break;
520 }
521 thing.ChangeWeight(EClass.pc.WeightLimit / 4 + 1000);
522 c.AddThing(thing);
524 }
AttackSource
Definition: AttackSource.cs:2
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3273
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4269
void ChangeWeight(int a)
Definition: Card.cs:2697
void SayNothingHappans()
Definition: Card.cs:7286
int Evalue(int ele)
Definition: Card.cs:2704
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9773
bool HasCondition(string alias)
Definition: Chara.cs:9938
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
static Chara pc
Definition: EClass.cs:15
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, EClass.pc, 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 ( )
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 = 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:301
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, 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 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:7076
int Num
Definition: Card.cs:161
SourceCategory.Row category
Definition: Card.cs:2101
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6351
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 328 of file Religion.cs.

329 {
330 return Array.Empty<string>();
331 }

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

314 {
315 return false;
316 }

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

338 {
339 if (!c.IsPC)
340 {
341 c.faith = this;
343 EClass.Sound.Play("worship");
344 Msg.Say("changeFaith", c, Name);
345 return;
346 }
347 if (c.faith != this)
348 {
349 c.faith.LeaveFaith(c, this, type);
350 }
351 if (type != ConvertType.Campaign)
352 {
353 EClass.pc.c_daysWithGod = 0;
354 }
355 Msg.Say("worship", Name);
356 Talk("worship", c);
357 EClass.Sound.Play("worship");
358 c.PlayEffect("aura_heaven");
359 c.faith = this;
360 OnJoinFaith();
361 if (IsEyth)
362 {
363 mood = 0;
364 }
365 else
366 {
367 mood = 50;
368 }
370 if (!c.HasElement(306))
371 {
372 c.elements.Learn(306);
373 }
374 if (!c.IsPC)
375 {
376 return;
377 }
379 if (EClass._zone.lv == 0)
380 {
381 if (EClass._zone is Zone_Mifu)
382 {
383 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.Trickery;
385 }
386 if (EClass._zone is Zone_Nefu)
387 {
388 EClass._map.config.blossom = EClass.pc.faith == EClass.game.religions.MoonShadow;
390 }
391 if (EClass._zone is Zone_Aquli)
392 {
393 EClass._map.config.fixedCondition = ((EClass.pc.faith == EClass.game.religions.Strife) ? Weather.Condition.Ether : Weather.Condition.None);
395 }
396 }
398 if (this is ReligionHealing)
399 {
400 Steam.GetAchievement(ID_Achievement.FAITH_HEALING);
401 }
402 }
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:6647
void PurgeEythArtifact()
Definition: Card.cs:3452
Faction faction
Definition: Chara.cs:431
override bool IsPC
Definition: Chara.cs:630
void RefreshFaithElement()
Definition: Chara.cs:10742
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:526
ConvertType
Definition: Religion.cs:8
virtual void LeaveFaith(Chara c, Religion newFaith, ConvertType type)
Definition: Religion.cs:404
virtual string Name
Definition: Religion.cs:37
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 404 of file Religion.cs.

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

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

334 {
335 }

◆ OnChangeHour()

virtual void Religion.OnChangeHour ( )
inlinevirtual

Definition at line 534 of file Religion.cs.

535 {
536 if (IsEyth)
537 {
538 mood = 0;
539 }
540 else
541 {
542 mood = EClass.rnd(200) - 100;
543 }
544 }
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 526 of file Religion.cs.

527 {
528 }

Referenced by JoinFaith().

◆ OnLeaveFaith()

virtual void Religion.OnLeaveFaith ( )
inlinevirtual

Definition at line 530 of file Religion.cs.

531 {
532 }

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

297 {
298 t.c_idDeity = id;
299 if (IsIgnoreReforge(t))
300 {
301 return;
302 }
303 foreach (Element value in t.elements.dict.Values)
304 {
305 int num = value.id;
306 if ((uint)(num - 64) > 3u && num != 92 && IsFaithElement(value))
307 {
308 value.vExp = -1;
309 }
310 }
311 }
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:323
virtual bool IsIgnoreReforge(Thing t)
Definition: Religion.cs:313

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

434 {
435 DoPunish(c, PunishType.Wrath);
436 }
void DoPunish(Chara c, PunishType type)
Definition: Religion.cs:448

References DoPunish().

◆ PunishPerverseWretch()

virtual void Religion.PunishPerverseWretch ( Chara  c)
inlinevirtual

Definition at line 443 of file Religion.cs.

444 {
445 DoPunish(c, PunishType.Pervert);
446 }

References DoPunish().

◆ PunishTakeOver()

virtual void Religion.PunishTakeOver ( Chara  c)
inlinevirtual

Reimplemented in ReligionCustom.

Definition at line 438 of file Religion.cs.

439 {
440 DoPunish(c, PunishType.Takeover);
441 }

References DoPunish().

Referenced by TraitAltar.OnOffer().

◆ Revelation()

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

Definition at line 167 of file Religion.cs.

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

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 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 ( )
inlinevirtual

Definition at line 259 of file Religion.cs.

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

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 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: