Elin Decompiled Documentation EA 23.245 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 (long a)
 
static int rnd (int a)
 
static int curve (int _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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 1702 of file DramaCustomSequence.cs.

1703 {
1704 manager.lastTalk = Event(new DramaEventTalk
1705 {
1706 idActor = idActor,
1707 idJump = idJump,
1708 funcText = funcText
1709 }) as DramaEventTalk;
1710 }
DramaEvent Event(DramaEvent e)

◆ _Talk() [2/2]

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

Definition at line 1692 of file DramaCustomSequence.cs.

1693 {
1694 manager.lastTalk = Event(new DramaEventTalk
1695 {
1696 idActor = idActor,
1697 idJump = idJump,
1698 text = text
1699 }) as DramaEventTalk;
1700 }

Referenced by Build().

◆ _TempTalk()

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

Definition at line 1712 of file DramaCustomSequence.cs.

1713 {
1714 manager.lastTalk = Event(new DramaEventTalk
1715 {
1716 idActor = idActor,
1717 idJump = idJump,
1718 text = text,
1719 temp = true
1720 }) as DramaEventTalk;
1722 }
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(c) || EClass.pc.bio.IsUnderAge(EClass.pc);
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(37) + 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 if (!c.IsDisabled && (c.HasElement(1250) || (EClass.pc.IsMofuable && c.ability.Has(6627))))
298 {
299 Choice2("daSuck", "_suck");
300 }
301 Choice2("daFactionOther", "_factionOther");
302 }
303 if (c.trait is TraitLoytel && EClass.game.quests.Get<QuestDebt>() != null)
304 {
305 Choice2("daGreatDebt", "_greatDebt");
306 }
307 if (!flag)
308 {
309 Choice2("bye", "_bye");
310 EnableCancel();
311 }
312 Step("_factionOther");
313 Talk("what", StepDefault);
314 if (c.trait is TraitLoytel)
315 {
316 QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
317 if (questDebt != null && questDebt.gaveBill)
318 {
319 Choice("daGreatDebt2", "_greatDebt2");
320 }
321 }
322 if (c.IsPCParty)
323 {
324 if (!c.isSummon)
325 {
326 Choice((c.GetInt(106) == 0) ? "daShutup" : "daShutup2", "_shutup");
327 if (c.CanInsult() || c.GetInt(108) == 1)
328 {
329 Choice((c.GetInt(108) == 0) ? "daInsult" : "daInsult2", "_insult");
330 }
331 }
332 }
333 else if (!c.noMove)
334 {
335 Choice("disableMove", "_disableMove");
336 }
337 Choice((c.GetInt(123) == 0) ? "daSleepBeside" : "daSleepBeside2", "_sleepBeside");
338 if (c.HasElement(1225))
339 {
340 Choice((c.GetInt(126) == 0) ? "daDisableLoyal" : "daDisableLoyal2", "_disableLoyal");
341 }
342 if (c.GetInt(113) == 0)
343 {
344 Choice("daEquipSharedOff", "_toggleSharedEquip");
345 }
346 else
347 {
348 Choice("daEquipSharedOn", "_toggleSharedEquip");
349 }
350 if (!c.IsMaid && c.homeBranch == EClass.Branch)
351 {
352 Choice("daMakeMaid", "_daMakeMaid");
353 }
354 if (c.trait.CanBeBanished && !c.IsPCParty)
355 {
356 Choice("daBanish", "_depart");
357 }
358 Choice("daNothing", StepDefault, cancel: true);
359 Step("_toggleSharedEquip");
360 Method(delegate
361 {
362 c.SetInt(113, (c.GetInt(113) == 0) ? 1 : 0);
363 });
364 _Talk("tg", GetTopic(c, (c.GetInt(113) == 0) ? "shutup" : "shutup2"));
365 End();
366 Step("_daMakeMaid");
367 Method(delegate
368 {
369 EClass.Branch.uidMaid = c.uid;
370 });
371 _Talk("tg", GetTopic(c, "becomeMaid"));
372 End();
373 Step("_joinParty");
374 Method(delegate
375 {
377 {
378 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
379 TempTalkTopic("invite3", StepDefault);
380 }
381 else
382 {
383 EClass.pc.party.AddMemeber(c, showMsg: true);
384 }
385 });
386 Talk("hired", StepEnd);
387 Step("_leaveParty");
388 Method(delegate
389 {
392 {
393 EClass.pc.Say("tame_send", c, c.homeZone.Name);
394 c.MoveZone(c.homeZone);
395 }
396 });
397 Goto("_bye");
398 Step("_banish");
399 Goto("_bye");
400 Step("_makeLivestock");
401 Method(delegate
402 {
403 c.memberType = FactionMemberType.Livestock;
404 });
405 Talk("becomeLivestock", StepEnd);
406 Step("_makeResident");
407 Method(delegate
408 {
409 c.memberType = FactionMemberType.Default;
410 });
411 Talk("becomeResident", StepEnd);
412 Step("_depart");
413 Talk("depart_choice", StepDefault);
414 Choice("depart1", "_depart1");
415 Choice("depart2", "_depart2");
416 Step("_depart1");
417 Method(delegate
418 {
420 {
422 });
423 });
424 Talk("depart1", StepEnd);
425 Step("_depart2");
426 Talk("depart2", StepDefault);
427 Step("_gift");
428 Talk("gift_good", null);
429 End();
430 Step("_goto");
431 Method(delegate
432 {
433 GameLang.refDrama1 = destCard.Name;
434 if (destCard == c)
435 {
436 TempTalkTopic("goto2", StepDefault);
437 }
438 else
439 {
440 TempTalkTopic("goto", "_goto2");
441 }
442 });
443 Step("_goto2");
444 Method(delegate
445 {
447 {
448 destCard.Teleport(EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true) ?? EClass.pc.pos, silent: true, force: true);
449 }
451 EInput.Consume(consumeAxis: false, 20);
452 });
453 End();
454 Step("_rumor");
455 Talk("rumor", StepDefault);
456 Step("_lostProperty");
457 Method(delegate
458 {
459 GameLang.refDrama1 = destThing.Name;
462 });
463 _Talk("tg", GetTopic(c, "deliver_purse"), StepEnd);
464 _ = c.quest;
465 string text = ((!setup.forceJump.IsEmpty()) ? StepEnd : StepDefault);
466 Step("_deliver");
467 Method(delegate
468 {
469 GameLang.refDrama1 = destQuest.NameDeliver;
471 });
472 _Talk("tg", () => (destQuest != null) ? destQuest.GetTalkComplete().IsEmpty(GetTopic(c, (destQuest.bonusMoney > 0) ? "questCompleteDeliverExtra" : "questCompleteDeliver")) : "", StepEnd);
473 Step("_quest");
474 _Talk("tg", delegate
475 {
476 if (c.quest == null)
477 {
478 return "";
479 }
483 return (!taken()) ? c.quest.GetDetail() : c.quest.GetTalkProgress().IsEmpty(GetTopic(c, "questInProgress"));
484 }, text);
485 string text2 = "daAccept".lang();
486 if (c.quest != null && c.quest.deadline != 0)
487 {
488 text2 += "hintDeadline".lang(c.quest.TextDeadline).ToLower();
489 }
490 Choice(text2, (c.quest != null && c.quest.UseInstanceZone) ? "_questAccept_instance" : "_questAccept").SetOnClick(delegate
491 {
493 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() < 5);
494 Choice(text2, "_questFull").SetOnClick(delegate
495 {
496 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() >= 5);
497 Choice("daDecline", text).SetOnClick(RumorChill).SetCondition(() => !taken());
498 if (c.quest != null && EClass.game.quests.Get(c.quest.uid) == null)
499 {
500 QuestSupply supply = c.quest as QuestSupply;
501 if (supply != null)
502 {
503 foreach (Thing item5 in supply.ListDestThing())
504 {
505 Thing _t2 = item5;
506 Choice("daDeliver".lang(supply.GetTitle() ?? "", _t2.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
507 {
509 destThing = _t2;
510 destQuest = supply;
511 }).SetOnTooltip(delegate(UITooltip a)
512 {
513 _t2.WriteNote(a.note);
514 });
515 }
516 }
517 }
518 EnableCancel(text);
519 Step("_questAccept");
520 _Talk("tg", GetTopic(c, "questAccept"), StepEnd);
521 Step("_questAccept_instance");
522 _Talk("tg", GetTopic(c, "questAccept"));
523 Method(delegate
524 {
525 Zone z2 = c.quest.CreateInstanceZone(c);
527 }, null, StepEnd);
528 Step("_questFull");
529 _Talk("tg", GetTopic(c, "questFull"), text);
530 Step("_greatDebt");
531 Method(delegate
532 {
533 QuestDebt questDebt3 = EClass.game.quests.Get<QuestDebt>();
534 if (!questDebt3.CanGiveBill())
535 {
536 TempTalkTopic("loytel_bill_give_wait", StepDefault);
537 }
538 else if (questDebt3.gaveBill)
539 {
540 TempTalkTopic("loytel_bill_give_given", StepDefault);
541 }
542 else
543 {
544 TempTalkTopic(questDebt3.GetIdTalk_GiveBill(), StepEnd);
545 questDebt3.GiveBill();
546 }
547 });
548 Step("_greatDebt2");
549 Method(delegate
550 {
551 QuestDebt questDebt2 = EClass.game.quests.Get<QuestDebt>();
552 TempTalkTopic("loytel_bill_give_lost", StepEnd);
553 questDebt2.GiveBill();
554 });
555 Step("_shutup");
556 Method(delegate
557 {
558 c.SetInt(106, (c.GetInt(106) == 0) ? 1 : 0);
559 });
560 _Talk("tg", GetTopic(c, (c.GetInt(106) == 0) ? "shutup" : "shutup2"));
561 End();
562 Step("_sleepBeside");
563 Method(delegate
564 {
565 if (c.affinity.CanSleepBeside() || c.GetInt(123) == 1)
566 {
567 c.SetInt(123, (c.GetInt(123) == 0) ? 1 : 0);
568 }
569 else
570 {
571 TempTalkTopic("refuse", StepEnd);
572 }
573 });
574 _Talk("tg", GetTopic(c, (c.GetInt(123) == 0) ? "ok" : "shutup"));
575 End();
576 Step("_disableLoyal");
577 Method(delegate
578 {
579 c.SetInt(126, (c.GetInt(126) == 0) ? 1 : 0);
580 });
581 _Talk("tg", GetTopic(c, (c.GetInt(126) == 0) ? "shutup" : "shutup2"));
582 End();
583 Step("_suck");
584 _Talk("tg", GetTalk("pervert4"));
585 Method(delegate
586 {
587 if (c.HasElement(1250))
588 {
589 c.UseAbility("ActBloodsuck", EClass.pc);
590 }
591 else
592 {
593 c.Sniff(EClass.pc);
594 }
596 });
597 End();
598 Step("_insult");
599 Method(delegate
600 {
601 c.SetInt(108, (c.GetInt(108) == 0) ? 1 : 0);
602 });
603 _Talk("tg", GetTopic(c, (c.GetInt(108) == 0) ? "insult" : "insult2"));
604 Method(delegate
605 {
606 if (c.GetInt(108) == 1)
607 {
608 c.Talk("insult");
609 }
610 });
611 End();
612 Step("_makeHome");
613 Method(delegate
614 {
616 });
617 _Talk("tg", GetTopic(c, "ok"));
618 End();
619 Step("_hire");
620 Talk("rumor", StepDefault);
621 Choice("daAccept", StepDefault).SetOnClick(delegate
622 {
623 });
624 Choice("daDecline", StepDefault).SetOnClick(delegate
625 {
626 });
627 Step("_invite");
628 Method(delegate
629 {
630 if (!c.trait.CanInvite)
631 {
632 string[] recruitItems = c.source.recruitItems;
633 if (!recruitItems.IsEmpty())
634 {
635 string[] array3 = recruitItems[0].Split('/');
636 string reqId = array3[0];
637 int reqNum = array3[1].ToInt();
638 CardBlueprint.Set(CardBlueprint.Original);
639 GameLang.refDrama1 = ThingGen.Create(reqId).SetNum(reqNum).Name;
640 TempTalkTopic("inviteReq1", null);
641 foreach (Thing t2 in EClass.pc.things.List((Thing t) => t.id == reqId && t.Num >= reqNum, onlyAccessible: true))
642 {
643 Thing _t5 = t2;
644 Choice("daDeliver".lang("", _t5.GetName(NameStyle.Full, _t5.Num)), delegate
645 {
646 t2.ModNum(-reqNum);
647 TempTalk("hired", StepEnd);
648 EClass.Sound.Play("good");
649 c.MakeAlly();
650 }).SetOnTooltip(delegate(UITooltip a)
651 {
652 _t5.WriteNote(a.note);
653 });
654 }
655 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
656 }
657 else
658 {
659 TempTalkTopic("invite2", StepDefault);
660 }
661 }
662 else if (c.GetBestAttribute() > EClass.pc.CHA && !EClass.debug.godMode)
663 {
664 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
665 TempTalkTopic("invite3", StepDefault);
666 }
667 else
668 {
669 TempTalkTopic("invite", null);
670 Choice("yes", delegate
671 {
672 TempTalk("hired", StepEnd);
673 EClass.Sound.Play("good");
674 c.MakeAlly();
675 });
676 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
677 }
678 });
679 Step("_Guide");
680 Method(delegate
681 {
682 TempTalkTopic("guide", null);
683 foreach (Card guide in GetListGuide())
684 {
685 Choice("daGotoGuide".lang(guide.Name, ""), "_goto").SetOnClick(delegate
686 {
687 destCard = guide;
688 });
689 }
690 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
691 TempCancel();
692 });
693 BackChill();
694 Step("_tail");
695 Method(delegate
696 {
697 TempTalkTopic(bird + "1", null);
698 Choice("yes2", delegate
699 {
700 TempTalkTopic(bird + "2", StepEnd);
702 {
703 target = c,
704 sell = true
705 });
706 });
707 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
708 });
709 Step("_whore");
710 Method(delegate
711 {
712 int costWhore = CalcMoney.Whore(c, EClass.pc);
713 GameLang.refDrama1 = costWhore.ToString() ?? "";
714 TempTalkTopic(bird + "3", null);
715 Choice("yes2", delegate
716 {
717 if (EClass.pc.GetCurrency() < costWhore)
718 {
719 TempTalkTopic("nomoney", StepDefault);
720 }
721 else
722 {
723 SE.Pay();
724 EClass.pc.ModCurrency(-costWhore);
725 TempTalkTopic(bird + "2", StepEnd);
726 EClass.pc.SetAI(new AI_Fuck
727 {
728 target = c
729 });
730 }
731 });
732 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
733 });
734 Step("_picklock");
735 Method(delegate
736 {
737 int cost8 = CalcMoney.Picklock(EClass.pc, destThing);
738 GameLang.refDrama1 = cost8.ToString() ?? "";
739 TempTalkTopic("bird3", null);
740 Choice("yes2", delegate
741 {
743 {
744 TempTalkTopic("lockTooHard", StepDefault);
745 }
746 else if (EClass.pc.GetCurrency() < cost8)
747 {
748 TempTalkTopic("nomoney", StepDefault);
749 }
750 else
751 {
752 SE.Pay();
753 EClass.pc.ModCurrency(-cost8);
754 manager.layer.SetOnKill(delegate
755 {
756 c.PlaySound("lock_open");
757 c.Say("lockpick_success", c, destThing);
758 c.ModExp(280, 200 + destThing.c_lockLv * 20);
759 destThing.c_lockLv = 0;
760 if (destThing.isLostProperty)
761 {
762 EClass.player.ModKarma(-8);
763 }
764 destThing.isLostProperty = false;
765 });
766 TempTalkTopic(destThing.isLostProperty ? "lockpick_purse" : "bird2", StepEnd);
767 }
768 });
769 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
770 });
771 Step("_bloom");
772 Method(delegate
773 {
774 TempTalkTopic("blooming1", null);
775 foreach (Chara item6 in EClass.pc.party.members.Where((Chara c2) => c2.CanBloom()))
776 {
777 Chara c4 = item6;
778 Choice("daBloom".lang(c4.Name), delegate
779 {
780 if (EClass._zone.influence < 10)
781 {
782 TempTalkTopic("blooming3", StepDefault);
783 }
784 else
785 {
786 EClass._zone.ModInfluence(-10);
787 LayerDrama.Instance.SetOnKill(delegate
788 {
789 c.Talk("goodBoy");
790 c4.Say("dingExp", c);
791 c4.Talk("insulted");
792 c4.SetFeat(1273, 1, msg: true);
793 c4.PlayEffect("aura_heaven");
794 c4.feat += 10;
795 EClass.pc.PlaySound("pray");
796 });
797 TempTalkTopic("blooming2", StepEnd);
798 }
799 });
800 }
801 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
802 });
803 Step("_buy");
804 Method(delegate
805 {
806 if (c.id == "miral")
807 {
808 SE.Play("click_chat");
809 if (EClass.pc.GetCurrency("medal") > 0)
810 {
811 TempTalkTopic("miral_medal", null);
812 }
813 else
814 {
815 TempTalkTopic("miral_medal2", StepDefault);
816 }
817 }
818 });
819 Method(delegate
820 {
821 if (c.trait is TraitMerchantBlack && Guild.Thief.relation.rank < 4 && (Guild.Thief.IsCurrentZone || (!(EClass._zone.id == "derphy") && !(EClass._zone.id == "kapul") && !EClass._zone.IsPCFaction)))
822 {
823 SE.Play("click_chat");
824 TempTalkTopic("shop_blackmarket_noaccess", StepEnd);
825 }
827 {
828 SE.Play("click_chat");
829 TempTalkTopic("shop_criminal", StepEnd);
830 }
831 else
832 {
833 sequence.Exit();
834 manager.layer.Close();
835 c.trait.OnBarter();
836 if ((bool)WidgetFeed.Instance)
837 {
838 WidgetFeed.Instance.Talk(c, "barter");
839 }
841 }
842 }, () => !layer, StepDefault);
843 Step("_buyPlan");
844 Method(delegate
845 {
846 List<ResearchPlan> plans = new List<ResearchPlan>();
847 foreach (SourceResearch.Row row in EClass.sources.researches.rows)
848 {
850 {
851 plans.Add(ResearchPlan.Create(row.id));
852 }
853 }
854 EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
855 {
856 list.moldItem = Resources.Load<ItemGeneral>("UI/Element/Item/ItemGeneralBarter").transform;
857 list.callbacks = new UIList.Callback<ResearchPlan, ItemGeneral>
858 {
859 onInstantiate = delegate(ResearchPlan a, ItemGeneral b)
860 {
861 b.button1.mainText.text = a.Name;
862 UIItem uIItem = Util.Instantiate<UIItem>("UI/Element/Item/Extra/costBarter", b.layout);
864 uIItem.text1.SetText(c3.cost.ToString() ?? "", (c3.resource.value >= c3.cost) ? FontColor.Good : FontColor.Bad);
865 uIItem.image1.sprite = c3.resource.Sprite;
866 b.button1.SetTooltip(delegate(UITooltip t)
867 {
868 a.WriteNote(t.note);
869 });
870 b.button1.onClick.AddListener(delegate
871 {
872 if (c3.resource.value < c3.cost)
873 {
874 SE.Beep();
875 }
876 else
877 {
878 c3.resource.Mod(-c3.cost);
879 plans.Remove(a);
881 SE.Pay();
882 list.List(refreshHighlight: true);
883 }
884 });
885 b.RebuildLayout(recursive: true);
886 },
887 onList = delegate
888 {
889 foreach (ResearchPlan item7 in plans)
890 {
891 list.Add(item7);
892 }
893 }
894 };
895 }).SetSize()
896 .windows[0].AttachCurrency().Build(new UICurrency.Options
897 {
898 branchMoney = true
899 });
900 }, () => !layer, StepDefault);
901 Step("_upgradeHearth");
902 Method(delegate
903 {
904 int cost7 = EClass.Branch.GetUpgradeCost();
905 GameLang.refDrama1 = Lang._currency(cost7, "money");
906 GameLang.refDrama2 = (EClass.Branch.lv + 1).ToString() ?? "";
907 GameLang.refDrama3 = "hearth_dialog".lang(EClass.Branch.GetHearthHint(EClass.Branch.lv + 1));
908 TempTalkTopic("upgrade_heath1", null);
909 Choice("yes", delegate
910 {
911 if (EClass.pc.GetCurrency() < cost7)
912 {
913 TempTalkTopic("nomoney", StepDefault);
914 }
915 else
916 {
917 EClass.pc.ModCurrency(-cost7);
918 SE.Pay();
919 LayerDrama.Instance.SetOnKill(delegate
920 {
921 EClass.Branch.Upgrade();
922 });
923 TempTalkTopic("upgrade_heath2", StepEnd);
924 }
925 });
926 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
927 });
928 Step("_sellFame");
929 Method(delegate
930 {
931 int cost6 = EClass.player.fame / 5;
932 GameLang.refDrama1 = cost6.ToString() ?? "";
933 if (cost6 == 0)
934 {
935 TempTalkTopic("goto2", StepDefault);
936 }
937 else
938 {
939 TempTalkTopic("sellFame1", null);
940 Choice("yes", delegate
941 {
942 EClass.pc.ModCurrency(cost6);
943 SE.Pay();
944 EClass.player.ModFame(-cost6);
945 TempTalkTopic("sellFame2", StepDefault);
946 });
947 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
948 }
949 });
950 Step("_investZone");
951 Method(delegate
952 {
953 int cost5 = CalcMoney.InvestZone(EClass.pc);
954 GameLang.refDrama1 = cost5.ToString() ?? "";
955 GameLang.refDrama2 = ((EClass._zone.investment < 0) ? int.MaxValue : EClass._zone.investment).ToString() ?? "";
956 TempTalkTopic("invest1", null);
957 Choice("yes", delegate
958 {
959 Invest(quick: false);
960 });
961 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
962 Choice("quickInvest", delegate
963 {
964 Invest(quick: true);
965 });
966 void Invest(bool quick)
967 {
968 if (EClass.pc.GetCurrency() < cost5)
969 {
970 TempTalkTopic("nomoney", StepDefault);
971 }
972 else
973 {
974 EClass.pc.ModCurrency(-cost5);
975 SE.Pay();
976 EClass._zone.investment += cost5;
979 EClass.pc.ModExp(292, 100 + EClass._zone.development * 2);
980 if (quick)
981 {
982 TempGoto("_investZone");
983 }
984 else
985 {
986 TempTalkTopic("invest2", StepDefault);
987 }
988 }
989 }
990 });
991 Step("_investShop");
992 Method(delegate
993 {
994 int cost4 = CalcMoney.InvestShop(EClass.pc, c);
995 GameLang.refDrama1 = cost4.ToString() ?? "";
996 GameLang.refDrama2 = c.trait.ShopLv.ToString() ?? "";
997 TempTalkTopic("invest_shop1", null);
998 Choice("yes", delegate
999 {
1000 Invest(quick: false);
1001 });
1002 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1003 Choice("quickInvest", delegate
1004 {
1005 Invest(quick: true);
1006 });
1007 void Invest(bool quick)
1008 {
1009 if (EClass.pc.GetCurrency() < cost4)
1010 {
1011 TempTalkTopic("nomoney", StepDefault);
1012 }
1013 else
1014 {
1015 EClass.pc.ModCurrency(-cost4);
1016 SE.Pay();
1017 c.c_invest++;
1019 EClass.pc.ModExp(292, 50 + c.c_invest * 20);
1021 if (quick)
1022 {
1023 TempGoto("_investShop");
1024 }
1025 else
1026 {
1027 TempTalkTopic("invest_shop2", StepDefault);
1028 }
1029 }
1030 }
1031 });
1032 Step("_changeTitle");
1033 Method(delegate
1034 {
1035 EClass.player.title = WordGen.Get("title");
1036 GameLang.refDrama1 = EClass.player.title;
1037 TempTalk("changeTitle", StepDefault);
1038 }, null, StepDefault);
1039 Step("_buyLand");
1040 Method(delegate
1041 {
1042 bool num5 = EClass._map.bounds.CanExpand(1);
1043 int costLand = CalcGold.ExpandLand();
1044 GameLang.refDrama1 = "";
1045 GameLang.refDrama2 = costLand.ToString() ?? "";
1046 if (!num5)
1047 {
1048 TempTalkTopic("expand3", StepDefault);
1049 }
1050 else
1051 {
1052 TempTalkTopic("expand1", StepDefault);
1053 Choice("yes", delegate
1054 {
1055 if (EClass.pc.GetCurrency("money2") < costLand)
1056 {
1057 TempTalkTopic("nomoney", StepDefault);
1058 }
1059 else
1060 {
1061 SE.Pay();
1062 EClass.pc.ModCurrency(-costLand, "money2");
1063 TempTalkTopic("expand2", StepDefault);
1064 EClass._map.bounds.Expand(1);
1065 SE.Play("good");
1066 EClass._map.RefreshAllTiles();
1067 WidgetMinimap.UpdateMap();
1068 ScreenEffect.Play("Firework");
1069 }
1070 });
1071 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1072 }
1073 });
1074 Step("_meeting");
1075 Method(delegate
1076 {
1077 sequence.Exit();
1080 });
1081 End();
1082 Step("_give");
1083 Method(delegate
1084 {
1085 manager.Hide();
1086 layer = LayerDragGrid.CreateGive(c);
1087 layer.SetOnKill(manager.Show);
1088 }, () => !layer, StepDefault);
1089 Step("_blessing");
1090 Method(delegate
1091 {
1092 bool flag6 = c.trait is TraitMiko_Mifu;
1093 TempTalkTopic("blessing", StepEnd);
1095 {
1096 foreach (Chara member in EClass.pc.party.members)
1097 {
1098 if (c.trait is TraitMiko_Mifu)
1099 {
1100 member.AddCondition<ConHolyVeil>()?.SetPerfume();
1101 }
1102 else if (c.trait is TraitMiko_Nefu)
1103 {
1104 member.AddCondition<ConEuphoric>()?.SetPerfume();
1105 }
1106 else
1107 {
1108 member.AddCondition<ConNightVision>()?.SetPerfume();
1109 }
1110 member.Say("blessing", member);
1111 member.PlaySound("pray");
1112 member.PlayEffect("holyveil");
1113 }
1114 c.isRestocking = true;
1115 });
1116 c.c_dateStockExpire = EClass.world.date.GetRaw() + (flag6 ? 180 : 180) * 1440;
1117 });
1118 Step("_train");
1119 Method(delegate
1120 {
1121 layer = EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1122 {
1123 list.moldItem = Resources.Load<ButtonElement>("UI/Element/Button/ButtonElementTrain").transform;
1124 list.callbacks = new UIList.Callback<Element, ButtonElement>
1125 {
1126 onClick = delegate(Element a, ButtonElement b)
1127 {
1128 int num4 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1129 if (num4 == 0)
1130 {
1131 SE.Beep();
1132 }
1133 else if (EClass.pc.TryPay(num4, "plat"))
1134 {
1135 if (EClass.pc.elements.HasBase(a.id))
1136 {
1138 }
1139 else
1140 {
1142 }
1143 list.Redraw();
1145 }
1146 },
1147 onRedraw = delegate(Element a, ButtonElement b, int i)
1148 {
1149 bool flag5 = EClass.pc.elements.HasBase(a.id);
1150 b.imagePotential.enabled = flag5;
1152 int plat = EClass.pc.GetCurrency("plat");
1153 int cost3 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1154 b.mainText.text = b.mainText.text + " " + (flag5 ? "" : ("notLearned".lang() + " "));
1155 b.subText2.text = ((cost3 == 0) ? "-" : (cost3.ToString() ?? "")).TagColor(() => plat >= cost3 && cost3 != 0);
1156 b.RebuildLayout();
1157 },
1158 onInstantiate = delegate
1159 {
1160 },
1161 onList = delegate
1162 {
1163 foreach (SourceElement.Row item8 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a)
1164 {
1165 if (a.tag.Contains("unused"))
1166 {
1167 return false;
1168 }
1169 if (a.tag.Contains("guild"))
1170 {
1171 if (a.tag.Contains("fighter") && Guild.Fighter.IsCurrentZone)
1172 {
1173 return true;
1174 }
1175 if (a.tag.Contains("mage") && Guild.Mage.IsCurrentZone)
1176 {
1177 return true;
1178 }
1179 if (a.tag.Contains("thief") && Guild.Thief.IsCurrentZone)
1180 {
1181 return true;
1182 }
1183 if (a.tag.Contains("merchant") && Guild.Merchant.IsCurrentZone)
1184 {
1185 return true;
1186 }
1187 return false;
1188 }
1189 if (isInGuild)
1190 {
1191 return false;
1192 }
1193 return a.category == "skill" && a.categorySub == c.trait.IDTrainer;
1194 }).ToList())
1195 {
1196 list.Add(Element.Create(item8.id));
1197 }
1198 }
1199 };
1200 }).SetSize()
1201 .SetTitles("wTrain")
1202 .SetOnKill(SE.PopDrama);
1203 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1204 {
1205 plat = true
1206 });
1207 }, () => !layer, StepDefault);
1208 Step("_changeDomain");
1209 Method(delegate
1210 {
1211 layer = EClass.player.SelectDomain(SE.PopDrama);
1212 }, () => !layer, StepDefault);
1213 Step("_revive");
1214 Method(delegate
1215 {
1216 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleRevive>("h_revive"));
1217 layer.SetOnKill(SE.PopDrama);
1218 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1219 {
1220 money = true
1221 });
1222 }, () => !layer, StepDefault);
1223 Step("_buySlave");
1224 Method(delegate
1225 {
1226 LayerPeople.slaveToBuy = null;
1227 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleBuySlave>("h_invBuy", c));
1228 layer.SetOnKill(SE.PopDrama);
1229 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1230 {
1231 money = true
1232 });
1233 manager.Load();
1234 }, () => !layer, "_buySlaveConfirm");
1235 Step("_buySlaveConfirm");
1236 Method(delegate
1237 {
1239 if (tc == null)
1240 {
1241 RumorChill();
1242 }
1243 else
1244 {
1245 int cost2 = CalcMoney.BuySlave(tc);
1246 GameLang.refDrama1 = cost2.ToString() ?? "";
1247 GameLang.refDrama2 = tc.Name;
1248 TempTalkTopic("slave_buy", null);
1249 Choice("yes", delegate
1250 {
1251 if (!EClass.pc.TryPay(cost2))
1252 {
1253 TempTalkTopic("nomoney", StepDefault);
1254 }
1255 else
1256 {
1257 GameLang.refDrama1 = tc.Name;
1258 EClass._zone.AddCard(tc, EClass.pc.pos.GetNearestPoint());
1259 tc.MakeAlly();
1260 c.GetObj<SlaverData>(5).list.Remove(tc);
1261 TempTalkTopic("slave_buy2", StepEnd);
1262 }
1263 }).DisableSound();
1264 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1265 }
1266 });
1268 Step("_trade");
1269 Method(delegate
1270 {
1271 layer = EClass.ui.AddLayer(LayerInventory.CreateContainer(c));
1272 }, () => !layer, StepDefault);
1273 Step("_identify");
1274 Method(delegate
1275 {
1276 manager.Hide();
1277 c.trait.OnBarter();
1278 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: false, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: false), -1);
1279 layer.SetOnKill(manager.Show);
1280 }, () => !layer, StepDefault);
1281 Step("_identifyAll");
1282 Method(delegate
1283 {
1284 int costIdentify = 0;
1285 int numIdentify = 0;
1286 int numSuperior = 0;
1287 EClass.pc.things.Foreach(delegate(Thing t)
1288 {
1289 if (!t.IsIdentified && t.c_IDTState != 1)
1290 {
1291 numIdentify++;
1292 costIdentify += CalcMoney.Identify(EClass.pc, superior: false);
1293 }
1294 });
1295 GameLang.refDrama1 = costIdentify.ToString() ?? "";
1296 GameLang.refDrama2 = numIdentify.ToString() ?? "";
1297 if (numIdentify == 0)
1298 {
1299 TempTalkTopic("appraise3", StepDefault);
1300 }
1301 else
1302 {
1303 TempTalkTopic("appraise1", StepDefault);
1304 Choice("yes", delegate
1305 {
1306 if (EClass.pc.GetCurrency() < costIdentify)
1307 {
1308 TempTalkTopic("nomoney", StepDefault);
1309 }
1310 else
1311 {
1312 SE.Pay();
1313 EClass.pc.ModCurrency(-costIdentify);
1314 foreach (Thing item9 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true))
1315 {
1316 item9.Thing.Identify(show: false);
1317 if (!item9.IsInstalled)
1318 {
1319 numSuperior++;
1320 }
1321 }
1322 TempTalkTopic("appraise2", StepDefault);
1323 }
1324 });
1325 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1326 }
1327 });
1328 Step("_identifySP");
1329 Method(delegate
1330 {
1331 manager.Hide();
1332 c.trait.OnBarter();
1333 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: true, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: true), -1);
1334 layer.SetOnKill(manager.Show);
1335 }, () => !layer, StepDefault);
1336 Step("_bout");
1337 Method(delegate
1338 {
1339 TempTalkTopic("bout1", StepDefault);
1340 Choice("yes", delegate
1341 {
1343 {
1344 uidTarget = c.uid,
1345 targetX = c.pos.x,
1346 targetZ = c.pos.z
1347 });
1348 c.SetGlobal();
1350 {
1351 target = c
1352 });
1353 c.SetInt(59, EClass.world.date.GetRaw());
1355 {
1356 EClass.pc.MoveZone(z, ZoneTransition.EnterState.Center);
1357 });
1358 TempTalkTopic("bout2", StepEnd);
1359 });
1360 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1361 }, null, StepDefault);
1362 Step("_news");
1363 Method(delegate
1364 {
1366 if (zone == null)
1367 {
1368 TempTalkTopic("news2", null);
1369 }
1370 else
1371 {
1372 zone.isKnown = true;
1373 Msg.Say("discoverZone", zone.Name);
1374 GameLang.refDrama1 = zone.Name;
1375 TempTalkTopic("news1", null);
1376 }
1377 c.SetInt(37, EClass.world.date.GetRaw());
1378 });
1379 Method(delegate
1380 {
1381 manager.Load();
1382 }, null, StepDefault);
1383 Step("_heal");
1384 Method(delegate
1385 {
1386 int costHeal = CalcMoney.Heal(EClass.pc);
1387 GameLang.refDrama1 = costHeal.ToString() ?? "";
1388 TempTalkTopic("healer1", null);
1389 Choice("yes", delegate
1390 {
1391 if (EClass.pc.GetCurrency() < costHeal)
1392 {
1393 TempTalkTopic("nomoney", StepDefault);
1394 }
1395 else
1396 {
1397 SE.Pay();
1398 foreach (Chara member2 in EClass.pc.party.members)
1399 {
1400 ActEffect.Proc(EffectId.HealComplete, member2);
1401 }
1402 EClass.pc.ModCurrency(-costHeal);
1403 TempTalkTopic("healer2", StepEnd);
1404 }
1405 });
1406 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1407 });
1408 Step("_food");
1409 Method(delegate
1410 {
1411 int cost = CalcMoney.Meal(EClass.pc);
1412 GameLang.refDrama1 = cost.ToString() ?? "";
1413 TempTalkTopic("food1", null);
1414 Choice("yes", delegate
1415 {
1416 if (EClass.pc.hunger.GetPhase() <= 0)
1417 {
1418 TempTalkTopic("alreadyFull", StepDefault);
1419 }
1420 else if (EClass.pc.GetCurrency() < cost)
1421 {
1422 TempTalkTopic("nomoney", StepDefault);
1423 }
1424 else
1425 {
1426 SE.Pay();
1427 EClass.pc.ModCurrency(-cost);
1428 TempTalkTopic("food2", StepDefault);
1429 FoodEffect.Proc(EClass.pc, ThingGen.Create("dish_lunch"), consume: false);
1430 EClass.pc.hunger.value = 0;
1431 }
1432 });
1433 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1434 });
1435 int[] bankTier = new int[5] { 100, 1000, 10000, 100000, 1000000 };
1436 Step("_deposit");
1437 Method(delegate
1438 {
1439 sequence.Exit();
1441 if ((bool)WidgetFeed.Instance)
1442 {
1443 WidgetFeed.Instance.Talk(c, "barter");
1444 }
1445 SE.Play("shop_open");
1447 }, () => !layer, StepDefault);
1448 End();
1449 Step("_copyItem");
1450 Method(delegate
1451 {
1452 sequence.Exit();
1454 if ((bool)WidgetFeed.Instance)
1455 {
1456 WidgetFeed.Instance.Talk(c, "barter");
1457 }
1458 SE.Play("shop_open");
1459 c.trait.OnBarter();
1460 if (c.c_copyContainer == null)
1461 {
1462 c.c_copyContainer = ThingGen.Create("container_deposit");
1463 }
1464 int numCopyItem = c.trait.NumCopyItem;
1465 c.c_copyContainer.things.SetSize(numCopyItem, 1);
1467 }, () => !layer, StepDefault);
1468 End();
1469 int[] taxTier = new int[6] { 0, 1000, 2000, 5000, 10000, 20000 };
1470 Step("_extraTax");
1471 Method(delegate
1472 {
1473 GameLang.refDrama1 = Lang._currency(EClass.player.extraTax, "money");
1474 TempTalkTopic("extraTax", null);
1475 int[] array2 = taxTier;
1476 foreach (int num3 in array2)
1477 {
1478 int _i2 = num3;
1479 Choice(Lang._currency(_i2, showUnit: true), delegate
1480 {
1481 EClass.player.extraTax = _i2;
1482 GameLang.refDrama1 = Lang._currency(_i2, "money");
1483 TempTalkTopic("extraTax2", StepDefault);
1484 });
1485 }
1486 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1487 });
1488 Step("_withdraw");
1489 Method(delegate
1490 {
1491 int bankMoney = EClass.player.bankMoney;
1492 GameLang.refDrama1 = bankMoney.ToString() ?? "";
1493 TempTalkTopic("banker2", null);
1494 int[] array = bankTier;
1495 foreach (int num2 in array)
1496 {
1497 int _i = num2;
1498 if (EClass.player.bankMoney >= _i)
1499 {
1500 Choice(Lang._currency(_i, showUnit: true), delegate
1501 {
1502 SE.Pay();
1503 EClass.pc.ModCurrency(_i);
1504 EClass.player.bankMoney -= _i;
1505 TempTalkTopic("banker4", StepDefault);
1506 });
1507 }
1508 }
1509 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1510 });
1511 Step("_disableMove");
1512 Method(delegate
1513 {
1514 c.noMove = true;
1515 c.orgPos = new Point(c.pos);
1516 c.Talk("ok");
1517 });
1518 End();
1519 Step("_enableMove");
1520 Method(delegate
1521 {
1522 c.noMove = false;
1523 c.orgPos = null;
1524 c.Talk("thanks");
1525 });
1526 End();
1527 Step("_bye");
1528 Method(delegate
1529 {
1530 c.Talk("bye");
1531 });
1532 End();
1533 void BackChill()
1534 {
1535 Method(RumorChill, null, StepDefault);
1536 }
1537 string GetTalk(string id)
1538 {
1539 return c.GetTalkText(id);
1540 }
1541 void RumorChill()
1542 {
1543 rumor = GetTalk("chill");
1544 }
1545 void Talk(string idTalk, string idJump)
1546 {
1547 _Talk("tg", GetTalk(idTalk), idJump);
1548 }
1549 void TempCancel()
1550 {
1551 EnableCancel("back");
1552 }
1553 void TempTalk(string idTalk, string idJump)
1554 {
1555 _TempTalk("tg", GetTalk(idTalk), idJump);
1556 }
1557 void TempTalkTopic(string idTopc, string idJump)
1558 {
1559 _TempTalk("tg", GetTopic(c, idTopc), idJump);
1560 }
1561 bool taken()
1562 {
1563 if (c.quest != null)
1564 {
1565 return EClass.game.quests.list.Contains(c.quest);
1566 }
1567 return false;
1568 }
1569 }
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:170
bool CanSleepBeside()
Definition: Affinity.cs:77
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
bool IsUnderAge(Chara c)
Definition: Biography.cs:266
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:2630
bool isSummon
Definition: Card.cs:710
ElementContainerCard elements
Definition: Card.cs:41
string id
Definition: Card.cs:35
bool c_lockedHard
Definition: Card.cs:1036
bool isLostProperty
Definition: Card.cs:806
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6145
int c_invest
Definition: Card.cs:1293
int c_lockLv
Definition: Card.cs:964
Biography bio
Definition: Card.cs:44
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6700
string Name
Definition: Card.cs:2137
int CHA
Definition: Card.cs:2347
int GetCurrency(string id="money")
Definition: Card.cs:3975
int c_IDTState
Definition: Card.cs:1257
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6824
Point pos
Definition: Card.cs:59
int uid
Definition: Card.cs:122
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6179
void ModCurrency(int a, string id="money")
Definition: Card.cs:3961
int c_dateStockExpire
Definition: Card.cs:1233
bool TryPay(int a, string id="money")
Definition: Card.cs:3925
void Destroy()
Definition: Card.cs:5070
bool noMove
Definition: Card.cs:770
ThingContainer things
Definition: Card.cs:38
virtual bool isChara
Definition: Card.cs:2083
int Evalue(int ele)
Definition: Card.cs:2571
Thing c_copyContainer
Definition: Card.cs:1809
void ModExp(string alias, int a)
Definition: Card.cs:2648
bool IsIdentified
Definition: Card.cs:2377
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5900
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6797
bool Has(int id)
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:7997
override bool IsAliveInCurrentZone
Definition: Chara.cs:561
new TraitChara trait
Definition: Chara.cs:503
bool isDrunk
Definition: Chara.cs:124
Chara host
Definition: Chara.cs:33
bool IsMofuable
Definition: Chara.cs:1099
bool IsMaid
Definition: Chara.cs:1027
override bool IsGlobal
Definition: Chara.cs:610
override bool IsPCParty
Definition: Chara.cs:615
Party party
Definition: Chara.cs:43
AIAct SetAI(AIAct g)
Definition: Chara.cs:8821
override bool IsDisabled
Definition: Chara.cs:585
Stats hunger
Definition: Chara.cs:1142
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1471
override bool IsPCFaction
Definition: Chara.cs:671
void SetAIImmediate(AIAct g)
Definition: Chara.cs:8853
List< Hobby > ListHobbies(bool useMemberType=true)
Definition: Chara.cs:8912
FactionMemberType memberType
Definition: Chara.cs:46
SourceThing.Row GetFavFood()
Definition: Chara.cs:7977
bool IsHomeMember()
Definition: Chara.cs:6535
Zone homeZone
Definition: Chara.cs:267
bool IsGuest()
Definition: Chara.cs:6560
bool CanBloom()
Definition: Chara.cs:8585
Affinity affinity
Definition: Chara.cs:314
CharaAbility ability
Definition: Chara.cs:424
Quest quest
Definition: Chara.cs:24
FactionBranch homeBranch
Definition: Chara.cs:1066
bool CanInsult()
Definition: Chara.cs:8053
void MoveZone(string alias)
Definition: Chara.cs:3311
bool godMode
Definition: CoreDebug.cs:173
bool showFav
Definition: CoreDebug.cs:226
bool enable
Definition: CoreDebug.cs:286
int GetRaw(int offsetHours=0)
Definition: Date.cs:326
bool IsExpired(int time)
Definition: Date.cs:336
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:6
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
static World world
Definition: EClass.cs:41
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static FactionBranch Branch
Definition: EClass.cs:23
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static FactionBranch BranchOrHomeBranch
Definition: EClass.cs:25
static CoreDebug debug
Definition: EClass.cs:49
static UI ui
Definition: EClass.cs:17
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:250
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1098
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:251
QuestManager quests
Definition: Game.cs:182
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:62
static GuildMage Mage
Definition: Guild.cs:58
static GuildFighter Fighter
Definition: Guild.cs:56
static GuildThief Thief
Definition: Guild.cs:60
static Guild GetCurrentGuild()
Definition: Guild.cs:74
Definition: Hobby.cs:5
string Name
Definition: Hobby.cs:10
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:102
List< Chara > members
Definition: Party.cs:19
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41
static PathManager Instance
Definition: PathManager.cs:16
bool IsCriminal
Definition: Player.cs:1337
Layer SelectDomain(Action onKill=null)
Definition: Player.cs:1541
void ModFame(int a)
Definition: Player.cs:2094
void ModKarma(int a)
Definition: Player.cs:2516
int extraTax
Definition: Player.cs:932
void EndTurn(bool consume=true)
Definition: Player.cs:2081
string title
Definition: Player.cs:1004
int bankMoney
Definition: Player.cs:914
Definition: Point.cs:9
int x
Definition: Point.cs:36
bool CanGiveBill()
Definition: QuestDebt.cs:42
string GetIdTalk_GiveBill()
Definition: QuestDebt.cs:103
bool gaveBill
Definition: QuestDebt.cs:7
void GiveBill()
Definition: QuestDebt.cs:58
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:685
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:613
virtual string NameDeliver
Definition: Quest.cs:239
virtual string GetTalkProgress()
Definition: Quest.cs:680
virtual string GetDetail(bool onJournal=false)
Definition: Quest.cs:633
virtual bool Deliver(Chara c, Thing t=null)
Definition: Quest.cs:711
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:139
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:509
SourceZone.Row source
Definition: Spatial.cs:453
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:878
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:531
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:516
void OnBarter(bool reroll=false)
Definition: Trait.cs:1506
virtual ShopType ShopType
Definition: Trait.cs:520
virtual PriceType PriceType
Definition: Trait.cs:524
string TextNextRestockPet
Definition: Trait.cs:564
string TextNextRestock
Definition: Trait.cs:562
virtual CurrencyType CurrencyType
Definition: Trait.cs:522
virtual SlaverType SlaverType
Definition: Trait.cs:554
virtual int ShopLv
Definition: Trait.cs:514
virtual int NumCopyItem
Definition: Trait.cs:518
virtual bool AllowCriminal
Definition: Trait.cs:550
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:268
bool IsInstance
Definition: Zone.cs:486
virtual bool AllowInvest
Definition: Zone.cs:247
Chara FindChara(string id)
Definition: Zone.cs:3050
virtual bool AllowCriminal
Definition: Zone.cs:244
void ModInfluence(int a)
Definition: Zone.cs:3584
bool IsPCFaction
Definition: Zone.cs:470
void ModDevelopment(int a)
Definition: Zone.cs:3594

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 1636 of file DramaCustomSequence.cs.

