Elin Decompiled Documentation EA 23.288 Nightly
Loading...
Searching...
No Matches
TraitParchmentBottle.cs
Go to the documentation of this file.
2{
3 public override bool CanBeSmashedToDeath => true;
4
5 public override bool CanBeAttacked => !EClass._zone.IsPCFactionOrTent;
6
7 public override ThrowType ThrowType => ThrowType.Vase;
8
9 public override BookList.Item Item => BottleMessageList.GetItem(base.IdItem);
10
11 public override void OnCreate(int lv)
12 {
14 owner.c_lockLv = 1;
15 string id;
16 int num;
17 if (!EClass._zone.IsUserZone && EClass.rnd(4) != 0)
18 {
19 id = "money";
20 num = EClass.rnd(EClass.rnd(EClass.rnd(EClass.rnd(500)))) + 1;
22 if (EClass.rnd(5) == 0)
23 {
24 SetId("scratchcard", 1);
25 }
26 if (EClass.rnd(10) == 0)
27 {
28 SetId("234", 1);
29 }
30 if (EClass.rnd(20) == 0)
31 {
32 SetId("medal", 1);
33 }
34 if (EClass.rnd(30) == 0)
35 {
36 SetId("map_treasure", 1);
37 }
38 if (EClass.rnd(50) == 0)
39 {
40 SetId("ticket_fortune", 1);
41 }
42 if (EClass.rnd(100) == 0)
43 {
44 SetId("1084", 1);
45 }
46 if (EClass.rnd(500) == 9)
47 {
48 SetId("book_exp", 1);
49 }
50 Rand.SetSeed();
52 }
53 void SetId(string _id, int _num)
54 {
55 id = _id;
56 num = _num;
57 }
58 }
59
60 public override void SetName(ref string s)
61 {
62 base.SetName(ref s);
63 if (owner.c_lockLv != 0)
64 {
65 s += "_sealed".lang();
66 }
67 }
68}
ThrowType
Definition: ThrowType.cs:2
void SetStr(int id, string value=null)
Definition: BaseCard.cs:63
static BookList.Item GetRandomItem()
static BookList.Item GetItem(string id)
int FameLv
Definition: Card.cs:2338
int c_lockLv
Definition: Card.cs:977
Card AddCard(Card c)
Definition: Card.cs:3166
Thing SetNum(int a)
Definition: Card.cs:3577
int uid
Definition: Card.cs:123
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
static int rnd(long a)
Definition: EClass.cs:59
static Chara pc
Definition: EClass.cs:15
Definition: Rand.cs:4
static void SetSeed(int a=-1)
Definition: Rand.cs:44
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
override bool CanBeSmashedToDeath
override void SetName(ref string s)
override BookList.Item Item
override void OnCreate(int lv)
Card owner
Definition: Trait.cs:28
bool IsPCFactionOrTent
Definition: Zone.cs:478
virtual bool IsUserZone
Definition: Zone.cs:273