Elin Modding Docs Doc
Loading...
Searching...
No Matches
AI_Fuck.cs
1using System;
2using System.Collections.Generic;
3using System.Runtime.CompilerServices;
4using UnityEngine;
5
6// Token: 0x02000209 RID: 521
7public class AI_Fuck : AIAct
8{
9 // Token: 0x170003CF RID: 975
10 // (get) Token: 0x06000EDE RID: 3806 RVA: 0x0006E2F3 File Offset: 0x0006C4F3
11 public virtual AI_Fuck.FuckType Type
12 {
13 get
14 {
15 return AI_Fuck.FuckType.fuck;
16 }
17 }
18
19 // Token: 0x170003D0 RID: 976
20 // (get) Token: 0x06000EDF RID: 3807 RVA: 0x0006E2F6 File Offset: 0x0006C4F6
21 public override bool PushChara
22 {
23 get
24 {
25 return false;
26 }
27 }
28
29 // Token: 0x170003D1 RID: 977
30 // (get) Token: 0x06000EE0 RID: 3808 RVA: 0x0006E2F9 File Offset: 0x0006C4F9
31 public override bool IsAutoTurn
32 {
33 get
34 {
35 return true;
36 }
37 }
38
39 // Token: 0x170003D2 RID: 978
40 // (get) Token: 0x06000EE1 RID: 3809 RVA: 0x0006E2FC File Offset: 0x0006C4FC
41 public override TargetType TargetType
42 {
43 get
44 {
45 return TargetType.Chara;
46 }
47 }
48
49 // Token: 0x170003D3 RID: 979
50 // (get) Token: 0x06000EE2 RID: 3810 RVA: 0x0006E303 File Offset: 0x0006C503
51 public override int MaxProgress
52 {
53 get
54 {
55 return this.maxProgress;
56 }
57 }
58
59 // Token: 0x170003D4 RID: 980
60 // (get) Token: 0x06000EE3 RID: 3811 RVA: 0x0006E30B File Offset: 0x0006C50B
61 public override int CurrentProgress
62 {
63 get
64 {
65 return this.progress;
66 }
67 }
68
69 // Token: 0x06000EE4 RID: 3812 RVA: 0x0006E313 File Offset: 0x0006C513
70 public virtual bool CanTame()
71 {
72 return false;
73 }
74
75 // Token: 0x06000EE5 RID: 3813 RVA: 0x0006E316 File Offset: 0x0006C516
76 public override IEnumerable<AIAct.Status> Run()
77 {
78 if (this.target == null)
79 {
80 foreach (Chara chara in EClass._map.charas)
81 {
82 if (!chara.IsHomeMember() && !chara.IsDeadOrSleeping && chara.Dist(this.owner) <= 5)
83 {
84 this.target = chara;
85 break;
86 }
87 }
88 }
89 if (this.target == null)
90 {
91 yield return this.Cancel();
92 }
93 Chara cc = this.sell ? this.target : this.owner;
94 Chara tc = this.sell ? this.owner : this.target;
95 cc.Say(this.Type.ToString() + "_start", cc, tc, null, null);
96 this.isFail = (() => !tc.IsAliveInCurrentZone || tc.Dist(this.owner) > 3);
97 if (this.Type == AI_Fuck.FuckType.tame)
98 {
99 cc.SetTempHand(1104, -1);
100 }
101 int destDist = (this.Type == AI_Fuck.FuckType.fuck) ? 1 : 1;
102 this.maxProgress = 25;
103 if (this.succubus)
104 {
105 cc.Talk("seduce", null, null, false);
106 }
107 int num;
108 for (int i = 0; i < this.maxProgress; i = num + 1)
109 {
110 this.progress = i;
111 yield return base.DoGoto(this.target.pos, destDist, false, null);
112 AI_Fuck.FuckType type = this.Type;
113 if (type != AI_Fuck.FuckType.fuck)
114 {
115 if (type == AI_Fuck.FuckType.tame)
116 {
117 if (EClass.rnd(8) == 0)
118 {
119 tc.AddCondition<ConFear>(50, false);
120 }
121 if (i == 0 || i == 10)
122 {
123 cc.Talk("goodBoy", null, null, false);
124 }
125 cc.elements.ModExp(237, 10, false);
126 }
127 }
128 else
129 {
130 cc.LookAt(tc);
131 tc.LookAt(cc);
132 num = i % 4;
133 if (num != 0)
134 {
135 if (num == 2)
136 {
137 tc.renderer.PlayAnime(AnimeID.Shiver, default(Vector3), false);
138 if (EClass.rnd(3) == 0)
139 {
140 tc.Talk("tailed", null, null, false);
141 }
142 }
143 }
144 else
145 {
146 cc.renderer.PlayAnime(AnimeID.Attack, tc);
147 if (EClass.rnd(3) == 0 || this.sell)
148 {
149 cc.Talk("tail", null, null, false);
150 }
151 }
152 if (EClass.rnd(3) == 0 || this.sell)
153 {
154 this.target.AddCondition<ConWait>(50, true);
155 }
156 }
157 num = i;
158 }
159 this.Finish();
160 yield break;
161 }
162
163 // Token: 0x06000EE6 RID: 3814 RVA: 0x0006E328 File Offset: 0x0006C528
164 public void Finish()
165 {
166 Chara chara = this.sell ? this.target : this.owner;
167 Chara chara2 = this.sell ? this.owner : this.target;
168 if (chara.isDead || chara2.isDead)
169 {
170 return;
171 }
172 bool flag = EClass.rnd(2) == 0;
173 AI_Fuck.FuckType type = this.Type;
174 if (type != AI_Fuck.FuckType.fuck)
175 {
176 if (type == AI_Fuck.FuckType.tame)
177 {
178 if (this.CanTame())
179 {
180 if (flag)
181 {
182 chara.Say("tame_success", this.owner, this.target, null, null);
183 chara2.MakeAlly(true);
184 chara.elements.ModExp(237, 200, false);
185 }
186 else
187 {
188 chara.Say("tame_fail", chara, chara2, null, null);
189 }
190 }
191 else
192 {
193 chara.Say("tame_invalid", chara2, null, null);
194 }
195 }
196 }
197 else
198 {
199 for (int i = 0; i < 2; i++)
200 {
201 Chara chara3 = (i == 0) ? chara : chara2;
202 chara3.RemoveCondition<ConDrunk>();
203 if (EClass.rnd(15) == 0)
204 {
205 chara3.AddCondition<ConDisease>(200, false);
206 }
207 chara3.ModExp(77, 250);
208 chara3.ModExp(71, 250);
209 chara3.ModExp(75, 250);
210 chara3.SAN.Mod(10);
211 }
212 if (EClass.rnd(5) == 0)
213 {
214 chara2.AddCondition<ConParalyze>(500, false);
215 }
216 if (EClass.rnd(3) == 0)
217 {
218 chara2.AddCondition<ConInsane>(100 + EClass.rnd(100), false);
219 }
220 int num = CalcMoney.Whore(chara2);
221 chara.Talk("tail_after", null, null, false);
222 bool flag2 = false;
223 if (this.succubus)
224 {
225 chara.ShowEmo(Emo.love, 0f, true);
226 chara2.ShowEmo(Emo.love, 0f, true);
227 EClass.player.forceTalk = true;
228 chara2.Talk("seduced", null, null, false);
229 }
230 else if (chara != EClass.pc)
231 {
232 Chara chara4 = chara;
233 Chara chara5 = chara2;
234 if (this.bitch)
235 {
236 chara = chara5;
237 chara2 = chara4;
238 }
239 if (!chara.IsPCParty && chara2 == EClass.pc && EClass.rnd(4) != 0)
240 {
241 num = num / 5 + 1;
242 chara.ModCurrency(num, "money");
243 }
244 if (chara.GetCurrency("money") >= num)
245 {
246 chara.Talk("tail_pay", null, null, false);
247 }
248 else
249 {
250 chara.Talk("tail_nomoney", null, null, false);
251 num = chara.GetCurrency("money");
252 chara2.Say("angry", chara2, null, null);
253 chara2.Talk("angry", null, null, false);
254 flag = this.sell;
255 if (EClass.rnd(20) == 0)
256 {
257 flag2 = true;
258 }
259 }
260 chara.ModCurrency(-num, "money");
261 if (chara2 == EClass.pc)
262 {
263 if (num > 0)
264 {
265 EClass.player.DropReward(ThingGen.Create("money", -1, -1).SetNum(num), false);
266 EClass.player.ModKarma(-1);
267 }
268 }
269 else
270 {
271 chara2.ModCurrency(num, "money");
272 }
273 chara = chara4;
274 chara2 = chara5;
275 }
276 if (flag2)
277 {
278 chara2.DoHostileAction(chara, false);
279 }
280 if (chara.IsPCParty || chara2.IsPCParty)
281 {
282 chara.stamina.Mod(-5 - EClass.rnd(chara.stamina.max / 10 + (this.succubus ? chara2.LV : 0) + 1));
283 chara2.stamina.Mod(-5 - EClass.rnd(chara2.stamina.max / 20 + (this.succubus ? chara.LV : 0) + 1));
284 }
285 AI_Fuck.<Finish>g__SuccubusExp|21_0(chara, chara2);
286 AI_Fuck.<Finish>g__SuccubusExp|21_0(chara2, chara);
287 }
288 chara2.ModAffinity(chara, flag ? 10 : -5, true);
289 }
290
291 // Token: 0x06000EE8 RID: 3816 RVA: 0x0006E6AC File Offset: 0x0006C8AC
292 [CompilerGenerated]
293 internal static void <Finish>g__SuccubusExp|21_0(Chara c, Chara tg)
294 {
295 if (!c.HasElement(1216, 1))
296 {
297 return;
298 }
299 foreach (Element element in tg.elements.ListBestAttributes())
300 {
301 if (c.elements.ValueWithoutLink(element.id) < element.ValueWithoutLink)
302 {
303 c.elements.ModTempPotential(element.id, 1 + EClass.rnd(element.ValueWithoutLink - c.elements.ValueWithoutLink(element.id) / 5 + 1), 0);
304 c.Say("succubus_exp", c, element.Name.ToLower(), null);
305 break;
306 }
307 }
308 }
309
310 // Token: 0x04000D65 RID: 3429
311 public Chara target;
312
313 // Token: 0x04000D66 RID: 3430
314 public bool sell;
315
316 // Token: 0x04000D67 RID: 3431
317 public bool bitch;
318
319 // Token: 0x04000D68 RID: 3432
320 public bool succubus;
321
322 // Token: 0x04000D69 RID: 3433
323 public int maxProgress;
324
325 // Token: 0x04000D6A RID: 3434
326 public int progress;
327
328 // Token: 0x02000904 RID: 2308
329 public enum FuckType
330 {
331 // Token: 0x04002635 RID: 9781
332 fuck,
333 // Token: 0x04002636 RID: 9782
334 tame
335 }
336}
Definition AIAct.cs:7
Definition Chara.cs:12