1637 {
1638 Step("import");
1639 string[] array = setup.textData.Split(new string[1] { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
1640 foreach (string text in array)
1641 {
1642 if (!(text == Environment.NewLine))
1643 {
1644 _Talk("", text.TrimStart(Environment.NewLine.ToCharArray()).TrimEnd(Environment.NewLine.ToCharArray()));
1645 }
1646 }
1647 End();
1648 }
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 1741 of file DramaCustomSequence.cs.

1742 {
1743 DramaChoice dramaChoice = new DramaChoice(lang.lang(), null);
1744 dramaChoice.onJump = onJump;
1745 manager.lastTalk.AddChoice(dramaChoice);
1746 return dramaChoice;
1747 }
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 1730 of file DramaCustomSequence.cs.

1731 {
1732 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1733 manager.lastTalk.AddChoice(dramaChoice);
1734 if (cancel)
1735 {
1736 EnableCancel(idJump);
1737 }
1738 return dramaChoice;
1739 }

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

◆ Choice2()

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

Definition at line 1749 of file DramaCustomSequence.cs.

1750 {
1751 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1752 manager.lastTalk.AddChoice(dramaChoice);
1753 sequence.manager._choices.Add(dramaChoice);
1754 return dramaChoice;
1755 }
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 1757 of file DramaCustomSequence.cs.

1758 {
1759 manager.lastTalk.canCancel = true;
1760 manager.lastTalk.idCancelJump = idCancelJump;
1761 }

◆ End()

void DramaCustomSequence.End ( )
inline

Definition at line 1677 of file DramaCustomSequence.cs.

1678 {
1679 Event(new DramaEventGoto("end"));
1680 }

◆ Event()

DramaEvent DramaCustomSequence.Event ( DramaEvent  e)
inline

Definition at line 1650 of file DramaCustomSequence.cs.

1651 {
1652 events.Add(e);
1653 e.sequence = sequence;
1654 return e;
1655 }
List< DramaEvent > events

◆ GetListGuide()

List< Card > DramaCustomSequence.GetListGuide ( )
inline

Definition at line 1763 of file DramaCustomSequence.cs.

1764 {
1765 List<Card> list = new List<Card>();
1766 foreach (Thing thing in EClass._map.things)
1767 {
1768 if (thing.IsInstalled && thing.trait.GuidePriotiy > 0)
1769 {
1770 list.Add(thing);
1771 }
1772 }
1773 foreach (Chara chara in EClass._map.charas)
1774 {
1775 if (!chara.IsPCParty && chara.trait.GuidePriotiy > 0)
1776 {
1777 list.Add(chara);
1778 }
1779 }
1780 list.Sort((Card a, Card b) => b.trait.GuidePriotiy - a.trait.GuidePriotiy);
1781 return list;
1782 }
Trait trait
Definition: Card.cs:53
bool IsInstalled
Definition: Card.cs:2381
List< Thing > things
Definition: Map.cs:49
List< Chara > charas
Definition: Map.cs:81
virtual int GuidePriotiy
Definition: Trait.cs:99

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 1571 of file DramaCustomSequence.cs.

1572 {
1573 if (c.interest <= 0)
1574 {
1575 return GetText(c, "rumor", "bored");
1576 }
1577 if (HasTopic("unique", c.id))
1578 {
1579 return GetText(c, "unique", c.id);
1580 }
1581 if (EClass.rnd(2) == 0 && !c.trait.IDRumor.IsEmpty())
1582 {
1583 return GetText(c, "rumor", c.trait.IDRumor);
1584 }
1585 if (EClass.rnd(2) == 0 && HasTopic("zone", EClass._zone.id))
1586 {
1587 return GetText(c, "zone", EClass._zone.id);
1588 }
1589 if (EClass.rnd(2) == 0)
1590 {
1591 return GetText(c, "rumor", "interest_" + c.bio.idInterest.ToEnum<Interest>());
1592 }
1593 if (EClass.rnd(2) == 0)
1594 {
1595 return c.GetTalkText("rumor");
1596 }
1597 if (EClass.rnd(4) == 0)
1598 {
1599 return GetText(c, "rumor", "hint");
1600 }
1601 return GetText(c, "rumor", "default");
1602 }
Interest
Definition: Interest.cs:2
int idInterest
Definition: Biography.cs:245
int interest
Definition: Chara.cs:317
virtual string IDRumor
Definition: TraitChara.cs:133

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 1617 of file DramaCustomSequence.cs.

1618 {
1619 if (!idTopic.IsEmpty() && manager.customTalkTopics.ContainsKey(idTopic))
1620 {
1621 return manager.customTalkTopics[idTopic];
1622 }
1623 string[] dialog = Lang.GetDialog(idSheet, idTopic);
1624 if (!(idSheet != "unique"))
1625 {
1626 return dialog.RandomItem();
1627 }
1628 return c.ApplyTone(dialog.RandomItem());
1629 }
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:6843
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:51
static string[] GetDialog(string idSheet, string idTopic)
Definition: Lang.cs:205

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

Referenced by Build().

◆ GetTopic()

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

Definition at line 1631 of file DramaCustomSequence.cs.

1632 {
1633 return GetText(c, "general", idTopic);
1634 }

◆ Goto()

void DramaCustomSequence.Goto ( string  idJump)
inline

Definition at line 1682 of file DramaCustomSequence.cs.

1683 {
1684 Event(new DramaEventGoto(idJump));
1685 }

◆ GotoDefault()

void DramaCustomSequence.GotoDefault ( )
inline

Definition at line 1687 of file DramaCustomSequence.cs.

1688 {
1690 }

◆ HasTopic()

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

Definition at line 1604 of file DramaCustomSequence.cs.

1605 {
1606 string path = CorePath.CorePackage.TextDialog + "dialog.xlsx";
1607 if (!File.Exists(path))
1608 {
1609 return false;
1610 }
1611 ExcelData excelData = new ExcelData();
1612 excelData.path = path;
1613 excelData.BuildMap(idSheet);
1614 return excelData.sheets[idSheet].map.ContainsKey(idTopic);
1615 }
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 1665 of file DramaCustomSequence.cs.

1666 {
1667 Event(new DramaEventMethod(action)
1668 {
1669 endFunc = endFunc
1670 });
1671 if (!idJump.IsEmpty())
1672 {
1673 Event(new DramaEventGoto(idJump));
1674 }
1675 }

◆ Step()

void DramaCustomSequence.Step ( string  step)
inline

Definition at line 1657 of file DramaCustomSequence.cs.

1658 {
1659 Event(new DramaEvent
1660 {
1661 step = step
1662 });
1663 }

Referenced by Build().

◆ TempGoto()

void DramaCustomSequence.TempGoto ( string  idJump = null)
inline

Definition at line 1724 of file DramaCustomSequence.cs.

1725 {
1726 sequence.tempEvents.Clear();
1727 sequence.Play(idJump);
1728 }
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: