Elin Modding Docs Doc
Loading...
Searching...
No Matches
DramaOutcome.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x02000119 RID: 281
6public class DramaOutcome : EMono
7{
8 // Token: 0x170001C0 RID: 448
9 // (get) Token: 0x06000763 RID: 1891 RVA: 0x0003056E File Offset: 0x0002E76E
10 public DramaSequence sequence
11 {
12 get
13 {
14 return this.manager.sequence;
15 }
16 }
17
18 // Token: 0x170001C1 RID: 449
19 // (get) Token: 0x06000764 RID: 1892 RVA: 0x0003057B File Offset: 0x0002E77B
20 public Person tg
21 {
22 get
23 {
24 return this.manager.tg;
25 }
26 }
27
28 // Token: 0x170001C2 RID: 450
29 // (get) Token: 0x06000765 RID: 1893 RVA: 0x00030588 File Offset: 0x0002E788
30 public Chara cc
31 {
32 get
33 {
34 return this.tg.chara;
35 }
36 }
37
38 // Token: 0x06000766 RID: 1894 RVA: 0x00030595 File Offset: 0x0002E795
39 public void StartNewGame()
40 {
41 if (!LayerTitle.actor)
42 {
43 return;
44 }
45 EMono.game.StartNewGame();
46 }
47
48 // Token: 0x06000767 RID: 1895 RVA: 0x000305B0 File Offset: 0x0002E7B0
49 public void StartNewGame2()
50 {
51 if (!LayerTitle.actor)
52 {
53 return;
54 }
55 EMono.core.actionsNextFrame.Add(new Action(LayerTitle.KillActor));
56 EMono.pc.MoveZone(EMono.game.Prologue.idStartZone);
57 EMono.pc.global.transition = new ZoneTransition
58 {
59 state = ZoneTransition.EnterState.Exact,
60 x = EMono.game.Prologue.startX,
61 z = EMono.game.Prologue.startZ
62 };
63 }
64
65 // Token: 0x06000768 RID: 1896 RVA: 0x00030644 File Offset: 0x0002E844
66 public void PutOutFire()
67 {
68 foreach (Card card in EMono._map.props.installed.traits.GetTraitSet<TraitHearth>().Values)
69 {
70 EMono._zone.AddCard(ThingGen.Create("dish_soup", -1, -1), card.pos.GetRandomNeighbor());
71 }
72 }
73
74 // Token: 0x06000769 RID: 1897 RVA: 0x000306CC File Offset: 0x0002E8CC
75 public void OnClaimLand()
76 {
77 Chara c = EMono.game.cards.globalCharas.Find("ashland");
78 EMono.game.quests.globalList.Add(Quest.Create("sharedContainer", null, null).SetClient(c, false));
79 EMono.game.quests.globalList.Add(Quest.Create("crafter", null, null).SetClient(c, false));
80 EMono.game.quests.globalList.Add(Quest.Create("defense", null, null).SetClient(c, false));
81 EMono.game.quests.Get<QuestHome>().ChangePhase(2);
82 this.AddMaid();
83 }
84
85 // Token: 0x0600076A RID: 1898 RVA: 0x00030783 File Offset: 0x0002E983
86 public void AddMaid()
87 {
88 }
89
90 // Token: 0x0600076B RID: 1899 RVA: 0x00030785 File Offset: 0x0002E985
91 public void QuestSharedContainer_Drop1()
92 {
93 EMono.player.DropReward(ThingGen.Create("chest6", -1, -1), false);
94 }
95
96 // Token: 0x0600076C RID: 1900 RVA: 0x0003079F File Offset: 0x0002E99F
97 public void QuestShippingChest_Drop1()
98 {
99 Recipe.DropIngredients("container_shipping", "palm", 6);
100 }
101
102 // Token: 0x0600076D RID: 1901 RVA: 0x000307B1 File Offset: 0x0002E9B1
103 public void QuestExploration_Drop1()
104 {
105 EMono.player.DropReward(ThingGen.CreateScroll(8220, 1), true).c_IDTState = 0;
106 EMono.player.DropReward(ThingGen.CreateScroll(8221, 1), false).c_IDTState = 0;
107 }
108
109 // Token: 0x0600076E RID: 1902 RVA: 0x000307EC File Offset: 0x0002E9EC
110 public void QuestExploration_MeetFarris()
111 {
112 EMono.game.quests.Get<QuestExploration>().ChangePhase(1);
113 this.cc.RemoveEditorTag(EditorTag.AINoMove);
114 this.cc.RemoveEditorTag(EditorTag.InvulnerableToMobs);
115 this.cc.RemoveEditorTag(EditorTag.Invulnerable);
116 this.cc.homeZone = EMono.game.StartZone;
117 this.cc.MoveZone(EMono.game.StartZone, ZoneTransition.EnterState.Return);
118 }
119
120 // Token: 0x0600076F RID: 1903 RVA: 0x00030864 File Offset: 0x0002EA64
121 public void QuestExploration_MeetFarris2()
122 {
123 EMono.game.quests.Get<QuestExploration>().ChangePhase(2);
124 if (EMono.Branch == null)
125 {
126 EMono._zone.ClaimZone(false);
127 }
128 EMono.Branch.Recruit(this.cc);
129 EMono.game.quests.Main.ChangePhase(300);
130 }
131
132 // Token: 0x06000770 RID: 1904 RVA: 0x000308C4 File Offset: 0x0002EAC4
133 public void QuestExploration_AfterCrystal()
134 {
135 Quest quest = EMono.game.quests.Get<QuestExploration>();
136 if (quest == null)
137 {
138 quest = EMono.game.quests.Start("exploration", EMono.game.cards.globalCharas.Find("ashland"), false);
139 }
140 quest.ChangePhase(5);
141 Chara chara = EMono.game.cards.globalCharas.Find("fiama");
142 EMono._zone.AddCard(ThingGen.CreateScroll(8220, 1).Identify(false, IDTSource.Identify), chara.pos);
143 chara.MoveZone(EMono.game.StartZone, ZoneTransition.EnterState.Auto);
144 chara.RemoveEditorTag(EditorTag.AINoMove);
145 }
146
147 // Token: 0x06000771 RID: 1905 RVA: 0x00030970 File Offset: 0x0002EB70
148 public void QuestExploration_AfterComplete()
149 {
150 Chara chara = EMono.game.cards.globalCharas.Find("ashland");
151 chara.MoveHome("lothria", 40, 49);
152 EMono.game.quests.RemoveAll(chara);
153 chara = EMono.game.cards.globalCharas.Find("fiama");
154 chara.MoveHome("lothria", 46, 56);
155 EMono.game.quests.RemoveAll(chara);
156 EMono.game.quests.Main.ChangePhase(700);
157 }
158
159 // Token: 0x06000772 RID: 1906 RVA: 0x00030A08 File Offset: 0x0002EC08
160 public void QuestCraft_Drop1()
161 {
162 EMono.player.DropReward(ThingGen.CreateRawMaterial(EMono.sources.materials.alias["straw"]), false);
163 }
164
165 // Token: 0x06000773 RID: 1907 RVA: 0x00030A34 File Offset: 0x0002EC34
166 public void QuestDefense_0()
167 {
168 Prologue prologue = EMono.game.Prologue;
169 Card card = EMono._zone.AddChara("punk", prologue.posPunk.x, prologue.posPunk.y);
170 card.things.DestroyAll(null);
171 (EMono._zone.AddThing("gallows", prologue.posPunk.x, prologue.posPunk.y).Install().trait as TraitShackle).Restrain(card, false);
172 CardBlueprint.SetNormalRarity(false);
173 }
174
175 // Token: 0x06000774 RID: 1908 RVA: 0x00030ABF File Offset: 0x0002ECBF
176 public void QuestVernis_DropRecipe()
177 {
178 EMono.player.DropReward(ThingGen.CreateRecipe("explosive"), false);
179 }
180
181 // Token: 0x06000775 RID: 1909 RVA: 0x00030AD8 File Offset: 0x0002ECD8
182 public void QuestDefense_1()
183 {
184 Prologue prologue = EMono.game.Prologue;
185 Card tc = EMono._zone.AddChara("boar", prologue.posPunk.x + 1, prologue.posPunk.y);
186 (EMono._zone.AddThing("gallows", prologue.posPunk.x + 1, prologue.posPunk.y).Install().trait as TraitShackle).Restrain(tc, false);
187 EMono.player.DropReward(ThingGen.Create("stone", -1, -1).SetNum(20), false);
188 EMono.player.DropReward(ThingGen.Create("330", -1, -1).SetNum(3), true).Identify(false, IDTSource.Identify);
189 EMono.player.DropReward(ThingGen.Create("331", -1, -1).SetNum(3), true).Identify(false, IDTSource.Identify);
190 EMono.player.DropReward(ThingGen.Create("bandage", -1, -1).SetNum(5), false);
191 }
192
193 // Token: 0x06000776 RID: 1910 RVA: 0x00030BDC File Offset: 0x0002EDDC
194 public void QuestDefense_2()
195 {
196 }
197
198 // Token: 0x06000777 RID: 1911 RVA: 0x00030BDE File Offset: 0x0002EDDE
199 public void QuestDebt_reward()
200 {
201 EMono.game.quests.Get<QuestDebt>().GiveReward();
202 }
203
204 // Token: 0x06000778 RID: 1912 RVA: 0x00030BF4 File Offset: 0x0002EDF4
205 public void Tutorial1()
206 {
207 Thing t = ThingGen.Create("log", -1, -1);
208 Point point = new Point(53, 52);
209 EMono._zone.AddCard(t, point).SetPlaceState(PlaceState.installed, false);
210 t = ThingGen.Create("crimAle", -1, -1);
211 EMono._zone.AddCard(t, point).SetPlaceState(PlaceState.installed, false);
212 }
213
214 // Token: 0x06000779 RID: 1913 RVA: 0x00030C4B File Offset: 0x0002EE4B
215 public void WelcomeMsg()
216 {
217 }
218
219 // Token: 0x0600077A RID: 1914 RVA: 0x00030C50 File Offset: 0x0002EE50
220 public void chara_hired()
221 {
222 if (EMono.Branch.IsRecruit(this.cc))
223 {
224 EMono.pc.ModCurrency(-CalcGold.Hire(this.cc), "money2");
225 this.cc.SetBool(18, true);
226 }
227 EMono.Sound.Play("good");
228 EMono.Branch.Recruit(this.cc);
229 }
230
231 // Token: 0x0600077B RID: 1915 RVA: 0x00030CB8 File Offset: 0x0002EEB8
232 public void chara_hired_ticket()
233 {
234 EMono.pc.things.Find("ticket_resident", -1, -1).ModNum(-1, true);
235 EMono.Sound.Play("good");
236 this.cc.SetBool(18, true);
237 EMono.Branch.Recruit(this.cc);
238 }
239
240 // Token: 0x0600077C RID: 1916 RVA: 0x00030D10 File Offset: 0x0002EF10
241 public void nerun_gift()
242 {
243 Dialog.Gift("", true, new Card[]
244 {
245 ThingGen.Create("rp1", -1, -1)
246 });
247 }
248
249 // Token: 0x0600077D RID: 1917 RVA: 0x00030D33 File Offset: 0x0002EF33
250 public void nerun_gift2()
251 {
252 Dialog.Gift("", true, new Card[]
253 {
254 ThingGen.Create("rp1", -1, -1)
255 });
256 }
257
258 // Token: 0x0600077E RID: 1918 RVA: 0x00030D58 File Offset: 0x0002EF58
259 public void nerun_gift3()
260 {
261 Dialog.Gift("", true, new List<Card>
262 {
263 ThingGen.Create("rp1", -1, -1),
264 ThingGen.Create("rp2", -1, -1),
265 ThingGen.Create("rp3", -1, -1),
266 ThingGen.Create("rp4", -1, -1),
267 ThingGen.Create("rp5", -1, -1)
268 });
269 }
270
271 // Token: 0x0600077F RID: 1919 RVA: 0x00030DD4 File Offset: 0x0002EFD4
272 public void fiama_gold()
273 {
274 EMono.player.DropReward(ThingGen.Create("money2", -1, -1).SetNum(10), false);
275 if (EMono.game.idPrologue == 2)
276 {
277 EMono.player.DropReward(ThingGen.Create("hammer", -1, -1), false);
278 }
279 }
280
281 // Token: 0x06000780 RID: 1920 RVA: 0x00030E28 File Offset: 0x0002F028
282 public void fiama_pet1()
283 {
284 Chara c = CharaGen.Create("dog", -1);
285 this.fiama_pet(c);
286 }
287
288 // Token: 0x06000781 RID: 1921 RVA: 0x00030E48 File Offset: 0x0002F048
289 public void fiama_pet2()
290 {
291 Chara c = CharaGen.Create("cat", -1);
292 this.fiama_pet(c);
293 }
294
295 // Token: 0x06000782 RID: 1922 RVA: 0x00030E68 File Offset: 0x0002F068
296 public void fiama_pet3()
297 {
298 Chara c = CharaGen.Create("bearCub", -1);
299 this.fiama_pet(c);
300 }
301
302 // Token: 0x06000783 RID: 1923 RVA: 0x00030E88 File Offset: 0x0002F088
303 public void fiama_pet4()
304 {
305 Chara c = CharaGen.Create("shojo", -1);
306 this.fiama_pet(c);
307 }
308
309 // Token: 0x06000784 RID: 1924 RVA: 0x00030EA8 File Offset: 0x0002F0A8
310 private void fiama_pet(Chara c)
311 {
312 EMono._zone.AddCard(c, EMono.pc.pos);
313 c.MakeAlly(true);
314 c.SetInt(100, 1);
315 }
316
317 // Token: 0x06000785 RID: 1925 RVA: 0x00030ED0 File Offset: 0x0002F0D0
318 public void fiama_starter_gift()
319 {
320 switch (DramaChoice.lastChoice.index)
321 {
322 case 0:
323 {
324 Thing thing = ThingGen.Create("ring_decorative", -1, -1).SetNoSell();
325 thing.elements.SetBase(65, 10, 0);
326 EMono.player.DropReward(thing, false);
327 return;
328 }
329 case 1:
330 EMono.player.DropReward(ThingGen.Create("ticket_resident", -1, -1).SetNoSell(), false);
331 EMono.player.DropReward(ThingGen.Create("1174", -1, -1).SetNoSell(), false);
332 return;
333 case 2:
334 {
335 Thing thing = ThingGen.Create("boots_", -1, -1).SetNoSell();
336 thing.elements.SetBase(65, 5, 0);
337 thing.elements.SetBase(407, 5, 0);
338 EMono.player.DropReward(thing, false);
339 return;
340 }
341 case 3:
342 EMono.player.DropReward(ThingGen.Create("1085", -1, -1).SetNum(3).SetNoSell(), false);
343 return;
344 case 4:
345 for (int i = 0; i < 10; i++)
346 {
347 EMono.player.DropReward(ThingGen.Create("234", -1, -1).SetNoSell(), false);
348 }
349 return;
350 default:
351 this.cc.DoHostileAction(EMono.pc, true);
352 this.cc.calmCheckTurn = 100;
353 return;
354 }
355 }
356
357 // Token: 0x06000786 RID: 1926 RVA: 0x00031028 File Offset: 0x0002F228
358 public void revive_pet()
359 {
360 foreach (Chara chara in EMono.pc.homeBranch.members)
361 {
362 if (chara.isDead && chara.GetInt(100, null) != 0)
363 {
364 chara.GetRevived();
365 }
366 }
367 this.cc.ModAffinity(EMono.pc, -2, true);
368 }
369
370 // Token: 0x06000787 RID: 1927 RVA: 0x000310B4 File Offset: 0x0002F2B4
371 public void melilith_friend()
372 {
373 if (this.cc.id == "melilith" && EMono.game.quests.completedIDs.Contains("melilith"))
374 {
375 this.cc.MakeAlly(true);
376 }
377 }
378
379 // Token: 0x06000788 RID: 1928 RVA: 0x000310F4 File Offset: 0x0002F2F4
380 public void sister_friend()
381 {
382 if (this.cc.id == "olderyoungersister")
383 {
384 this.cc.MakeAlly(true);
385 }
386 EMono.pc.ModCurrency(-10000, "money");
387 this.cc.Say("hug", this.cc, EMono.pc, null, null);
388 }
389
390 // Token: 0x06000789 RID: 1929 RVA: 0x00031155 File Offset: 0x0002F355
391 public void sister_change()
392 {
393 this.cc.idSkin = ((this.cc.idSkin == 1) ? 2 : 1);
394 }
395
396 // Token: 0x0600078A RID: 1930 RVA: 0x00031174 File Offset: 0x0002F374
397 public void get_scratch()
398 {
399 EMono._map.TrySmoothPick(EMono.pc.pos, ThingGen.Create("scratchcard", -1, -1), EMono.pc);
400 EMono.game.dateScratch = EMono.world.date.GetRaw(24);
401 }
402
403 // Token: 0x0600078B RID: 1931 RVA: 0x000311C4 File Offset: 0x0002F3C4
404 public void poppy_found()
405 {
406 if (this.cc.id == "poppy")
407 {
408 this.cc.MakeAlly(true);
409 }
410 EMono.game.quests.Get("puppy").NextPhase();
411 Msg.Say("npc_rescue", this.cc, null, null, null);
412 this.cc.RemoveEditorTag(EditorTag.InvulnerableToMobs);
413 this.cc.RemoveEditorTag(EditorTag.Invulnerable);
414 }
415
416 // Token: 0x0600078C RID: 1932 RVA: 0x0003123B File Offset: 0x0002F43B
417 public void event_swordkeeper()
418 {
419 EMono._zone.AddChara("swordkeeper", 45, 52);
420 }
421
422 // Token: 0x0600078D RID: 1933 RVA: 0x00031251 File Offset: 0x0002F451
423 public static bool If(DramaChoice item, Chara c)
424 {
425 item.IF.Split('/', StringSplitOptions.None)[0] == "costHire";
426 return true;
427 }
428
429 // Token: 0x0600078E RID: 1934 RVA: 0x00031270 File Offset: 0x0002F470
430 public void guild_trial()
431 {
432 if (Guild.Current == EMono.game.factions.Merchant)
433 {
434 EMono.game.quests.Start("guild_merchant", this.cc, false);
435 return;
436 }
437 (this.cc.trait as TraitGuildDoorman).GiveTrial();
438 }
439
440 // Token: 0x0600078F RID: 1935 RVA: 0x000312C8 File Offset: 0x0002F4C8
441 public void guild_join()
442 {
443 if (Guild.Current != EMono.game.factions.Merchant)
444 {
445 (this.cc.trait as TraitGuildDoorman).OnJoinGuild();
446 }
447 Msg.Say("guild_join", Guild.Current.Name, null, null, null);
448 SE.Play("questComplete");
449 Guild.Current.relation.type = FactionRelation.RelationType.Member;
450 Guild.CurrentQuest.ChangePhase(10);
451 }
452
453 // Token: 0x06000790 RID: 1936 RVA: 0x00031340 File Offset: 0x0002F540
454 public void guild_mageTrial()
455 {
456 Guild.CurrentQuest.NextPhase();
457 Thing thing = EMono.pc.things.Find("letter_trial", -1, -1);
458 if (thing != null)
459 {
460 thing.ModNum(-1, true);
461 }
462 }
463
464 // Token: 0x06000791 RID: 1937 RVA: 0x00031379 File Offset: 0x0002F579
465 public void guild_promote()
466 {
467 Guild.Current.relation.Promote();
468 Guild currentGuild = Guild.GetCurrentGuild();
469 if (currentGuild == null)
470 {
471 return;
472 }
473 currentGuild.RefreshDevelopment();
474 }
475
476 // Token: 0x06000792 RID: 1938 RVA: 0x0003139C File Offset: 0x0002F59C
477 public bool check_sketch()
478 {
479 Thing thing = EMono.pc.things.Find("sketch_old", -1, -1);
480 if (thing == null)
481 {
482 return false;
483 }
484 int num = thing.Num;
485 thing.Destroy();
486 bool flag = false;
487 for (int i = 0; i < num; i++)
488 {
489 for (int j = 0; j < 5; j++)
490 {
491 int item = EMono.core.refs.dictSketches.Keys.RandomItem<int>();
492 if (!EMono.player.sketches.Contains(item))
493 {
494 EMono.player.sketches.Add(item);
495 Msg.Say("add_sketch", item.ToString() ?? "", null, null, null);
496 flag = true;
497 break;
498 }
499 }
500 }
501 if (flag)
502 {
503 SE.WriteJournal();
504 return true;
505 }
506 return false;
507 }
508
509 // Token: 0x06000793 RID: 1939 RVA: 0x00031460 File Offset: 0x0002F660
510 public int GetFelmeraRewardIndex()
511 {
512 int count = EMono.player.sketches.Count;
513 int num = count / 10;
514 if (num >= 29)
515 {
516 num = 29;
517 }
518 Debug.Log(string.Concat(new string[]
519 {
520 count.ToString(),
521 "/",
522 num.ToString(),
523 "/",
524 EMono.player.lastFelmeraReward.ToString()
525 }));
526 return num;
527 }
528
529 // Token: 0x06000794 RID: 1940 RVA: 0x000314D1 File Offset: 0x0002F6D1
530 public bool check_sketch2()
531 {
532 return this.GetFelmeraRewardIndex() > EMono.player.lastFelmeraReward;
533 }
534
535 // Token: 0x06000795 RID: 1941 RVA: 0x000314E8 File Offset: 0x0002F6E8
536 public List<Thing> ListFelmeraBarter()
537 {
538 List<Thing> list = new List<Thing>();
539 int felmeraRewardIndex = this.GetFelmeraRewardIndex();
540 for (int i = 0; i < felmeraRewardIndex; i++)
541 {
542 Thing thing = ThingGen.Create("painting_reward", -1, -1);
543 thing.idSkin = i;
544 list.Add(thing);
545 }
546 return list;
547 }
548
549 // Token: 0x06000796 RID: 1942 RVA: 0x0003152C File Offset: 0x0002F72C
550 public void give_sketch_reward()
551 {
552 int felmeraRewardIndex = this.GetFelmeraRewardIndex();
553 for (int i = EMono.player.lastFelmeraReward; i < felmeraRewardIndex; i++)
554 {
555 Thing thing = ThingGen.Create("painting_reward", -1, -1);
556 thing.idSkin = i;
557 EMono.player.DropReward(thing, false);
558 }
559 EMono.player.lastFelmeraReward = felmeraRewardIndex;
560 }
561
562 // Token: 0x06000797 RID: 1943 RVA: 0x00031584 File Offset: 0x0002F784
563 public void give_sketch_special()
564 {
565 foreach (int num in EMono.core.refs.dictSketches.Keys)
566 {
567 if (num >= 500 && num < 700)
568 {
569 EMono.player.sketches.Add(num);
570 }
571 }
572 Msg.Say("add_sketch_special");
573 SE.WriteJournal();
574 EMono.pc.things.Find("sketch_special", -1, -1).Destroy();
575 }
576
577 // Token: 0x0400079B RID: 1947
578 public static string idJump;
579
580 // Token: 0x0400079C RID: 1948
581 public DramaManager manager;
582}
Definition Card.cs:13
Definition Chara.cs:12
Definition EMono.cs:6
Definition Guild.cs:5
Definition Msg.cs:7
Definition Point.cs:11
Definition Quest.cs:8
Definition Thing.cs:10