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