Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TraitSpecialLantern.cs
Go to the documentation of this file.
2{
4
5 public bool ShowBackerContent
6 {
7 get
8 {
9 if (owner.isBackerContent && source != null)
10 {
12 }
13 return false;
14 }
15 }
16
17 public override void OnCreate(int lv)
18 {
19 if (EClass.rnd(10) == 0 && owner != null && EClass._zone != null && EClass._zone.IsFestival && !owner.isBackerContent)
20 {
22 if (row != null)
23 {
24 owner.ApplyBacker(row.id);
25 }
26 }
27 }
28
29 public override void TrySetAct(ActPlan p)
30 {
32 {
33 p.TrySetAct("actRead", delegate
34 {
36 Msg.Say("backerLantern_read");
37 Msg.Say("backerLantern", row.Text);
38 return false;
39 }, owner);
40 }
41 }
42
43 public override void SetName(ref string s)
44 {
46 {
47 s = "_of".lang(source.Name, s);
48 }
49 }
50}
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:344
static int indexLantern
Definition: BackerContent.cs:7
int c_idBacker
Definition: Card.cs:1361
void ApplyBacker(int bid)
Definition: Card.cs:6193
bool isBackerContent
Definition: Card.cs:885
BackerContentConfig backer
Definition: CoreConfig.cs:600
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Core core
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:20
static SourceManager sources
Definition: EClass.cs:42
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< Row > listLantern
Definition: SourceBacker.cs:70
SourceBacker backers
override void SetName(ref string s)
override void TrySetAct(ActPlan p)
SourceBacker.Row source
override void OnCreate(int lv)
Card owner
Definition: Trait.cs:26
virtual bool IsFestival
Definition: Zone.cs:206