Elin Decompiled Documentation EA 23.319 Nightly Patch 1
Loading...
Searching...
No Matches
DramaCustomSequence Class Reference
Inheritance diagram for DramaCustomSequence:
EClass

Public Member Functions

void Build (Chara c)
 
string GetRumor (Chara c)
 
bool HasTopic (string idSheet, string idTopic)
 
string GetText (Chara c, string idSheet, string idTopic)
 
string GetTopic (Chara c, string idTopic=null)
 
void BuildTextData ()
 
DramaEvent Event (DramaEvent e)
 
void Step (string step)
 
void Method (Action action, Func< bool > endFunc=null, string idJump=null)
 
void End ()
 
void Goto (string idJump)
 
void GotoDefault ()
 
void _Talk (string idActor, string text, string idJump=null)
 
void _Talk (string idActor, Func< string > funcText, string idJump=null)
 
void _TempTalk (string idActor, string text, string idJump=null)
 
void TempGoto (string idJump=null)
 
DramaChoice Choice (string lang, string idJump, bool cancel=false)
 
DramaChoice Choice (string lang, Action onJump)
 
DramaChoice Choice2 (string lang, string idJump)
 
void EnableCancel (string idCancelJump=null)
 
List< CardGetListGuide ()
 

Public Attributes

Card destCard
 
Chara destChara
 
Quest destQuest
 
Thing destThing
 
string idDefault
 
string idCustom
 
DramaSetup setup
 
DramaSequence sequence
 
List< DramaEventevents
 
DramaManager manager
 

Properties

string StepDefault [get]
 
