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