Elin Decompiled Documentation EA 23.347 Nightly
Loading...
Searching...
No Matches
DramaCustomSequence.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5
7{
8 public Card destCard;
9
11
13
15
16 public string idDefault;
17
18 public string idCustom;
19
21
23
24 public List<DramaEvent> events;
25
27
28 public string StepDefault => idDefault;
29
30 public string StepEnd => "end";
31
32 public void Build(Chara c)
33 {
34 bool flag = idCustom == "Unique";
35 bool flag2 = c.bio.IsUnderAge(c) || EClass.pc.bio.IsUnderAge(EClass.pc);
36 bool isInGuild = Guild.Fighter.IsCurrentZone || Guild.Mage.IsCurrentZone || Guild.Thief.IsCurrentZone || Guild.Merchant.IsCurrentZone;
37 string bird = (flag2 ? "bird" : "tail");
38 _ = c.Name;
39 string rumor = (c.IsPCParty ? GetTalk("sup") : GetRumor(c));
40 Layer layer = null;
41 bool flag3 = c.IsHumanSpeak || EClass.pc.HasElement(1640);
42 bool num = !c.IsUnique || HasTopic("unique", c.id);
43 if (!flag)
44 {
45 Step("Resident");
46 _Talk("tg", () => rumor);
47 }
48 if (num && flag3)
49 {
50 DramaChoice choice = Choice2("letsTalk", StepDefault);
51 choice.SetOnClick(delegate
52 {
53 sequence.firstTalk.funcText = () => rumor;
54 List<Hobby> list = c.ListHobbies();
55 Hobby hobby = ((list.Count > 0) ? list[0] : null);
56 if (EClass.rnd(20) == 0 || EClass.debug.showFav)
57 {
58 if (EClass.rnd(2) == 0 || hobby == null)
59 {
60 GameLang.refDrama1 = c.GetFavCat().GetName().ToLower();
61 GameLang.refDrama2 = c.GetFavFood().GetName();
62 rumor = GetText(c, "general", "talk_fav");
63 c.knowFav = true;
64 }
65 else
66 {
67 GameLang.refDrama1 = hobby.Name.ToLower();
68 rumor = GetText(c, "general", "talk_hobby");
69 }
70 }
71 else
72 {
73 rumor = GetRumor(c);
74 }
76 choice.forceHighlight = true;
77 }).SetCondition(() => c.interest > 0);
78 }
79 bool flag4 = false;
80 if (!c.IsPCFaction && c.affinity.CanInvite() && !EClass._zone.IsInstance && c.c_bossType == BossType.none && !EClass.game.IsSurvival)
81 {
82 if ((c.trait.IsUnique || c.IsGlobal) && c.GetInt(111) == 0 && !c.IsPCFaction && c.trait.NeedBoutToJoin)
83 {
84 Choice2("daBout", "_bout");
85 flag4 = true;
86 }
87 else
88 {
89 Choice2("daInvite", "_invite");
90 }
91 }
92 foreach (Quest item in EClass.game.quests.list)
93 {
94 Quest _quest = item;
95 if (!item.CanDeliverToClient(c))
96 {
97 continue;
98 }
99 QuestDeliver questDeliver = _quest as QuestDeliver;
100 foreach (Thing item2 in questDeliver.ListDestThing())
101 {
102 Thing _t = item2;
103 Choice2("daDeliver".lang(item.GetTitle() ?? "", _t.GetName(NameStyle.Full, questDeliver.num)), "_deliver").SetOnClick(delegate
104 {
105 destThing = _t;
106 destQuest = _quest;
107 }).SetOnTooltip(delegate(UITooltip a)
108 {
109 _t.WriteNote(a.note);
110 });
111 }
112 }
113 if (c.IsPCParty && !c.isSummon)
114 {
115 if (EClass._zone.IsPCFaction && c.homeBranch != EClass._zone.branch)
116 {
117 Choice2("daMakeHome", "_makeHome");
118 }
119 if (c.host == null && c.homeZone != null)
120 {
121 Choice2("daLeaveParty".lang(c.homeZone.Name), "_leaveParty");
122 }
123 }
124 if (c.memberType != FactionMemberType.Livestock && !c.IsGuest())
125 {
126 Choice2("daQuest".lang(c.quest?.GetTitle() ?? ""), "_quest").SetCondition(() => c.quest != null);
127 if (c.trait is TraitGuard)
128 {
129 EClass.pc.things.Foreach(delegate(Thing thing)
130 {
131 if (thing.isLostProperty)
132 {
133 Choice2("daLostProperty".lang(thing.Name), "_lostProperty").SetOnClick(delegate
134 {
135 destThing = thing;
136 });
137 }
138 });
139 }
140 if (!c.IsPCParty || EClass._zone.IsPCFaction)
141 {
142 if (c.trait.CanGuide)
143 {
144 foreach (Quest item3 in EClass.game.quests.list)
145 {
146 if (!item3.IsRandomQuest)
147 {
148 continue;
149 }
150 Chara dest = ((item3.chara != null && item3.chara.IsAliveInCurrentZone) ? item3.chara : null);
151 if (dest != null)
152 {
153 Choice2("daGoto".lang(dest.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
154 {
155 destCard = dest;
156 });
157 }
158 if (!(item3 is QuestDeliver { IsDeliver: not false } questDeliver2) || questDeliver2.DestZone != EClass._zone || !EClass._zone.dictCitizen.ContainsKey(questDeliver2.uidTarget))
159 {
160 continue;
161 }
162 Chara dest2 = EClass._zone.FindChara(questDeliver2.uidTarget);
163 if (dest2 != null)
164 {
165 Choice2("daGoto".lang(dest2.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
166 {
167 destCard = dest2;
168 });
169 }
170 }
171 if (GetListGuide().Count > 0)
172 {
173 Choice2("daGuide", "_Guide");
174 }
175 }
177 {
178 if (c.trait is TraitGM_Mage && Guild.Mage.relation.rank >= 4)
179 {
180 Choice2("daChangeDomain", "_changeDomain").DisableSound();
181 }
182 if (c.trait.ShopType != ShopType.None)
183 {
184 if (!c.GetBool("disable_barter_choice"))
185 {
186 Choice2(c.trait.TextNextRestock, "_buy").DisableSound();
187 }
188 if (c.trait is TraitMerchantTravel && !c.IsPCFactionOrMinion && !c.isSummon)
189 {
190 Choice2("daRob", "_rob");
191 }
192 }
193 if (c.trait.SlaverType != SlaverType.None)
194 {
195 Choice2(c.trait.TextNextRestockPet, "_buySlave").DisableSound();
196 }
197 if (c.trait.CopyShop != Trait.CopyShopType.None)
198 {
199 Choice2(("daCopy" + c.trait.CopyShop).lang(c.trait.NumCopyItem.ToString() ?? ""), "_copyItem").DisableSound();
200 }
201 }
202 if (c.trait.HaveNews && c.GetInt(37) + 10080 < EClass.world.date.GetRaw())
203 {
204 Choice2("daNews", "_news");
205 }
206 if (!flag4 && !EClass._zone.IsInstance && !c.IsPCFaction && c.trait.CanBout && c.IsGlobal && c.GetInt(59) + 10080 < EClass.world.date.GetRaw())
207 {
208 Choice2("daBout", "_bout");
209 }
210 if (c.isDrunk || c.HasElement(1275) || EClass.debug.enable)
211 {
212 Choice2(flag2 ? "daBird" : "daTail", "_tail");
213 }
215 bool num2;
216 if (condition == null)
217 {
218 if (EClass.pc.HasElement(1232) || EClass.pc.HasElement(1291))
219 {
220 goto IL_098d;
221 }
223 }
224 else
225 {
226 num2 = condition.IsBaby;
227 }
228 if (num2)
229 {
230 goto IL_098d;
231 }
232 goto IL_099e;
233 }
234 if (c.isDrunk || c.HasElement(1275) || EClass.debug.enable)
235 {
236 Choice2(flag2 ? "daBird" : "daTail", "_tail");
237 }
238 }
239 goto IL_0db7;
240 IL_09ee:
241 if (c.trait.CanRevive)
242 {
243 Choice2("daRevive", "_revive").DisableSound();
244 }
245 if (!c.trait.IDTrainer.IsEmpty() && !EClass._zone.IsUserZone && (Guild.GetCurrentGuild() == null || Guild.GetCurrentGuild().relation.IsMember()))
246 {
247 Choice2("daTrain", "_train").DisableSound();
248 }
249 if (c.trait.CanWhore)
250 {
251 Choice2(flag2 ? "daBirdBuy" : "daTailBuy", "_whore");
252 }
253 if (c.trait.CanHeal)
254 {
255 Choice2("daHeal", "_heal");
256 }
257 if (c.trait.CanServeFood)
258 {
259 Choice2("daFood", "_food");
260 }
261 if (c.trait is TraitInformer)
262 {
263 Choice2("daSellFame", "_sellFame");
264 }
266 {
267 if (c.trait.CanInvestTown && Guild.GetCurrentGuild() == null)
268 {
269 Choice2("daInvest", "_investZone");
270 }
271 if (c.trait.CanInvest)
272 {
273 Choice2("daInvest", "_investShop");
274 }
275 }
276 if (c.trait.CanIdentify)
277 {
278 Choice2("daIdentify", "_identify").DisableSound();
279 Choice2("daIdentifyAll", "_identifyAll");
280 Choice2("daIdentifySP", "_identifySP").DisableSound();
281 }
282 if (c.trait.CanPicklock)
283 {
284 if (c.Evalue(280) < 20)
285 {
286 c.elements.SetBase(280, 20);
287 }
288 foreach (Thing item4 in EClass.pc.things.List((Thing a) => a.c_lockLv > 0, onlyAccessible: true))
289 {
290 Thing _t2 = item4;
291 Choice2("daPicklock".lang(_t2.Name), "_picklock").SetOnClick(delegate
292 {
293 destThing = _t2;
294 });
295 }
296 }
297 if (c.trait is TraitBanker)
298 {
299 Choice2("daDeposit", "_deposit");
300 }
301 if (c.IsMaid || (c.trait.CanInvestTown && (EClass._zone.source.faction == "mysilia" || EClass._zone.IsPCFaction)))
302 {
303 Choice2("daExtraTax", "_extraTax");
304 }
305 if ((c.trait is TraitMiko_Mifu || c.trait is TraitMiko_Nefu || c.trait is TraitEureka) && EClass.world.date.IsExpired(c.c_dateStockExpire))
306 {
307 Choice2("daBlessing", "_blessing");
308 }
309 goto IL_0db7;
310 IL_098d:
311 Choice2("daMama", "_mama");
312 goto IL_099e;
313 IL_099e:
314 ConTransmuteHuman condition2 = c.GetCondition<ConTransmuteHuman>();
315 bool num3;
316 if (condition2 == null)
317 {
318 if (c.HasElement(1232))
319 {
320 goto IL_09dd;
321 }
322 num3 = c.HasElement(1291);
323 }
324 else
325 {
326 num3 = condition2.IsBaby;
327 }
328 if (num3)
329 {
330 goto IL_09dd;
331 }
332 goto IL_09ee;
333 IL_09dd:
334 Choice2("daBaby", "_baby");
335 goto IL_09ee;
336 IL_0db7:
337 if (c.IsHomeMember())
338 {
339 if (c.IsMaid)
340 {
342 {
343 Choice2("daMeeting".lang(EClass.Branch.meetings.list.Count.ToString() ?? ""), "_meeting");
344 }
345 Choice2("daBuyLand", "_buyLand");
346 Choice2("daChangeTitle", "_changeTitle");
347 }
348 if (c.noMove)
349 {
350 Choice2("enableMove", "_enableMove");
351 }
352 if (!c.IsPCParty && c.memberType != FactionMemberType.Livestock && c.trait.CanJoinParty)
353 {
354 Choice2("daJoinParty", "_joinParty");
355 }
356 if (!c.IsDisabled && (c.HasElement(1250) || (EClass.pc.IsMofuable && c.ability.Has(6627))))
357 {
358 Choice2("daSuck", "_suck");
359 }
360 Choice2("daFactionOther", "_factionOther");
361 }
362 if (c.trait is TraitLoytel && EClass.game.quests.Get<QuestDebt>() != null)
363 {
364 Choice2("daGreatDebt", "_greatDebt");
365 }
366 if (!flag)
367 {
368 Choice2("bye", "_bye");
369 EnableCancel();
370 }
371 Step("_factionOther");
372 Talk("what", StepDefault);
373 if (!c.IsMarried || EClass.debug.enable)
374 {
375 foreach (Thing item5 in EClass.pc.things.List((Thing a) => !a.c_isImportant && !a.isEquipped && a.c_uidAttune == 0 && (a.id == "amulet_engagement" || a.id == "ring_engagement")))
376 {
377 Thing _t3 = item5;
378 Choice("daMarry".lang(item5.Name), "_marry").SetOnClick(delegate
379 {
380 destThing = _t3;
381 });
382 }
383 }
384 if ((c.IsMarried && !c.c_love.IsWed) || EClass.debug.enable)
385 {
386 Choice("daWed", "_wed");
387 }
388 if (c.trait is TraitLoytel)
389 {
390 QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
391 if (questDebt != null && questDebt.gaveBill)
392 {
393 Choice("daGreatDebt2", "_greatDebt2");
394 }
395 }
396 if (c.IsPCParty)
397 {
398 if (!c.isSummon)
399 {
400 Choice((c.GetInt(106) == 0) ? "daShutup" : "daShutup2", "_shutup");
401 if (c.CanInsult() || c.GetInt(108) == 1)
402 {
403 Choice((c.GetInt(108) == 0) ? "daInsult" : "daInsult2", "_insult");
404 }
405 }
406 }
407 else if (!c.noMove)
408 {
409 Choice("disableMove", "_disableMove");
410 }
411 Choice((c.GetInt(123) == 0) ? "daSleepBeside" : "daSleepBeside2", "_sleepBeside");
412 if (c.HasElement(1225))
413 {
414 Choice((c.GetInt(126) == 0) ? "daDisableLoyal" : "daDisableLoyal2", "_disableLoyal");
415 }
416 if (c.IsSlimeEvolvable || c.ability.Has(6603) || c.HasElement(1216))
417 {
418 Choice((c.GetInt(119) == 0) ? "daDisableFuck" : "daDisableFuck2", "_disableFuck");
419 }
420 if (c.GetInt(113) == 0)
421 {
422 Choice("daEquipSharedOff", "_toggleSharedEquip");
423 }
424 else
425 {
426 Choice("daEquipSharedOn", "_toggleSharedEquip");
427 }
428 if (!c.IsMaid && c.homeBranch == EClass.Branch)
429 {
430 Choice("daMakeMaid", "_daMakeMaid");
431 }
432 if (c.trait.CanBeBanished && !c.IsPCParty)
433 {
434 Choice("daBanish", "_depart");
435 }
436 Choice("daNothing", StepDefault, cancel: true);
437 Step("_toggleSharedEquip");
438 Method(delegate
439 {
440 c.SetInt(113, (c.GetInt(113) == 0) ? 1 : 0);
441 });
442 _Talk("tg", GetTopic(c, (c.GetInt(113) == 0) ? "shutup" : "shutup2"));
443 End();
444 Step("_daMakeMaid");
445 Method(delegate
446 {
447 EClass.Branch.uidMaid = c.uid;
448 });
449 _Talk("tg", GetTopic(c, "becomeMaid"));
450 End();
451 Step("_joinParty");
452 Method(delegate
453 {
454 if (!c.trait.CanJoinPartyResident)
455 {
456 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
457 TempTalkTopic("invite3", StepDefault);
458 }
459 else
460 {
461 EClass.pc.party.AddMemeber(c, showMsg: true);
462 }
463 });
464 Talk("hired", StepEnd);
465 Step("_leaveParty");
466 Method(delegate
467 {
469 if (EClass.game.activeZone != c.homeZone)
470 {
471 EClass.pc.Say("tame_send", c, c.homeZone.Name);
472 c.MoveZone(c.homeZone);
473 }
474 });
475 Goto("_end");
476 Step("_banish");
477 Goto("_bye");
478 Step("_makeLivestock");
479 Method(delegate
480 {
481 c.memberType = FactionMemberType.Livestock;
482 });
483 Talk("becomeLivestock", StepEnd);
484 Step("_makeResident");
485 Method(delegate
486 {
487 c.memberType = FactionMemberType.Default;
488 });
489 Talk("becomeResident", StepEnd);
490 Step("_depart");
491 Talk("depart_choice", StepDefault);
492 Choice("depart1", "_depart1");
493 Choice("depart2", "_depart2");
494 Step("_depart1");
495 Method(delegate
496 {
498 {
499 c.homeBranch.BanishMember(c);
500 });
501 });
502 Talk("depart1", StepEnd);
503 Step("_depart2");
504 Talk("depart2", StepDefault);
505 Step("_gift");
506 Talk("gift_good", null);
507 End();
508 Step("_goto");
509 Method(delegate
510 {
511 GameLang.refDrama1 = destCard.Name;
512 if (destCard == c)
513 {
514 TempTalkTopic("goto2", StepDefault);
515 }
516 else
517 {
518 TempTalkTopic("goto", "_goto2");
519 }
520 });
521 Step("_goto2");
522 Method(delegate
523 {
525 {
526 destCard.Teleport(EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true) ?? EClass.pc.pos, silent: true, force: true);
527 }
529 EInput.Consume(consumeAxis: false, 20);
530 });
531 End();
532 Step("_rumor");
533 Talk("rumor", StepDefault);
534 Step("_lostProperty");
535 Method(delegate
536 {
537 GameLang.refDrama1 = destThing.Name;
540 });
541 _Talk("tg", GetTopic(c, "deliver_purse"), StepEnd);
542 _ = c.quest;
543 string text = ((!setup.forceJump.IsEmpty()) ? StepEnd : StepDefault);
544 Step("_deliver");
545 Method(delegate
546 {
547 GameLang.refDrama1 = destQuest.NameDeliver;
549 });
550 _Talk("tg", () => (destQuest != null) ? destQuest.GetTalkComplete().IsEmpty(GetTopic(c, (destQuest.bonusMoney > 0) ? "questCompleteDeliverExtra" : "questCompleteDeliver")) : "", StepEnd);
551 Step("_quest");
552 _Talk("tg", delegate
553 {
554 if (c.quest == null)
555 {
556 return "";
557 }
558 GameLang.refDrama1 = c.quest.RefDrama1;
559 GameLang.refDrama2 = c.quest.RefDrama2;
560 GameLang.refDrama3 = c.quest.RefDrama3;
561 return (!taken()) ? c.quest.GetDetail() : c.quest.GetTalkProgress().IsEmpty(GetTopic(c, "questInProgress"));
562 }, text);
563 string text2 = "daAccept".lang();
564 if (c.quest != null && c.quest.deadline != 0)
565 {
566 text2 += "hintDeadline".lang(c.quest.TextDeadline).ToLower();
567 }
568 Choice(text2, (c.quest != null && c.quest.UseInstanceZone) ? "_questAccept_instance" : "_questAccept").SetOnClick(delegate
569 {
570 EClass.game.quests.Start(c.quest);
571 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() < 5);
572 Choice(text2, "_questFull").SetOnClick(delegate
573 {
574 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() >= 5);
575 Choice("daDecline", text).SetOnClick(RumorChill).SetCondition(() => !taken());
576 if (c.quest != null && EClass.game.quests.Get(c.quest.uid) == null)
577 {
578 QuestSupply supply = c.quest as QuestSupply;
579 if (supply != null)
580 {
581 foreach (Thing item6 in supply.ListDestThing())
582 {
583 Thing _t4 = item6;
584 Choice("daDeliver".lang(supply.GetTitle() ?? "", _t4.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
585 {
586 EClass.game.quests.Start(c.quest);
587 destThing = _t4;
588 destQuest = supply;
589 }).SetOnTooltip(delegate(UITooltip a)
590 {
591 _t4.WriteNote(a.note);
592 });
593 }
594 }
595 }
596 EnableCancel(text);
597 Step("_questAccept");
598 _Talk("tg", GetTopic(c, "questAccept"), StepEnd);
599 Step("_questAccept_instance");
600 _Talk("tg", GetTopic(c, "questAccept"));
601 Method(delegate
602 {
603 Zone z = c.quest.CreateInstanceZone(c);
605 }, null, StepEnd);
606 Step("_questFull");
607 _Talk("tg", GetTopic(c, "questFull"), text);
608 Step("_greatDebt");
609 Method(delegate
610 {
611 QuestDebt questDebt2 = EClass.game.quests.Get<QuestDebt>();
612 if (!questDebt2.CanGiveBill())
613 {
614 TempTalkTopic("loytel_bill_give_wait", StepDefault);
615 }
616 else if (questDebt2.gaveBill)
617 {
618 TempTalkTopic("loytel_bill_give_given", StepDefault);
619 }
620 else
621 {
622 TempTalkTopic(questDebt2.GetIdTalk_GiveBill(), StepEnd);
623 questDebt2.GiveBill();
624 }
625 });
626 Step("_greatDebt2");
627 Method(delegate
628 {
629 QuestDebt questDebt2 = EClass.game.quests.Get<QuestDebt>();
630 TempTalkTopic("loytel_bill_give_lost", StepEnd);
631 questDebt2.GiveBill();
632 });
633 Step("_shutup");
634 Method(delegate
635 {
636 c.SetInt(106, (c.GetInt(106) == 0) ? 1 : 0);
637 });
638 _Talk("tg", GetTopic(c, (c.GetInt(106) == 0) ? "shutup" : "shutup2"));
639 End();
640 Step("_sleepBeside");
641 Method(delegate
642 {
643 if (c.affinity.CanSleepBeside() || c.GetInt(123) == 1)
644 {
645 c.SetInt(123, (c.GetInt(123) == 0) ? 1 : 0);
646 }
647 else
648 {
649 TempTalkTopic("refuse", StepEnd);
650 }
651 });
652 _Talk("tg", GetTopic(c, (c.GetInt(123) == 0) ? "ok" : "shutup"));
653 End();
654 Step("_marry");
655 Method(delegate
656 {
657 if (!c.affinity.CanMarry())
658 {
659 TempTalkTopic("refuse", StepEnd);
660 }
661 });
662 _Talk("tg", GetTopic(c, "marry"));
663 Method(delegate
664 {
665 manager.layer.SetOnKill(delegate
666 {
667 destThing.Attune(c);
668 destThing.elements.ModBase(484, 3);
669 if (destThing.rarity < Rarity.Mythical)
670 {
671 destThing.rarity = Rarity.Mythical;
672 }
673 c.AddCard(destThing);
674 c.TryEquip(destThing);
675 GameLang.refDrama1 = EClass.world.date.year.ToString() ?? "";
679 GameLang.refDrama5 = c.NameBraced;
680 LayerDrama.Activate("_adv", "general", "marry", c);
681 Net.SendChat(EClass.pc.NameTitled, "net_marriage".lang(EClass.pc.NameBraced, EClass._zone.Name, c.NameBraced), ChatCategory.Marriage, Lang.langCode);
682 });
683 });
684 End();
685 Step("_wed");
686 Method(delegate
687 {
688 Thing deed = EClass.pc.things.Find("deed_wedding");
689 if (deed == null && !EClass.debug.enable)
690 {
691 TempTalkTopic("wedding_deed", StepDefault);
692 }
694 {
695 TempTalkTopic("wedding_zone", StepDefault);
696 }
697 else
698 {
699 TempTalkTopic("wedding_confirm", null);
700 Choice("yes", delegate
701 {
702 TempTalkTopic("wedding_accept", null);
703 if (deed != null)
704 {
705 deed.ModNum(-1);
706 }
707 if (c.c_love != null)
708 {
709 c.c_love.dateWedding = EClass.world.date.GetRaw();
710 }
711 });
712 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
713 }
714 });
715 Step("_wed2");
716 Method(delegate
717 {
719 c.BanishAllMinions();
720 if (!c.IsPCParty)
721 {
722 EClass.pc.party.AddMemeber(c);
723 }
724 foreach (Chara item7 in EClass.pc.party.members.ToList())
725 {
726 if (item7 != EClass.pc && item7 != c)
727 {
728 EClass.pc.party.RemoveMember(item7);
729 }
730 }
731 if (c.host != null)
732 {
733 ActRide.Unride(EClass.pc, c == EClass.pc.parasite, talk: false);
734 }
735 Quest quest = Quest.Create("wedding", null, c, assignQuest: false);
736 EClass.game.quests.Start(quest);
737 Zone z = quest.CreateInstanceZone(c);
739 {
740 state = ZoneTransition.EnterState.Exact,
741 x = 50,
742 z = 53
743 });
744 LayerDrama.Activate("_adv", "general", "wedding", c);
745 });
746 End();
747 Step("_disableLoyal");
748 Method(delegate
749 {
750 c.SetInt(126, (c.GetInt(126) == 0) ? 1 : 0);
751 });
752 _Talk("tg", GetTopic(c, (c.GetInt(126) == 0) ? "shutup" : "shutup2"));
753 End();
754 Step("_disableFuck");
755 Method(delegate
756 {
757 c.SetInt(119, (c.GetInt(119) == 0) ? 1 : 0);
758 });
759 _Talk("tg", GetTopic(c, (c.GetInt(119) == 0) ? "shutup" : "shutup2"));
760 End();
761 Step("_suck");
762 _Talk("tg", GetTalk("pervert4"));
763 Method(delegate
764 {
765 if (c.HasElement(1250))
766 {
767 c.UseAbility("ActBloodsuck", EClass.pc);
768 }
769 else
770 {
771 c.Sniff(EClass.pc);
772 }
774 });
775 End();
776 Step("_insult");
777 Method(delegate
778 {
779 c.SetInt(108, (c.GetInt(108) == 0) ? 1 : 0);
780 });
781 _Talk("tg", GetTopic(c, (c.GetInt(108) == 0) ? "insult" : "insult2"));
782 Method(delegate
783 {
784 if (c.GetInt(108) == 1)
785 {
786 c.Talk("insult");
787 }
788 });
789 End();
790 Step("_makeHome");
791 Method(delegate
792 {
794 });
795 _Talk("tg", GetTopic(c, "ok"));
796 End();
797 Step("_hire");
798 Talk("rumor", StepDefault);
799 Choice("daAccept", StepDefault).SetOnClick(delegate
800 {
801 });
802 Choice("daDecline", StepDefault).SetOnClick(delegate
803 {
804 });
805 Step("_invite");
806 Method(delegate
807 {
808 if (!c.trait.CanInvite)
809 {
810 string[] recruitItems = c.source.recruitItems;
811 if (!recruitItems.IsEmpty())
812 {
813 string[] array = recruitItems[0].Split('/');
814 string reqId = array[0];
815 int reqNum = array[1].ToInt();
816 CardBlueprint.Set(CardBlueprint.Original);
817 GameLang.refDrama1 = ThingGen.Create(reqId).SetNum(reqNum).Name;
818 TempTalkTopic("inviteReq1", null);
819 foreach (Thing t in EClass.pc.things.List((Thing thing) => thing.id == reqId && (thing.Num >= reqNum || EClass.debug.enable), onlyAccessible: true))
820 {
821 Thing _t5 = t;
822 Choice("daDeliver".lang("", _t5.GetName(NameStyle.Full, _t5.Num)), delegate
823 {
824 t.ModNum(-reqNum);
825 TempTalk("hired", StepEnd);
826 EClass.Sound.Play("good");
827 if (c.id == "mamani")
828 {
829 Chara chara = CharaGen.Create("mamani2");
830 EClass._zone.AddCard(chara, EClass.pc.pos.GetNearestPoint());
831 chara.isCopy = true;
832 chara.MakeAlly();
833 }
834 else
835 {
836 c.MakeAlly();
837 }
838 }).SetOnTooltip(delegate(UITooltip a)
839 {
840 _t5.WriteNote(a.note);
841 });
842 }
843 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
844 }
845 else
846 {
847 TempTalkTopic("invite2", StepDefault);
848 }
849 }
850 else if (c.GetBestAttribute() > EClass.pc.CHA && !EClass.debug.godMode)
851 {
852 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
853 TempTalkTopic("invite3", StepDefault);
854 }
855 else
856 {
857 TempTalkTopic("invite", null);
858 Choice("yes", delegate
859 {
860 TempTalk("hired", StepEnd);
861 EClass.Sound.Play("good");
862 c.MakeAlly();
863 });
864 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
865 }
866 });
867 Step("_Guide");
868 Method(delegate
869 {
870 TempTalkTopic("guide", null);
871 foreach (Card guide in GetListGuide())
872 {
873 Choice("daGotoGuide".lang(guide.Name, ""), "_goto").SetOnClick(delegate
874 {
875 destCard = guide;
876 });
877 }
878 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
879 TempCancel();
880 });
881 BackChill();
882 Step("_tail");
883 Method(delegate
884 {
885 TempTalkTopic(c.IsMarried ? "tail4" : (bird + "1"), null);
886 Choice("yes2", delegate
887 {
888 TempTalkTopic(bird + "2", StepEnd);
890 {
891 target = c,
892 sell = true
893 });
894 });
895 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
896 });
897 Step("_mama");
898 Method(delegate
899 {
900 if (c.affinity.CanBecomeMama() || EClass.pc.faith == EClass.game.religions.MoonShadow || EClass.debug.enable)
901 {
902 Steam.GetAchievement(ID_Achievement.MAMA);
903 string id = c.id;
904 if (!(id == "farris"))
905 {
906 if (id == "quru")
907 {
908 Steam.GetAchievement(ID_Achievement.MAMA3);
909 }
910 }
911 else
912 {
913 Steam.GetAchievement(ID_Achievement.MAMA2);
914 }
915 TempTalkTopic("mama_yes", StepEnd);
917 {
918 target = c,
919 variation = AI_Fuck.Variation.MotherMilk
920 });
921 }
922 else
923 {
924 TempTalkTopic("mama_no", StepDefault);
925 RumorChill();
926 }
927 });
928 Step("_baby");
929 Method(delegate
930 {
931 if (c.affinity.CanBecomeMama() || EClass.pc.faith == EClass.game.religions.MoonShadow || EClass.debug.enable)
932 {
933 TempTalkTopic("baby_yes", StepEnd);
934 EClass.pc.SetAI(new AI_Fuck
935 {
936 target = c,
937 variation = AI_Fuck.Variation.MotherMilk,
938 sell = true
939 });
940 }
941 else
942 {
943 TempTalkTopic("baby_no", StepDefault);
944 RumorChill();
945 }
946 });
947 Step("_whore");
948 Method(delegate
949 {
950 int costWhore = CalcMoney.Whore(c, EClass.pc);
951 GameLang.refDrama1 = costWhore.ToString() ?? "";
952 TempTalkTopic(bird + "3", null);
953 Choice("yes2", delegate
954 {
955 if (EClass.pc.GetCurrency() < costWhore)
956 {
957 TempTalkTopic("nomoney", StepDefault);
958 }
959 else
960 {
961 SE.Pay();
962 EClass.pc.ModCurrency(-costWhore);
963 TempTalkTopic(bird + "2", StepEnd);
964 EClass.pc.SetAI(new AI_Fuck
965 {
966 target = c
967 });
968 }
969 });
970 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
971 });
972 Step("_picklock");
973 Method(delegate
974 {
975 int cost = CalcMoney.Picklock(EClass.pc, destThing);
976 GameLang.refDrama1 = cost.ToString() ?? "";
977 TempTalkTopic("bird3", null);
978 Choice("yes2", delegate
979 {
980 if (destThing.c_lockedHard)
981 {
982 TempTalkTopic("lockTooHard", StepDefault);
983 }
984 else if (EClass.pc.GetCurrency() < cost)
985 {
986 TempTalkTopic("nomoney", StepDefault);
987 }
988 else
989 {
990 SE.Pay();
991 EClass.pc.ModCurrency(-cost);
992 manager.layer.SetOnKill(delegate
993 {
994 c.PlaySound("lock_open");
995 c.Say("lockpick_success", c, destThing);
996 c.ModExp(280, 200 + destThing.c_lockLv * 20);
997 destThing.c_lockLv = 0;
998 if (destThing.isLostProperty)
999 {
1000 EClass.player.ModKarma(-8);
1001 }
1002 destThing.isLostProperty = false;
1003 });
1004 TempTalkTopic(destThing.isLostProperty ? "lockpick_purse" : "bird2", StepEnd);
1005 }
1006 });
1007 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1008 });
1009 Step("_bloom");
1010 Method(delegate
1011 {
1012 TempTalkTopic("blooming1", null);
1013 foreach (Chara item8 in EClass.pc.party.members.Where((Chara chara) => chara.CanBloom()))
1014 {
1015 Chara c2 = item8;
1016 Choice("daBloom".lang(c2.Name), delegate
1017 {
1018 if (EClass._zone.influence < 10)
1019 {
1020 TempTalkTopic("blooming3", StepDefault);
1021 }
1022 else
1023 {
1024 EClass._zone.ModInfluence(-10);
1025 LayerDrama.Instance.SetOnKill(delegate
1026 {
1027 c.Talk("goodBoy");
1028 c2.Say("dingExp", c);
1029 c2.Talk("insulted");
1030 c2.SetFeat(1273, 1, msg: true);
1031 c2.PlayEffect("aura_heaven");
1032 c2.feat += 10;
1033 EClass.pc.PlaySound("pray");
1034 });
1035 TempTalkTopic("blooming2", StepEnd);
1036 }
1037 });
1038 }
1039 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1040 });
1041 Step("_buy");
1042 Method(delegate
1043 {
1044 if (c.id == "miral")
1045 {
1046 SE.Play("click_chat");
1047 if (EClass.pc.GetCurrency("medal") > 0)
1048 {
1049 TempTalkTopic("miral_medal", null);
1050 }
1051 else
1052 {
1053 TempTalkTopic("miral_medal2", StepDefault);
1054 }
1055 }
1056 });
1057 Method(delegate
1058 {
1059 if (c.trait is TraitMerchantBlack && Guild.Thief.relation.rank < 4 && (Guild.Thief.IsCurrentZone || (!(EClass._zone.id == "derphy") && !(EClass._zone.id == "kapul") && !EClass._zone.IsPCFaction)))
1060 {
1061 SE.Play("click_chat");
1062 TempTalkTopic("shop_blackmarket_noaccess", StepEnd);
1063 }
1064 else if (EClass.player.IsCriminal && !EClass._zone.AllowCriminal && !EClass._zone.IsPCFaction && !c.trait.AllowCriminal)
1065 {
1066 SE.Play("click_chat");
1067 TempTalkTopic("shop_criminal", StepEnd);
1068 }
1069 else
1070 {
1071 sequence.Exit();
1072 manager.layer.Close();
1073 c.trait.OnBarter();
1074 if ((bool)WidgetFeed.Instance)
1075 {
1076 WidgetFeed.Instance.Talk(c, "barter");
1077 }
1078 layer = EClass.ui.AddLayer(LayerInventory.CreateBuy(c, c.trait.CurrencyType, c.trait.PriceType));
1079 }
1080 }, () => !layer, StepDefault);
1081 Step("_buyPlan");
1082 Method(delegate
1083 {
1084 List<ResearchPlan> plans = new List<ResearchPlan>();
1085 foreach (SourceResearch.Row row in EClass.sources.researches.rows)
1086 {
1088 {
1089 plans.Add(ResearchPlan.Create(row.id));
1090 }
1091 }
1092 EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1093 {
1094 list.moldItem = Resources.Load<ItemGeneral>("UI/Element/Item/ItemGeneralBarter").transform;
1095 list.callbacks = new UIList.Callback<ResearchPlan, ItemGeneral>
1096 {
1097 onInstantiate = delegate(ResearchPlan a, ItemGeneral b)
1098 {
1099 b.button1.mainText.text = a.Name;
1100 UIItem uIItem = Util.Instantiate<UIItem>("UI/Element/Item/Extra/costBarter", b.layout);
1102 uIItem.text1.SetText(c2.cost.ToString() ?? "", (c2.resource.value >= c2.cost) ? FontColor.Good : FontColor.Bad);
1103 uIItem.image1.sprite = c2.resource.Sprite;
1104 b.button1.SetTooltip(delegate(UITooltip t)
1105 {
1106 a.WriteNote(t.note);
1107 });
1108 b.button1.onClick.AddListener(delegate
1109 {
1110 if (c2.resource.value < c2.cost)
1111 {
1112 SE.Beep();
1113 }
1114 else
1115 {
1116 c2.resource.Mod(-c2.cost);
1117 plans.Remove(a);
1119 SE.Pay();
1120 list.List(refreshHighlight: true);
1121 }
1122 });
1123 b.RebuildLayout(recursive: true);
1124 },
1125 onList = delegate
1126 {
1127 foreach (ResearchPlan item9 in plans)
1128 {
1129 list.Add(item9);
1130 }
1131 }
1132 };
1133 }).SetSize()
1134 .windows[0].AttachCurrency().Build(new UICurrency.Options
1135 {
1136 branchMoney = true
1137 });
1138 }, () => !layer, StepDefault);
1139 Step("_upgradeHearth");
1140 Method(delegate
1141 {
1142 int cost = EClass.Branch.GetUpgradeCost();
1143 GameLang.refDrama1 = Lang._currency(cost, "money");
1144 GameLang.refDrama2 = (EClass.Branch.lv + 1).ToString() ?? "";
1145 GameLang.refDrama3 = "hearth_dialog".lang(EClass.Branch.GetHearthHint(EClass.Branch.lv + 1));
1146 TempTalkTopic("upgrade_heath1", null);
1147 Choice("yes", delegate
1148 {
1149 if (EClass.pc.GetCurrency() < cost)
1150 {
1151 TempTalkTopic("nomoney", StepDefault);
1152 }
1153 else
1154 {
1155 EClass.pc.ModCurrency(-cost);
1156 SE.Pay();
1157 LayerDrama.Instance.SetOnKill(delegate
1158 {
1159 EClass.Branch.Upgrade();
1160 });
1161 TempTalkTopic("upgrade_heath2", StepEnd);
1162 }
1163 });
1164 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1165 });
1166 Step("_sellFame");
1167 Method(delegate
1168 {
1169 int cost = EClass.player.fame / 5;
1170 GameLang.refDrama1 = cost.ToString() ?? "";
1171 if (cost == 0)
1172 {
1173 TempTalkTopic("goto2", StepDefault);
1174 }
1175 else
1176 {
1177 TempTalkTopic("sellFame1", null);
1178 Choice("yes", delegate
1179 {
1180 EClass.pc.ModCurrency(cost);
1181 SE.Pay();
1182 EClass.player.ModFame(-cost);
1183 TempTalkTopic("sellFame2", StepDefault);
1184 });
1185 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1186 }
1187 });
1188 Step("_investZone");
1189 Method(delegate
1190 {
1191 int cost = CalcMoney.InvestZone(EClass.pc);
1192 GameLang.refDrama1 = cost.ToString() ?? "";
1193 GameLang.refDrama2 = ((EClass._zone.investment < 0) ? int.MaxValue : EClass._zone.investment).ToString() ?? "";
1194 TempTalkTopic("invest1", null);
1195 Choice("yes", delegate
1196 {
1197 Invest(quick: false);
1198 });
1199 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1200 Choice("quickInvest", delegate
1201 {
1202 Invest(quick: true);
1203 });
1204 void Invest(bool quick)
1205 {
1206 if (EClass.pc.GetCurrency() < cost)
1207 {
1208 TempTalkTopic("nomoney", StepDefault);
1209 }
1210 else
1211 {
1212 EClass.pc.ModCurrency(-cost);
1213 SE.Pay();
1214 EClass._zone.investment += cost;
1217 EClass.pc.ModExp(292, 100 + EClass._zone.development * 2);
1218 if (quick)
1219 {
1220 TempGoto("_investZone");
1221 }
1222 else
1223 {
1224 TempTalkTopic("invest2", StepDefault);
1225 }
1226 }
1227 }
1228 });
1229 Step("_investShop");
1230 Method(delegate
1231 {
1232 int cost = CalcMoney.InvestShop(EClass.pc, c);
1233 GameLang.refDrama1 = cost.ToString() ?? "";
1234 GameLang.refDrama2 = c.trait.ShopLv.ToString() ?? "";
1235 TempTalkTopic("invest_shop1", null);
1236 Choice("yes", delegate
1237 {
1238 Invest(quick: false);
1239 });
1240 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1241 Choice("quickInvest", delegate
1242 {
1243 Invest(quick: true);
1244 });
1245 void Invest(bool quick)
1246 {
1247 if (EClass.pc.GetCurrency() < cost)
1248 {
1249 TempTalkTopic("nomoney", StepDefault);
1250 }
1251 else
1252 {
1253 EClass.pc.ModCurrency(-cost);
1254 SE.Pay();
1255 c.c_invest++;
1257 EClass.pc.ModExp(292, 50 + c.c_invest * 20);
1258 Guild.Merchant.AddContribution(5 + c.c_invest);
1259 if (quick)
1260 {
1261 TempGoto("_investShop");
1262 }
1263 else
1264 {
1265 TempTalkTopic("invest_shop2", StepDefault);
1266 }
1267 }
1268 }
1269 });
1270 Step("_changeTitle");
1271 Method(delegate
1272 {
1273 EClass.player.title = WordGen.Get("title");
1274 GameLang.refDrama1 = EClass.player.title;
1275 TempTalk("changeTitle", StepDefault);
1276 }, null, StepDefault);
1277 Step("_buyLand");
1278 Method(delegate
1279 {
1280 bool num4 = EClass._map.bounds.CanExpand(1);
1281 int costLand = CalcGold.ExpandLand();
1282 GameLang.refDrama1 = "";
1283 GameLang.refDrama2 = costLand.ToString() ?? "";
1284 if (!num4)
1285 {
1286 TempTalkTopic("expand3", StepDefault);
1287 }
1288 else
1289 {
1290 TempTalkTopic("expand1", StepDefault);
1291 Choice("yes", delegate
1292 {
1293 if (EClass.pc.GetCurrency("money2") < costLand)
1294 {
1295 TempTalkTopic("nomoney", StepDefault);
1296 }
1297 else
1298 {
1299 SE.Pay();
1300 EClass.pc.ModCurrency(-costLand, "money2");
1301 TempTalkTopic("expand2", StepDefault);
1302 EClass._map.bounds.Expand(1);
1303 SE.Play("good");
1304 EClass._map.RefreshAllTiles();
1305 WidgetMinimap.UpdateMap();
1306 ScreenEffect.Play("Firework");
1307 }
1308 });
1309 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1310 }
1311 });
1312 Step("_meeting");
1313 Method(delegate
1314 {
1315 sequence.Exit();
1316 manager.layer.Close();
1318 });
1319 End();
1320 Step("_give");
1321 Method(delegate
1322 {
1323 manager.Hide();
1324 layer = LayerDragGrid.CreateGive(c);
1325 layer.SetOnKill(manager.Show);
1326 }, () => !layer, StepDefault);
1327 Step("_blessing");
1328 Method(delegate
1329 {
1330 bool flag5 = c.trait is TraitMiko_Mifu;
1331 TempTalkTopic("blessing", StepEnd);
1333 {
1334 foreach (Chara member in EClass.pc.party.members)
1335 {
1336 if (c.trait is TraitMiko_Mifu)
1337 {
1338 member.AddCondition<ConHolyVeil>()?.SetPerfume();
1339 }
1340 else if (c.trait is TraitMiko_Nefu)
1341 {
1342 member.AddCondition<ConEuphoric>()?.SetPerfume();
1343 }
1344 else
1345 {
1346 member.AddCondition<ConNightVision>()?.SetPerfume();
1347 }
1348 member.Say("blessing", member);
1349 member.PlaySound("pray");
1350 member.PlayEffect("holyveil");
1351 }
1352 c.isRestocking = true;
1353 });
1354 c.c_dateStockExpire = EClass.world.date.GetRaw() + (flag5 ? 180 : 180) * 1440;
1355 });
1356 Step("_train");
1357 Method(delegate
1358 {
1359 layer = EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1360 {
1361 list.moldItem = Resources.Load<ButtonElement>("UI/Element/Button/ButtonElementTrain").transform;
1362 list.callbacks = new UIList.Callback<Element, ButtonElement>
1363 {
1364 onClick = delegate(Element a, ButtonElement b)
1365 {
1366 int num4 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1367 if (num4 == 0)
1368 {
1369 SE.Beep();
1370 }
1371 else if (EClass.pc.TryPay(num4, "plat"))
1372 {
1373 if (EClass.pc.elements.HasBase(a.id))
1374 {
1376 }
1377 else
1378 {
1380 }
1381 list.Redraw();
1383 }
1384 },
1385 onRedraw = delegate(Element a, ButtonElement b, int i)
1386 {
1387 bool flag5 = EClass.pc.elements.HasBase(a.id);
1388 b.imagePotential.enabled = flag5;
1390 int plat = EClass.pc.GetCurrency("plat");
1391 int cost = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1392 b.mainText.text = b.mainText.text + " " + (flag5 ? "" : ("notLearned".lang() + " "));
1393 b.subText2.text = ((cost == 0) ? "-" : (cost.ToString() ?? "")).TagColor(() => plat >= cost && cost != 0);
1394 b.RebuildLayout();
1395 },
1396 onInstantiate = delegate
1397 {
1398 },
1399 onList = delegate
1400 {
1401 foreach (SourceElement.Row item10 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a)
1402 {
1403 if (a.tag.Contains("unused"))
1404 {
1405 return false;
1406 }
1407 if (a.tag.Contains("guild"))
1408 {
1409 if (a.tag.Contains("fighter") && Guild.Fighter.IsCurrentZone)
1410 {
1411 return true;
1412 }
1413 if (a.tag.Contains("mage") && Guild.Mage.IsCurrentZone)
1414 {
1415 return true;
1416 }
1417 if (a.tag.Contains("thief") && Guild.Thief.IsCurrentZone)
1418 {
1419 return true;
1420 }
1421 if (a.tag.Contains("merchant") && Guild.Merchant.IsCurrentZone)
1422 {
1423 return true;
1424 }
1425 return false;
1426 }
1427 if (isInGuild)
1428 {
1429 return false;
1430 }
1431 return a.category == "skill" && a.categorySub == c.trait.IDTrainer;
1432 }).ToList())
1433 {
1434 list.Add(Element.Create(item10.id));
1435 }
1436 }
1437 };
1438 }).SetSize()
1439 .SetTitles("wTrain")
1440 .SetOnKill(SE.PopDrama);
1441 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1442 {
1443 plat = true
1444 });
1445 }, () => !layer, StepDefault);
1446 Step("_changeDomain");
1447 Method(delegate
1448 {
1449 layer = EClass.player.SelectDomain(SE.PopDrama);
1450 }, () => !layer, StepDefault);
1451 Step("_revive");
1452 Method(delegate
1453 {
1454 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleRevive>("h_revive"));
1455 layer.SetOnKill(SE.PopDrama);
1456 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1457 {
1458 money = true
1459 });
1460 }, () => !layer, StepDefault);
1461 Step("_buySlave");
1462 Method(delegate
1463 {
1464 LayerPeople.slaveToBuy = null;
1465 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleBuySlave>("h_invBuy", c));
1466 layer.SetOnKill(SE.PopDrama);
1467 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1468 {
1469 money = true
1470 });
1471 manager.Load();
1472 }, () => !layer, "_buySlaveConfirm");
1473 Step("_buySlaveConfirm");
1474 Method(delegate
1475 {
1477 if (tc == null)
1478 {
1479 RumorChill();
1480 }
1481 else
1482 {
1483 int cost = CalcMoney.BuySlave(tc);
1484 GameLang.refDrama1 = cost.ToString() ?? "";
1485 GameLang.refDrama2 = tc.Name;
1486 TempTalkTopic("slave_buy", null);
1487 Choice("yes", delegate
1488 {
1489 if (!EClass.pc.TryPay(cost))
1490 {
1491 TempTalkTopic("nomoney", StepDefault);
1492 }
1493 else
1494 {
1495 GameLang.refDrama1 = tc.Name;
1496 EClass._zone.AddCard(tc, EClass.pc.pos.GetNearestPoint());
1497 tc.MakeAlly();
1498 c.GetObj<SlaverData>(5).list.Remove(tc);
1499 TempTalkTopic("slave_buy2", StepEnd);
1500 }
1501 }).DisableSound();
1502 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1503 }
1504 });
1505 Goto(StepDefault);
1506 Step("_trade");
1507 Method(delegate
1508 {
1509 layer = EClass.ui.AddLayer(LayerInventory.CreateContainer(c));
1510 }, () => !layer, StepDefault);
1511 Step("_identify");
1512 Method(delegate
1513 {
1514 manager.Hide();
1515 c.trait.OnBarter();
1516 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: false, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: false), -1);
1517 layer.SetOnKill(manager.Show);
1518 }, () => !layer, StepDefault);
1519 Step("_identifyAll");
1520 Method(delegate
1521 {
1522 int costIdentify = 0;
1523 int numIdentify = 0;
1524 int numSuperior = 0;
1525 EClass.pc.things.Foreach(delegate(Thing t)
1526 {
1527 if (!t.IsIdentified && t.c_IDTState != 1)
1528 {
1529 numIdentify++;
1530 costIdentify += CalcMoney.Identify(EClass.pc, superior: false);
1531 }
1532 });
1533 GameLang.refDrama1 = costIdentify.ToString() ?? "";
1534 GameLang.refDrama2 = numIdentify.ToString() ?? "";
1535 if (numIdentify == 0)
1536 {
1537 TempTalkTopic("appraise3", StepDefault);
1538 }
1539 else
1540 {
1541 TempTalkTopic("appraise1", StepDefault);
1542 Choice("yes", delegate
1543 {
1544 if (EClass.pc.GetCurrency() < costIdentify)
1545 {
1546 TempTalkTopic("nomoney", StepDefault);
1547 }
1548 else
1549 {
1550 SE.Pay();
1551 EClass.pc.ModCurrency(-costIdentify);
1552 foreach (Thing item11 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true))
1553 {
1554 item11.Thing.Identify(show: false);
1555 if (!item11.IsInstalled)
1556 {
1557 numSuperior++;
1558 }
1559 }
1560 TempTalkTopic("appraise2", StepDefault);
1561 }
1562 });
1563 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1564 }
1565 });
1566 Step("_identifySP");
1567 Method(delegate
1568 {
1569 manager.Hide();
1570 c.trait.OnBarter();
1571 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: true, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: true), -1);
1572 layer.SetOnKill(manager.Show);
1573 }, () => !layer, StepDefault);
1574 Step("_bout");
1575 Method(delegate
1576 {
1577 TempTalkTopic("bout1", StepDefault);
1578 Choice("yes", delegate
1579 {
1581 {
1582 uidTarget = c.uid,
1583 targetX = c.pos.x,
1584 targetZ = c.pos.z
1585 });
1586 c.SetGlobal();
1588 {
1589 target = c
1590 });
1591 c.SetInt(59, EClass.world.date.GetRaw());
1593 {
1594 EClass.pc.MoveZone(z, ZoneTransition.EnterState.Center);
1595 });
1596 TempTalkTopic("bout2", StepEnd);
1597 });
1598 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1599 }, null, StepDefault);
1600 Step("_rob");
1601 Method(delegate
1602 {
1603 TempTalkTopic("rob1", StepDefault);
1604 Choice("yes_rob", delegate
1605 {
1606 sequence.Exit();
1607 c.Talk("callGuards");
1608 foreach (Chara chara2 in EClass._map.charas)
1609 {
1610 if (chara2 == c || chara2.master == c)
1611 {
1612 chara2.SetHostility(Hostility.Enemy);
1613 chara2.DoHostileAction(EClass.pc.party.members.RandomItem());
1614 }
1615 }
1617 {
1618 EClass._zone.SetBGM(102);
1619 }
1620 EClass.player.ModKarma((!c.GetBool(129)) ? 1 : (-1));
1621 c.SetBool(129, enable: true);
1622 });
1623 Choice("no_rob", StepDefault, cancel: true).SetOnClick(RumorChill);
1624 }, null, StepDefault);
1625 Step("_news");
1626 Method(delegate
1627 {
1629 if (zone == null)
1630 {
1631 TempTalkTopic("news2", null);
1632 }
1633 else
1634 {
1635 zone.isKnown = true;
1636 Msg.Say("discoverZone", zone.Name);
1637 GameLang.refDrama1 = zone.Name;
1638 TempTalkTopic("news1", null);
1639 }
1640 c.SetInt(37, EClass.world.date.GetRaw());
1641 });
1642 Method(delegate
1643 {
1644 manager.Load();
1645 }, null, StepDefault);
1646 Step("_heal");
1647 Method(delegate
1648 {
1649 int costHeal = CalcMoney.Heal(EClass.pc);
1650 GameLang.refDrama1 = costHeal.ToString() ?? "";
1651 TempTalkTopic("healer1", null);
1652 Choice("yes", delegate
1653 {
1654 if (EClass.pc.GetCurrency() < costHeal)
1655 {
1656 TempTalkTopic("nomoney", StepDefault);
1657 }
1658 else
1659 {
1660 SE.Pay();
1661 foreach (Chara member2 in EClass.pc.party.members)
1662 {
1663 ActEffect.Proc(EffectId.HealComplete, member2);
1664 }
1665 EClass.pc.ModCurrency(-costHeal);
1666 TempTalkTopic("healer2", StepEnd);
1667 }
1668 });
1669 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1670 });
1671 Step("_food");
1672 Method(delegate
1673 {
1674 int cost = CalcMoney.Meal(EClass.pc);
1675 GameLang.refDrama1 = cost.ToString() ?? "";
1676 TempTalkTopic("food1", null);
1677 Choice("yes", delegate
1678 {
1679 if (EClass.pc.hunger.GetPhase() <= 0)
1680 {
1681 TempTalkTopic("alreadyFull", StepDefault);
1682 }
1683 else
1684 {
1685 if (EClass.pc.GetCurrency() >= cost)
1686 {
1687 SE.Pay();
1688 EClass.pc.ModCurrency(-cost);
1689 TempTalkTopic("food2", StepDefault);
1690 {
1691 foreach (Chara member3 in EClass.pc.party.members)
1692 {
1693 if (member3.hunger.GetPhase() > 0)
1694 {
1695 FoodEffect.Proc(member3, ThingGen.Create("dish_lunch"), consume: false);
1696 member3.hunger.value = 0;
1697 }
1698 }
1699 return;
1700 }
1701 }
1702 TempTalkTopic("nomoney", StepDefault);
1703 }
1704 });
1705 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1706 });
1707 int[] bankTier = new int[5] { 100, 1000, 10000, 100000, 1000000 };
1708 Step("_deposit");
1709 Method(delegate
1710 {
1711 sequence.Exit();
1712 manager.layer.Close();
1713 if ((bool)WidgetFeed.Instance)
1714 {
1715 WidgetFeed.Instance.Talk(c, "barter");
1716 }
1717 SE.Play("shop_open");
1719 }, () => !layer, StepDefault);
1720 End();
1721 Step("_copyItem");
1722 Method(delegate
1723 {
1724 sequence.Exit();
1725 manager.layer.Close();
1726 if ((bool)WidgetFeed.Instance)
1727 {
1728 WidgetFeed.Instance.Talk(c, "barter");
1729 }
1730 SE.Play("shop_open");
1731 c.trait.OnBarter();
1732 if (c.c_copyContainer == null)
1733 {
1734 c.c_copyContainer = ThingGen.Create("container_deposit");
1735 }
1736 int numCopyItem = c.trait.NumCopyItem;
1737 c.c_copyContainer.things.SetSize(numCopyItem, 1);
1738 layer = LayerInventory.CreateContainer<InvOwnerCopyShop>(c, c.c_copyContainer);
1739 }, () => !layer, StepDefault);
1740 End();
1741 int[] taxTier = new int[6] { 0, 1000, 2000, 5000, 10000, 20000 };
1742 Step("_extraTax");
1743 Method(delegate
1744 {
1745 GameLang.refDrama1 = Lang._currency(EClass.player.extraTax, "money");
1746 TempTalkTopic("extraTax", null);
1747 int[] array = taxTier;
1748 foreach (int num4 in array)
1749 {
1750 int _i = num4;
1751 Choice(Lang._currency(_i, showUnit: true), delegate
1752 {
1753 EClass.player.extraTax = _i;
1754 GameLang.refDrama1 = Lang._currency(_i, "money");
1755 TempTalkTopic("extraTax2", StepDefault);
1756 });
1757 }
1758 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1759 });
1760 Step("_withdraw");
1761 Method(delegate
1762 {
1763 int bankMoney = EClass.player.bankMoney;
1764 GameLang.refDrama1 = bankMoney.ToString() ?? "";
1765 TempTalkTopic("banker2", null);
1766 int[] array = bankTier;
1767 foreach (int num4 in array)
1768 {
1769 int _i = num4;
1770 if (EClass.player.bankMoney >= _i)
1771 {
1772 Choice(Lang._currency(_i, showUnit: true), delegate
1773 {
1774 SE.Pay();
1775 EClass.pc.ModCurrency(_i);
1776 EClass.player.bankMoney -= _i;
1777 TempTalkTopic("banker4", StepDefault);
1778 });
1779 }
1780 }
1781 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1782 });
1783 Step("_disableMove");
1784 Method(delegate
1785 {
1786 c.noMove = true;
1787 c.orgPos = new Point(c.pos);
1788 c.Talk("ok");
1789 });
1790 End();
1791 Step("_enableMove");
1792 Method(delegate
1793 {
1794 c.noMove = false;
1795 c.orgPos = null;
1796 c.Talk("thanks");
1797 });
1798 End();
1799 Step("_bye");
1800 Method(delegate
1801 {
1802 c.Talk("bye");
1803 });
1804 End();
1805 Step("_end");
1806 End();
1807 void BackChill()
1808 {
1809 Method(RumorChill, null, StepDefault);
1810 }
1811 string GetTalk(string id)
1812 {
1813 return c.GetTalkText(id);
1814 }
1815 void RumorChill()
1816 {
1817 rumor = GetTalk("chill");
1818 }
1819 void Talk(string idTalk, string idJump)
1820 {
1821 _Talk("tg", GetTalk(idTalk), idJump);
1822 }
1823 void TempCancel()
1824 {
1825 EnableCancel("back");
1826 }
1827 void TempTalk(string idTalk, string idJump)
1828 {
1829 _TempTalk("tg", GetTalk(idTalk), idJump);
1830 }
1831 void TempTalkTopic(string idTopc, string idJump)
1832 {
1833 _TempTalk("tg", GetTopic(c, idTopc), idJump);
1834 }
1835 bool taken()
1836 {
1837 if (c.quest != null)
1838 {
1839 return EClass.game.quests.list.Contains(c.quest);
1840 }
1841 return false;
1842 }
1843 }
1844
1845 public string GetRumor(Chara c)
1846 {
1847 if (c.interest <= 0)
1848 {
1849 return GetText(c, "rumor", "bored");
1850 }
1851 if (HasTopic("unique", c.id))
1852 {
1853 return GetText(c, "unique", c.id);
1854 }
1855 if (EClass.rnd(2) == 0 && !c.trait.IDRumor.IsEmpty())
1856 {
1857 return GetText(c, "rumor", c.trait.IDRumor);
1858 }
1859 if (EClass.rnd(2) == 0 && HasTopic("zone", EClass._zone.id))
1860 {
1861 return GetText(c, "zone", EClass._zone.id);
1862 }
1863 if (EClass.rnd(2) == 0)
1864 {
1865 return GetText(c, "rumor", "interest_" + c.bio.idInterest.ToEnum<Interest>());
1866 }
1867 if (EClass.rnd(2) == 0)
1868 {
1869 return c.GetTalkText("rumor");
1870 }
1871 if (EClass.rnd(4) == 0)
1872 {
1873 return GetText(c, "rumor", "hint");
1874 }
1875 return GetText(c, "rumor", "default");
1876 }
1877
1878 public bool HasTopic(string idSheet, string idTopic)
1879 {
1880 return Lang.GetDialogSheet(idSheet).map.ContainsKey(idTopic);
1881 }
1882
1883 public string GetText(Chara c, string idSheet, string idTopic)
1884 {
1885 if (!idTopic.IsEmpty() && manager.customTalkTopics.ContainsKey(idTopic))
1886 {
1887 return manager.customTalkTopics[idTopic];
1888 }
1889 string[] dialog = Lang.GetDialog(idSheet, idTopic);
1890 if (!(idSheet != "unique"))
1891 {
1892 return dialog.RandomItem();
1893 }
1894 return c.ApplyTone(dialog.RandomItem());
1895 }
1896
1897 public string GetTopic(Chara c, string idTopic = null)
1898 {
1899 return GetText(c, "general", idTopic);
1900 }
1901
1902 public void BuildTextData()
1903 {
1904 Step("import");
1905 string[] array = setup.textData.Split(new string[1] { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
1906 foreach (string text in array)
1907 {
1908 if (!(text == Environment.NewLine))
1909 {
1910 _Talk("", text.TrimStart(Environment.NewLine.ToCharArray()).TrimEnd(Environment.NewLine.ToCharArray()));
1911 }
1912 }
1913 End();
1914 }
1915
1917 {
1918 events.Add(e);
1919 e.sequence = sequence;
1920 return e;
1921 }
1922
1923 public void Step(string step)
1924 {
1925 Event(new DramaEvent
1926 {
1927 step = step
1928 });
1929 }
1930
1931 public void Method(Action action, Func<bool> endFunc = null, string idJump = null)
1932 {
1933 Event(new DramaEventMethod(action)
1934 {
1935 endFunc = endFunc
1936 });
1937 if (!idJump.IsEmpty())
1938 {
1939 Event(new DramaEventGoto(idJump));
1940 }
1941 }
1942
1943 public void End()
1944 {
1945 Event(new DramaEventGoto("end"));
1946 }
1947
1948 public void Goto(string idJump)
1949 {
1950 Event(new DramaEventGoto(idJump));
1951 }
1952
1953 public void GotoDefault()
1954 {
1955 Event(new DramaEventGoto(StepDefault));
1956 }
1957
1958 public void _Talk(string idActor, string text, string idJump = null)
1959 {
1960 manager.lastTalk = Event(new DramaEventTalk
1961 {
1962 idActor = idActor,
1963 idJump = idJump,
1964 text = text
1965 }) as DramaEventTalk;
1966 }
1967
1968 public void _Talk(string idActor, Func<string> funcText, string idJump = null)
1969 {
1970 manager.lastTalk = Event(new DramaEventTalk
1971 {
1972 idActor = idActor,
1973 idJump = idJump,
1974 funcText = funcText
1975 }) as DramaEventTalk;
1976 }
1977
1978 public void _TempTalk(string idActor, string text, string idJump = null)
1979 {
1980 manager.lastTalk = Event(new DramaEventTalk
1981 {
1982 idActor = idActor,
1983 idJump = idJump,
1984 text = text,
1985 temp = true
1986 }) as DramaEventTalk;
1987 sequence.tempEvents.Add(manager.lastTalk);
1988 }
1989
1990 public void TempGoto(string idJump = null)
1991 {
1992 sequence.tempEvents.Clear();
1993 sequence.Play(idJump);
1994 }
1995
1996 public DramaChoice Choice(string lang, string idJump, bool cancel = false)
1997 {
1998 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1999 manager.lastTalk.AddChoice(dramaChoice);
2000 if (cancel)
2001 {
2002 EnableCancel(idJump);
2003 }
2004 return dramaChoice;
2005 }
2006
2007 public DramaChoice Choice(string lang, Action onJump)
2008 {
2009 DramaChoice dramaChoice = new DramaChoice(lang.lang(), null);
2010 dramaChoice.onJump = onJump;
2011 manager.lastTalk.AddChoice(dramaChoice);
2012 return dramaChoice;
2013 }
2014
2015 public DramaChoice Choice2(string lang, string idJump)
2016 {
2017 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
2018 manager.lastTalk.AddChoice(dramaChoice);
2019 sequence.manager._choices.Add(dramaChoice);
2020 return dramaChoice;
2021 }
2022
2023 public void EnableCancel(string idCancelJump = null)
2024 {
2025 manager.lastTalk.canCancel = true;
2026 manager.lastTalk.idCancelJump = idCancelJump;
2027 }
2028
2029 public List<Card> GetListGuide()
2030 {
2031 List<Card> list = new List<Card>();
2032 foreach (Thing thing in EClass._map.things)
2033 {
2034 if (thing.IsInstalled && thing.trait.GuidePriotiy > 0)
2035 {
2036 list.Add(thing);
2037 }
2038 }
2039 foreach (Chara chara in EClass._map.charas)
2040 {
2041 if (!chara.IsPCParty && chara.trait.GuidePriotiy > 0)
2042 {
2043 list.Add(chara);
2044 }
2045 }
2046 list.Sort((Card a, Card b) => b.trait.GuidePriotiy - a.trait.GuidePriotiy);
2047 return list;
2048 }
2049}
BlessedState
Definition: BlessedState.cs:2
ChatCategory
Definition: ChatCategory.cs:2
if(!match.Success)
static bool not(DramaManager dm, Dictionary< string, string > line, params string[] parameters)
FactionMemberType
FontColor
Definition: FontColor.cs:2
Interest
Definition: Interest.cs:2
NameStyle
Definition: NameStyle.cs:2
Rarity
Definition: Rarity.cs:2
ShopType
Definition: ShopType.cs:2
SlaverType
Definition: SlaverType.cs:2
bool CanInvite()
Definition: Affinity.cs:56
void OnTalkRumor()
Definition: Affinity.cs:190
bool IsUnderAge(Chara c)
Definition: Biography.cs:266
int idInterest
Definition: Biography.cs:245
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
ElementContainerCard elements
Definition: Card.cs:42
string id
Definition: Card.cs:36
bool c_lockedHard
Definition: Card.cs:1063
bool isLostProperty
Definition: Card.cs:809
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
int c_lockLv
Definition: Card.cs:991
Biography bio
Definition: Card.cs:45
Rarity rarity
Definition: Card.cs:317
string Name
Definition: Card.cs:2191
int CHA
Definition: Card.cs:2417
int GetCurrency(string id="money")
Definition: Card.cs:4156
int c_IDTState
Definition: Card.cs:1297
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7351
Point pos
Definition: Card.cs:60
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
Trait trait
Definition: Card.cs:54
void ModCurrency(int a, string id="money")
Definition: Card.cs:4142
bool TryPay(int a, string id="money")
Definition: Card.cs:4106
void Destroy()
Definition: Card.cs:5314
bool c_isImportant
Definition: Card.cs:1051
ThingContainer things
Definition: Card.cs:39
bool IsInstalled
Definition: Card.cs:2451
virtual bool isChara
Definition: Card.cs:2135
void ModExp(string alias, int a)
Definition: Card.cs:2781
bool IsIdentified
Definition: Card.cs:2447
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2567
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7324
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:7371
int c_uidAttune
Definition: Card.cs:1212
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:8577
override bool IsAliveInCurrentZone
Definition: Chara.cs:567
BaseCondition GetCondition(string idCon)
Definition: Chara.cs:10103
new TraitChara trait
Definition: Chara.cs:509
bool IsMofuable
Definition: Chara.cs:1158
override bool IsGlobal
Definition: Chara.cs:628
override bool IsPCParty
Definition: Chara.cs:633
Party party
Definition: Chara.cs:43
int interest
Definition: Chara.cs:321
bool HasCondition(string alias)
Definition: Chara.cs:10047
AIAct SetAI(AIAct g)
Definition: Chara.cs:9490
Stats hunger
Definition: Chara.cs:1201
override bool IsPCFaction
Definition: Chara.cs:689
string NameBraced
Definition: Chara.cs:520
void SetAIImmediate(AIAct g)
Definition: Chara.cs:9522
List< Hobby > ListHobbies(bool useMemberType=true)
Definition: Chara.cs:9581
string NameTitled
Definition: Chara.cs:522
SourceThing.Row GetFavFood()
Definition: Chara.cs:8544
bool CanBloom()
Definition: Chara.cs:9254
Affinity affinity
Definition: Chara.cs:318
void BanishAllMinions()
Definition: Chara.cs:2613
Religion faith
Definition: Chara.cs:443
void MoveZone(string alias)
Definition: Chara.cs:3577
bool godMode
Definition: CoreDebug.cs:189
bool showFav
Definition: CoreDebug.cs:242
bool enable
Definition: CoreDebug.cs:302
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
string NameMonth
Definition: Date.cs:147
int year
Definition: Date.cs:38
bool IsExpired(int time)
Definition: Date.cs:338
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)
DramaChoice Choice(string lang, Action onJump)
void Goto(string idJump)
void _Talk(string idActor, string text, string idJump=null)
DramaChoice Choice2(string lang, string idJump)
List< DramaEvent > events
DramaEvent Event(DramaEvent e)
string GetTopic(Chara c, string idTopic=null)
void _Talk(string idActor, Func< string > funcText, string idJump=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)
void AddChoice(DramaChoice choice)
LayerDrama layer
Definition: DramaManager.cs:14
DramaSequence Load()
List< DramaChoice > _choices
Definition: DramaManager.cs:50
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:52
DramaEventTalk lastTalk
Definition: DramaManager.cs:67
void Play(string id)
DramaManager manager
List< DramaEvent > tempEvents
string textData
Definition: DramaSetup.cs:11
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:667
void Train(int ele, int a=10)
void Learn(int ele, int v=1)
Element ModBase(int ele, int v)
bool HasBase(int ele)
Element GetElement(string alias)
int id
Definition: ELEMENT.cs:259
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1163
MeetingManager meetings
ResearchManager researches
string GetHearthHint(int a)
HomeResourceManager resources
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 refDrama4
Definition: GameLang.cs:12
static string refDrama5
Definition: GameLang.cs:14
static string refDrama3
Definition: GameLang.cs:10
ReligionManager religions
Definition: Game.cs:159
CardManager cards
Definition: Game.cs:156
Zone activeZone
Definition: Game.cs:252
bool IsSurvival
Definition: Game.cs:276
QuestManager quests
Definition: Game.cs:183
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:14
Definition: Lang.cs:7
static string[] GetDialog(string idSheet, string idTopic)
Definition: Lang.cs:246
static string langCode
Definition: Lang.cs:29
static ExcelData.Sheet GetDialogSheet(string idSheet)
Definition: Lang.cs:204
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:161
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 Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:66
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:106
static Chara slaveToBuy
Definition: LayerPeople.cs:23
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
List< Thing > things
Definition: Map.cs:52
List< Chara > charas
Definition: Map.cs:84
MapBounds bounds
Definition: Map.cs:55
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
Definition: Net.cs:12
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
Definition: Net.cs:335
void RemoveMember(Chara c)
Definition: Party.cs:116
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:1412
Layer SelectDomain(Action onKill=null)
Definition: Player.cs:1629
void ModFame(int a)
Definition: Player.cs:2192
void ModKarma(int a)
Definition: Player.cs:2636
int extraTax
Definition: Player.cs:999
void EndTurn(bool consume=true)
Definition: Player.cs:2179
string title
Definition: Player.cs:1074
int bankMoney
Definition: Player.cs:981
Definition: Point.cs:9
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
virtual string GetTalkComplete()
Definition: Quest.cs:685
static Quest Create(string _id, string _idPerson=null, Chara c=null, bool assignQuest=true)
Definition: Quest.cs:241
Chara chara
Definition: Quest.cs:105
virtual string GetTitle()
Definition: Quest.cs:613
virtual string NameDeliver
Definition: Quest.cs:239
long bonusMoney
Definition: Quest.cs:61
virtual bool Deliver(Chara c, Thing t=null)
Definition: Quest.cs:711
Zone CreateRandomSite(Zone center, int radius=8, string idSource=null, bool updateMesh=true, int lv=0)
Definition: Region.cs:141
ReligionMoonShadow MoonShadow
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)
Thing Find(int uid)
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:899
bool isEquipped
Definition: Thing.cs:17
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:532
void Attune(Chara c)
Definition: Thing.cs:2149
virtual string IDRumor
Definition: TraitChara.cs:138
virtual bool IsUnique
Definition: TraitChara.cs:34
virtual bool NeedBoutToJoin
Definition: TraitChara.cs:50
Definition: Trait.cs:7
CopyShopType
Definition: Trait.cs:20
virtual int GuidePriotiy
Definition: Trait.cs:100
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:354
void Sort()
Definition: UIList.cs:750
override void Redraw()
Definition: UIList.cs:793
override void List()
Definition: UIList.cs:770
void SetText(string s)
Definition: UIText.cs:163
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:55
ZoneEventManager events
Definition: Zone.cs:43
FactionBranch branch
Definition: Zone.cs:34
virtual bool IsUserZone
Definition: Zone.cs:278
bool IsInstance
Definition: Zone.cs:496
virtual bool AllowInvest
Definition: Zone.cs:257
Chara FindChara(string id)
Definition: Zone.cs:3356
virtual bool AllowCriminal
Definition: Zone.cs:254
void ModInfluence(int a)
Definition: Zone.cs:3908
bool IsPCFaction
Definition: Zone.cs:480
void ModDevelopment(int a)
Definition: Zone.cs:3918