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