string StepEnd [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 6 of file DramaCustomSequence.cs.

Member Function Documentation

◆ _Talk() [1/2]

void DramaCustomSequence._Talk ( string  idActor,
Func< string >  funcText,
string  idJump = null 
)
inline

Definition at line 1947 of file DramaCustomSequence.cs.

1948 {
1949 manager.lastTalk = Event(new DramaEventTalk
1950 {
1951 idActor = idActor,
1952 idJump = idJump,
1953 funcText = funcText
1954 }) as DramaEventTalk;
1955 }
DramaEvent Event(DramaEvent e)

◆ _Talk() [2/2]

void DramaCustomSequence._Talk ( string  idActor,
string  text,
string  idJump = null 
)
inline

Definition at line 1937 of file DramaCustomSequence.cs.

1938 {
1939 manager.lastTalk = Event(new DramaEventTalk
1940 {
1941 idActor = idActor,
1942 idJump = idJump,
1943 text = text
1944 }) as DramaEventTalk;
1945 }

Referenced by Build().

◆ _TempTalk()

void DramaCustomSequence._TempTalk ( string  idActor,
string  text,
string  idJump = null 
)
inline

Definition at line 1957 of file DramaCustomSequence.cs.

1958 {
1959 manager.lastTalk = Event(new DramaEventTalk
1960 {
1961 idActor = idActor,
1962 idJump = idJump,
1963 text = text,
1964 temp = true
1965 }) as DramaEventTalk;
1967 }
DramaEventTalk lastTalk
Definition: DramaManager.cs:67
List< DramaEvent > tempEvents

References DramaManager.lastTalk, and DramaSequence.tempEvents.

◆ Build()

void DramaCustomSequence.Build ( Chara  c)
inline

Definition at line 32 of file DramaCustomSequence.cs.

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 {
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 }
141 {
142 if (c.trait.CanGuide)
143 {
144 foreach (Quest item3 in EClass.game.quests.list)
145 {
146 if (!item3.IsRandomQuest)
147 {
148 continue;
149 }
150 Chara dest = ((item3.chara != null && item3.chara.IsAliveInCurrentZone) ? item3.chara : null);
151 if (dest != null)
152 {
153 Choice2("daGoto".lang(dest.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
154 {
155 destCard = dest;
156 });
157 }
158 if (!(item3 is QuestDeliver { IsDeliver: not false } questDeliver2) || questDeliver2.DestZone != EClass._zone || !EClass._zone.dictCitizen.ContainsKey(questDeliver2.uidTarget))
159 {
160 continue;
161 }
162 Chara dest2 = EClass._zone.FindChara(questDeliver2.uidTarget);
163 if (dest2 != null)
164 {
165 Choice2("daGoto".lang(dest2.Name, item3.GetTitle() ?? ""), "_goto").SetOnClick(delegate
166 {
167 destCard = dest2;
168 });
169 }
170 }
171 if (GetListGuide().Count > 0)
172 {
173 Choice2("daGuide", "_Guide");
174 }
175 }
177 {
178 if (c.trait is TraitGM_Mage && Guild.Mage.relation.rank >= 4)
179 {
180 Choice2("daChangeDomain", "_changeDomain").DisableSound();
181 }
182 if (c.trait.ShopType != 0)
183 {
184 if (!c.GetBool("disable_barter_choice"))
185 {
187 }
189 {
190 Choice2("daRob", "_rob");
191 }
192 }
193 if (c.trait.SlaverType != 0)
194 {
196 }
197 if (c.trait.CopyShop != 0)
198 {
199 Choice2(("daCopy" + c.trait.CopyShop).lang(c.trait.NumCopyItem.ToString() ?? ""), "_copyItem").DisableSound();
200 }
201 }
202 if (c.trait.HaveNews && c.GetInt(37) + 10080 < EClass.world.date.GetRaw())
203 {
204 Choice2("daNews", "_news");
205 }
206 if (!flag4 && !EClass._zone.IsInstance && !c.IsPCFaction && c.trait.CanBout && c.IsGlobal && c.GetInt(59) + 10080 < EClass.world.date.GetRaw())
207 {
208 Choice2("daBout", "_bout");
209 }
210 if (c.isDrunk || c.HasElement(1275) || EClass.debug.enable)
211 {
212 Choice2(flag2 ? "daBird" : "daTail", "_tail");
213 }
214 ConTransmuteHuman condition = EClass.pc.GetCondition<ConTransmuteHuman>();
215 bool num2;
216 if (condition == null)
217 {
218 if (EClass.pc.HasElement(1232) || EClass.pc.HasElement(1291))
219 {
220 goto IL_095c;
221 }
223 }
224 else
225 {
226 num2 = condition.IsBaby;
227 }
228 if (num2)
229 {
230 goto IL_095c;
231 }
232 goto IL_096d;
233 }
234 if (c.isDrunk || c.HasElement(1275) || EClass.debug.enable)
235 {
236 Choice2(flag2 ? "daBird" : "daTail", "_tail");
237 }
238 }
239 goto IL_0d86;
240 IL_095c:
241 Choice2("daMama", "_mama");
242 goto IL_096d;
243 IL_09bd:
244 if (c.trait.CanRevive)
245 {
246 Choice2("daRevive", "_revive").DisableSound();
247 }
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 }
309 {
310 Choice2("daBlessing", "_blessing");
311 }
312 goto IL_0d86;
313 IL_09ac:
314 Choice2("daBaby", "_baby");
315 goto IL_09bd;
316 IL_096d:
317 ConTransmuteHuman condition2 = c.GetCondition<ConTransmuteHuman>();
318 bool num3;
319 if (condition2 == null)
320 {
321 if (c.HasElement(1232))
322 {
323 goto IL_09ac;
324 }
325 num3 = c.HasElement(1291);
326 }
327 else
328 {
329 num3 = condition2.IsBaby;
330 }
331 if (num3)
332 {
333 goto IL_09ac;
334 }
335 goto IL_09bd;
336 IL_0d86:
337 if (c.IsHomeMember())
338 {
339 if (c.IsMaid)
340 {
342 {
343 Choice2("daMeeting".lang(EClass.Branch.meetings.list.Count.ToString() ?? ""), "_meeting");
344 }
345 Choice2("daBuyLand", "_buyLand");
346 Choice2("daChangeTitle", "_changeTitle");
347 }
348 if (c.noMove)
349 {
350 Choice2("enableMove", "_enableMove");
351 }
352 if (!c.IsPCParty && c.memberType != FactionMemberType.Livestock && c.trait.CanJoinParty)
353 {
354 Choice2("daJoinParty", "_joinParty");
355 }
356 if (!c.IsDisabled && (c.HasElement(1250) || (EClass.pc.IsMofuable && c.ability.Has(6627))))
357 {
358 Choice2("daSuck", "_suck");
359 }
360 Choice2("daFactionOther", "_factionOther");
361 }
362 if (c.trait is TraitLoytel && EClass.game.quests.Get<QuestDebt>() != null)
363 {
364 Choice2("daGreatDebt", "_greatDebt");
365 }
366 if (!flag)
367 {
368 Choice2("bye", "_bye");
369 EnableCancel();
370 }
371 Step("_factionOther");
372 Talk("what", StepDefault);
373 if (!c.IsMarried || EClass.debug.enable)
374 {
375 foreach (Thing item5 in EClass.pc.things.List((Thing a) => !a.c_isImportant && !a.isEquipped && a.c_uidAttune == 0 && (a.id == "amulet_engagement" || a.id == "ring_engagement")))
376 {
377 Thing _t3 = item5;
378 Choice("daMarry".lang(item5.Name), "_marry").SetOnClick(delegate
379 {
380 destThing = _t3;
381 });
382 }
383 }
384 if ((c.IsMarried && !c.c_love.IsWed) || EClass.debug.enable)
385 {
386 Choice("daWed", "_wed");
387 }
388 if (c.trait is TraitLoytel)
389 {
390 QuestDebt questDebt = EClass.game.quests.Get<QuestDebt>();
391 if (questDebt != null && questDebt.gaveBill)
392 {
393 Choice("daGreatDebt2", "_greatDebt2");
394 }
395 }
396 if (c.IsPCParty)
397 {
398 if (!c.isSummon)
399 {
400 Choice((c.GetInt(106) == 0) ? "daShutup" : "daShutup2", "_shutup");
401 if (c.CanInsult() || c.GetInt(108) == 1)
402 {
403 Choice((c.GetInt(108) == 0) ? "daInsult" : "daInsult2", "_insult");
404 }
405 }
406 }
407 else if (!c.noMove)
408 {
409 Choice("disableMove", "_disableMove");
410 }
411 Choice((c.GetInt(123) == 0) ? "daSleepBeside" : "daSleepBeside2", "_sleepBeside");
412 if (c.HasElement(1225))
413 {
414 Choice((c.GetInt(126) == 0) ? "daDisableLoyal" : "daDisableLoyal2", "_disableLoyal");
415 }
416 if (c.GetInt(113) == 0)
417 {
418 Choice("daEquipSharedOff", "_toggleSharedEquip");
419 }
420 else
421 {
422 Choice("daEquipSharedOn", "_toggleSharedEquip");
423 }
424 if (!c.IsMaid && c.homeBranch == EClass.Branch)
425 {
426 Choice("daMakeMaid", "_daMakeMaid");
427 }
428 if (c.trait.CanBeBanished && !c.IsPCParty)
429 {
430 Choice("daBanish", "_depart");
431 }
432 Choice("daNothing", StepDefault, cancel: true);
433 Step("_toggleSharedEquip");
434 Method(delegate
435 {
436 c.SetInt(113, (c.GetInt(113) == 0) ? 1 : 0);
437 });
438 _Talk("tg", GetTopic(c, (c.GetInt(113) == 0) ? "shutup" : "shutup2"));
439 End();
440 Step("_daMakeMaid");
441 Method(delegate
442 {
443 EClass.Branch.uidMaid = c.uid;
444 });
445 _Talk("tg", GetTopic(c, "becomeMaid"));
446 End();
447 Step("_joinParty");
448 Method(delegate
449 {
451 {
452 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
453 TempTalkTopic("invite3", StepDefault);
454 }
455 else
456 {
457 EClass.pc.party.AddMemeber(c, showMsg: true);
458 }
459 });
460 Talk("hired", StepEnd);
461 Step("_leaveParty");
462 Method(delegate
463 {
466 {
467 EClass.pc.Say("tame_send", c, c.homeZone.Name);
468 c.MoveZone(c.homeZone);
469 }
470 });
471 Goto("_end");
472 Step("_banish");
473 Goto("_bye");
474 Step("_makeLivestock");
475 Method(delegate
476 {
477 c.memberType = FactionMemberType.Livestock;
478 });
479 Talk("becomeLivestock", StepEnd);
480 Step("_makeResident");
481 Method(delegate
482 {
483 c.memberType = FactionMemberType.Default;
484 });
485 Talk("becomeResident", StepEnd);
486 Step("_depart");
487 Talk("depart_choice", StepDefault);
488 Choice("depart1", "_depart1");
489 Choice("depart2", "_depart2");
490 Step("_depart1");
491 Method(delegate
492 {
494 {
496 });
497 });
498 Talk("depart1", StepEnd);
499 Step("_depart2");
500 Talk("depart2", StepDefault);
501 Step("_gift");
502 Talk("gift_good", null);
503 End();
504 Step("_goto");
505 Method(delegate
506 {
507 GameLang.refDrama1 = destCard.Name;
508 if (destCard == c)
509 {
510 TempTalkTopic("goto2", StepDefault);
511 }
512 else
513 {
514 TempTalkTopic("goto", "_goto2");
515 }
516 });
517 Step("_goto2");
518 Method(delegate
519 {
521 {
522 destCard.Teleport(EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true) ?? EClass.pc.pos, silent: true, force: true);
523 }
525 EInput.Consume(consumeAxis: false, 20);
526 });
527 End();
528 Step("_rumor");
529 Talk("rumor", StepDefault);
530 Step("_lostProperty");
531 Method(delegate
532 {
533 GameLang.refDrama1 = destThing.Name;
536 });
537 _Talk("tg", GetTopic(c, "deliver_purse"), StepEnd);
538 _ = c.quest;
539 string text = ((!setup.forceJump.IsEmpty()) ? StepEnd : StepDefault);
540 Step("_deliver");
541 Method(delegate
542 {
543 GameLang.refDrama1 = destQuest.NameDeliver;
545 });
546 _Talk("tg", () => (destQuest != null) ? destQuest.GetTalkComplete().IsEmpty(GetTopic(c, (destQuest.bonusMoney > 0) ? "questCompleteDeliverExtra" : "questCompleteDeliver")) : "", StepEnd);
547 Step("_quest");
548 _Talk("tg", delegate
549 {
550 if (c.quest == null)
551 {
552 return "";
553 }
557 return (!taken()) ? c.quest.GetDetail() : c.quest.GetTalkProgress().IsEmpty(GetTopic(c, "questInProgress"));
558 }, text);
559 string text2 = "daAccept".lang();
560 if (c.quest != null && c.quest.deadline != 0)
561 {
562 text2 += "hintDeadline".lang(c.quest.TextDeadline).ToLower();
563 }
564 Choice(text2, (c.quest != null && c.quest.UseInstanceZone) ? "_questAccept_instance" : "_questAccept").SetOnClick(delegate
565 {
567 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() < 5);
568 Choice(text2, "_questFull").SetOnClick(delegate
569 {
570 }).SetCondition(() => !taken() && EClass.game.quests.CountRandomQuest() >= 5);
571 Choice("daDecline", text).SetOnClick(RumorChill).SetCondition(() => !taken());
572 if (c.quest != null && EClass.game.quests.Get(c.quest.uid) == null)
573 {
574 QuestSupply supply = c.quest as QuestSupply;
575 if (supply != null)
576 {
577 foreach (Thing item6 in supply.ListDestThing())
578 {
579 Thing _t2 = item6;
580 Choice("daDeliver".lang(supply.GetTitle() ?? "", _t2.GetName(NameStyle.Full, supply.num)), "_deliver").SetOnClick(delegate
581 {
583 destThing = _t2;
584 destQuest = supply;
585 }).SetOnTooltip(delegate(UITooltip a)
586 {
587 _t2.WriteNote(a.note);
588 });
589 }
590 }
591 }
592 EnableCancel(text);
593 Step("_questAccept");
594 _Talk("tg", GetTopic(c, "questAccept"), StepEnd);
595 Step("_questAccept_instance");
596 _Talk("tg", GetTopic(c, "questAccept"));
597 Method(delegate
598 {
599 Zone z3 = c.quest.CreateInstanceZone(c);
601 }, null, StepEnd);
602 Step("_questFull");
603 _Talk("tg", GetTopic(c, "questFull"), text);
604 Step("_greatDebt");
605 Method(delegate
606 {
607 QuestDebt questDebt3 = EClass.game.quests.Get<QuestDebt>();
608 if (!questDebt3.CanGiveBill())
609 {
610 TempTalkTopic("loytel_bill_give_wait", StepDefault);
611 }
612 else if (questDebt3.gaveBill)
613 {
614 TempTalkTopic("loytel_bill_give_given", StepDefault);
615 }
616 else
617 {
618 TempTalkTopic(questDebt3.GetIdTalk_GiveBill(), StepEnd);
619 questDebt3.GiveBill();
620 }
621 });
622 Step("_greatDebt2");
623 Method(delegate
624 {
625 QuestDebt questDebt2 = EClass.game.quests.Get<QuestDebt>();
626 TempTalkTopic("loytel_bill_give_lost", StepEnd);
627 questDebt2.GiveBill();
628 });
629 Step("_shutup");
630 Method(delegate
631 {
632 c.SetInt(106, (c.GetInt(106) == 0) ? 1 : 0);
633 });
634 _Talk("tg", GetTopic(c, (c.GetInt(106) == 0) ? "shutup" : "shutup2"));
635 End();
636 Step("_sleepBeside");
637 Method(delegate
638 {
639 if (c.affinity.CanSleepBeside() || c.GetInt(123) == 1)
640 {
641 c.SetInt(123, (c.GetInt(123) == 0) ? 1 : 0);
642 }
643 else
644 {
645 TempTalkTopic("refuse", StepEnd);
646 }
647 });
648 _Talk("tg", GetTopic(c, (c.GetInt(123) == 0) ? "ok" : "shutup"));
649 End();
650 Step("_marry");
651 Method(delegate
652 {
653 if (!c.affinity.CanMarry())
654 {
655 TempTalkTopic("refuse", StepEnd);
656 }
657 });
658 _Talk("tg", GetTopic(c, "marry"));
659 Method(delegate
660 {
661 manager.layer.SetOnKill(delegate
662 {
663 destThing.Attune(c);
664 destThing.elements.ModBase(484, 3);
665 if (destThing.rarity < Rarity.Mythical)
666 {
667 destThing.rarity = Rarity.Mythical;
668 }
671 GameLang.refDrama1 = EClass.world.date.year.ToString() ?? "";
676 LayerDrama.Activate("_adv", "general", "marry", c);
678 });
679 });
680 End();
681 Step("_wed");
682 Method(delegate
683 {
684 Thing deed = EClass.pc.things.Find("deed_wedding");
685 if (deed == null && !EClass.debug.enable)
686 {
687 TempTalkTopic("wedding_deed", StepDefault);
688 }
690 {
691 TempTalkTopic("wedding_zone", StepDefault);
692 }
693 else
694 {
695 TempTalkTopic("wedding_confirm", null);
696 Choice("yes", delegate
697 {
698 TempTalkTopic("wedding_accept", null);
699 if (deed != null)
700 {
701 deed.ModNum(-1);
702 }
703 if (c.c_love != null)
704 {
705 c.c_love.dateWedding = EClass.world.date.GetRaw();
706 }
707 });
708 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
709 }
710 });
711 Step("_wed2");
712 Method(delegate
713 {
716 if (!c.IsPCParty)
717 {
718 EClass.pc.party.AddMemeber(c);
719 }
720 foreach (Chara item7 in EClass.pc.party.members.ToList())
721 {
722 if (item7 != EClass.pc && item7 != c)
723 {
724 EClass.pc.party.RemoveMember(item7);
725 }
726 }
727 if (c.host != null)
728 {
729 ActRide.Unride(EClass.pc, c == EClass.pc.parasite, talk: false);
730 }
731 Quest quest = Quest.Create("wedding", null, c, assignQuest: false);
732 EClass.game.quests.Start(quest);
733 Zone z2 = quest.CreateInstanceZone(c);
735 {
736 state = ZoneTransition.EnterState.Exact,
737 x = 50,
738 z = 53
739 });
740 LayerDrama.Activate("_adv", "general", "wedding", c);
741 });
742 End();
743 Step("_disableLoyal");
744 Method(delegate
745 {
746 c.SetInt(126, (c.GetInt(126) == 0) ? 1 : 0);
747 });
748 _Talk("tg", GetTopic(c, (c.GetInt(126) == 0) ? "shutup" : "shutup2"));
749 End();
750 Step("_suck");
751 _Talk("tg", GetTalk("pervert4"));
752 Method(delegate
753 {
754 if (c.HasElement(1250))
755 {
756 c.UseAbility("ActBloodsuck", EClass.pc);
757 }
758 else
759 {
760 c.Sniff(EClass.pc);
761 }
763 });
764 End();
765 Step("_insult");
766 Method(delegate
767 {
768 c.SetInt(108, (c.GetInt(108) == 0) ? 1 : 0);
769 });
770 _Talk("tg", GetTopic(c, (c.GetInt(108) == 0) ? "insult" : "insult2"));
771 Method(delegate
772 {
773 if (c.GetInt(108) == 1)
774 {
775 c.Talk("insult");
776 }
777 });
778 End();
779 Step("_makeHome");
780 Method(delegate
781 {
783 });
784 _Talk("tg", GetTopic(c, "ok"));
785 End();
786 Step("_hire");
787 Talk("rumor", StepDefault);
788 Choice("daAccept", StepDefault).SetOnClick(delegate
789 {
790 });
791 Choice("daDecline", StepDefault).SetOnClick(delegate
792 {
793 });
794 Step("_invite");
795 Method(delegate
796 {
797 if (!c.trait.CanInvite)
798 {
799 string[] recruitItems = c.source.recruitItems;
800 if (!recruitItems.IsEmpty())
801 {
802 string[] array3 = recruitItems[0].Split('/');
803 string reqId = array3[0];
804 int reqNum = array3[1].ToInt();
805 CardBlueprint.Set(CardBlueprint.Original);
806 GameLang.refDrama1 = ThingGen.Create(reqId).SetNum(reqNum).Name;
807 TempTalkTopic("inviteReq1", null);
808 foreach (Thing t2 in EClass.pc.things.List((Thing t) => t.id == reqId && t.Num >= reqNum, onlyAccessible: true))
809 {
810 Thing _t6 = t2;
811 Choice("daDeliver".lang("", _t6.GetName(NameStyle.Full, _t6.Num)), delegate
812 {
813 t2.ModNum(-reqNum);
814 TempTalk("hired", StepEnd);
815 EClass.Sound.Play("good");
816 c.MakeAlly();
817 }).SetOnTooltip(delegate(UITooltip a)
818 {
819 _t6.WriteNote(a.note);
820 });
821 }
822 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
823 }
824 else
825 {
826 TempTalkTopic("invite2", StepDefault);
827 }
828 }
829 else if (c.GetBestAttribute() > EClass.pc.CHA && !EClass.debug.godMode)
830 {
831 GameLang.refDrama1 = c.GetBestAttribute().ToString() ?? "";
832 TempTalkTopic("invite3", StepDefault);
833 }
834 else
835 {
836 TempTalkTopic("invite", null);
837 Choice("yes", delegate
838 {
839 TempTalk("hired", StepEnd);
840 EClass.Sound.Play("good");
841 c.MakeAlly();
842 });
843 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
844 }
845 });
846 Step("_Guide");
847 Method(delegate
848 {
849 TempTalkTopic("guide", null);
850 foreach (Card guide in GetListGuide())
851 {
852 Choice("daGotoGuide".lang(guide.Name, ""), "_goto").SetOnClick(delegate
853 {
854 destCard = guide;
855 });
856 }
857 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
858 TempCancel();
859 });
860 BackChill();
861 Step("_tail");
862 Method(delegate
863 {
864 TempTalkTopic(c.IsMarried ? "tail4" : (bird + "1"), null);
865 Choice("yes2", delegate
866 {
867 TempTalkTopic(bird + "2", StepEnd);
869 {
870 target = c,
871 sell = true
872 });
873 });
874 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
875 });
876 Step("_mama");
877 Method(delegate
878 {
880 {
881 Steam.GetAchievement(ID_Achievement.MAMA);
882 string id2 = c.id;
883 if (!(id2 == "farris"))
884 {
885 if (id2 == "quru")
886 {
887 Steam.GetAchievement(ID_Achievement.MAMA3);
888 }
889 }
890 else
891 {
892 Steam.GetAchievement(ID_Achievement.MAMA2);
893 }
894 TempTalkTopic("mama_yes", StepEnd);
896 {
897 target = c,
898 variation = AI_Fuck.Variation.MotherMilk
899 });
900 }
901 else
902 {
903 TempTalkTopic("mama_no", StepDefault);
904 RumorChill();
905 }
906 });
907 Step("_baby");
908 Method(delegate
909 {
911 {
912 TempTalkTopic("baby_yes", StepEnd);
913 EClass.pc.SetAI(new AI_Fuck
914 {
915 target = c,
916 variation = AI_Fuck.Variation.MotherMilk,
917 sell = true
918 });
919 }
920 else
921 {
922 TempTalkTopic("baby_no", StepDefault);
923 RumorChill();
924 }
925 });
926 Step("_whore");
927 Method(delegate
928 {
929 int costWhore = CalcMoney.Whore(c, EClass.pc);
930 GameLang.refDrama1 = costWhore.ToString() ?? "";
931 TempTalkTopic(bird + "3", null);
932 Choice("yes2", delegate
933 {
934 if (EClass.pc.GetCurrency() < costWhore)
935 {
936 TempTalkTopic("nomoney", StepDefault);
937 }
938 else
939 {
940 SE.Pay();
941 EClass.pc.ModCurrency(-costWhore);
942 TempTalkTopic(bird + "2", StepEnd);
943 EClass.pc.SetAI(new AI_Fuck
944 {
945 target = c
946 });
947 }
948 });
949 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
950 });
951 Step("_picklock");
952 Method(delegate
953 {
954 int cost8 = CalcMoney.Picklock(EClass.pc, destThing);
955 GameLang.refDrama1 = cost8.ToString() ?? "";
956 TempTalkTopic("bird3", null);
957 Choice("yes2", delegate
958 {
960 {
961 TempTalkTopic("lockTooHard", StepDefault);
962 }
963 else if (EClass.pc.GetCurrency() < cost8)
964 {
965 TempTalkTopic("nomoney", StepDefault);
966 }
967 else
968 {
969 SE.Pay();
970 EClass.pc.ModCurrency(-cost8);
971 manager.layer.SetOnKill(delegate
972 {
973 c.PlaySound("lock_open");
974 c.Say("lockpick_success", c, destThing);
975 c.ModExp(280, 200 + destThing.c_lockLv * 20);
976 destThing.c_lockLv = 0;
977 if (destThing.isLostProperty)
978 {
979 EClass.player.ModKarma(-8);
980 }
981 destThing.isLostProperty = false;
982 });
983 TempTalkTopic(destThing.isLostProperty ? "lockpick_purse" : "bird2", StepEnd);
984 }
985 });
986 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
987 });
988 Step("_bloom");
989 Method(delegate
990 {
991 TempTalkTopic("blooming1", null);
992 foreach (Chara item8 in EClass.pc.party.members.Where((Chara c2) => c2.CanBloom()))
993 {
994 Chara c4 = item8;
995 Choice("daBloom".lang(c4.Name), delegate
996 {
997 if (EClass._zone.influence < 10)
998 {
999 TempTalkTopic("blooming3", StepDefault);
1000 }
1001 else
1002 {
1003 EClass._zone.ModInfluence(-10);
1004 LayerDrama.Instance.SetOnKill(delegate
1005 {
1006 c.Talk("goodBoy");
1007 c4.Say("dingExp", c);
1008 c4.Talk("insulted");
1009 c4.SetFeat(1273, 1, msg: true);
1010 c4.PlayEffect("aura_heaven");
1011 c4.feat += 10;
1012 EClass.pc.PlaySound("pray");
1013 });
1014 TempTalkTopic("blooming2", StepEnd);
1015 }
1016 });
1017 }
1018 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1019 });
1020 Step("_buy");
1021 Method(delegate
1022 {
1023 if (c.id == "miral")
1024 {
1025 SE.Play("click_chat");
1026 if (EClass.pc.GetCurrency("medal") > 0)
1027 {
1028 TempTalkTopic("miral_medal", null);
1029 }
1030 else
1031 {
1032 TempTalkTopic("miral_medal2", StepDefault);
1033 }
1034 }
1035 });
1036 Method(delegate
1037 {
1038 if (c.trait is TraitMerchantBlack && Guild.Thief.relation.rank < 4 && (Guild.Thief.IsCurrentZone || (!(EClass._zone.id == "derphy") && !(EClass._zone.id == "kapul") && !EClass._zone.IsPCFaction)))
1039 {
1040 SE.Play("click_chat");
1041 TempTalkTopic("shop_blackmarket_noaccess", StepEnd);
1042 }
1044 {
1045 SE.Play("click_chat");
1046 TempTalkTopic("shop_criminal", StepEnd);
1047 }
1048 else
1049 {
1050 sequence.Exit();
1051 manager.layer.Close();
1052 c.trait.OnBarter();
1053 if ((bool)WidgetFeed.Instance)
1054 {
1055 WidgetFeed.Instance.Talk(c, "barter");
1056 }
1058 }
1059 }, () => !layer, StepDefault);
1060 Step("_buyPlan");
1061 Method(delegate
1062 {
1063 List<ResearchPlan> plans = new List<ResearchPlan>();
1064 foreach (SourceResearch.Row row in EClass.sources.researches.rows)
1065 {
1067 {
1068 plans.Add(ResearchPlan.Create(row.id));
1069 }
1070 }
1071 EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1072 {
1073 list.moldItem = Resources.Load<ItemGeneral>("UI/Element/Item/ItemGeneralBarter").transform;
1074 list.callbacks = new UIList.Callback<ResearchPlan, ItemGeneral>
1075 {
1076 onInstantiate = delegate(ResearchPlan a, ItemGeneral b)
1077 {
1078 b.button1.mainText.text = a.Name;
1079 UIItem uIItem = Util.Instantiate<UIItem>("UI/Element/Item/Extra/costBarter", b.layout);
1081 uIItem.text1.SetText(c3.cost.ToString() ?? "", (c3.resource.value >= c3.cost) ? FontColor.Good : FontColor.Bad);
1082 uIItem.image1.sprite = c3.resource.Sprite;
1083 b.button1.SetTooltip(delegate(UITooltip t)
1084 {
1085 a.WriteNote(t.note);
1086 });
1087 b.button1.onClick.AddListener(delegate
1088 {
1089 if (c3.resource.value < c3.cost)
1090 {
1091 SE.Beep();
1092 }
1093 else
1094 {
1095 c3.resource.Mod(-c3.cost);
1096 plans.Remove(a);
1098 SE.Pay();
1099 list.List(refreshHighlight: true);
1100 }
1101 });
1102 b.RebuildLayout(recursive: true);
1103 },
1104 onList = delegate
1105 {
1106 foreach (ResearchPlan item9 in plans)
1107 {
1108 list.Add(item9);
1109 }
1110 }
1111 };
1112 }).SetSize()
1113 .windows[0].AttachCurrency().Build(new UICurrency.Options
1114 {
1115 branchMoney = true
1116 });
1117 }, () => !layer, StepDefault);
1118 Step("_upgradeHearth");
1119 Method(delegate
1120 {
1121 int cost7 = EClass.Branch.GetUpgradeCost();
1122 GameLang.refDrama1 = Lang._currency(cost7, "money");
1123 GameLang.refDrama2 = (EClass.Branch.lv + 1).ToString() ?? "";
1124 GameLang.refDrama3 = "hearth_dialog".lang(EClass.Branch.GetHearthHint(EClass.Branch.lv + 1));
1125 TempTalkTopic("upgrade_heath1", null);
1126 Choice("yes", delegate
1127 {
1128 if (EClass.pc.GetCurrency() < cost7)
1129 {
1130 TempTalkTopic("nomoney", StepDefault);
1131 }
1132 else
1133 {
1134 EClass.pc.ModCurrency(-cost7);
1135 SE.Pay();
1136 LayerDrama.Instance.SetOnKill(delegate
1137 {
1138 EClass.Branch.Upgrade();
1139 });
1140 TempTalkTopic("upgrade_heath2", StepEnd);
1141 }
1142 });
1143 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1144 });
1145 Step("_sellFame");
1146 Method(delegate
1147 {
1148 int cost6 = EClass.player.fame / 5;
1149 GameLang.refDrama1 = cost6.ToString() ?? "";
1150 if (cost6 == 0)
1151 {
1152 TempTalkTopic("goto2", StepDefault);
1153 }
1154 else
1155 {
1156 TempTalkTopic("sellFame1", null);
1157 Choice("yes", delegate
1158 {
1159 EClass.pc.ModCurrency(cost6);
1160 SE.Pay();
1161 EClass.player.ModFame(-cost6);
1162 TempTalkTopic("sellFame2", StepDefault);
1163 });
1164 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1165 }
1166 });
1167 Step("_investZone");
1168 Method(delegate
1169 {
1170 int cost5 = CalcMoney.InvestZone(EClass.pc);
1171 GameLang.refDrama1 = cost5.ToString() ?? "";
1172 GameLang.refDrama2 = ((EClass._zone.investment < 0) ? int.MaxValue : EClass._zone.investment).ToString() ?? "";
1173 TempTalkTopic("invest1", null);
1174 Choice("yes", delegate
1175 {
1176 Invest(quick: false);
1177 });
1178 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1179 Choice("quickInvest", delegate
1180 {
1181 Invest(quick: true);
1182 });
1183 void Invest(bool quick)
1184 {
1185 if (EClass.pc.GetCurrency() < cost5)
1186 {
1187 TempTalkTopic("nomoney", StepDefault);
1188 }
1189 else
1190 {
1191 EClass.pc.ModCurrency(-cost5);
1192 SE.Pay();
1193 EClass._zone.investment += cost5;
1196 EClass.pc.ModExp(292, 100 + EClass._zone.development * 2);
1197 if (quick)
1198 {
1199 TempGoto("_investZone");
1200 }
1201 else
1202 {
1203 TempTalkTopic("invest2", StepDefault);
1204 }
1205 }
1206 }
1207 });
1208 Step("_investShop");
1209 Method(delegate
1210 {
1211 int cost4 = CalcMoney.InvestShop(EClass.pc, c);
1212 GameLang.refDrama1 = cost4.ToString() ?? "";
1213 GameLang.refDrama2 = c.trait.ShopLv.ToString() ?? "";
1214 TempTalkTopic("invest_shop1", null);
1215 Choice("yes", delegate
1216 {
1217 Invest(quick: false);
1218 });
1219 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1220 Choice("quickInvest", delegate
1221 {
1222 Invest(quick: true);
1223 });
1224 void Invest(bool quick)
1225 {
1226 if (EClass.pc.GetCurrency() < cost4)
1227 {
1228 TempTalkTopic("nomoney", StepDefault);
1229 }
1230 else
1231 {
1232 EClass.pc.ModCurrency(-cost4);
1233 SE.Pay();
1234 c.c_invest++;
1236 EClass.pc.ModExp(292, 50 + c.c_invest * 20);
1238 if (quick)
1239 {
1240 TempGoto("_investShop");
1241 }
1242 else
1243 {
1244 TempTalkTopic("invest_shop2", StepDefault);
1245 }
1246 }
1247 }
1248 });
1249 Step("_changeTitle");
1250 Method(delegate
1251 {
1252 EClass.player.title = WordGen.Get("title");
1253 GameLang.refDrama1 = EClass.player.title;
1254 TempTalk("changeTitle", StepDefault);
1255 }, null, StepDefault);
1256 Step("_buyLand");
1257 Method(delegate
1258 {
1259 bool num7 = EClass._map.bounds.CanExpand(1);
1260 int costLand = CalcGold.ExpandLand();
1261 GameLang.refDrama1 = "";
1262 GameLang.refDrama2 = costLand.ToString() ?? "";
1263 if (!num7)
1264 {
1265 TempTalkTopic("expand3", StepDefault);
1266 }
1267 else
1268 {
1269 TempTalkTopic("expand1", StepDefault);
1270 Choice("yes", delegate
1271 {
1272 if (EClass.pc.GetCurrency("money2") < costLand)
1273 {
1274 TempTalkTopic("nomoney", StepDefault);
1275 }
1276 else
1277 {
1278 SE.Pay();
1279 EClass.pc.ModCurrency(-costLand, "money2");
1280 TempTalkTopic("expand2", StepDefault);
1281 EClass._map.bounds.Expand(1);
1282 SE.Play("good");
1283 EClass._map.RefreshAllTiles();
1284 WidgetMinimap.UpdateMap();
1285 ScreenEffect.Play("Firework");
1286 }
1287 });
1288 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1289 }
1290 });
1291 Step("_meeting");
1292 Method(delegate
1293 {
1294 sequence.Exit();
1297 });
1298 End();
1299 Step("_give");
1300 Method(delegate
1301 {
1302 manager.Hide();
1303 layer = LayerDragGrid.CreateGive(c);
1304 layer.SetOnKill(manager.Show);
1305 }, () => !layer, StepDefault);
1306 Step("_blessing");
1307 Method(delegate
1308 {
1309 bool flag6 = c.trait is TraitMiko_Mifu;
1310 TempTalkTopic("blessing", StepEnd);
1312 {
1313 foreach (Chara member in EClass.pc.party.members)
1314 {
1315 if (c.trait is TraitMiko_Mifu)
1316 {
1317 member.AddCondition<ConHolyVeil>()?.SetPerfume();
1318 }
1319 else if (c.trait is TraitMiko_Nefu)
1320 {
1321 member.AddCondition<ConEuphoric>()?.SetPerfume();
1322 }
1323 else
1324 {
1325 member.AddCondition<ConNightVision>()?.SetPerfume();
1326 }
1327 member.Say("blessing", member);
1328 member.PlaySound("pray");
1329 member.PlayEffect("holyveil");
1330 }
1331 c.isRestocking = true;
1332 });
1333 c.c_dateStockExpire = EClass.world.date.GetRaw() + (flag6 ? 180 : 180) * 1440;
1334 });
1335 Step("_train");
1336 Method(delegate
1337 {
1338 layer = EClass.ui.AddLayer<LayerList>().ManualList(delegate(UIList list, LayerList l)
1339 {
1340 list.moldItem = Resources.Load<ButtonElement>("UI/Element/Button/ButtonElementTrain").transform;
1341 list.callbacks = new UIList.Callback<Element, ButtonElement>
1342 {
1343 onClick = delegate(Element a, ButtonElement b)
1344 {
1345 int num6 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1346 if (num6 == 0)
1347 {
1348 SE.Beep();
1349 }
1350 else if (EClass.pc.TryPay(num6, "plat"))
1351 {
1352 if (EClass.pc.elements.HasBase(a.id))
1353 {
1355 }
1356 else
1357 {
1359 }
1360 list.Redraw();
1362 }
1363 },
1364 onRedraw = delegate(Element a, ButtonElement b, int i)
1365 {
1366 bool flag5 = EClass.pc.elements.HasBase(a.id);
1367 b.imagePotential.enabled = flag5;
1369 int plat = EClass.pc.GetCurrency("plat");
1370 int cost3 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
1371 b.mainText.text = b.mainText.text + " " + (flag5 ? "" : ("notLearned".lang() + " "));
1372 b.subText2.text = ((cost3 == 0) ? "-" : (cost3.ToString() ?? "")).TagColor(() => plat >= cost3 && cost3 != 0);
1373 b.RebuildLayout();
1374 },
1375 onInstantiate = delegate
1376 {
1377 },
1378 onList = delegate
1379 {
1380 foreach (SourceElement.Row item10 in EClass.sources.elements.rows.Where(delegate(SourceElement.Row a)
1381 {
1382 if (a.tag.Contains("unused"))
1383 {
1384 return false;
1385 }
1386 if (a.tag.Contains("guild"))
1387 {
1388 if (a.tag.Contains("fighter") && Guild.Fighter.IsCurrentZone)
1389 {
1390 return true;
1391 }
1392 if (a.tag.Contains("mage") && Guild.Mage.IsCurrentZone)
1393 {
1394 return true;
1395 }
1396 if (a.tag.Contains("thief") && Guild.Thief.IsCurrentZone)
1397 {
1398 return true;
1399 }
1400 if (a.tag.Contains("merchant") && Guild.Merchant.IsCurrentZone)
1401 {
1402 return true;
1403 }
1404 return false;
1405 }
1406 if (isInGuild)
1407 {
1408 return false;
1409 }
1410 return a.category == "skill" && a.categorySub == c.trait.IDTrainer;
1411 }).ToList())
1412 {
1413 list.Add(Element.Create(item10.id));
1414 }
1415 }
1416 };
1417 }).SetSize()
1418 .SetTitles("wTrain")
1419 .SetOnKill(SE.PopDrama);
1420 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1421 {
1422 plat = true
1423 });
1424 }, () => !layer, StepDefault);
1425 Step("_changeDomain");
1426 Method(delegate
1427 {
1428 layer = EClass.player.SelectDomain(SE.PopDrama);
1429 }, () => !layer, StepDefault);
1430 Step("_revive");
1431 Method(delegate
1432 {
1433 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleRevive>("h_revive"));
1434 layer.SetOnKill(SE.PopDrama);
1435 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1436 {
1437 money = true
1438 });
1439 }, () => !layer, StepDefault);
1440 Step("_buySlave");
1441 Method(delegate
1442 {
1443 LayerPeople.slaveToBuy = null;
1444 layer = EClass.ui.AddLayer(LayerPeople.Create<ListPeopleBuySlave>("h_invBuy", c));
1445 layer.SetOnKill(SE.PopDrama);
1446 layer.windows[0].AttachCurrency().Build(new UICurrency.Options
1447 {
1448 money = true
1449 });
1450 manager.Load();
1451 }, () => !layer, "_buySlaveConfirm");
1452 Step("_buySlaveConfirm");
1453 Method(delegate
1454 {
1456 if (tc == null)
1457 {
1458 RumorChill();
1459 }
1460 else
1461 {
1462 int cost2 = CalcMoney.BuySlave(tc);
1463 GameLang.refDrama1 = cost2.ToString() ?? "";
1464 GameLang.refDrama2 = tc.Name;
1465 TempTalkTopic("slave_buy", null);
1466 Choice("yes", delegate
1467 {
1468 if (!EClass.pc.TryPay(cost2))
1469 {
1470 TempTalkTopic("nomoney", StepDefault);
1471 }
1472 else
1473 {
1474 GameLang.refDrama1 = tc.Name;
1475 EClass._zone.AddCard(tc, EClass.pc.pos.GetNearestPoint());
1476 tc.MakeAlly();
1477 c.GetObj<SlaverData>(5).list.Remove(tc);
1478 TempTalkTopic("slave_buy2", StepEnd);
1479 }
1480 }).DisableSound();
1481 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1482 }
1483 });
1485 Step("_trade");
1486 Method(delegate
1487 {
1488 layer = EClass.ui.AddLayer(LayerInventory.CreateContainer(c));
1489 }, () => !layer, StepDefault);
1490 Step("_identify");
1491 Method(delegate
1492 {
1493 manager.Hide();
1494 c.trait.OnBarter();
1495 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: false, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: false), -1);
1496 layer.SetOnKill(manager.Show);
1497 }, () => !layer, StepDefault);
1498 Step("_identifyAll");
1499 Method(delegate
1500 {
1501 int costIdentify = 0;
1502 int numIdentify = 0;
1503 int numSuperior = 0;
1504 EClass.pc.things.Foreach(delegate(Thing t)
1505 {
1506 if (!t.IsIdentified && t.c_IDTState != 1)
1507 {
1508 numIdentify++;
1509 costIdentify += CalcMoney.Identify(EClass.pc, superior: false);
1510 }
1511 });
1512 GameLang.refDrama1 = costIdentify.ToString() ?? "";
1513 GameLang.refDrama2 = numIdentify.ToString() ?? "";
1514 if (numIdentify == 0)
1515 {
1516 TempTalkTopic("appraise3", StepDefault);
1517 }
1518 else
1519 {
1520 TempTalkTopic("appraise1", StepDefault);
1521 Choice("yes", delegate
1522 {
1523 if (EClass.pc.GetCurrency() < costIdentify)
1524 {
1525 TempTalkTopic("nomoney", StepDefault);
1526 }
1527 else
1528 {
1529 SE.Pay();
1530 EClass.pc.ModCurrency(-costIdentify);
1531 foreach (Thing item11 in EClass.pc.things.List((Thing t) => !t.IsIdentified, onlyAccessible: true))
1532 {
1533 item11.Thing.Identify(show: false);
1534 if (!item11.IsInstalled)
1535 {
1536 numSuperior++;
1537 }
1538 }
1539 TempTalkTopic("appraise2", StepDefault);
1540 }
1541 });
1542 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1543 }
1544 });
1545 Step("_identifySP");
1546 Method(delegate
1547 {
1548 manager.Hide();
1549 c.trait.OnBarter();
1550 layer = LayerDragGrid.CreateIdentify(EClass.pc, superior: true, BlessedState.Normal, CalcMoney.Identify(EClass.pc, superior: true), -1);
1551 layer.SetOnKill(manager.Show);
1552 }, () => !layer, StepDefault);
1553 Step("_bout");
1554 Method(delegate
1555 {
1556 TempTalkTopic("bout1", StepDefault);
1557 Choice("yes", delegate
1558 {
1560 {
1561 uidTarget = c.uid,
1562 targetX = c.pos.x,
1563 targetZ = c.pos.z
1564 });
1565 c.SetGlobal();
1567 {
1568 target = c
1569 });
1570 c.SetInt(59, EClass.world.date.GetRaw());
1572 {
1573 EClass.pc.MoveZone(z, ZoneTransition.EnterState.Center);
1574 });
1575 TempTalkTopic("bout2", StepEnd);
1576 });
1577 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1578 }, null, StepDefault);
1579 Step("_rob");
1580 Method(delegate
1581 {
1582 TempTalkTopic("rob1", StepDefault);
1583 Choice("yes_rob", delegate
1584 {
1585 sequence.Exit();
1586 c.Talk("callGuards");
1587 foreach (Chara chara in EClass._map.charas)
1588 {
1589 if (chara == c || chara.master == c)
1590 {
1591 chara.SetHostility(Hostility.Enemy);
1592 chara.DoHostileAction(EClass.pc.party.members.RandomItem());
1593 }
1594 }
1596 {
1597 EClass._zone.SetBGM(102);
1598 }
1599 EClass.player.ModKarma((!c.GetBool(129)) ? 1 : (-1));
1600 c.SetBool(129, enable: true);
1601 });
1602 Choice("no_rob", StepDefault, cancel: true).SetOnClick(RumorChill);
1603 }, null, StepDefault);
1604 Step("_news");
1605 Method(delegate
1606 {
1608 if (zone == null)
1609 {
1610 TempTalkTopic("news2", null);
1611 }
1612 else
1613 {
1614 zone.isKnown = true;
1615 Msg.Say("discoverZone", zone.Name);
1616 GameLang.refDrama1 = zone.Name;
1617 TempTalkTopic("news1", null);
1618 }
1619 c.SetInt(37, EClass.world.date.GetRaw());
1620 });
1621 Method(delegate
1622 {
1623 manager.Load();
1624 }, null, StepDefault);
1625 Step("_heal");
1626 Method(delegate
1627 {
1628 int costHeal = CalcMoney.Heal(EClass.pc);
1629 GameLang.refDrama1 = costHeal.ToString() ?? "";
1630 TempTalkTopic("healer1", null);
1631 Choice("yes", delegate
1632 {
1633 if (EClass.pc.GetCurrency() < costHeal)
1634 {
1635 TempTalkTopic("nomoney", StepDefault);
1636 }
1637 else
1638 {
1639 SE.Pay();
1640 foreach (Chara member2 in EClass.pc.party.members)
1641 {
1642 ActEffect.Proc(EffectId.HealComplete, member2);
1643 }
1644 EClass.pc.ModCurrency(-costHeal);
1645 TempTalkTopic("healer2", StepEnd);
1646 }
1647 });
1648 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1649 });
1650 Step("_food");
1651 Method(delegate
1652 {
1653 int cost = CalcMoney.Meal(EClass.pc);
1654 GameLang.refDrama1 = cost.ToString() ?? "";
1655 TempTalkTopic("food1", null);
1656 Choice("yes", delegate
1657 {
1658 if (EClass.pc.hunger.GetPhase() <= 0)
1659 {
1660 TempTalkTopic("alreadyFull", StepDefault);
1661 }
1662 else
1663 {
1664 if (EClass.pc.GetCurrency() >= cost)
1665 {
1666 SE.Pay();
1667 EClass.pc.ModCurrency(-cost);
1668 TempTalkTopic("food2", StepDefault);
1669 {
1670 foreach (Chara member3 in EClass.pc.party.members)
1671 {
1672 if (member3.hunger.GetPhase() > 0)
1673 {
1674 FoodEffect.Proc(member3, ThingGen.Create("dish_lunch"), consume: false);
1675 member3.hunger.value = 0;
1676 }
1677 }
1678 return;
1679 }
1680 }
1681 TempTalkTopic("nomoney", StepDefault);
1682 }
1683 });
1684 Choice("no", StepDefault, cancel: true).SetOnClick(RumorChill);
1685 });
1686 int[] bankTier = new int[5] { 100, 1000, 10000, 100000, 1000000 };
1687 Step("_deposit");
1688 Method(delegate
1689 {
1690 sequence.Exit();
1692 if ((bool)WidgetFeed.Instance)
1693 {
1694 WidgetFeed.Instance.Talk(c, "barter");
1695 }
1696 SE.Play("shop_open");
1698 }, () => !layer, StepDefault);
1699 End();
1700 Step("_copyItem");
1701 Method(delegate
1702 {
1703 sequence.Exit();
1705 if ((bool)WidgetFeed.Instance)
1706 {
1707 WidgetFeed.Instance.Talk(c, "barter");
1708 }
1709 SE.Play("shop_open");
1710 c.trait.OnBarter();
1711 if (c.c_copyContainer == null)
1712 {
1713 c.c_copyContainer = ThingGen.Create("container_deposit");
1714 }
1715 int numCopyItem = c.trait.NumCopyItem;
1716 c.c_copyContainer.things.SetSize(numCopyItem, 1);
1718 }, () => !layer, StepDefault);
1719 End();
1720 int[] taxTier = new int[6] { 0, 1000, 2000, 5000, 10000, 20000 };
1721 Step("_extraTax");
1722 Method(delegate
1723 {
1724 GameLang.refDrama1 = Lang._currency(EClass.player.extraTax, "money");
1725 TempTalkTopic("extraTax", null);
1726 int[] array2 = taxTier;
1727 foreach (int num5 in array2)
1728 {
1729 int _i2 = num5;
1730 Choice(Lang._currency(_i2, showUnit: true), delegate
1731 {
1732 EClass.player.extraTax = _i2;
1733 GameLang.refDrama1 = Lang._currency(_i2, "money");
1734 TempTalkTopic("extraTax2", StepDefault);
1735 });
1736 }
1737 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1738 });
1739 Step("_withdraw");
1740 Method(delegate
1741 {
1742 int bankMoney = EClass.player.bankMoney;
1743 GameLang.refDrama1 = bankMoney.ToString() ?? "";
1744 TempTalkTopic("banker2", null);
1745 int[] array = bankTier;
1746 foreach (int num4 in array)
1747 {
1748 int _i = num4;
1749 if (EClass.player.bankMoney >= _i)
1750 {
1751 Choice(Lang._currency(_i, showUnit: true), delegate
1752 {
1753 SE.Pay();
1754 EClass.pc.ModCurrency(_i);
1755 EClass.player.bankMoney -= _i;
1756 TempTalkTopic("banker4", StepDefault);
1757 });
1758 }
1759 }
1760 Choice("no2", StepDefault, cancel: true).SetOnClick(RumorChill);
1761 });
1762 Step("_disableMove");
1763 Method(delegate
1764 {
1765 c.noMove = true;
1766 c.orgPos = new Point(c.pos);
1767 c.Talk("ok");
1768 });
1769 End();
1770 Step("_enableMove");
1771 Method(delegate
1772 {
1773 c.noMove = false;
1774 c.orgPos = null;
1775 c.Talk("thanks");
1776 });
1777 End();
1778 Step("_bye");
1779 Method(delegate
1780 {
1781 c.Talk("bye");
1782 });
1783 End();
1784 Step("_end");
1785 End();
1786 void BackChill()
1787 {
1788 Method(RumorChill, null, StepDefault);
1789 }
1790 string GetTalk(string id)
1791 {
1792 return c.GetTalkText(id);
1793 }
1794 void RumorChill()
1795 {
1796 rumor = GetTalk("chill");
1797 }
1798 void Talk(string idTalk, string idJump)
1799 {
1800 _Talk("tg", GetTalk(idTalk), idJump);
1801 }
1802 void TempCancel()
1803 {
1804 EnableCancel("back");
1805 }
1806 void TempTalk(string idTalk, string idJump)
1807 {
1808 _TempTalk("tg", GetTalk(idTalk), idJump);
1809 }
1810 void TempTalkTopic(string idTopc, string idJump)
1811 {
1812 _TempTalk("tg", GetTopic(c, idTopc), idJump);
1813 }
1814 bool taken()
1815 {
1816 if (c.quest != null)
1817 {
1818 return EClass.game.quests.list.Contains(c.quest);
1819 }
1820 return false;
1821 }
1822 }
BlessedState
Definition: BlessedState.cs:2
BossType
Definition: BossType.cs:2
ChatCategory
Definition: ChatCategory.cs:2
if(!match.Success)
static bool not(DramaManager dm, Dictionary< string, string > line, params string[] parameters)
FactionMemberType
FontColor
Definition: FontColor.cs:2
NameStyle
Definition: NameStyle.cs:2
Rarity
Definition: Rarity.cs:2
bool CanInvite()
Definition: Affinity.cs:56
void OnTalkRumor()
Definition: Affinity.cs:177
bool CanMarry()
Definition: Affinity.cs:75
bool CanSleepBeside()
Definition: Affinity.cs:84
bool CanBecomeMama()
Definition: Affinity.cs:65
bool IsUnderAge(Chara c)
Definition: Biography.cs:266
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
bool IsPCFactionOrMinion
Definition: Card.cs:2326
int GetBestAttribute()
Definition: Card.cs:2747
bool isSummon
Definition: Card.cs:713
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:6562
int c_invest
Definition: Card.cs:1333
void SetInt(string id, int value=0)
Definition: Card.cs:2570
int c_lockLv
Definition: Card.cs:991
Card AddCard(Card c)
Definition: Card.cs:3243
Biography bio
Definition: Card.cs:45
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7122
Rarity rarity
Definition: Card.cs:317
string Name
Definition: Card.cs:2191
int CHA
Definition: Card.cs:2401
LoveData c_love
Definition: Card.cs:1885
int GetCurrency(string id="money")
Definition: Card.cs:4133
int c_IDTState
Definition: Card.cs:1297
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7267
Point pos
Definition: Card.cs:60
int uid
Definition: Card.cs:125
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6596
void ModCurrency(int a, string id="money")
Definition: Card.cs:4119
int c_dateStockExpire
Definition: Card.cs:1273
bool TryPay(int a, string id="money")
Definition: Card.cs:4083
void Destroy()
Definition: Card.cs:5268
bool c_isImportant
Definition: Card.cs:1051
bool noMove
Definition: Card.cs:773
ThingContainer things
Definition: Card.cs:39
virtual bool isChara
Definition: Card.cs:2135
int Evalue(int ele)
Definition: Card.cs:2688
bool GetBool(string id)
Definition: Card.cs:2541
Thing c_copyContainer
Definition: Card.cs:1849
void ModExp(string alias, int a)
Definition: Card.cs:2765
void SetBool(string id, bool enable)
Definition: Card.cs:2546
bool IsIdentified
Definition: Card.cs:2431
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2551
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6304
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7240
int c_uidAttune
Definition: Card.cs:1212
bool Has(int id)
Definition: Chara.cs:10
SourceCategory.Row GetFavCat()
Definition: Chara.cs:8362
override bool IsAliveInCurrentZone
Definition: Chara.cs:567
new TraitChara trait
Definition: Chara.cs:509
bool isDrunk
Definition: Chara.cs:126
Chara host
Definition: Chara.cs:33
bool IsMofuable
Definition: Chara.cs:1134
bool IsMaid
Definition: Chara.cs:1050
override bool IsGlobal
Definition: Chara.cs:628
override bool IsPCParty
Definition: Chara.cs:633
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9811
AIAct SetAI(AIAct g)
Definition: Chara.cs:9266
override bool IsDisabled
Definition: Chara.cs:591
Stats hunger
Definition: Chara.cs:1177
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1518
override bool IsPCFaction
Definition: Chara.cs:689
string NameBraced
Definition: Chara.cs:520
void SetAIImmediate(AIAct g)
Definition: Chara.cs:9298
List< Hobby > ListHobbies(bool useMemberType=true)
Definition: Chara.cs:9357
FactionMemberType memberType
Definition: Chara.cs:46
string NameTitled
Definition: Chara.cs:522
SourceThing.Row GetFavFood()
Definition: Chara.cs:8334
bool IsHomeMember()
Definition: Chara.cs:6823
Zone homeZone
Definition: Chara.cs:271
bool IsGuest()
Definition: Chara.cs:6848
bool CanBloom()
Definition: Chara.cs:9030
Affinity affinity
Definition: Chara.cs:318
void BanishAllMinions()
Definition: Chara.cs:2487
Religion faith
Definition: Chara.cs:443
bool IsMarried
Definition: Chara.cs:615
CharaAbility ability
Definition: Chara.cs:428
Quest quest
Definition: Chara.cs:24
bool TryEquip(Thing t, bool useFav=false)
Definition: Chara.cs:8025
FactionBranch homeBranch
Definition: Chara.cs:1089
bool CanInsult()
Definition: Chara.cs:8450
void MoveZone(string alias)
Definition: Chara.cs:3451
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)
void Goto(string idJump)
void _Talk(string idActor, string text, string idJump=null)
DramaChoice Choice2(string lang, string idJump)
string GetTopic(Chara c, string idTopic=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)
LayerDrama layer
Definition: DramaManager.cs:14
DramaSequence Load()
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)
Element SetBase(string alias, int v, int potential=0)
bool HasBase(int ele)
Element GetElement(string alias)
int id
Definition: ELEMENT.cs:257
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1121
MeetingManager meetings
ResearchManager researches
string GetHearthHint(int a)
HomeResourceManager resources
void BanishMember(Chara c, bool skipMsg=false)
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:7
static string langCode
Definition: Lang.cs:29
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:161
static LayerDragGrid CreateGive(Chara c)
static LayerDragGrid CreateIdentify(Chara cc, bool superior=false, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDrama Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:66
static LayerDrama Instance
Definition: LayerDrama.cs:20
static LayerInventory CreateContainer(Card owner)
static LayerInventory CreateBuy(Card c, CurrencyType currency=CurrencyType.Money, PriceType price=PriceType.Default)
static LayerPeople Create(Mode mode)
Definition: LayerPeople.cs:106
static Chara slaveToBuy
Definition: LayerPeople.cs:23
Definition: Layer.cs:9
Layer SetTitles(string langList, string idHeaderRow=null)
Definition: Layer.cs:688
List< Window > windows
Definition: Layer.cs:116
virtual void Close()
Definition: Layer.cs:463
Layer SetOnKill(Action action)
Definition: Layer.cs:579
bool IsWed
Definition: LoveData.cs:23
bool CanExpand(int a)
Definition: MapBounds.cs:138
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
int x
Definition: Point.cs:36
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
int uid
Definition: Quest.cs:34
virtual string RefDrama2
Definition: Quest.cs:208
virtual string GetTalkComplete()
Definition: Quest.cs:685
virtual bool UseInstanceZone
Definition: Quest.cs:183
string TextDeadline
Definition: Quest.cs:136
virtual string RefDrama1
Definition: Quest.cs:196
int deadline
Definition: Quest.cs:46
static Quest Create(string _id, string _idPerson=null, Chara c=null, bool assignQuest=true)
Definition: Quest.cs:241
virtual string RefDrama3
Definition: Quest.cs:220
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 string GetTalkProgress()
Definition: Quest.cs:680
virtual string GetDetail(bool onJournal=false)
Definition: Quest.cs:633
virtual bool Deliver(Chara c, Thing t=null)
Definition: Quest.cs:711
virtual Zone CreateInstanceZone(Chara c)
Definition: Quest.cs:323
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 SetSize(int w, int h)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
Definition: Thing.cs:8
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Thing.cs:899
bool isEquipped
Definition: Thing.cs:17
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:532
void Attune(Chara c)
Definition: Thing.cs:2126
virtual bool CanBout
Definition: TraitChara.cs:92
virtual bool CanServeFood
Definition: TraitChara.cs:88
virtual bool CanInvest
Definition: TraitChara.cs:44
virtual bool CanWhore
Definition: TraitChara.cs:86
virtual bool HaveNews
Definition: TraitChara.cs:90
virtual bool CanRevive
Definition: TraitChara.cs:36
virtual bool CanBeBanished
Definition: TraitChara.cs:64
virtual bool CanJoinParty
Definition: TraitChara.cs:48
virtual bool CanIdentify
Definition: TraitChara.cs:40
virtual bool IsUnique
Definition: TraitChara.cs:34
virtual bool CanInvestTown
Definition: TraitChara.cs:70
virtual string IDTrainer
Definition: TraitChara.cs:46
virtual bool CanInvite
Definition: TraitChara.cs:66
virtual bool CanPicklock
Definition: TraitChara.cs:42
virtual bool CanGuide
Definition: TraitChara.cs:38
virtual bool CanJoinPartyResident
Definition: TraitChara.cs:51
virtual bool CanHeal
Definition: TraitChara.cs:84
virtual CopyShopType CopyShop
Definition: Trait.cs:527
virtual ShopType ShopType
Definition: Trait.cs:532
virtual PriceType PriceType
Definition: Trait.cs:545
string TextNextRestockPet
Definition: Trait.cs:585
string TextNextRestock
Definition: Trait.cs:583
virtual void OnBarter(bool reroll=false)
Definition: Trait.cs:1692
virtual CurrencyType CurrencyType
Definition: Trait.cs:543
virtual SlaverType SlaverType
Definition: Trait.cs:575
virtual int ShopLv
Definition: Trait.cs:525
virtual int NumCopyItem
Definition: Trait.cs:529
virtual bool AllowCriminal
Definition: Trait.cs:571
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
override void Redraw()
Definition: UIList.cs:792
override void List()
Definition: UIList.cs:769
void SetText(string s)
Definition: UIText.cs:163
UINote note
Definition: UITooltip.cs:21
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67
static WidgetFeed Instance
Definition: WidgetFeed.cs:14
Region region
Definition: World.cs:23
GameDate date
Definition: World.cs:6
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
Definition: Zone.cs:12
Dictionary< int, string > dictCitizen
Definition: Zone.cs:52
ZoneEventManager events
Definition: Zone.cs:40
FactionBranch branch
Definition: Zone.cs:34
virtual bool IsUserZone
Definition: Zone.cs:275
bool IsInstance
Definition: Zone.cs:493
virtual bool AllowInvest
Definition: Zone.cs:254
Chara FindChara(string id)
Definition: Zone.cs:3248
virtual bool AllowCriminal
Definition: Zone.cs:251
void ModInfluence(int a)
Definition: Zone.cs:3782
bool IsPCFaction
Definition: Zone.cs:477
void ModDevelopment(int a)
Definition: Zone.cs:3792

References _Talk(), EClass._zone, Chara.affinity, Card.bio, Zone.branch, Affinity.CanInvite(), Quest.chara, Choice2(), World.date, EClass.debug, destCard, destQuest, destThing, Zone.dictCitizen, DramaChoice.DisableSound(), CoreDebug.enable, Zone.FindChara(), ThingContainer.Foreach(), EClass.game, Chara.GetFavCat(), Chara.GetFavFood(), Card.GetInt(), GetListGuide(), Thing.GetName(), Date.GetRaw(), GetRumor(), GetText(), Quest.GetTitle(), Chara.HasCondition(), Card.HasElement(), HasTopic(), Card.id, idCustom, Chara.IsAliveInCurrentZone, ConTransmuteHuman.IsBaby, GuildMerchant.IsCurrentZone, Chara.IsGlobal, Zone.IsInstance, Card.isLostProperty, Chara.IsPCFaction, Zone.IsPCFaction, Quest.IsRandomQuest, Biography.IsUnderAge(), TraitChara.IsUnique, Zone.IsUserZone, item, QuestManager.list, Chara.ListHobbies(), Guild.Mage, Guild.Merchant, Card.Name, Hobby.Name, not(), UITooltip.note, Affinity.OnTalkRumor(), EClass.pc, Game.quests, FactionRelation.rank, Faction.relation, EClass.rnd(), DramaChoice.SetCondition(), DramaChoice.SetOnClick(), CoreDebug.showFav, Step(), StepDefault, Card.things, Chara.trait, EClass.world, and Thing.WriteNote().

Referenced by DramaManager.AddCustomEvents().

◆ BuildTextData()

void DramaCustomSequence.BuildTextData ( )
inline

Definition at line 1881 of file DramaCustomSequence.cs.

1882 {
1883 Step("import");
1884 string[] array = setup.textData.Split(new string[1] { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
1885 foreach (string text in array)
1886 {
1887 if (!(text == Environment.NewLine))
1888 {
1889 _Talk("", text.TrimStart(Environment.NewLine.ToCharArray()).TrimEnd(Environment.NewLine.ToCharArray()));
1890 }
1891 }
1892 End();
1893 }
string textData
Definition: DramaSetup.cs:11

References DramaSetup.textData.

Referenced by DramaManager.AddCustomEvents().

◆ Choice() [1/2]

DramaChoice DramaCustomSequence.Choice ( string  lang,
Action  onJump 
)
inline

Definition at line 1986 of file DramaCustomSequence.cs.

1987 {
1988 DramaChoice dramaChoice = new DramaChoice(lang.lang(), null);
1989 dramaChoice.onJump = onJump;
1990 manager.lastTalk.AddChoice(dramaChoice);
1991 return dramaChoice;
1992 }
void AddChoice(DramaChoice choice)

References DramaEventTalk.AddChoice(), and DramaManager.lastTalk.

◆ Choice() [2/2]

DramaChoice DramaCustomSequence.Choice ( string  lang,
string  idJump,
bool  cancel = false 
)
inline

Definition at line 1975 of file DramaCustomSequence.cs.

1976 {
1977 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1978 manager.lastTalk.AddChoice(dramaChoice);
1979 if (cancel)
1980 {
1981 EnableCancel(idJump);
1982 }
1983 return dramaChoice;
1984 }

References DramaEventTalk.AddChoice(), and DramaManager.lastTalk.

◆ Choice2()

DramaChoice DramaCustomSequence.Choice2 ( string  lang,
string  idJump 
)
inline

Definition at line 1994 of file DramaCustomSequence.cs.

1995 {
1996 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
1997 manager.lastTalk.AddChoice(dramaChoice);
1998 sequence.manager._choices.Add(dramaChoice);
1999 return dramaChoice;
2000 }
List< DramaChoice > _choices
Definition: DramaManager.cs:50
DramaManager manager

References DramaManager._choices, DramaEventTalk.AddChoice(), DramaManager.lastTalk, and DramaSequence.manager.

Referenced by Build().

◆ EnableCancel()

void DramaCustomSequence.EnableCancel ( string  idCancelJump = null)
inline

Definition at line 2002 of file DramaCustomSequence.cs.

2003 {
2004 manager.lastTalk.canCancel = true;
2005 manager.lastTalk.idCancelJump = idCancelJump;
2006 }

◆ End()

void DramaCustomSequence.End ( )
inline

Definition at line 1922 of file DramaCustomSequence.cs.

1923 {
1924 Event(new DramaEventGoto("end"));
1925 }

◆ Event()

DramaEvent DramaCustomSequence.Event ( DramaEvent  e)
inline

Definition at line 1895 of file DramaCustomSequence.cs.

1896 {
1897 events.Add(e);
1898 e.sequence = sequence;
1899 return e;
1900 }
List< DramaEvent > events

◆ GetListGuide()

List< Card > DramaCustomSequence.GetListGuide ( )
inline

Definition at line 2008 of file DramaCustomSequence.cs.

2009 {
2010 List<Card> list = new List<Card>();
2011 foreach (Thing thing in EClass._map.things)
2012 {
2013 if (thing.IsInstalled && thing.trait.GuidePriotiy > 0)
2014 {
2015 list.Add(thing);
2016 }
2017 }
2018 foreach (Chara chara in EClass._map.charas)
2019 {
2020 if (!chara.IsPCParty && chara.trait.GuidePriotiy > 0)
2021 {
2022 list.Add(chara);
2023 }
2024 }
2025 list.Sort((Card a, Card b) => b.trait.GuidePriotiy - a.trait.GuidePriotiy);
2026 return list;
2027 }
Trait trait
Definition: Card.cs:54
bool IsInstalled
Definition: Card.cs:2435
List< Thing > things
Definition: Map.cs:49
virtual int GuidePriotiy
Definition: Trait.cs:100

References EClass._map, UIList.Add(), Map.charas, Trait.GuidePriotiy, Card.IsInstalled, Chara.IsPCParty, UIList.Sort(), Map.things, Card.trait, and Chara.trait.

Referenced by Build().

◆ GetRumor()

string DramaCustomSequence.GetRumor ( Chara  c)
inline

Definition at line 1824 of file DramaCustomSequence.cs.

1825 {
1826 if (c.interest <= 0)
1827 {
1828 return GetText(c, "rumor", "bored");
1829 }
1830 if (HasTopic("unique", c.id))
1831 {
1832 return GetText(c, "unique", c.id);
1833 }
1834 if (EClass.rnd(2) == 0 && !c.trait.IDRumor.IsEmpty())
1835 {
1836 return GetText(c, "rumor", c.trait.IDRumor);
1837 }
1838 if (EClass.rnd(2) == 0 && HasTopic("zone", EClass._zone.id))
1839 {
1840 return GetText(c, "zone", EClass._zone.id);
1841 }
1842 if (EClass.rnd(2) == 0)
1843 {
1844 return GetText(c, "rumor", "interest_" + c.bio.idInterest.ToEnum<Interest>());
1845 }
1846 if (EClass.rnd(2) == 0)
1847 {
1848 return c.GetTalkText("rumor");
1849 }
1850 if (EClass.rnd(4) == 0)
1851 {
1852 return GetText(c, "rumor", "hint");
1853 }
1854 return GetText(c, "rumor", "default");
1855 }
Interest
Definition: Interest.cs:2
int idInterest
Definition: Biography.cs:245
int interest
Definition: Chara.cs:321
virtual string IDRumor
Definition: TraitChara.cs:136

References EClass._zone, Card.bio, Card.GetTalkText(), Card.id, Spatial.id, Biography.idInterest, TraitChara.IDRumor, Chara.interest, EClass.rnd(), and Chara.trait.

Referenced by Build(), and CustomDramaExpansionHelper.InjectUniqueRumor().

◆ GetText()

string DramaCustomSequence.GetText ( Chara  c,
string  idSheet,
string  idTopic 
)
inline

Definition at line 1862 of file DramaCustomSequence.cs.

1863 {
1864 if (!idTopic.IsEmpty() && manager.customTalkTopics.ContainsKey(idTopic))
1865 {
1866 return manager.customTalkTopics[idTopic];
1867 }
1868 string[] dialog = Lang.GetDialog(idSheet, idTopic);
1869 if (!(idSheet != "unique"))
1870 {
1871 return dialog.RandomItem();
1872 }
1873 return c.ApplyTone(dialog.RandomItem());
1874 }
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:7287
Dictionary< string, string > customTalkTopics
Definition: DramaManager.cs:52
static string[] GetDialog(string idSheet, string idTopic)
Definition: Lang.cs:246

References Card.ApplyTone(), DramaManager.customTalkTopics, and Lang.GetDialog().

Referenced by Build(), and CustomDramaExpansionHelper.InjectUniqueRumor().

◆ GetTopic()

string DramaCustomSequence.GetTopic ( Chara  c,
string  idTopic = null 
)
inline

Definition at line 1876 of file DramaCustomSequence.cs.

1877 {
1878 return GetText(c, "general", idTopic);
1879 }

◆ Goto()

void DramaCustomSequence.Goto ( string  idJump)
inline

Definition at line 1927 of file DramaCustomSequence.cs.

1928 {
1929 Event(new DramaEventGoto(idJump));
1930 }

◆ GotoDefault()

void DramaCustomSequence.GotoDefault ( )
inline

Definition at line 1932 of file DramaCustomSequence.cs.

1933 {
1935 }

◆ HasTopic()

bool DramaCustomSequence.HasTopic ( string  idSheet,
string  idTopic 
)
inline

Definition at line 1857 of file DramaCustomSequence.cs.

1858 {
1859 return Lang.GetDialogSheet(idSheet).map.ContainsKey(idTopic);
1860 }
static ExcelData.Sheet GetDialogSheet(string idSheet)
Definition: Lang.cs:204

References Lang.GetDialogSheet().

Referenced by Build(), and CustomDramaExpansionHelper.InjectUniqueRumor().

◆ Method()

void DramaCustomSequence.Method ( Action  action,
Func< bool >  endFunc = null,
string  idJump = null 
)
inline

Definition at line 1910 of file DramaCustomSequence.cs.

1911 {
1912 Event(new DramaEventMethod(action)
1913 {
1914 endFunc = endFunc
1915 });
1916 if (!idJump.IsEmpty())
1917 {
1918 Event(new DramaEventGoto(idJump));
1919 }
1920 }

◆ Step()

void DramaCustomSequence.Step ( string  step)
inline

Definition at line 1902 of file DramaCustomSequence.cs.

1903 {
1904 Event(new DramaEvent
1905 {
1906 step = step
1907 });
1908 }

Referenced by Build().

◆ TempGoto()

void DramaCustomSequence.TempGoto ( string  idJump = null)
inline

Definition at line 1969 of file DramaCustomSequence.cs.

1970 {
1971 sequence.tempEvents.Clear();
1972 sequence.Play(idJump);
1973 }
void Play(string id)

References DramaSequence.Play(), and DramaSequence.tempEvents.

Member Data Documentation

◆ destCard

Card DramaCustomSequence.destCard

Definition at line 8 of file DramaCustomSequence.cs.

Referenced by Build().

◆ destChara

Chara DramaCustomSequence.destChara

Definition at line 10 of file DramaCustomSequence.cs.

◆ destQuest

Quest DramaCustomSequence.destQuest

Definition at line 12 of file DramaCustomSequence.cs.

Referenced by Build().

◆ destThing

Thing DramaCustomSequence.destThing

Definition at line 14 of file DramaCustomSequence.cs.

Referenced by Build().

◆ events

List<DramaEvent> DramaCustomSequence.events

Definition at line 24 of file DramaCustomSequence.cs.

◆ idCustom

string DramaCustomSequence.idCustom

Definition at line 18 of file DramaCustomSequence.cs.

Referenced by Build().

◆ idDefault

string DramaCustomSequence.idDefault

Definition at line 16 of file DramaCustomSequence.cs.

◆ manager

DramaManager DramaCustomSequence.manager

Definition at line 26 of file DramaCustomSequence.cs.

◆ sequence

DramaSequence DramaCustomSequence.sequence

Definition at line 22 of file DramaCustomSequence.cs.

◆ setup

DramaSetup DramaCustomSequence.setup

Definition at line 20 of file DramaCustomSequence.cs.

Property Documentation

◆ StepDefault

string DramaCustomSequence.StepDefault
get

Definition at line 28 of file DramaCustomSequence.cs.

Referenced by Build().

◆ StepEnd

string DramaCustomSequence.StepEnd
get

Definition at line 30 of file DramaCustomSequence.cs.


The documentation for this class was generated from the following file: