Elin Decompiled Documentation EA 23.333 Myaightly 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 1969 of file DramaCustomSequence.cs.

1970 {
1971 manager.lastTalk = Event(new DramaEventTalk
1972 {
1973 idActor = idActor,
1974 idJump = idJump,
1975 funcText = funcText
1976 }) as DramaEventTalk;
1977 }
DramaEvent Event(DramaEvent e)

◆ _Talk() [2/2]

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

Definition at line 1959 of file DramaCustomSequence.cs.

1960 {
1961 manager.lastTalk = Event(new DramaEventTalk
1962 {
1963 idActor = idActor,
1964 idJump = idJump,
1965 text = text
1966 }) as DramaEventTalk;
1967 }

Referenced by Build().

◆ _TempTalk()

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

Definition at line 1979 of file DramaCustomSequence.cs.

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

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.GetCondition(), 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, TraitChara.NeedBoutToJoin, 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 1903 of file DramaCustomSequence.cs.

1904 {
1905 Step("import");
1906 string[] array = setup.textData.Split(new string[1] { Environment.NewLine + Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
1907 foreach (string text in array)
1908 {
1909 if (!(text == Environment.NewLine))
1910 {
1911 _Talk("", text.TrimStart(Environment.NewLine.ToCharArray()).TrimEnd(Environment.NewLine.ToCharArray()));
1912 }
1913 }
1914 End();
1915 }
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 2008 of file DramaCustomSequence.cs.

2009 {
2010 DramaChoice dramaChoice = new DramaChoice(lang.lang(), null);
2011 dramaChoice.onJump = onJump;
2012 manager.lastTalk.AddChoice(dramaChoice);
2013 return dramaChoice;
2014 }
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 1997 of file DramaCustomSequence.cs.

1998 {
1999 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
2000 manager.lastTalk.AddChoice(dramaChoice);
2001 if (cancel)
2002 {
2003 EnableCancel(idJump);
2004 }
2005 return dramaChoice;
2006 }

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

◆ Choice2()

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

Definition at line 2016 of file DramaCustomSequence.cs.

2017 {
2018 DramaChoice dramaChoice = new DramaChoice(lang.lang(), idJump);
2019 manager.lastTalk.AddChoice(dramaChoice);
2020 sequence.manager._choices.Add(dramaChoice);
2021 return dramaChoice;
2022 }
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 2024 of file DramaCustomSequence.cs.

2025 {
2026 manager.lastTalk.canCancel = true;
2027 manager.lastTalk.idCancelJump = idCancelJump;
2028 }

◆ End()

void DramaCustomSequence.End ( )
inline

Definition at line 1944 of file DramaCustomSequence.cs.

1945 {
1946 Event(new DramaEventGoto("end"));
1947 }

◆ Event()

DramaEvent DramaCustomSequence.Event ( DramaEvent  e)
inline

Definition at line 1917 of file DramaCustomSequence.cs.

1918 {
1919 events.Add(e);
1920 e.sequence = sequence;
1921 return e;
1922 }
List< DramaEvent > events

◆ GetListGuide()

List< Card > DramaCustomSequence.GetListGuide ( )
inline

Definition at line 2030 of file DramaCustomSequence.cs.

2031 {
2032 List<Card> list = new List<Card>();
2033 foreach (Thing thing in EClass._map.things)
2034 {
2035 if (thing.IsInstalled && thing.trait.GuidePriotiy > 0)
2036 {
2037 list.Add(thing);
2038 }
2039 }
2040 foreach (Chara chara in EClass._map.charas)
2041 {
2042 if (!chara.IsPCParty && chara.trait.GuidePriotiy > 0)
2043 {
2044 list.Add(chara);
2045 }
2046 }
2047 list.Sort((Card a, Card b) => b.trait.GuidePriotiy - a.trait.GuidePriotiy);
2048 return list;
2049 }
Trait trait
Definition: Card.cs:54
bool IsInstalled
Definition: Card.cs:2451
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 1846 of file DramaCustomSequence.cs.

1847 {
1848 if (c.interest <= 0)
1849 {
1850 return GetText(c, "rumor", "bored");
1851 }
1852 if (HasTopic("unique", c.id))
1853 {
1854 return GetText(c, "unique", c.id);
1855 }
1856 if (EClass.rnd(2) == 0 && !c.trait.IDRumor.IsEmpty())
1857 {
1858 return GetText(c, "rumor", c.trait.IDRumor);
1859 }
1860 if (EClass.rnd(2) == 0 && HasTopic("zone", EClass._zone.id))
1861 {
1862 return GetText(c, "zone", EClass._zone.id);
1863 }
1864 if (EClass.rnd(2) == 0)
1865 {
1866 return GetText(c, "rumor", "interest_" + c.bio.idInterest.ToEnum<Interest>());
1867 }
1868 if (EClass.rnd(2) == 0)
1869 {
1870 return c.GetTalkText("rumor");
1871 }
1872 if (EClass.rnd(4) == 0)
1873 {
1874 return GetText(c, "rumor", "hint");
1875 }
1876 return GetText(c, "rumor", "default");
1877 }
Interest
Definition: Interest.cs:2
int idInterest
Definition: Biography.cs:245
int interest
Definition: Chara.cs:321
virtual string IDRumor
Definition: TraitChara.cs:138

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 1884 of file DramaCustomSequence.cs.

1885 {
1886 if (!idTopic.IsEmpty() && manager.customTalkTopics.ContainsKey(idTopic))
1887 {
1888 return manager.customTalkTopics[idTopic];
1889 }
1890 string[] dialog = Lang.GetDialog(idSheet, idTopic);
1891 if (!(idSheet != "unique"))
1892 {
1893 return dialog.RandomItem();
1894 }
1895 return c.ApplyTone(dialog.RandomItem());
1896 }
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:7351
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 1898 of file DramaCustomSequence.cs.

1899 {
1900 return GetText(c, "general", idTopic);
1901 }

◆ Goto()

void DramaCustomSequence.Goto ( string  idJump)
inline

Definition at line 1949 of file DramaCustomSequence.cs.

1950 {
1951 Event(new DramaEventGoto(idJump));
1952 }

◆ GotoDefault()

void DramaCustomSequence.GotoDefault ( )
inline

Definition at line 1954 of file DramaCustomSequence.cs.

1955 {
1957 }

◆ HasTopic()

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

Definition at line 1879 of file DramaCustomSequence.cs.

1880 {
1881 return Lang.GetDialogSheet(idSheet).map.ContainsKey(idTopic);
1882 }
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 1932 of file DramaCustomSequence.cs.

1933 {
1934 Event(new DramaEventMethod(action)
1935 {
1936 endFunc = endFunc
1937 });
1938 if (!idJump.IsEmpty())
1939 {
1940 Event(new DramaEventGoto(idJump));
1941 }
1942 }

◆ Step()

void DramaCustomSequence.Step ( string  step)
inline

Definition at line 1924 of file DramaCustomSequence.cs.

1925 {
1926 Event(new DramaEvent
1927 {
1928 step = step
1929 });
1930 }

Referenced by Build().

◆ TempGoto()

void DramaCustomSequence.TempGoto ( string  idJump = null)
inline

Definition at line 1991 of file DramaCustomSequence.cs.

1992 {
1993 sequence.tempEvents.Clear();
1994 sequence.Play(idJump);
1995 }
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: