Elin Decompiled Documentation EA 23.153 Nightly
Loading...
Searching...
No Matches
DramaCustomSequence Class Reference
Inheritance diagram for DramaCustomSequence:
EClass

Public Member Functions

void Build (Chara c)
 
string GetRumor (Chara c)
 
bool HasTopic (string idSheet, string idTopic)
 
string GetText (Chara c, string idSheet, string idTopic)
 
string GetTopic (Chara c, string idTopic=null)
 
void BuildTextData ()
 
DramaEvent Event (DramaEvent e)
 
void Step (string step)
 
void Method (Action action, Func< bool > endFunc=null, string idJump=null)
 
void End ()
 
void Goto (string idJump)
 
void GotoDefault ()
 
void _Talk (string idActor, string text, string idJump=null)
 
void _Talk (string idActor, Func< string > funcText, string idJump=null)
 
void _TempTalk (string idActor, string text, string idJump=null)
 
void TempGoto (string idJump=null)
 
DramaChoice Choice (string lang, string idJump, bool cancel=false)
 
DramaChoice Choice (string lang, Action onJump)
 
DramaChoice Choice2 (string lang, string idJump)
 
void EnableCancel (string idCancelJump=null)
 
List< CardGetListGuide ()
 

Public Attributes

Card destCard
 
Chara destChara
 
Quest destQuest
 
Thing destThing
 
string idDefault
 
string idCustom
 
DramaSetup setup
 
DramaSequence sequence
 
List< DramaEventevents
 
DramaManager manager
 

Properties

string StepDefault [get]
 
