Elin Modding Docs Doc
Loading...
Searching...
No Matches
TraitFoodEggFertilized.cs
1using System;
2
3// Token: 0x0200034D RID: 845
5{
6 // Token: 0x170007B5 RID: 1973
7 // (get) Token: 0x06001A66 RID: 6758 RVA: 0x000A4C24 File Offset: 0x000A2E24
8 public override int DecaySpeed
9 {
10 get
11 {
12 return 1;
13 }
14 }
15
16 // Token: 0x06001A67 RID: 6759 RVA: 0x000A4C28 File Offset: 0x000A2E28
17 public static Chara Incubate(Thing egg, Point pos, Card incubator = null)
18 {
19 egg.SetSale(false);
20 string str = "";
21 CardRow refCard = egg.refCard;
22 if (refCard != null)
23 {
24 str = refCard.id;
25 if (refCard.id == "chara" || refCard.quality == 4)
26 {
27 str = "";
28 }
29 }
30 if (egg.IsDecayed)
31 {
32 str = "zombie";
33 }
34 Chara chara = CharaGen.Create(str.IsEmpty("chicken"), -1);
35 EClass._zone.AddCard(chara, pos.GetNearestPoint(false, false, true, false) ?? EClass.pc.pos);
36 chara.SetLv(1);
37 chara.SetMainElement(egg.c_idMainElement, 10, true);
38 chara.SetFeat(1232, (incubator != null) ? 3 : 2, true);
39 chara.things.DestroyAll(null);
40 foreach (Element element in chara.elements.dict.Values)
41 {
42 if ((!(element.source.category != "attribute") || !(element.source.category != "skill")) && (!(element.source.category == "attribute") || element.source.tag.Contains("primary")))
43 {
44 element.vTempPotential = element.vTempPotential * 2 + 100;
45 element.vPotential += 30;
46 }
47 }
48 EClass.Branch.AddMemeber(chara);
49 EClass.Branch.ChangeMemberType(chara, FactionMemberType.Livestock);
50 Msg.Say("incubate", chara, null, null, null);
51 return chara;
52 }
53
54 // Token: 0x06001A68 RID: 6760 RVA: 0x000A4DE8 File Offset: 0x000A2FE8
55 public override bool CanStackTo(Thing to)
56 {
57 return to.c_idMainElement == this.owner.c_idMainElement && base.CanStackTo(to);
58 }
59}
Definition Card.cs:13
Definition Chara.cs:12
Definition Msg.cs:7
Definition Point.cs:11
Definition Thing.cs:10