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