Elin Modding Docs Doc
All Classes Namespaces
QuestDebt.cs
1using System;
2using Newtonsoft.Json;
3
4// Token: 0x020000D5 RID: 213
6{
7 // Token: 0x060005F4 RID: 1524 RVA: 0x00027CE8 File Offset: 0x00025EE8
8 public override void OnStart()
9 {
10 Chara chara = EClass.game.cards.globalCharas.Find("loytel");
11 if (chara.homeBranch != null)
12 {
13 chara.homeBranch.RemoveMemeber(chara);
14 }
15 EClass.pc.homeBranch.AddMemeber(chara);
16 EClass.pc.party.AddMemeber(chara);
17 chara.homeZone = EClass.pc.homeBranch.owner;
18 chara.noMove = false;
19 chara.RemoveEditorTag(EditorTag.Invulnerable);
20 Thing thing = ThingGen.Create("856", -1, -1);
21 thing.refVal = 109;
22 EClass.pc.Pick(thing, true, true);
23 }
24
25 // Token: 0x060005F5 RID: 1525 RVA: 0x00027D8A File Offset: 0x00025F8A
26 public override bool CanUpdateOnTalk(Chara c)
27 {
28 int phase = this.phase;
29 return false;
30 }
31
32 // Token: 0x060005F6 RID: 1526 RVA: 0x00027D94 File Offset: 0x00025F94
33 public override string GetTextProgress()
34 {
35 return "progressDebt".lang(Lang._currency(EClass.player.debt, true, 14), null, null, null, null);
36 }
37
38 // Token: 0x060005F7 RID: 1527 RVA: 0x00027DB6 File Offset: 0x00025FB6
39 public bool CanGiveBill()
40 {
41 return this.stage < 6;
42 }
43
44 // Token: 0x060005F8 RID: 1528 RVA: 0x00027DC1 File Offset: 0x00025FC1
45 public int GetBillAmount()
46 {
47 return (new int[]
48 {
49 1,
50 3,
51 6,
52 10,
53 30,
54 50,
55 100,
56 300,
57 500,
58 1000
59 })[this.stage] * 10000;
60 }
61
62 // Token: 0x060005F9 RID: 1529 RVA: 0x00027DE4 File Offset: 0x00025FE4
63 public void GiveBill()
64 {
65 Thing thing = ThingGen.Create("bill_debt", -1, -1);
66 thing.c_bill = this.GetBillAmount();
67 thing.c_isImportant = true;
68 EClass.player.DropReward(thing, false);
69 this.gaveBill = true;
70 if (EClass.debug.enable)
71 {
72 this.paid = true;
73 }
74 }
75
76 // Token: 0x060005FA RID: 1530 RVA: 0x00027E38 File Offset: 0x00026038
77 public void GiveReward()
78 {
79 this.gaveBill = false;
80 this.paid = false;
81 switch (this.stage)
82 {
83 case 1:
84 EClass.player.DropReward(ThingGen.Create("ticket_massage", -1, -1), false);
85 return;
86 case 2:
87 EClass.player.DropReward(ThingGen.Create("ticket_armpillow", -1, -1), false);
88 return;
89 case 3:
90 EClass.player.DropReward(ThingGen.Create("ticket_champagne", -1, -1), false);
91 return;
92 case 4:
93 EClass.player.DropReward(ThingGen.Create("ticket_resident", -1, -1), false);
94 return;
95 case 5:
96 EClass.player.DropReward(ThingGen.Create("loytel_mart", -1, -1), false);
97 return;
98 case 6:
99 EClass.player.flags.loytelMartLv = 1;
100 Msg.Say("upgradeLoytelMart");
101 return;
102 default:
103 return;
104 }
105 }
106
107 // Token: 0x060005FB RID: 1531 RVA: 0x00027F13 File Offset: 0x00026113
108 public string GetIdTalk_GiveBill()
109 {
110 if (this.stage != 0)
111 {
112 return "loytel_bill_give2";
113 }
114 return "loytel_bill_give1";
115 }
116
117 // Token: 0x0400070D RID: 1805
118 [JsonProperty]
119 public bool gaveBill;
120
121 // Token: 0x0400070E RID: 1806
122 [JsonProperty]
123 public bool paid;
124
125 // Token: 0x0400070F RID: 1807
126 [JsonProperty]
127 public int stage;
128}
Definition Chara.cs:12
Definition Msg.cs:7
Definition Thing.cs:10