string StepEnd [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 7 of file DramaCustomSequence.cs.

Member Function Documentation

◆ _Talk() [1/2]

void DramaCustomSequence._Talk ( string  idActor,
Func< string >  funcText,
string  idJump = null 
)
inline

Definition at line 1613 of file DramaCustomSequence.cs.

1614 {
1615 manager.lastTalk = Event(new DramaEventTalk
1616 {
1617 idActor = idActor,
1618 idJump = idJump,
1619 funcText = funcText
1620 }) as DramaEventTalk;
1621 }
DramaEvent Event(DramaEvent e)

◆ _Talk() [2/2]

void DramaCustomSequence._Talk ( string  idActor,
string  text,
string  idJump = null 
)
inline

Definition at line 1603 of file DramaCustomSequence.cs.

1604 {
1605 manager.lastTalk = Event(new DramaEventTalk
1606 {
1607 idActor = idActor,
1608 idJump = idJump,
1609 text = text
1610 }) as DramaEventTalk;
1611 }

Referenced by Build().

◆ _TempTalk()

void DramaCustomSequence._TempTalk ( string  idActor,
string  text,
string  idJump = null 
)
inline

Definition at line 1623 of file DramaCustomSequence.cs.

1624 {
1625 manager.lastTalk = Event(new DramaEventTalk
1626 {
1627 idActor = idActor,
1628 idJump = idJump,
1629 text = text,
1630 temp = true
1631 }) as DramaEventTalk;
1633 }
DramaEventTalk lastTalk
Definition: DramaManager.cs:61
List< DramaEvent > tempEvents

References DramaManager.lastTalk, and DramaSequence.tempEvents.

◆ Build()

void DramaCustomSequence.Build ( Chara  c)
inline

Definition at line 33 of file DramaCustomSequence.cs.

34 {
35 bool flag = idCustom == "Unique";
36 bool flag2 = c.bio.IsUnderAge || EClass.pc.bio.IsUnderAge;
37 bool isInGuild = Guild.Fighter.IsCurrentZone || Guild.Mage.IsCurrentZone || Guild.Thief.IsCurrentZone || Guild.Merchant.IsCurrentZone;
38 string bird = (flag2 ? "bird" : "tail");
39 _ = c.Name;
40 string rumor = (c.IsPCParty ? GetTalk("sup") : GetRumor(c));
41 Layer layer = null;
42 bool flag3 = c.IsHumanSpeak || EClass.pc.HasElement(1640);
43 bool num = !c.IsUnique || HasTopic("unique", c.id);
44 if (!flag)
45 {
46 Step("Resident");
47 _Talk("tg", () => rumor);
48 }
49 if (num && flag3)
50 {
51 DramaChoice choice = Choice2("letsTalk", StepDefault);
52 choice.SetOnClick(delegate
53 {
54 sequence.firstTalk.funcText = () => rumor;
55 List<Hobby> list2 = c.ListHobbies();
56 Hobby hobby = ((list2.Count > 0) ? list2[0] : null);
57 if (EClass.rnd(20) == 0 || EClass.debug.showFav)
58 {
59 if (EClass.rnd(2) == 0 || hobby == null)
60 {
61 GameLang.refDrama1 = c.GetFavCat().GetName().ToLower();
62 GameLang.refDrama2 = c.GetFavFood().GetName();
63 rumor = GetText(c, "general", "talk_fav");
64 c.knowFav = true;
65 }
66 else
67 {
68 GameLang.refDrama1 = hobby.Name.ToLower();
69 rumor = GetText(c, "general", "talk_hobby");
70 }
71 }
72 else
73 {
74 rumor = GetRumor(c);
75 }
77 choice.forceHighlight = true;
78 }).SetCondition(() => c.interest > 0);
79 }
80 bool flag4 = false;
81 if (!c.IsPCFaction && c.affinity.CanInvite() && !EClass._zone.IsInstance && c.c_bossType == BossType.none)
82 {
83 if ((c.trait.IsUnique || c.IsGlobal) && c.GetInt(111) == 0 && !c.IsPCFaction)
84 {
85 Choice2("daBout", "_bout");
86 flag4 = true;
87 }
88 else
89 {
90 Choice2("daInvite", "_invite");
91 }
92 }
93 foreach (Quest item in EClass.game.quests.list)
94 {
95 Quest _quest = item;
96 if (!item.CanDeliverToClient(c))
97 {
98 continue;
99 }
100 QuestDeliver questDeliver = _quest as QuestDeliver;
101 foreach (Thing item2 in questDeliver.ListDestThing())
102 {
103 Thing _t4 = item2;
104 Choice2("daDeliver".lang(item.GetTitle() ?? "", _t4.GetName(NameStyle.Full, questDeliver.num)), "_deliver").SetOnClick(delegate
105 {
106 destThing = _t4;
107 destQuest = _quest;
108 }).SetOnTooltip(delegate(UITooltip a)
109 {
110 _t4.WriteNote(a.note);
111 });
112 }
113 }
114 if (c.IsPCParty && !c.isSummon)
115 {
117 {
118 Choice2("daMakeHome", "_makeHome");
119 }
120 if (c.host == null && c.homeZone != null)
121 {
122 Choice2("daLeaveParty".lang(c.homeZone.Name), "_leaveParty");
123 }
124 }
125 if (c.memberType != FactionMemberType.Livestock && !c.IsGuest())
126 {
127 Choice2("daQuest".lang(c.quest?.GetTitle() ?? ""), "_quest").SetCondition(() => c.quest != null);
128 if (c.trait is TraitGuard)
129 {
130 EClass.pc.things.Foreach(delegate(Thing _t)
131 {
132 if (_t.isLostProperty)
133 {
134 Choice2("daLostProperty".lang(_t.Name), "_lostProperty").SetOnClick(delegate
135 {
136 destThing = _t;
137 });
138 }
139 });
140 }
142 {
143 if (c.trait.CanGuide)
144 {
145 foreach (Quest item3 in EClass.game.quests.list)
146 {
147 if (!item3.IsRandomQuest)
148 {
149 continue;
150 }
151 Chara dest = ((item3.chara != null && item3.chara.IsAliveInCurrentZone) ? item3.chara : null);
152 if (dest != null)
153 {
154 Choice2("daGoto".lang(dest.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
155 {
156 destCard = dest;
157 });
158 }
159 if (!(item3 is QuestDeliver { IsDeliver: not false } questDeliver2) || questDeliver2.DestZone != EClass._zone || !EClass._zone.dictCitizen.ContainsKey(questDeliver2.uidTarget))
160 {
161 continue;
162 }
163 Chara dest2 = EClass._zone.FindChara(questDeliver2.uidTarget);
164 if (dest2 != null)
165 {
166 Choice2("daGoto".lang(dest2.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
167 {
168 destCard = dest2;
169 });
170 }
171 }
172 if (GetListGuide().Count > 0)
173 {
174 Choice2("daGuide", "_Guide");
175 }
176 }
177 if (c.trait is TraitGM_Mage && Guild.Mage.relation.rank >= 4)
178 {
179 Choice2("daChangeDomain", "_changeDomain").DisableSound();
180 }
181 if (c.trait.ShopType != 0)
182 {
184 }
186 {
187 if (c.trait.SlaverType != 0)
188 {
190 }
191 if (c.trait.CopyShop != 0)
192 {
193 Choice2(("daCopy" + c.trait.CopyShop).lang(c.trait.NumCopyItem.ToString() ?? ""), "_copyItem").DisableSound();
194 }
195 }
196 if (c.trait.HaveNews && c.GetInt(33) + 10080 < EClass.world.date.GetRaw())
197 {
198 Choice2("daNews", "_news");
199 }
200 if (!flag4 && !EClass._zone.IsInstance && !c.IsPCFaction && c.trait.CanBout && c.IsGlobal && c.GetInt(59) + 10080 < EClass.world.date.GetRaw())
201 {
202 Choice2("daBout", "_bout");
203 }
204 if (c.isDrunk || EClass.debug.enable)
205 {
206 Choice2(flag2 ? "daBird" : "daTail", "_tail");
207 }
208 if (c.trait.CanRevive)
209 {
210 Choice2("daRevive", "_revive").DisableSound();
211 }
213 {
214 Choice2("daTrain", "_train").DisableSound();
215 }
216 if (c.trait.CanWhore)
217 {
218 Choice2(flag2 ? "daBirdBuy" : "daTailBuy", "_whore");
219 }
220 if (c.trait.CanHeal)
221 {
222 Choice2("daHeal", "_heal");
223 }
224 if (c.trait.CanServeFood)
225 {
226 Choice2("daFood", "_food");
227 }
228 if (c.trait is TraitInformer)
229 {
230 Choice2("daSellFame", "_sellFame");
231 }
233 {
234 if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null)
235 {
236 Choice2("daInvest", "_investZone");
237 }
238 if (c.trait.CanInvest)
239 {
240 Choice2("daInvest", "_investShop");
241 }
242 }
243 if (c.trait.CanIdentify)
244 {
245 Choice2("daIdentify", "_identify").DisableSound();
246 Choice2("daIdentifyAll", "_identifyAll");
247 Choice2("daIdentifySP", "_identifySP").DisableSound();
248 }
249 if (c.trait.CanPicklock)
250 {
251 if (c.Evalue(280) < 20)
252 {
253 c.elements.SetBase(280, 20);
254 }
255 foreach (Thing item4 in EClass.pc.things.List((Thing a) => a.c_lockLv > 0, onlyAccessible: true))
256 {
257 Thing _t3 = item4;
258 Choice2("daPicklock".lang(_t3.Name), "_picklock").SetOnClick(delegate
259 {
260 destThing = _t3;
261 });
262 }
263 }
264 if (c.trait is TraitBanker)
265 {
266 Choice2("daDeposit", "_deposit");
267 }
268 if (c.IsMaid || (c.trait.CanInvestTown && (EClass._zone.source.faction == "mysilia" || EClass._zone.IsPCFaction)))
269 {
270 Choice2("daExtraTax", "_extraTax");
271 }
273 {
274 Choice2("daBlessing", "_blessing");
275 }
276 }
277 }
278 if (c.IsHomeMember())
279 {
280 if (c.IsMaid)
281 {
283 {
284 Choice2("daMeeting".lang(EClass.Branch.meetings.list.Count.ToString() ?? ""), "_meeting");
285 }
286 Choice2("daBuyLand", "_buyLand");
287 Choice2("daChangeTitle", "_changeTitle");
288 }
289 if (c.noMove)
290 {
291 Choice2("enableMove", "_enableMove");
292 }
293 if (!c.IsPCParty && c.memberType != FactionMemberType.Livestock && c.trait.CanJoinParty)
294 {
295 Choice2("daJoinParty", "_joinParty");
296 }
297 Choice2("daFactionOther", "_factionOther");
298 }
299 if (c.trait is TraitLoytel && EClass.game.quests.Get<QuestDebt>() != null)
300 {
301 Choice2("daGreatDebt", "_greatDebt");
302 }
303 if (!flag)
304 {
305 Choice2("bye", "_bye");
306 EnableCancel();
307 }
308 Step("_factionOther");
309 Talk("what", StepDefault);
310 if (c.trait is TraitLoytel)
311 {
312 QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
313 if (questDebt != null && questDebt.gaveBill)
314 {
315 Choice("daGreatDebt2", "_greatDebt2");
316 }
317 }
318 if (c.IsPCParty)
319 {
320 if (!c.isSummon)
321 {
322 Choice((c.GetInt(106) == 0) ? "daShutup" : "daShutup2", "_shutup");
323 if (c.CanInsult() || c.GetInt(108) == 1)
324 {
325 Choice((c.GetInt(108) == 0) ? "daInsult" : "daInsult2", "_insult");
326 }
327 }
328 }
329 else if (!c.noMove)
330 {
331 Choice("disableMove", "_disableMove");
332 }
333 Choice((c.GetInt(123) == 0) ? "daSleepBeside" : "daSleepBeside2", "_sleepBeside");
334 if (c.GetInt(113) == 0)
335 {
336 Choice("daEquipSharedOff", "_toggleSharedEquip");
337 }
338 else
339 {
340 Choice("daEquipSharedOn", "_toggleSharedEquip");
341 }
342 if (!c.IsMaid && c.homeBranch == EClass.Branch)
343 {
344 Choice("daMakeMaid", "_daMakeMaid");
345 }
346 if (c.trait.CanBeBanished && !c.IsPCParty)
347 {
348 Choice("daBanish", "_depart");
349 }
350 Choice("daNothing", StepDefault, cancel: true);
351 Step("_toggleSharedEquip");
352 Method(delegate
353 {
354 c.SetInt(113, (c.GetInt(113) == 0) ? 1 : 0);
355 });
356 _Talk("tg", GetTopic(c, (c.GetInt(113) == 0) ? "shutup" : "shutup2"));
357 End();
358 Step("_daMakeMaid");
359 Method(delegate
360 {
361 EClass.Branch.uidMaid = c.uid;
362 });
363 _Talk("tg", GetTopic(c, "becomeMaid"));
364 End();
365 Step("_joinParty");
366 Method(delegate
367 {
369 {
370 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
371 TempTalkTopic("invite3", StepDefault);
372 }
373 else
374 {
375 EClass.pc.party.AddMemeber(c, showMsg: true);
376 }
377 });
378 Talk("hired", StepEnd);
379 Step("_leaveParty");
380 Method(delegate
381 {
384 {
385 EClass.pc.Say("tame_send", c, c.homeZone.Name);
386 c.MoveZone(c.homeZone);
387 }
388 });
389 Goto("_bye");
390 Step("_banish");
391 Goto("_bye");
392 Step("_makeLivestock");
393 Method(delegate
394 {
395 c.memberType = FactionMemberType.Livestock;
396 });
397 Talk("becomeLivestock", StepEnd);
398 Step("_makeResident");
399 Method(delegate
400 {
401 c.memberType = FactionMemberType.Default;
402 });
403 Talk("becomeResident", StepEnd);
404 Step("_depart");
405 Talk("depart_choice", StepDefault);
406 Choice("depart1", "_depart1");
407 Choice("depart2", "_depart2");
408 Step("_depart1");
409 Method(delegate
410 {
412 {
414 });
415 });
416 Talk("depart1", StepEnd);
417 Step("_depart2");
418 Talk("depart2", StepDefault);
419 Step("_gift");
420 Talk("gift_good", null);
421 End();
422 Step("_goto");
423 Method(delegate
424 {
425 GameLang.refDrama1 = destCard.Name;
426 if (destCard == c)
427 {
428 TempTalkTopic("goto2", StepDefault);
429 }
430 else
431 {
432 TempTalkTopic("goto", "_goto2");
433 }
434 });
435 Step("_goto2");
436 Method(delegate
437 {
439 {
440 destCard.Teleport(EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true) ?? EClass.pc.pos, silent: true, force: true);
441 }
443 EInput.Consume(consumeAxis: false, 20);
444 });
445 End();
446 Step("_rumor");
447 Talk("rumor", StepDefault);
448 Step("_lostProperty");
449 Method(delegate
450 {
451 GameLang.refDrama1 = destThing.Name;
454 });
455 _Talk("tg", GetTopic(c, "deliver_purse"), StepEnd);
456 _ = c.quest;
457 string text = ((!setup.forceJump.IsEmpty()) ? StepEnd : StepDefault);
458 Step("_deliver");
459 Method(delegate
460 {
461 GameLang.refDrama1 = destQuest.NameDeliver;
463 });
464 _Talk("tg", () => (destQuest != null) ? destQuest.GetTalkComplete().IsEmpty(GetTopic(c, (destQuest.bonusMoney > 0) ? "questCompleteDeliverExtra" : "questCompleteDeliver")) : "", StepEnd);
465 Step("_quest");
466 _Talk("tg", delegate
467 {
468 if (c.quest == null)
469 {
470 return "";
471 }
475 return (!taken()) ? c.quest.GetDetail() : c.quest.GetTalkProgress().IsEmpty(GetTopic(c, "questInProgress"));
476 }, text);
477 string text2 = "daAccept".lang();
478 if (c.quest != null && c.quest.deadline != 0)
479 {
480 text2 += "hintDeadline".lang(c.quest.TextDeadline).ToLower();
481 }
482 Choice(text2, (c.quest != null && c.quest.UseInstanceZone) ? "_questAccept_instance" : "_questAccept").SetOnClick(delegate
483 {
485 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() < 5);
486 Choice(text2, "_questFull").SetOnClick(delegate
487 {
488 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() >= 5);
489 Choice("daDecline", text).SetOnClick(RumorChill).SetCondition(() => !taken());
490 if (c.quest != null && EClass.game.quests.Get(c.quest.uid) == null)
491 {
492 QuestSupply supply = c.quest as QuestSupply;
493 if (supply != null)
494 {
495 foreach (Thing item5 in supply.ListDestThing())
496 {
497 Thing _t2 = item5;
498 Choice("daDeliver".lang(supply.GetTitle() ?? "", _t2.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
499 {
501 destThing = _t2;
502 destQuest = supply;
503 }).SetOnTooltip(delegate(UITooltip a)
504 {
505 _t2.WriteNote(a.note);
506 });
507 }
508 }
509 }
510 EnableCancel(text);
511 Step("_questAccept");
512 _Talk("tg", GetTopic(c, "questAccept"), StepEnd);
513 Step("_questAccept_instance");
514 _Talk("tg", GetTopic(c, "questAccept"));
515 Method(delegate
516 {
517 Zone z2 = c.quest.CreateInstanceZone(c);
519 }, null, StepEnd);
520 Step("_questFull");
521 _Talk("tg", GetTopic(c, "questFull"), text);
522 Step("_greatDebt");
523 Method(delegate
524 {
525 QuestDebt questDebt3 = EClass.game.quests.Get<QuestDebt>();
526 if (!questDebt3.CanGiveBill())
527 {
528 TempTalkTopic("loytel_bill_give_wait", StepDefault);
529 }
530 else if (questDebt3.gaveBill)
531 {
532 TempTalkTopic("loytel_bill_give_given", StepDefault);
533 }
534 else
535 {
536 TempTalkTopic(questDebt3.GetIdTalk_GiveBill(), StepEnd);
537 questDebt3.GiveBill();
538 }
539 });
540 Step("_greatDebt2");
541 Method(delegate
542 {
543 QuestDebt questDebt2 = EClass.game.quests.Get<QuestDebt>();
544 TempTalkTopic("loytel_bill_give_lost", StepEnd);
545 questDebt2.GiveBill();
546 });
547 Step("_shutup");
548 Method(delegate
549 {
550 c.SetInt(106, (c.GetInt(106) == 0) ? 1 : 0);
551 });
552 _Talk("tg", GetTopic(c, (c.GetInt(106) == 0) ? "shutup" : "shutup2"));
553 End();
554 Step("_sleepBeside");
555 Method(delegate
556 {
557 if (c.affinity.CanSleepBeside() || c.GetInt(123) == 1)
558 {
559 c.SetInt(123, (c.GetInt(123) == 0) ? 1 : 0);
560 }
561 else
562 {
563 TempTalkTopic("refuse", StepEnd);
564 }
565 });
566 _Talk("tg", GetTopic(c, (c.GetInt(123) == 0) ? "ok" : "shutup"));
567 End();
568 Step("_insult");
569 Method(delegate
570 {
571 c.SetInt(108, (c.GetInt(108) == 0) ? 1 : 0);
572 });
573 _Talk("tg", GetTopic(c, (c.GetInt(108) == 0) ? "insult" : "insult2"));
574 Method(delegate
575 {
576 if (c.GetInt(108) == 1)
577 {
578 c.Talk("insult");
579 }
580 });
581 End();
582 Step("_makeHome");
583 Method(delegate
584 {
586 });
587 _Talk("tg", GetTopic(c, "ok"));
588 End();
589 Step("_hire");
590 Talk("rumor", StepDefault);
591 Choice("daAccept", StepDefault).SetOnClick(delegate
592 {
593 });
594 Choice("daDecline", StepDefault).SetOnClick(delegate
595 {
596 });
597 Step("_invite");
598 Method(delegate
599 {
600 if (!c.trait.CanInvite)
601 {
602 TempTalkTopic("invite2", StepDefault);
603 }
605 {
606 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
607 TempTalkTopic("invite3", StepDefault);
608 }
609 else
610 {
611 TempTalkTopic("invite", null);
612 Choice("yes", delegate
613 {
614 TempTalk("hired", StepEnd);
615 EClass.Sound.Play("good");
616 c.MakeAlly();
617 });
618 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
619 }
620 });
621 Step("_Guide");
622 Method(delegate
623 {
624 TempTalkTopic("guide", null);
625 foreach (Card guide in GetListGuide())
626 {
627 Choice("daGotoGuide".lang(guide.Name, ""), "_goto").SetOnClick(delegate
628 {
629 destCard = guide;
630 });
631 }
632 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
633 TempCancel();
634 });
635 BackChill();
636 Step("_tail");
637 Method(delegate
638 {
639 TempTalkTopic(bird + "1", null);
640 Choice("yes2", delegate
641 {
642 TempTalkTopic(bird + "2", StepEnd);
644 {
645 target = c,
646 sell = true
647 });
648 });
649 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
650 });
651 Step("_whore");
652 Method(delegate
653 {
654 int costWhore = CalcMoney.Whore(c, EClass.pc);
655 GameLang.refDrama1 = costWhore.ToString() ?? "";
656 TempTalkTopic(bird + "3", null);
657 Choice("yes2", delegate
658 {
659 if (EClass.pc.GetCurrency() < costWhore)
660 {
661 TempTalkTopic("nomoney", StepDefault);
662 }
663 else
664 {
665 SE.Pay();
666 EClass.pc.ModCurrency(-costWhore);
667 TempTalkTopic(bird + "2", StepEnd);
668 EClass.pc.SetAI(new AI_Fuck
669 {
670 target = c
671 });
672 }
673 });
674 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
675 });
676 Step("_picklock");
677 Method(delegate
678 {
679 int cost8 = CalcMoney.Picklock(EClass.pc, destThing);
680 GameLang.refDrama1 = cost8.ToString() ?? "";
681 TempTalkTopic("bird3", null);
682 Choice("yes2", delegate
683 {
685 {
686 TempTalkTopic("lockTooHard", StepDefault);
687 }
688 else if (EClass.pc.GetCurrency() < cost8)
689 {
690 TempTalkTopic("nomoney", StepDefault);
691 }
692 else
693 {
694 SE.Pay();
695 EClass.pc.ModCurrency(-cost8);
696 manager.layer.SetOnKill(delegate
697 {
698 c.PlaySound("lock_open");
699 c.Say("lockpick_success", c, destThing);
700 c.ModExp(280, 200 + destThing.c_lockLv * 20);
701 destThing.c_lockLv = 0;
702 if (destThing.isLostProperty)
703 {
704 EClass.player.ModKarma(-8);
705 }
706 destThing.isLostProperty = false;
707 });
708 TempTalkTopic(destThing.isLostProperty ? "lockpick_purse" : "bird2", StepEnd);
709 }
710 });
711 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
712 });
713 Step("_buy");
714 Method(delegate
715 {
716 if (c.id == "miral")
717 {
718 SE.Play("click_chat");
719 if (EClass.pc.GetCurrency("medal") > 0)
720 {
721 TempTalkTopic("miral_medal", null);
722 }
723 else
724 {
725 TempTalkTopic("miral_medal2", StepDefault);
726 }
727 }
728 });
729 Method(delegate
730 {
731 if (c.trait is TraitMerchantBlack && Guild.Thief.relation.rank < 4 && (Guild.Thief.IsCurrentZone || (!(EClass._zone.id == "derphy") && !(EClass._zone.id == "kapul"))))
732 {
733 SE.Play("click_chat");
734 TempTalkTopic("shop_blackmarket_noaccess", StepEnd);
735 }
737 {
738 SE.Play("click_chat");
739 TempTalkTopic("shop_criminal", StepEnd);
740 }
741 else
742 {
743 sequence.Exit();
744 manager.layer.Close();
745 c.trait.OnBarter();
746 if ((bool)WidgetFeed.Instance)
747 {
748 WidgetFeed.Instance.Talk(c, "barter");
749 }
751 }
752 }, () => !layer, StepDefault);
753 Step("_buyPlan");
754 Method(delegate
755 {
756 List<ResearchPlan> plans = new List<ResearchPlan>();
757 foreach (SourceResearch.Row row in EClass.sources.researches.rows)
758 {
760 {
761 plans.Add(ResearchPlan.Create(row.id));
762 }
763 }
764 EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
765 {
766 list.moldItem = Resources.Load<ItemGeneral>("UI/Element/Item/ItemGeneralBarter").transform;
767 list.callbacks = new UIList.Callback<ResearchPlan, ItemGeneral>
768 {
769 onInstantiate = delegate(ResearchPlan a, ItemGeneral b)
770 {
771 b.button1.mainText.text = a.Name;
772 UIItem uIItem = Util.Instantiate<UIItem>("UI/Element/Item/Extra/costBarter", b.layout);
774 uIItem.text1.SetText(c2.cost.ToString() ?? "", (c2.resource.value >= c2.cost) ? FontColor.Good : FontColor.Bad);
775 uIItem.image1.sprite = c2.resource.Sprite;
776 b.button1.SetTooltip(delegate(UITooltip t)
777 {
778 a.WriteNote(t.note);
779 });
780 b.button1.onClick.AddListener(delegate
781 {
782 if (c2.resource.value < c2.cost)
783 {
784 SE.Beep();
785 }
786 else
787 {
788 c2.resource.Mod(-c2.cost);
789 plans.Remove(a);
791 SE.Pay();
792 list.List(refreshHighlight: true);
793 }
794 });
795 b.RebuildLayout(recursive: true);
796 },
797 onList = delegate
798 {
799 foreach (ResearchPlan item6 in plans)
800 {
801 list.Add(item6);
802 }
803 }
804 };
805 }).SetSize()
806 .windows[0].AttachCurrency().Build(new UICurrency.Options
807 {
808 branchMoney = true
809 });
810 }, () => !layer, StepDefault);
811 Step("_upgradeHearth");
812 Method(delegate
813 {
814 int cost7 = EClass.Branch.GetUpgradeCost();
815 GameLang.refDrama1 = Lang._currency(cost7, "money");
816 GameLang.refDrama2 = (EClass.Branch.lv + 1).ToString() ?? "";
817 GameLang.refDrama3 = "hearth_dialog".lang(EClass.Branch.GetHearthHint(EClass.Branch.lv + 1));
818 TempTalkTopic("upgrade_heath1", null);
819 Choice("yes", delegate
820 {
821 if (EClass.pc.GetCurrency() < cost7)
822 {
823 TempTalkTopic("nomoney", StepDefault);
824 }
825 else
826 {
827 EClass.pc.ModCurrency(-cost7);
828 SE.Pay();
829 LayerDrama.Instance.SetOnKill(delegate
830 {
831 EClass.Branch.Upgrade();
832 });
833 TempTalkTopic("upgrade_heath2", StepEnd);
834 }
835 });
836 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
837 });
838 Step("_sellFame");
839 Method(delegate
840 {
841 int cost6 = EClass.player.fame / 5;
842 GameLang.refDrama1 = cost6.ToString() ?? "";
843 if (cost6 == 0)
844 {
845 TempTalkTopic("goto2", StepDefault);
846 }
847 else
848 {
849 TempTalkTopic("sellFame1", null);
850 Choice("yes", delegate
851 {
852 EClass.pc.ModCurrency(cost6);
853 SE.Pay();
854 EClass.player.ModFame(-cost6);
855 TempTalkTopic("sellFame2", StepDefault);
856 });
857 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
858 }
859 });
860 Step("_investZone");
861 Method(delegate
862 {
863 int cost5 = CalcMoney.InvestZone(EClass.pc);
864 GameLang.refDrama1 = cost5.ToString() ?? "";
865 GameLang.refDrama2 = ((EClass._zone.investment < 0) ? int.MaxValue : EClass._zone.investment).ToString() ?? "";
866 TempTalkTopic("invest1", null);
867 Choice("yes", delegate
868 {
869 Invest(quick: false);
870 });
871 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
872 Choice("quickInvest", delegate
873 {
874 Invest(quick: true);
875 });
876 void Invest(bool quick)
877 {
878 if (EClass.pc.GetCurrency() < cost5)
879 {
880 TempTalkTopic("nomoney", StepDefault);
881 }
882 else
883 {
884 EClass.pc.ModCurrency(-cost5);
885 SE.Pay();
886 EClass._zone.investment += cost5;
889 EClass.pc.ModExp(292, 100 + EClass._zone.development * 2);
890 if (quick)
891 {
892 TempGoto("_investZone");
893 }
894 else
895 {
896 TempTalkTopic("invest2", StepDefault);
897 }
898 }
899 }
900 });
901 Step("_investShop");
902 Method(delegate
903 {
904 int cost4 = CalcMoney.InvestShop(EClass.pc, c);
905 GameLang.refDrama1 = cost4.ToString() ?? "";
906 GameLang.refDrama2 = c.trait.ShopLv.ToString() ?? "";
907 TempTalkTopic("invest_shop1", null);
908 Choice("yes", delegate
909 {
910 Invest(quick: false);
911 });
912 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
913 Choice("quickInvest", delegate
914 {
915 Invest(quick: true);
916 });
917 void Invest(bool quick)
918 {
919 if (EClass.pc.GetCurrency() < cost4)
920 {
921 TempTalkTopic("nomoney", StepDefault);
922 }
923 else
924 {
925 EClass.pc.ModCurrency(-cost4);
926 SE.Pay();
927 c.c_invest++;
929 EClass.pc.ModExp(292, 50 + c.c_invest * 20);
931 if (quick)
932 {
933 TempGoto("_investShop");
934 }
935 else
936 {
937 TempTalkTopic("invest_shop2", StepDefault);
938 }
939 }
940 }
941 });
942 Step("_changeTitle");
943 Method(delegate
944 {
945 EClass.player.title = WordGen.Get("title");
946 GameLang.refDrama1 = EClass.player.title;
947 TempTalk("changeTitle", StepDefault);
948 }, null, StepDefault);
949 Step("_buyLand");
950 Method(delegate
951 {
952 bool num5 = EClass._map.bounds.CanExpand(1);
953 int costLand = CalcGold.ExpandLand();
954 GameLang.refDrama1 = "";
955 GameLang.refDrama2 = costLand.ToString() ?? "";
956 if (!num5)
957 {
958 TempTalkTopic("expand3", StepDefault);
959 }
960 else
961 {
962 TempTalkTopic("expand1", StepDefault);
963 Choice("yes", delegate
964 {
965 if (EClass.pc.GetCurrency("money2") < costLand)
966 {
967 TempTalkTopic("nomoney", StepDefault);
968 }
969 else
970 {
971 SE.Pay();
972 EClass.pc.ModCurrency(-costLand, "money2");
973 TempTalkTopic("expand2", StepDefault);
974 EClass._map.bounds.Expand(1);
975 SE.Play("good");
976 EClass._map.RefreshAllTiles();
977 WidgetMinimap.UpdateMap();
978 ScreenEffect.Play("Firework");
979 }
980 });
981 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
982 }
983 });
984 Step("_meeting");
985 Method(delegate
986 {
987 sequence.Exit();
990 });
991 End();
992 Step("_give");
993 Method(delegate
994 {
995 manager.Hide();
996 layer = LayerDragGrid.CreateGive(c);
997 layer.SetOnKill(manager.Show);
998 }, () => !layer, StepDefault);
999 Step("_blessing");
1000 Method(delegate
1001 {
1002 bool flag6 = c.trait is TraitMiko_Mifu;
1003 TempTalkTopic("blessing", StepEnd);
1005 {
1006 foreach (Chara member in EClass.pc.party.members)
1007 {
1008 if (c.trait is TraitMiko_Mifu)
1009 {
1010 member.AddCondition<ConHolyVeil>()?.SetPerfume();
1011 }
1012 else if (c.trait is TraitMiko_Nefu)
1013 {
1014 member.AddCondition<ConEuphoric>()?.SetPerfume();
1015 }
1016 else
1017 {
1018 member.AddCondition<ConNightVision>()?.SetPerfume();
1019 }
1020 member.Say("blessing", member);
1021 member.PlaySound("pray");
1022 member.PlayEffect("holyveil");
1023 }
1024 c.isRestocking = true;
1025 });
1026 c.c_dateStockExpire = EClass.world.date.GetRaw() + (flag6 ? 180 : 180) * 1440;
1027 });
1028 Step("_train");
1029 Method(delegate
1030 {
1031 layer = EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1032 {
1033 list.moldItem = Resources.Load<ButtonElement>("UI/Element/Button/ButtonElementTrain").transform;
1034 list.callbacks = new UIList.Callback<Element, ButtonElement>
1035 {
1036 onClick = delegate(Element a, ButtonElement b)
1037 {
1038 int num4 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1039 if (num4 == 0)
1040 {
1041 SE.Beep();
1042 }
1043 else if (EClass.pc.TryPay(num4, "plat"))
1044 {
1045 if (EClass.pc.elements.HasBase(a.id))
1046 {
1048 }
1049 else
1050 {
1052 }
1053 list.Redraw();
1055 }
1056 },
1057 onRedraw = delegate(Element a, ButtonElement b, int i)
1058 {
1059 bool flag5 = EClass.pc.elements.HasBase(a.id);
1060 b.imagePotential.enabled = flag5;
1062 int plat = EClass.pc.GetCurrency("plat");
1063 int cost3 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1064 b.mainText.text = b.mainText.text + " " + (flag5 ? "" : ("notLearned".lang() + " "));
1065 b.subText2.text = ((cost3 == 0) ? "-" : (cost3.ToString() ?? "")).TagColor(() => plat >= cost3 && cost3 != 0);
1066 b.RebuildLayout();
1067 },
1068 onInstantiate = delegate
1069 {
1070 },
1071 onList = delegate
1072 {
1073 foreach (SourceElement.Row item7 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a)
1074 {
1075 if (a.tag.Contains("unused"))
1076 {
1077 return false;
1078 }
1079 if (a.tag.Contains("guild"))
1080 {
1081 if (a.tag.Contains("fighter") && Guild.Fighter.IsCurrentZone)
1082 {
1083 return true;
1084 }
1085 if (a.tag.Contains("mage") && Guild.Mage.IsCurrentZone)
1086 {
1087 return true;
1088 }
1089 if (a.tag.Contains("thief") && Guild.Thief.IsCurrentZone)
1090 {
1091 return true;
1092 }
1093 if (a.tag.Contains("merchant") && Guild.Merchant.IsCurrentZone)
1094 {
1095 return true;
1096 }
1097 return false;
1098 }
1099 if (isInGuild)
1100 {
1101 return false;
1102 }
1103 return a.category == "skill" && a.categorySub == c.trait.IDTrainer;
1104 }).ToList())
1105 {
1106 list.Add(Element.Create(item7.id));
1107 }
1108 }
1109 };
1110 }).SetSize()
1111 .SetTitles("wTrain")
1112 .SetOnKill(SE.PopDrama);
1113 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1114 {
1115 plat = true
1116 });
1117 }, () => !layer, StepDefault);
1118 Step("_changeDomain");
1119 Method(delegate
1120 {
1121 layer = EClass.player.SelectDomain(SE.PopDrama);
1122 }, () => !layer, StepDefault);
1123 Step("_revive");
1124 Method(delegate
1125 {
1126 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleRevive>("h_revive"));
1127 layer.SetOnKill(SE.PopDrama);
1128 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1129 {
1130 money = true
1131 });
1132 }, () => !layer, StepDefault);
1133 Step("_buySlave");
1134 Method(delegate
1135 {
1136 LayerPeople.slaveToBuy = null;
1137 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleBuySlave>("h_invBuy", c));
1138 layer.SetOnKill(SE.PopDrama);
1139 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1140 {
1141 money = true
1142 });
1143 manager.Load();
1144 }, () => !layer, "_buySlaveConfirm");
1145 Step("_buySlaveConfirm");
1146 Method(delegate
1147 {
1149 if (tc == null)
1150 {
1151 RumorChill();
1152 }
1153 else
1154 {
1155 int cost2 = CalcMoney.BuySlave(tc);
1156 GameLang.refDrama1 = cost2.ToString() ?? "";
1157 GameLang.refDrama2 = tc.Name;
1158 TempTalkTopic("slave_buy", null);
1159 Choice("yes", delegate
1160 {
1161 if (!EClass.pc.TryPay(cost2))
1162 {
1163 TempTalkTopic("nomoney", StepDefault);
1164 }
1165 else
1166 {
1167 GameLang.refDrama1 = tc.Name;
1168 EClass._zone.AddCard(tc, EClass.pc.pos.GetNearestPoint());
1169 tc.MakeAlly();
1170 c.GetObj<SlaverData>(5).list.Remove(tc);
1171 TempTalkTopic("slave_buy2", StepEnd);
1172 }
1173 }).DisableSound();
1174 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1175 }
1176 });
1178 Step("_trade");
1179 Method(delegate
1180 {
1181 layer = EClass.ui.AddLayer(LayerInventory.CreateContainer(c));
1182 }, () => !layer, StepDefault);
1183 Step("_identify");
1184 Method(delegate
1185 {
1186 manager.Hide();
1187 c.trait.OnBarter();
1188 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: false, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: false), -1);
1189 layer.SetOnKill(manager.Show);
1190 }, () => !layer, StepDefault);
1191 Step("_identifyAll");
1192 Method(delegate
1193 {
1194 int costIdentify = 0;
1195 int numIdentify = 0;
1196 int numSuperior = 0;
1197 EClass.pc.things.Foreach(delegate(Thing t)
1198 {
1199 if (!t.IsIdentified && t.c_IDTState != 1)
1200 {
1201 numIdentify++;
1202 costIdentify += CalcMoney.Identify(EClass.pc, superior: false);
1203 }
1204 });
1205 GameLang.refDrama1 = costIdentify.ToString() ?? "";
1206 GameLang.refDrama2 = numIdentify.ToString() ?? "";
1207 if (numIdentify == 0)
1208 {
1209 TempTalkTopic("appraise3", StepDefault);
1210 }
1211 else
1212 {
1213 TempTalkTopic("appraise1", StepDefault);
1214 Choice("yes", delegate
1215 {
1216 if (EClass.pc.GetCurrency() < costIdentify)
1217 {
1218 TempTalkTopic("nomoney", StepDefault);
1219 }
1220 else
1221 {
1222 SE.Pay();
1223 EClass.pc.ModCurrency(-costIdentify);
1224 foreach (Thing item8 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true))
1225 {
1226 item8.Thing.Identify(show: false);
1227 if (!item8.IsInstalled)
1228 {
1229 numSuperior++;
1230 }
1231 }
1232 TempTalkTopic("appraise2", StepDefault);
1233 }
1234 });
1235 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1236 }
1237 });
1238 Step("_identifySP");
1239 Method(delegate
1240 {
1241 manager.Hide();
1242 c.trait.OnBarter();
1243 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: true, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: true), -1);
1244 layer.SetOnKill(manager.Show);
1245 }, () => !layer, StepDefault);
1246 Step("_bout");
1247 Method(delegate
1248 {
1249 TempTalkTopic("bout1", StepDefault);
1250 Choice("yes", delegate
1251 {
1253 {
1254 uidTarget = c.uid,
1255 targetX = c.pos.x,
1256 targetZ = c.pos.z
1257 });
1258 c.SetGlobal();
1260 {
1261 target = c
1262 });
1263 c.SetInt(59, EClass.world.date.GetRaw());
1265 {
1266 EClass.pc.MoveZone(z, ZoneTransition.EnterState.Center);
1267 });
1268 TempTalkTopic("bout2", StepEnd);
1269 });
1270 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1271 }, null, StepDefault);
1272 Step("_news");
1273 Method(delegate
1274 {
1276 if (zone == null)
1277 {
1278 TempTalkTopic("news2", null);
1279 }
1280 else
1281 {
1282 zone.isKnown = true;
1283 Msg.Say("discoverZone", zone.Name);
1284 GameLang.refDrama1 = zone.Name;
1285 TempTalkTopic("news1", null);
1286 }
1287 c.SetInt(33, EClass.world.date.GetRaw());
1288 });
1289 Method(delegate
1290 {
1291 manager.Load();
1292 }, null, StepDefault);
1293 Step("_heal");
1294 Method(delegate
1295 {
1296 int costHeal = CalcMoney.Heal(EClass.pc);
1297 GameLang.refDrama1 = costHeal.ToString() ?? "";
1298 TempTalkTopic("healer1", null);
1299 Choice("yes", delegate
1300 {
1301 if (EClass.pc.GetCurrency() < costHeal)
1302 {
1303 TempTalkTopic("nomoney", StepDefault);
1304 }
1305 else
1306 {
1307 SE.Pay();
1308 foreach (Chara member2 in EClass.pc.party.members)
1309 {
1310 ActEffect.Proc(EffectId.HealComplete, member2);
1311 }
1312 EClass.pc.ModCurrency(-costHeal);
1313 TempTalkTopic("healer2", StepEnd);
1314 }
1315 });
1316 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1317 });
1318 Step("_food");
1319 Method(delegate
1320 {
1321 int cost = CalcMoney.Meal(EClass.pc);
1322 GameLang.refDrama1 = cost.ToString() ?? "";
1323 TempTalkTopic("food1", null);
1324 Choice("yes", delegate
1325 {
1326 if (EClass.pc.hunger.GetPhase() <= 0)
1327 {
1328 TempTalkTopic("alreadyFull", StepDefault);
1329 }
1330 else if (EClass.pc.GetCurrency() < cost)
1331 {
1332 TempTalkTopic("nomoney", StepDefault);
1333 }
1334 else
1335 {
1336 SE.Pay();
1337 EClass.pc.ModCurrency(-cost);
1338 TempTalkTopic("food2", StepDefault);
1339 FoodEffect.Proc(EClass.pc, ThingGen.Create("dish_lunch"));
1340 EClass.pc.hunger.value = 0;
1341 }
1342 });
1343 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1344 });
1345 int[] bankTier = new int[5] { 100, 1000, 10000, 100000, 1000000 };
1346 Step("_deposit");
1347 Method(delegate
1348 {
1349 sequence.Exit();
1351 if ((bool)WidgetFeed.Instance)
1352 {
1353 WidgetFeed.Instance.Talk(c, "barter");
1354 }
1355 SE.Play("shop_open");
1357 }, () => !layer, StepDefault);
1358 End();
1359 Step("_copyItem");
1360 Method(delegate
1361 {
1362 sequence.Exit();
1364 if ((bool)WidgetFeed.Instance)
1365 {
1366 WidgetFeed.Instance.Talk(c, "barter");
1367 }
1368 SE.Play("shop_open");
1369 c.trait.OnBarter();
1370 if (c.c_copyContainer == null)
1371 {
1372 c.c_copyContainer = ThingGen.Create("container_deposit");
1373 }
1374 int numCopyItem = c.trait.NumCopyItem;
1375 c.c_copyContainer.things.SetSize(numCopyItem, 1);
1377 }, () => !layer, StepDefault);
1378 End();
1379 int[] taxTier = new int[6] { 0, 1000, 2000, 5000, 10000, 20000 };
1380 Step("_extraTax");
1381 Method(delegate
1382 {
1383 GameLang.refDrama1 = Lang._currency(EClass.player.extraTax, "money");
1384 TempTalkTopic("extraTax", null);
1385 int[] array2 = taxTier;
1386 foreach (int num3 in array2)
1387 {
1388 int _i2 = num3;
1389 Choice(Lang._currency(_i2, showUnit: true), delegate
1390 {
1391 EClass.player.extraTax = _i2;
1392 GameLang.refDrama1 = Lang._currency(_i2, "money");
1393 TempTalkTopic("extraTax2", StepDefault);
1394 });
1395 }
1396 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1397 });
1398 Step("_withdraw");
1399 Method(delegate
1400 {
1401 int bankMoney = EClass.player.bankMoney;
1402 GameLang.refDrama1 = bankMoney.ToString() ?? "";
1403 TempTalkTopic("banker2", null);
1404 int[] array = bankTier;
1405 foreach (int num2 in array)
1406 {
1407 int _i = num2;
1408 if (EClass.player.bankMoney >= _i)
1409 {
1410 Choice(Lang._currency(_i, showUnit: true), delegate
1411 {
1412 SE.Pay();
1413 EClass.pc.ModCurrency(_i);
1414 EClass.player.bankMoney -= _i;
1415 TempTalkTopic("banker4", StepDefault);
1416 });
1417 }
1418 }
1419 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1420 });
1421 Step("_disableMove");
1422 Method(delegate
1423 {
1424 c.noMove = true;
1425 c.orgPos = new Point(c.pos);
1426 c.Talk("ok");
1427 });
1428 End();
1429 Step("_enableMove");
1430 Method(delegate
1431 {
1432 c.noMove = false;
1433 c.orgPos = null;
1434 c.Talk("thanks");
1435 });
1436 End();
1437 Step("_bye");
1438 Method(delegate
1439 {
1440 c.Talk("bye");
1441 });
1442 End();
1443 void BackChill()
1444 {
1445 Method(RumorChill, null, StepDefault);
1446 }
1447 string GetTalk(string id)
1448 {
1449 return c.GetTalkText(id);
1450 }
1451 void RumorChill()
1452 {
1453 rumor = GetTalk("chill");
1454 }
1455 void Talk(string idTalk, string idJump)
1456 {
1457 _Talk("tg", GetTalk(idTalk), idJump);
1458 }
1459 void TempCancel()
1460 {
1461 EnableCancel("back");
1462 }
1463 void TempTalk(string idTalk, string idJump)
1464 {
1465 _TempTalk("tg", GetTalk(idTalk), idJump);
1466 }
1467 void TempTalkTopic(string idTopc, string idJump)
1468 {
1469 _TempTalk("tg", GetTopic(c, idTopc), idJump);
1470 }
1471 bool taken()
1472 {
1473 if (c.quest != null)
1474 {
1475 return EClass.game.quests.list.Contains(c.quest);
1476 }
1477 return false;
1478 }
1479 }
BlessedState
Definition: BlessedState.cs:2
BossType
Definition: BossType.cs:2
FactionMemberType
FontColor
Definition: FontColor.cs:2
NameStyle
Definition: NameStyle.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
bool CanInvite()
Definition: Affinity.cs:54
void OnTalkRumor()
Definition: Affinity.cs:140
bool CanSleepBeside()
Definition: Affinity.cs:72
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
bool IsUnderAge
Definition: Biography.cs:278
void SetElement(Element _e, ElementContainer _owner, Mode _mode=Mode.Skill)
static int ExpandLand()
Definition: CalcGold.cs:3
static int Picklock(Chara c, Thing t)
Definition: CalcMoney.cs:30
static int Heal(Chara c)
Definition: CalcMoney.cs:25
static int InvestZone(Chara c)
Definition: CalcMoney.cs:73
static int Identify(Chara c, bool superior)
Definition: CalcMoney.cs:35
static int BuySlave(Chara c)
Definition: CalcMoney.cs:45
static int InvestShop(Chara c, Chara tc)
Definition: CalcMoney.cs:67
static int Whore(Chara seller, Chara buyer)
Definition: CalcMoney.cs:55
static int Meal(Chara c)
Definition: CalcMoney.cs:20
static int Learn(Chara c, Element e)
Definition: CalcPlat.cs:5
static int Train(Chara c, Element _e)
Definition: CalcPlat.cs:15
Thing container_deposit
Definition: CardManager.cs:58
Definition: Card.cs:11
int GetBestAttribute()
Definition: Card.cs:2566
bool isSummon
Definition: Card.cs:694
ElementContainerCard elements
Definition: Card.cs:37
string id
Definition: Card.cs:31
bool HasElement(int ele, int req=1)
Definition: Card.cs:5566
bool c_lockedHard
Definition: Card.cs:1008
bool isLostProperty
Definition: Card.cs:790
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5776
int c_invest
Definition: Card.cs:1265
int c_lockLv
Definition: Card.cs:936
Biography bio
Definition: Card.cs:40
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6326
string Name
Definition: Card.cs:2073
int CHA
Definition: Card.cs:2283
int GetCurrency(string id="money")
Definition: Card.cs:3820
int c_IDTState
Definition: Card.cs:1229
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6450
Point pos
Definition: Card.cs:55
int uid
Definition: Card.cs:118
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5810
void ModCurrency(int a, string id="money")
Definition: Card.cs:3806
int c_dateStockExpire
Definition: Card.cs:1205
bool TryPay(int a, string id="money")
Definition: Card.cs:3770
void Destroy()
Definition: Card.cs:4783
bool noMove
Definition: Card.cs:754
ThingContainer things
Definition: Card.cs:34
virtual bool isChara
Definition: Card.cs:2019
int Evalue(int ele)
Definition: Card.cs:2507
Thing c_copyContainer
Definition: Card.cs:1769
void ModExp(string alias, int a)
Definition: Card.cs:2584
bool IsIdentified
Definition: Card.cs:2313
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6423
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:7469
override bool IsAliveInCurrentZone
Definition: Chara.cs:557
new TraitChara trait
Definition: Chara.cs:499
bool isDrunk
Definition: Chara.cs:124
Chara host
Definition: Chara.cs:33
bool IsMaid
Definition: Chara.cs:893
override bool IsGlobal
Definition: Chara.cs:606
override bool IsPCParty
Definition: Chara.cs:611
Party party
Definition: Chara.cs:43
AIAct SetAI(AIAct g)
Definition: Chara.cs:8189
Stats hunger
Definition: Chara.cs:994
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1314
override bool IsPCFaction
Definition: Chara.cs:667
void SetAIImmediate(AIAct g)
Definition: Chara.cs:8221
List< Hobby > ListHobbies(bool useMemberType=true)
Definition: Chara.cs:8280
FactionMemberType memberType
Definition: Chara.cs:46
SourceThing.Row GetFavFood()
Definition: Chara.cs:7449
bool IsHomeMember()
Definition: Chara.cs:6092
Zone homeZone
Definition: Chara.cs:263
bool IsGuest()
Definition: Chara.cs:6117
Affinity affinity
Definition: Chara.cs:310
Quest quest
Definition: Chara.cs:24
FactionBranch homeBranch
Definition: Chara.cs:932
bool CanInsult()
Definition: Chara.cs:7503
void MoveZone(string alias)
Definition: Chara.cs:3094
bool godMode
Definition: CoreDebug.cs:172
bool showFav
Definition: CoreDebug.cs:225
bool enable
Definition: CoreDebug.cs:285
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
bool IsExpired(int time)
Definition: Date.cs:332
DramaChoice SetCondition(Func< bool > condition)
Definition: DramaChoice.cs:62
DramaChoice DisableSound()
Definition: DramaChoice.cs:44
DramaChoice SetOnClick(Action action)
Definition: DramaChoice.cs:56
void _TempTalk(string idActor, string text, string idJump=null)
void Method(Action action, Func< bool > endFunc=null, string idJump=null)
void EnableCancel(string idCancelJump=null)
void Goto(string idJump)
void _Talk(string idActor, string text, string idJump=null)
DramaChoice Choice2(string lang, string idJump)
string GetTopic(Chara c, string idTopic=null)
bool HasTopic(string idSheet, string idTopic)
DramaChoice Choice(string lang, string idJump, bool cancel=false)
void TempGoto(string idJump=null)
string GetText(Chara c, string idSheet, string idTopic)
void Step(string step)
LayerDrama layer
Definition: DramaManager.cs:13
DramaSequence Load()
string forceJump
Definition: DramaSetup.cs:13
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static int rnd(int a)
Definition: EClass.cs:58
static Zone _zone
Definition: EClass.cs:20
static World world
Definition: EClass.cs:40
static Map _map
Definition: EClass.cs:18
static SourceManager sources
Definition: EClass.cs:42
static FactionBranch Branch
Definition: EClass.cs:22
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static FactionBranch BranchOrHomeBranch
Definition: EClass.cs:24
static CoreDebug debug
Definition: EClass.cs:48
static UI ui
Definition: EClass.cs:16
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
void Train(int ele, int a=10)
void Learn(int ele, int v=1)
Element SetBase(string alias, int v, int potential=0)
bool HasBase(int ele)
Element GetElement(string alias)
int id
Definition: ELEMENT.cs:248
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1097
MeetingManager meetings
ResearchManager researches
string GetHearthHint(int a)
HomeResourceManager resources
void BanishMember(Chara c, bool skipMsg=false)
void AddMemeber(Chara c)
void AddContribution(int a)
Definition: FACTION.cs:318
FactionRelation relation
Definition: FACTION.cs:126
static string refDrama1
Definition: GameLang.cs:6
static string refDrama2
Definition: GameLang.cs:8
static string refDrama3
Definition: GameLang.cs:10
CardManager cards
Definition: Game.cs:155
Zone activeZone
Definition: Game.cs:245
QuestManager quests
Definition: Game.cs:179
override bool IsCurrentZone
Definition: GuildFighter.cs:6
override bool IsCurrentZone
Definition: GuildMage.cs:6
override bool IsCurrentZone
Definition: GuildMerchant.cs:5
override bool IsCurrentZone
Definition: GuildThief.cs:6
Definition: Guild.cs:2
static GuildMerchant Merchant
Definition: Guild.cs:29
static GuildMage Mage
Definition: Guild.cs:25
static GuildFighter Fighter
Definition: Guild.cs:23
static GuildThief Thief
Definition: Guild.cs:27
static Guild GetCurrentGuild()
Definition: Guild.cs:41
Definition: Hobby.cs:4
string Name
Definition: Hobby.cs:9
LayoutGroup layout
Definition: ItemGeneral.cs:19
Definition: Lang.cs:6
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:162
static LayerDragGrid CreateGive(Chara c)
static LayerDragGrid CreateIdentify(Chara cc, bool superior=false, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDrama Instance
Definition: LayerDrama.cs:20
static LayerInventory CreateContainer(Card owner)
static LayerInventory CreateBuy(Card c, CurrencyType currency=CurrencyType.Money, PriceType price=PriceType.Default)
static LayerPeople Create(Mode mode)
Definition: LayerPeople.cs:94
static Chara slaveToBuy
Definition: LayerPeople.cs:22
Definition: Layer.cs:9
Layer SetTitles(string langList, string idHeaderRow=null)
Definition: Layer.cs:688
List< Window > windows
Definition: Layer.cs:116
virtual void Close()
Definition: Layer.cs:463
Layer SetOnKill(Action action)
Definition: Layer.cs:579
bool CanExpand(int a)
Definition: MapBounds.cs:138
MapBounds bounds
Definition: Map.cs:52
List< Meeting > list
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
void RemoveMember(Chara c)
Definition: Party.cs:89
List< Chara > members
Definition: Party.cs:18
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41
static PathManager Instance
Definition: PathManager.cs:16
bool IsCriminal
Definition: Player.cs:1153
Layer SelectDomain(Action onKill=null)
Definition: Player.cs:1357
void ModFame(int a)
Definition: Player.cs:1900
void ModKarma(int a)
Definition: Player.cs:2311
int extraTax
Definition: Player.cs:751
string title
Definition: Player.cs:820
int bankMoney
Definition: Player.cs:733
Definition: Point.cs:9
int x
Definition: Point.cs:36
bool CanGiveBill()
Definition: QuestDebt.cs:43
string GetIdTalk_GiveBill()
Definition: QuestDebt.cs:104
bool gaveBill
Definition: QuestDebt.cs:7
void GiveBill()
Definition: QuestDebt.cs:59
List< Thing > ListDestThing(bool onlyFirst=false)
List< Quest > list
Definition: QuestManager.cs:11
int CountRandomQuest()
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
Quest Get(string id)
Definition: Quest.cs:7
virtual bool IsRandomQuest
Definition: Quest.cs:237
int uid
Definition: Quest.cs:34
virtual string RefDrama2
Definition: Quest.cs:208
virtual string GetTalkComplete()
Definition: Quest.cs:680
virtual bool UseInstanceZone
Definition: Quest.cs:183
string TextDeadline
Definition: Quest.cs:136
virtual string RefDrama1
Definition: Quest.cs:196
int deadline
Definition: Quest.cs:46
virtual string RefDrama3
Definition: Quest.cs:220
int bonusMoney
Definition: Quest.cs:55
Chara chara
Definition: Quest.cs:105
virtual string GetTitle()
Definition: Quest.cs:608
virtual string NameDeliver
Definition: Quest.cs:239
virtual string GetTalkProgress()
Definition: Quest.cs:675
virtual string GetDetail(bool onJournal=false)
Definition: Quest.cs:628
virtual bool Deliver(Chara c, Thing t=null)
Definition: Quest.cs:706
virtual Zone CreateInstanceZone(Chara c)
Definition: Quest.cs:323
Zone CreateRandomSite(Zone center, int radius=8, string idSource=null, bool updateMesh=true, int lv=0)
Definition: Region.cs:120
void AddPlan(string id)
bool IsListBarter(string idPlan)
void WriteNote(UINote n)
Definition: ResearchPlan.cs:54
static ResearchPlan Create(string id)
SourceResearch.Row source
Definition: ResearchPlan.cs:23
SourceResearch researches
SourceElement elements
static Zone CreateInstance(string id, ZoneInstance instance)
Definition: SpatialGen.cs:39
int investment
Definition: Spatial.cs:226
virtual string Name
Definition: Spatial.cs:495
SourceZone.Row source
Definition: Spatial.cs:441
string id
Definition: Spatial.cs:13
int development
Definition: Spatial.cs:238
override int GetPhase()
Definition: Stats.cs:117
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
void SetSize(int w, int h)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
Definition: Thing.cs:8
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Thing.cs:841
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:498
virtual bool CanBout
Definition: TraitChara.cs:91
virtual bool CanServeFood
Definition: TraitChara.cs:87
virtual bool CanInvest
Definition: TraitChara.cs:43
virtual bool CanWhore
Definition: TraitChara.cs:85
virtual bool HaveNews
Definition: TraitChara.cs:89
virtual bool CanRevive
Definition: TraitChara.cs:35
virtual bool CanBeBanished
Definition: TraitChara.cs:63
virtual bool CanJoinParty
Definition: TraitChara.cs:47
virtual bool CanIdentify
Definition: TraitChara.cs:39
virtual bool IsUnique
Definition: TraitChara.cs:33
virtual bool CanInvestTown
Definition: TraitChara.cs:69
virtual string IDTrainer
Definition: TraitChara.cs:45
virtual bool CanInvite
Definition: TraitChara.cs:65
virtual bool CanPicklock
Definition: TraitChara.cs:41
virtual bool CanGuide
Definition: TraitChara.cs:37
virtual bool CanJoinPartyResident
Definition: TraitChara.cs:50
virtual bool CanHeal
Definition: TraitChara.cs:83
virtual CopyShopType CopyShop
Definition: Trait.cs:507
void OnBarter()
Definition: Trait.cs:1493
virtual ShopType ShopType
Definition: Trait.cs:511
virtual PriceType PriceType
Definition: Trait.cs:515
string TextNextRestockPet
Definition: Trait.cs:551
string TextNextRestock
Definition: Trait.cs:549
virtual CurrencyType CurrencyType
Definition: Trait.cs:513
virtual SlaverType SlaverType
Definition: Trait.cs:545
virtual int ShopLv
Definition: Trait.cs:505
virtual int NumCopyItem
Definition: Trait.cs:509
virtual bool AllowCriminal
Definition: Trait.cs:541
void SetTooltip(Action< UITooltip > onShowTooltip=null, bool enable=true)
Definition: UIButton.cs:361
static void TryShowTip(Transform root=null, bool highlight=true, bool ignoreWhenRightClick=true)
Definition: UIButton.cs:778
Definition: UIItem.cs:5
UIButton button1
Definition: UIItem.cs:18
UIText text1
Definition: UIItem.cs:6
Definition: UIList.cs:9
override void Add(object item)
Definition: UIList.cs:302
override void Redraw()
Definition: UIList.cs:740
override void List()
Definition: UIList.cs:717
void SetText(string s)
Definition: UIText.cs:159
UINote note
Definition: UITooltip.cs:21
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
static WidgetFeed Instance
Definition: WidgetFeed.cs:14
Region region
Definition: World.cs:23
GameDate date
Definition: World.cs:6
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
Definition: Zone.cs:12
Dictionary< int, string > dictCitizen
Definition: Zone.cs:49
ZoneEventManager events
Definition: Zone.cs:40
FactionBranch branch
Definition: Zone.cs:34
virtual bool IsUserZone
Definition: Zone.cs:266
bool IsInstance
Definition: Zone.cs:482
virtual bool AllowInvest
Definition: Zone.cs:245
Chara FindChara(string id)
Definition: Zone.cs:2909
virtual bool AllowCriminal
Definition: Zone.cs:242
void ModInfluence(int a)
Definition: Zone.cs:3405
bool IsPCFaction
Definition: Zone.cs:466
void ModDevelopment(int a)
Definition: Zone.cs:3415

References _Talk(), EClass._zone, Chara.affinity, Zone.AllowInvest, Card.bio, Zone.branch, Card.c_lockLv, Affinity.CanInvite(), Quest.chara, Choice2(), World.date, EClass.debug, destCard, destQuest, destThing, Zone.dictCitizen, DramaChoice.DisableSound(), CoreDebug.enable, Zone.FindChara(), ThingContainer.Foreach(), EClass.game, Guild.GetCurrentGuild(), Chara.GetFavCat(), Chara.GetFavFood(), BaseCard.GetInt(), GetListGuide(), Thing.GetName(), Date.GetRaw(), GetRumor(), GetText(), Quest.GetTitle(), Card.HasElement(), HasTopic(), Card.id, idCustom, Chara.IsAliveInCurrentZone, GuildMerchant.IsCurrentZone, Date.IsExpired(), Chara.IsGlobal, Zone.IsInstance, Card.isLostProperty, FactionRelation.IsMember(), Chara.IsPCFaction, Zone.IsPCFaction, Quest.IsRandomQuest, Biography.IsUnderAge, TraitChara.IsUnique, Zone.IsUserZone, item, QuestManager.list, ThingContainer.List(), Chara.ListHobbies(), Guild.Mage, Guild.Merchant, Card.Name, Hobby.Name, UITooltip.note, Affinity.OnTalkRumor(), EClass.pc, Game.quests, FactionRelation.rank, Faction.relation, EClass.rnd(), DramaChoice.SetCondition(), DramaChoice.SetOnClick(), CoreDebug.showFav, Spatial.source, Step(), StepDefault, Card.things, Chara.trait, EClass.world, and Thing.WriteNote().

Referenced by DramaManager.AddCustomEvents().

◆ BuildTextData()

void DramaCustomSequence.BuildTextData ( )
inline

Definition at line 1547 of file DramaCustomSequence.cs.

1548 {
1549 Step("import");
1550 string[] array = setup.textData.Split(new string[1] { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
1551 foreach (string text in array)
1552 {
1553 if (!(text == Environment.NewLine))
1554 {
1555 _Talk("", text.TrimStart(Environment.NewLine.ToCharArray()).TrimEnd(Environment.NewLine.ToCharArray()));
1556 }
1557 }
1558 End();
1559 }
string textData
Definition: DramaSetup.cs:11

References DramaSetup.textData.

Referenced by DramaManager.AddCustomEvents().

◆ Choice() [1/2]

DramaChoice DramaCustomSequence.Choice ( string  lang,
Action  onJump 
)
inline

Definition at line 1652 of file DramaCustomSequence.cs.

1653 {
1654 DramaChoice dramaChoice = new DramaChoice(lang.lang(), null);
1655 dramaChoice.onJump = onJump;
1656 manager.lastTalk.AddChoice(dramaChoice);
1657 return dramaChoice;
1658 }
void AddChoice(DramaChoice choice)

References DramaEventTalk.AddChoice(), and DramaManager.lastTalk.

◆ Choice() [2/2]

DramaChoice DramaCustomSequence.Choice ( string  lang,
string  idJump,
bool  cancel = false 
)
inline

Definition at line 1641 of file DramaCustomSequence.cs.

1642 {
1643 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1644 manager.lastTalk.AddChoice(dramaChoice);
1645 if (cancel)
1646 {
1647 EnableCancel(idJump);
1648 }
1649 return dramaChoice;
1650 }

References DramaEventTalk.AddChoice(), and DramaManager.lastTalk.

◆ Choice2()

DramaChoice DramaCustomSequence.Choice2 ( string  lang,
string  idJump 
)
inline

Definition at line 1660 of file DramaCustomSequence.cs.

1661 {
1662 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1663 manager.lastTalk.AddChoice(dramaChoice);
1664 sequence.manager._choices.Add(dramaChoice);
1665 return dramaChoice;
1666 }
List< DramaChoice > _choices
Definition: DramaManager.cs:49
DramaManager manager

References DramaManager._choices, DramaEventTalk.AddChoice(), DramaManager.lastTalk, and DramaSequence.manager.

Referenced by Build().

◆ EnableCancel()

void DramaCustomSequence.EnableCancel ( string  idCancelJump = null)
inline

Definition at line 1668 of file DramaCustomSequence.cs.

1669 {
1670 manager.lastTalk.canCancel = true;
1671 manager.lastTalk.idCancelJump = idCancelJump;
1672 }

◆ End()

void DramaCustomSequence.End ( )
inline

Definition at line 1588 of file DramaCustomSequence.cs.

1589 {
1590 Event(new DramaEventGoto("end"));
1591 }

◆ Event()

DramaEvent DramaCustomSequence.Event ( DramaEvent  e)
inline

Definition at line 1561 of file DramaCustomSequence.cs.

1562 {
1563 events.Add(e);
1564 e.sequence = sequence;
1565 return e;
1566 }
List< DramaEvent > events

◆ GetListGuide()

List< Card > DramaCustomSequence.GetListGuide ( )
inline

Definition at line 1674 of file DramaCustomSequence.cs.

1675 {
1676 List<Card> list = new List<Card>();
1677 foreach (Thing thing in EClass._map.things)
1678 {
1679 if (thing.IsInstalled && thing.trait.GuidePriotiy > 0)
1680 {
1681 list.Add(thing);
1682 }
1683 }
1684 foreach (Chara chara in EClass._map.charas)
1685 {
1686 if (!chara.IsPCParty && chara.trait.GuidePriotiy > 0)
1687 {
1688 list.Add(chara);
1689 }
1690 }
1691 list.Sort((Card a, Card b) => b.trait.GuidePriotiy - a.trait.GuidePriotiy);
1692 return list;
1693 }
Trait trait
Definition: Card.cs:49
bool IsInstalled
Definition: Card.cs:2317
List< Thing > things
Definition: Map.cs:49
List< Chara > charas
Definition: Map.cs:81
virtual int GuidePriotiy
Definition: Trait.cs:98

References EClass._map, UIList.Add(), Map.charas, Trait.GuidePriotiy, Card.IsInstalled, Chara.IsPCParty, UIList.Sort(), Map.things, Card.trait, and Chara.trait.

Referenced by Build().

◆ GetRumor()

string DramaCustomSequence.GetRumor ( Chara  c)
inline

Definition at line 1481 of file DramaCustomSequence.cs.

1482 {
1483 if (c.interest <= 0)
1484 {
1485 return GetText(c, "rumor", "bored");
1486 }
1487 if (HasTopic("unique", c.id))
1488 {
1489 manager.enableTone = false;
1490 return GetText(c, "unique", c.id);
1491 }
1492 if (EClass.rnd(2) == 0 && !c.trait.IDRumor.IsEmpty())
1493 {
1494 return GetText(c, "rumor", c.trait.IDRumor);
1495 }
1496 if (EClass.rnd(2) == 0 && HasTopic("zone", EClass._zone.id))
1497 {
1498 return GetText(c, "zone", EClass._zone.id);
1499 }
1500 if (EClass.rnd(2) == 0)
1501 {
1502 return GetText(c, "rumor", "interest_" + c.bio.idInterest.ToEnum<Interest>());
1503 }
1504 if (EClass.rnd(2) == 0)
1505 {
1506 return c.GetTalkText("rumor");
1507 }
1508 if (EClass.rnd(4) == 0)
1509 {
1510 return GetText(c, "rumor", "hint");
1511 }
1512 return GetText(c, "rumor", "default");
1513 }
Interest
Definition: Interest.cs:2
int idInterest
Definition: Biography.cs:245
int interest
Definition: Chara.cs:313
virtual string IDRumor
Definition: TraitChara.cs:135

References EClass._zone, Card.bio, Card.GetTalkText(), Card.id, Spatial.id, Biography.idInterest, TraitChara.IDRumor, Chara.interest, EClass.rnd(), and Chara.trait.

Referenced by Build().

◆ GetText()

string DramaCustomSequence.GetText ( Chara  c,
string  idSheet,
string  idTopic 
)
inline

Definition at line 1528 of file DramaCustomSequence.cs.

1529 {
1530 if (!idTopic.IsEmpty() && manager.customTalkTopics.ContainsKey(idTopic))
1531 {
1532 return manager.customTalkTopics[idTopic];
1533 }
1534 string[] dialog = Lang.GetDialog(idSheet, idTopic);
1535 if (!manager.enableTone && !(idSheet == "general"))
1536 {
1537 return dialog.RandomItem();
1538 }
1539 return c.ApplyTone(dialog.RandomItem());
1540 }
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:6469
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:51
static string[] GetDialog(string idSheet, string idTopic)
Definition: Lang.cs:205

References Card.ApplyTone(), DramaManager.customTalkTopics, DramaManager.enableTone, and Lang.GetDialog().

Referenced by Build().

◆ GetTopic()

string DramaCustomSequence.GetTopic ( Chara  c,
string  idTopic = null 
)
inline

Definition at line 1542 of file DramaCustomSequence.cs.

1543 {
1544 return GetText(c, "general", idTopic);
1545 }

◆ Goto()

void DramaCustomSequence.Goto ( string  idJump)
inline

Definition at line 1593 of file DramaCustomSequence.cs.

1594 {
1595 Event(new DramaEventGoto(idJump));
1596 }

◆ GotoDefault()

void DramaCustomSequence.GotoDefault ( )
inline

Definition at line 1598 of file DramaCustomSequence.cs.

1599 {
1601 }

◆ HasTopic()

bool DramaCustomSequence.HasTopic ( string  idSheet,
string  idTopic 
)
inline

Definition at line 1515 of file DramaCustomSequence.cs.

1516 {
1517 string path = CorePath.CorePackage.TextDialog + "dialog.xlsx";
1518 if (!File.Exists(path))
1519 {
1520 return false;
1521 }
1522 ExcelData excelData = new ExcelData();
1523 excelData.path = path;
1524 excelData.BuildMap(idSheet);
1525 return excelData.sheets[idSheet].map.ContainsKey(idTopic);
1526 }
Dictionary< string, Sheet > sheets
Definition: ExcelData.cs:25
virtual void BuildMap(string sheetName="_default")
Definition: ExcelData.cs:77

References ExcelData.BuildMap(), and ExcelData.sheets.

Referenced by Build().

◆ Method()

void DramaCustomSequence.Method ( Action  action,
Func< bool >  endFunc = null,
string  idJump = null 
)
inline

Definition at line 1576 of file DramaCustomSequence.cs.

1577 {
1578 Event(new DramaEventMethod(action)
1579 {
1580 endFunc = endFunc
1581 });
1582 if (!idJump.IsEmpty())
1583 {
1584 Event(new DramaEventGoto(idJump));
1585 }
1586 }

◆ Step()

void DramaCustomSequence.Step ( string  step)
inline

Definition at line 1568 of file DramaCustomSequence.cs.

1569 {
1570 Event(new DramaEvent
1571 {
1572 step = step
1573 });
1574 }

Referenced by Build().

◆ TempGoto()

void DramaCustomSequence.TempGoto ( string  idJump = null)
inline

Definition at line 1635 of file DramaCustomSequence.cs.

1636 {
1637 sequence.tempEvents.Clear();
1638 sequence.Play(idJump);
1639 }
void Play(string id)

References DramaSequence.Play(), and DramaSequence.tempEvents.

Member Data Documentation

◆ destCard

Card DramaCustomSequence.destCard

Definition at line 9 of file DramaCustomSequence.cs.

Referenced by Build().

◆ destChara

Chara DramaCustomSequence.destChara

Definition at line 11 of file DramaCustomSequence.cs.

◆ destQuest

Quest DramaCustomSequence.destQuest

Definition at line 13 of file DramaCustomSequence.cs.

Referenced by Build().

◆ destThing

Thing DramaCustomSequence.destThing

Definition at line 15 of file DramaCustomSequence.cs.

Referenced by Build().

◆ events

List<DramaEvent> DramaCustomSequence.events

Definition at line 25 of file DramaCustomSequence.cs.

◆ idCustom

string DramaCustomSequence.idCustom

Definition at line 19 of file DramaCustomSequence.cs.

Referenced by Build().

◆ idDefault

string DramaCustomSequence.idDefault

Definition at line 17 of file DramaCustomSequence.cs.

◆ manager

DramaManager DramaCustomSequence.manager

Definition at line 27 of file DramaCustomSequence.cs.

◆ sequence

DramaSequence DramaCustomSequence.sequence

Definition at line 23 of file DramaCustomSequence.cs.

◆ setup

DramaSetup DramaCustomSequence.setup

Definition at line 21 of file DramaCustomSequence.cs.

Property Documentation

◆ StepDefault

string DramaCustomSequence.StepDefault
get

Definition at line 29 of file DramaCustomSequence.cs.

Referenced by Build().

◆ StepEnd

string DramaCustomSequence.StepEnd
get

Definition at line 31 of file DramaCustomSequence.cs.


The documentation for this class was generated from the following file: