Elin Decompiled Documentation EA 23.247 Stable Patch 1
Loading...
Searching...
No Matches
TraitPowerStatue.cs
Go to the documentation of this file.
2{
3 public override bool CanBeDestroyed
4 {
5 get
6 {
8 {
9 return base.CanBeDestroyed;
10 }
11 return false;
12 }
13 }
14
15 public override bool CanBeStolen => false;
16
17 public override bool CanBeTeleported => false;
18
19 public override bool CanUseFromInventory => false;
20
21 public override bool UseExtra => owner.isOn;
22
23 public override bool CanStack => false;
24
25 public override void OnCreate(int lv)
26 {
27 owner.isOn = true;
29 owner.c_seed = EClass.rnd(20000);
30 owner.SetLv(lv);
31 }
32
33 public override bool CanUse(Chara c)
34 {
35 if (base.CanUse(c) && owner.isOn)
36 {
37 return !EClass._zone.IsUserZone;
38 }
39 return false;
40 }
41
42 public override bool OnUse(Chara c)
43 {
44 bool flag = this is TraitGodStatue;
45 if (!IsImplemented())
46 {
48 return true;
49 }
50 Msg.Say("shrine_power", owner);
51 if (flag)
52 {
53 SE.Play("godbless");
54 owner.PlayEffect("aura_heaven");
55 }
56 else
57 {
58 SE.Play("shrine");
59 owner.PlayEffect("buff");
60 }
61 _OnUse(c);
62 owner.isOn = false;
63 if (flag)
64 {
65 owner.ChangeMaterial("onyx");
66 }
67 owner.rarity = Rarity.Normal;
69 return true;
70 }
71
72 public virtual void _OnUse(Chara c)
73 {
74 }
75
76 public virtual bool IsImplemented()
77 {
78 return true;
79 }
80}
Rarity
Definition: Rarity.cs:2
void RefreshExtra()
bool isNPCProperty
Definition: Card.cs:554
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3041
Card SetLv(int a)
Definition: Card.cs:2905
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6211
bool isOn
Definition: Card.cs:542
CardRenderer renderer
Definition: Card.cs:61
Definition: Chara.cs:10
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
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
virtual void _OnUse(Chara c)
virtual bool IsImplemented()
override bool CanBeDestroyed
override bool CanBeTeleported
override bool UseExtra
override bool CanStack
override bool CanUseFromInventory
override bool OnUse(Chara c)
override bool CanUse(Chara c)
override bool CanBeStolen
override void OnCreate(int lv)
Card owner
Definition: Trait.cs:27
virtual bool IsUserZone
Definition: Zone.cs:271