Elin Decompiled Documentation EA 23.344.1 Nightly
Loading...
Searching...
No Matches
TraitPowerStatue.cs
Go to the documentation of this file.
2{
3 public virtual Religion Religion => null;
4
5 public override bool CanBeDestroyed
6 {
7 get
8 {
10 {
11 return base.CanBeDestroyed;
12 }
13 return false;
14 }
15 }
16
17 public override bool CanBeStolen => false;
18
19 public override bool CanBeTeleported => false;
20
21 public override bool CanUseFromInventory => false;
22
23 public override bool UseExtra => owner.isOn;
24
25 public override string IDInvStyle => "jewelbox";
26
27 public override int CostRerollShop => 1;
28
29 public override CurrencyType CurrencyRerollShop => CurrencyType.BlueCapsule;
30
31 public override bool CanStack => false;
32
33 public override void OnCreate(int lv)
34 {
35 owner.isOn = true;
37 owner.c_seed = EClass.rnd(20000);
38 owner.SetLv(lv);
39 }
40
41 public override bool CanUse(Chara c)
42 {
43 if (base.CanUse(c) && owner.isOn)
44 {
45 return !EClass._zone.IsUserZone;
46 }
47 return false;
48 }
49
50 public override bool OnUse(Chara c)
51 {
52 bool flag = this is TraitGodStatue;
53 if (!IsImplemented())
54 {
56 return true;
57 }
58 if (Religion?.id == "machine" && owner.material.id == 12)
59 {
60 owner.things.SetSize(5, 2);
61 if (owner.things.Count < 3)
62 {
64 }
65 LayerInventory.CreateContainer<InvOwnerChoose>(owner, owner).TryShowHint("h_invManiGene");
66 SE.Play("pop_principal");
67 return false;
68 }
69 Msg.Say("shrine_power", owner);
70 if (flag)
71 {
72 SE.Play("godbless");
73 owner.PlayEffect("aura_heaven");
74 }
75 else
76 {
77 SE.Play("shrine");
78 owner.PlayEffect("buff");
79 }
80 _OnUse(c);
81 owner.isOn = false;
82 if (flag)
83 {
84 owner.ChangeMaterial("onyx");
85 }
86 owner.rarity = Rarity.Normal;
88 return true;
89 }
90
91 public virtual void _OnUse(Chara c)
92 {
93 }
94
95 public virtual bool IsImplemented()
96 {
97 return true;
98 }
99
100 public override void SetName(ref string s)
101 {
102 if (!(this is TraitGodStatue) && !owner.isOn)
103 {
104 s = s + Lang.space + "empty".lang();
105 }
106 }
107}
CurrencyType
Definition: CurrencyType.cs:2
Rarity
Definition: Rarity.cs:2
void RefreshExtra()
bool isNPCProperty
Definition: Card.cs:557
SourceMaterial.Row material
Definition: Card.cs:2103
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3217
Card SetLv(int a)
Definition: Card.cs:3070
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
ThingContainer things
Definition: Card.cs:39
bool isOn
Definition: Card.cs:545
CardRenderer renderer
Definition: Card.cs:64
Definition: Chara.cs:10
Definition: DNA.cs:9
static void GenerateManiGene(Card owner)
Definition: DNA.cs:152
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
static int rnd(long a)
Definition: EClass.cs:59
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
static LayerInventory CreateContainer(Card owner)
Definition: Msg.cs:5
static string SayNothingHappen()
Definition: Msg.cs:96
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void SetSize(int w, int h)
override int CostRerollShop
virtual void _OnUse(Chara c)
virtual bool IsImplemented()
override bool CanBeDestroyed
override void SetName(ref string s)
override CurrencyType CurrencyRerollShop
override bool CanBeTeleported
override bool UseExtra
override bool CanStack
override bool CanUseFromInventory
override string IDInvStyle
override bool OnUse(Chara c)
override bool CanUse(Chara c)
override bool CanBeStolen
override void OnCreate(int lv)
Card owner
Definition: Trait.cs:28
virtual bool IsUserZone
Definition: Zone.cs:278