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