Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TraitStethoscope.cs
Go to the documentation of this file.
2{
3 public override bool HasCharges => true;
4
5 public override void OnCreate(int lv)
6 {
7 owner.c_charges = EClass.rnd(6) + 2;
8 }
9
10 public override void TrySetHeldAct(ActPlan p)
11 {
12 p.pos.ListCards().ForEach(delegate(Card a)
13 {
14 Chara c = a.Chara;
15 if (c != null && p.IsSelfOrNeighbor && EClass.pc.CanSee(a) && c.IsPCFaction)
16 {
17 p.TrySetAct("actInvestigate", delegate
18 {
19 EClass.pc.Say("use_scope", c, owner);
20 EClass.pc.Say("use_scope2", c);
21 c.Talk("pervert2");
22 EClass.ui.AddLayer<LayerChara>().SetChara(c);
23 owner.ModCharge(-1);
24 if (owner.c_charges <= 0)
25 {
26 EClass.pc.Say("spellbookCrumble", owner);
27 owner.Destroy();
28 }
29 return false;
30 }, c);
31 }
32 });
33 }
34}
Point pos
Definition: ActPlan.cs:149
bool IsSelfOrNeighbor
Definition: ActPlan.cs:175
Definition: Card.cs:11
virtual Chara Chara
Definition: Card.cs:1946
Definition: Chara.cs:10
override bool IsPCFaction
Definition: Chara.cs:656
bool CanSee(Card c)
Definition: Chara.cs:1027
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Chara pc
Definition: EClass.cs:14
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1015
override bool HasCharges
override void OnCreate(int lv)
override void TrySetHeldAct(ActPlan p)