Elin Decompiled Documentation EA 23.254 Nightly Patch 1
Loading...
Searching...
No Matches
ActEffect.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using UnityEngine;
5
6public class ActEffect : EClass
7{
8 private class WishItem
9 {
10 public string n;
11
12 public int score;
13
14 public Action action;
15 }
16
17 public static int RapidCount;
18
19 public static float RapidDelay;
20
21 public static int angle = 20;
22
23 public static void TryDelay(Action a)
24 {
25 if (RapidCount == 0)
26 {
27 a();
28 return;
29 }
30 TweenUtil.Delay((float)RapidCount * RapidDelay, delegate
31 {
32 a();
33 });
34 }
35
36 public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Point> points, ActRef actref, string lang = null)
37 {
38 if (points.Count == 0)
39 {
41 return false;
42 }
44 {
45 Debug.Log(e.source.alias);
46 e = Element.Create(0, 1);
47 }
48 ElementRef elementRef = EClass.setting.elements[e.source.alias];
49 int num = actref.act?.ElementPowerMod ?? 50;
50 int num2 = 0;
51 Point point = CC.pos.Copy();
52 List<Card> list = new List<Card>();
53 bool flag = false;
54 if ((id == EffectId.Explosive || id == EffectId.Rocket || id == EffectId.GravityGun) && actref.refThing != null)
55 {
56 power = power * actref.refThing.material.hardness / 10;
57 }
58 string text = id.ToString();
59 string text2 = (EClass.sources.calc.map.ContainsKey(text) ? text : (EClass.sources.calc.map.ContainsKey("Sp" + text) ? ("Sp" + text) : (text.ToLowerInvariant() + "_")));
60 foreach (Point p in points)
61 {
62 bool flag2 = true;
63 AttackSource attackSource = AttackSource.None;
64 switch (id)
65 {
66 case EffectId.Explosive:
67 case EffectId.Rocket:
68 case EffectId.GravityGun:
69 text2 = "ball_";
70 flag = false;
71 break;
72 case EffectId.BallBubble:
73 text2 = "ball_";
74 break;
75 case EffectId.Earthquake:
76 text2 = "SpEarthquake";
77 flag2 = false;
78 flag = true;
79 break;
80 case EffectId.Meteor:
81 text2 = "SpMeteor";
82 break;
83 default:
84 if (CC.isChara && p.Equals(CC.pos) && points.Count >= 2)
85 {
86 continue;
87 }
88 break;
89 case EffectId.Suicide:
90 break;
91 }
92 Effect effect = null;
93 Effect effect2 = (flag2 ? Effect.Get("trail1") : null);
94 Point from = p;
95 switch (id)
96 {
97 case EffectId.Arrow:
98 case EffectId.MoonSpear:
99 case EffectId.MoonArrow:
100 {
101 effect = Effect.Get((id == EffectId.MoonSpear || id == EffectId.MoonArrow) ? "spell_moonspear" : "spell_arrow");
102 if (id == EffectId.Arrow)
103 {
104 effect.sr.color = elementRef.colorSprite;
105 }
106 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
107 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
108 componentInChildren.startColor = startColor;
109 from = CC.pos;
110 break;
111 }
112 case EffectId.Earthquake:
113 {
114 if (EClass.rnd(4) == 0 && p.IsSync)
115 {
116 effect = Effect.Get("smoke_earthquake");
117 }
118 float num3 = 0.06f * (float)CC.pos.Distance(p);
119 Point pos = p.Copy();
120 TweenUtil.Tween(num3, null, delegate
121 {
122 pos.Animate(AnimeID.Quake, animeBlock: true);
123 });
124 if (effect != null)
125 {
126 effect.SetStartDelay(num3);
127 }
128 break;
129 }
130 default:
131 {
132 effect = Effect.Get("Element/ball_" + ((e.id == 0) ? "Void" : ((id == EffectId.GravityGun) ? "Gravity" : e.source.alias.Remove(0, 3))));
133 if (effect == null)
134 {
135 effect = Effect.Get("Element/ball_Fire");
136 }
137 float startDelay = ((id == EffectId.Meteor) ? 0.1f : 0.04f) * (float)CC.pos.Distance(p);
138 effect.SetStartDelay(startDelay);
139 effect2.SetStartDelay(startDelay);
140 if (id == EffectId.GravityGun)
141 {
142 float duration = 0.06f * (float)CC.pos.Distance(p);
143 Point pos2 = p.Copy();
144 TweenUtil.Tween(duration, null, delegate
145 {
146 pos2.Animate(AnimeID.Gravity, animeBlock: true);
147 });
148 }
149 break;
150 }
151 }
152 if (effect2 != null)
153 {
154 effect2.SetParticleColor(elementRef.colorTrail, changeMaterial: true, "_TintColor").Play(from);
155 }
156 if (effect != null)
157 {
158 if (id == EffectId.Arrow || id == EffectId.MoonSpear || id == EffectId.MoonArrow)
159 {
160 TryDelay(delegate
161 {
162 effect.Play(CC.pos, 0f, p);
163 });
164 }
165 else
166 {
167 TryDelay(delegate
168 {
169 effect.Play(p).Flip(p.x > CC.pos.x);
170 });
171 }
172 }
173 bool flag3 = false;
174 if (CC.IsPCFactionOrMinion && (CC.HasElement(1651) || EClass.pc.Evalue(1651) >= 2))
175 {
176 bool flag4 = false;
177 foreach (Card item in p.ListCards())
178 {
179 if (item.isChara)
180 {
181 if (item.IsPCFactionOrMinion)
182 {
183 flag4 = true;
184 }
185 }
186 else if ((e.id != 910 && e.id != 911) || !item.IsFood || !item.category.IsChildOf("foodstuff"))
187 {
188 flag4 = true;
189 }
190 }
191 flag3 = flag4;
192 }
193 if (!flag3)
194 {
195 if (e.id == 910)
196 {
197 EClass._map.TryShatter(p, 910, power);
198 }
199 if (e.id == 911)
200 {
201 EClass._map.TryShatter(p, 911, power);
202 }
203 }
204 foreach (Card item2 in p.ListCards().ToList())
205 {
206 Card c = item2;
207 if ((!c.isChara && !c.trait.CanBeAttacked) || (c.IsMultisize && item2 == CC) || (c.isChara && (c.Chara.host == CC || c.Chara.parasite == CC || c.Chara.ride == CC)))
208 {
209 continue;
210 }
211 switch (id)
212 {
213 case EffectId.Arrow:
214 case EffectId.Hand:
215 case EffectId.Sword:
216 case EffectId.MoonSpear:
217 case EffectId.MoonArrow:
218 if (c.isChara && CC.isChara)
219 {
220 c.Chara.RequestProtection(CC.Chara, delegate(Chara a)
221 {
222 c = a;
223 });
224 }
225 if (id == EffectId.MoonSpear || (id == EffectId.MoonArrow && EClass.rnd(5) == 0))
226 {
227 attackSource = AttackSource.MoonSpear;
228 }
229 break;
230 }
231 switch (id)
232 {
233 case EffectId.Arrow:
234 attackSource = AttackSource.MagicArrow;
235 break;
236 case EffectId.Hand:
237 attackSource = AttackSource.MagicHand;
238 break;
239 case EffectId.Sword:
240 attackSource = AttackSource.MagicSword;
241 break;
242 }
243 long num4 = 0L;
244 bool isChara = CC.isChara;
245 if (id == EffectId.Suicide)
246 {
247 num4 = CC.MaxHP * 2;
248 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
249 if ((c.HasCondition<ConBrightnessOfLife>() || c.HasTag(CTAG.suicide)) && !c.HasCondition<ConWet>() && !c.IsPowerful)
250 {
251 list.Add(c);
252 }
253 }
254 else
255 {
256 Dice dice = Dice.Create(text2, power, CC, (actref.refThing != null) ? null : actref.act);
257 if (dice == null)
258 {
259 Debug.Log(text2);
260 }
261 num4 = dice.Roll();
262 switch (id)
263 {
264 case EffectId.Earthquake:
265 if (c.HasCondition<ConGravity>())
266 {
267 num4 = dice.RollMax() * 2;
268 }
269 else if (c.isChara && c.Chara.IsLevitating)
270 {
271 num4 /= 2;
272 }
273 break;
274 case EffectId.Sword:
275 num4 = num4 * (int)Mathf.Min(70f + Mathf.Sqrt(CC.Evalue(101)) * 3f, 200f) / 100;
276 break;
277 case EffectId.GravityGun:
278 num4 /= 5;
279 break;
280 }
281 if (id == EffectId.Ball || id == EffectId.BallBubble || id == EffectId.Explosive || id == EffectId.Rocket || id == EffectId.GravityGun)
282 {
283 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
284 }
285 }
286 if (id == EffectId.Sword)
287 {
288 c.PlaySound("ab_magicsword");
289 c.PlayEffect("hit_slash");
290 }
291 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as Chara)) || (flag && c == CC))
292 {
293 continue;
294 }
295 if (isChara && points.Count > 1 && c != null && c.isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.Chara))
296 {
297 int num5 = CC.Evalue(302);
298 if (!CC.IsPC && CC.IsPCFactionOrMinion)
299 {
300 num5 += EClass.pc.Evalue(302);
301 }
302 if (CC.HasElement(1214))
303 {
304 num5 *= 2;
305 }
306 if (num5 > 0)
307 {
308 if (num5 * 10 > EClass.rnd(num4 + 1))
309 {
310 if (c == c.pos.FirstChara)
311 {
312 CC.ModExp(302, CC.IsPC ? 10 : 50);
313 }
314 continue;
315 }
316 num4 = EClass.rnd(num4 * 100 / (100 + num5 * 10 + 1));
317 if (c == c.pos.FirstChara)
318 {
319 CC.ModExp(302, CC.IsPC ? 20 : 100);
320 }
321 if (num4 == 0L)
322 {
323 continue;
324 }
325 }
326 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) && EClass.pc.HasElement(1214))) && EClass.rnd(5) != 0)
327 {
328 continue;
329 }
330 }
331 if (!lang.IsEmpty())
332 {
333 if (lang == "spell_hand")
334 {
335 string[] list2 = Lang.GetList("attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty("Touch") : "Touch"));
336 string @ref = "_elehand".lang(e.source.GetAltname(2), list2[4]);
337 CC.Say(c.IsPCParty ? "cast_hand_ally" : "cast_hand", CC, c, @ref, c.IsPCParty ? list2[1] : list2[2]);
338 }
339 else
340 {
341 CC.Say(lang + "_hit", CC, c, e.Name.ToLower());
342 }
343 }
344 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing != null) ? EClass._map.FindChara(actref.refThing.c_uidRefCard) : null));
345 if (c.IsMultisize)
346 {
347 switch (id)
348 {
349 case EffectId.Ball:
350 case EffectId.Explosive:
351 case EffectId.BallBubble:
352 case EffectId.Meteor:
353 case EffectId.Earthquake:
354 case EffectId.Suicide:
355 case EffectId.Rocket:
356 case EffectId.Flare:
357 case EffectId.GravityGun:
358 num4 /= 2;
359 break;
360 }
361 }
362 if (RapidCount > 0)
363 {
364 num4 = num4 * 100 / (100 + RapidCount * 50);
365 }
366 num4 = num4 * Act.powerMod / 100;
367 if (num4 > 99999999)
368 {
369 num4 = 99999999L;
370 }
371 c.DamageHP(num4, e.id, power * num / 100, attackSource, chara ?? CC);
373 {
374 switch (id)
375 {
376 case EffectId.GravityGun:
377 if (c.isChara)
378 {
379 AddCon<ConGravity>(1, power);
380 AddCon<ConBlind>(4, power);
381 AddCon<ConDim>(5, power / 2);
382 AddCon<ConSupress>(3, power / 2);
383 if (actref.refThing != null && actref.refThing.id == "gun_gravity2")
384 {
385 AddCon<ConEntangle>(4, power / 3);
386 AddCon<ConSilence>(4, power / 3);
387 AddCon<ConWeakResEle>(4, power);
388 AddCon<ConNightmare>(4, power);
389 }
390 }
391 break;
392 case EffectId.DrainMana:
393 if (CC.IsAliveInCurrentZone && c.isChara && CC.isChara && c.Chara.mana.value > 0)
394 {
395 long num6 = num4 * num / 100;
396 Debug.Log(num4 + " v:" + num6 + " evalue:" + e.Value + " power:" + power + " elepMod:" + num);
397 if (num6 > c.Chara.mana.value)
398 {
399 num6 = c.Chara.mana.value;
400 }
401 c.Chara.mana.Mod((int)(-num6));
402 CC.Chara.mana.Mod((int)num6);
403 }
404 break;
405 }
406 }
407 if (id == EffectId.Explosive && CC.trait is TraitCookerMicrowave)
408 {
409 chara = EClass.pc;
410 }
411 if (chara != null && chara.IsAliveInCurrentZone)
412 {
413 chara.DoHostileAction(c);
414 }
415 num2++;
416 void AddCon<T>(int rate, int power) where T : Condition
417 {
418 if (EClass.rnd(1 + actref.refVal) == 0 && !c.Chara.HasCondition<T>() && EClass.rnd(rate) == 0)
419 {
420 c.Chara.AddCondition<T>(power);
421 }
422 }
423 }
424 if ((id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket) && (!EClass._zone.IsPCFaction || !EClass.Branch.HasItemProtection))
425 {
426 int num7 = id switch
427 {
428 EffectId.Suicide => CC.LV / 3 + 40,
429 EffectId.Meteor => 50 + power / 20,
430 _ => (actref.refThing != null) ? actref.refThing.material.hardness : (30 + power / 20),
431 };
432 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (id == EffectId.Explosive && actref.refThing == null)) && !(EClass._zone is Zone_Vernis);
433 if (p.HasObj && p.cell.matObj.hardness <= num7)
434 {
436 if (flag5)
437 {
439 }
440 }
441 if (!p.HasObj && p.HasBlock && p.matBlock.hardness <= num7)
442 {
444 if (flag5)
445 {
447 }
448 }
449 }
450 if (e.id == 910)
451 {
452 int num8 = 0;
453 if (id == EffectId.Meteor)
454 {
455 num8 = 2;
456 }
458 {
459 num8 = 0;
460 }
461 if (num8 > EClass.rnd(10))
462 {
463 p.ModFire(4 + EClass.rnd(10));
464 }
465 }
466 if (e.id == 911)
467 {
468 p.ModFire(-20, extinguish: true);
469 }
470 }
471 if (RapidCount == 0)
472 {
473 foreach (Card item3 in list)
474 {
475 if (item3.ExistsOnMap)
476 {
477 RapidCount += 2;
478 ProcAt(id, power, BlessedState.Normal, item3, null, item3.pos, isNeg: true, actref);
479 }
480 }
481 }
482 return num2 > 0;
483 }
484
485 public static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef = default(ActRef))
486 {
487 Chara CC = cc.Chara;
488 bool flag = state <= BlessedState.Cursed;
489 bool flag2 = isNeg || flag;
490 Element element = Element.Create(actRef.aliasEle.IsEmpty("eleFire"), power / 10);
492 {
493 angle += 5;
494 if (angle > 100)
495 {
496 angle = 30;
497 }
498 Debug.Log(angle);
499 }
500 switch (id)
501 {
502 case EffectId.Earthquake:
503 {
504 List<Point> list = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
505 if (list.Count == 0)
506 {
507 list.Add(CC.pos.Copy());
508 }
509 CC.Say("spell_earthquake", CC, element.Name.ToLower());
510 TryDelay(delegate
511 {
512 CC.PlaySound("spell_earthquake");
513 });
514 if (CC.IsInMutterDistance())
515 {
516 Shaker.ShakeCam("ball");
517 }
518 EClass.Wait(1f, CC);
519 DamageEle(CC, id, power, element, list, actRef, "spell_earthquake");
520 break;
521 }
522 case EffectId.Meteor:
523 {
524 EffectMeteor.Create(cc.pos, 6, 10, delegate
525 {
526 });
527 List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 10f);
528 if (list3.Count == 0)
529 {
530 list3.Add(CC.pos.Copy());
531 }
532 CC.Say("spell_ball", CC, element.Name.ToLower());
533 TryDelay(delegate
534 {
535 CC.PlaySound("spell_ball");
536 });
537 if (CC.IsInMutterDistance())
538 {
539 Shaker.ShakeCam("ball");
540 }
541 EClass.Wait(1f, CC);
542 DamageEle(CC, id, power, element, list3, actRef, "spell_ball");
543 return;
544 }
545 case EffectId.Hand:
546 case EffectId.DrainBlood:
547 case EffectId.DrainMana:
548 case EffectId.Sword:
549 {
550 List<Point> list6 = new List<Point>();
551 list6.Add(tp.Copy());
552 EClass.Wait(0.3f, CC);
553 TryDelay(delegate
554 {
555 CC.PlaySound("spell_hand");
556 });
557 if (!DamageEle(CC, id, power, element, list6, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : ((id == EffectId.Sword) ? "spell_sword" : "spell_hand")))
558 {
559 CC.Say("spell_hand_miss", CC, element.Name.ToLower());
560 }
561 return;
562 }
563 case EffectId.Arrow:
564 case EffectId.MoonSpear:
565 case EffectId.MoonArrow:
566 {
567 List<Point> list7 = new List<Point>();
568 list7.Add(tp.Copy());
569 CC.Say((id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow", CC, element.Name.ToLower());
570 EClass.Wait(0.5f, CC);
571 TryDelay(delegate
572 {
573 CC.PlaySound((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
574 });
575 DamageEle(CC, id, power, element, list7, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
576 return;
577 }
578 case EffectId.Summon:
579 {
580 string n = actRef.n1;
581 if (!(n == "special"))
582 {
583 if (n == "special2")
584 {
585 if (EClass._zone.HasField(10000))
586 {
587 foreach (Chara item in EClass._map.charas.Where((Chara _c) => _c.id == "cocoon").ToList())
588 {
589 if (!item.pos.IsSunLit)
590 {
591 item.pos.PlayEffect("darkwomb3");
592 item.HatchEgg();
593 }
594 }
595 }
596 CC.PlayEffect("darkwomb");
597 SE.Play("ab_womb");
598 }
599 else
600 {
601 CC.Say("summon_ally", CC);
602 }
603 }
604 else
605 {
606 SE.Play("warhorn");
607 Msg.Say("warhorn");
608 }
609 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
610 {
611 CC.Say("summon_ally_fail", CC);
612 return;
613 }
614 string id3 = actRef.n1;
615 int num3 = 1;
616 int num4 = -1;
617 int radius = 3;
618 bool flag3 = false;
619 bool flag4 = actRef.n1 == "special";
620 int num5 = -1;
621 string text = "";
622 switch (actRef.n1)
623 {
624 case "shadow":
625 case "tsunami":
626 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
627 break;
628 case "monster":
629 case "fire":
630 case "animal":
631 num3 = 1 + EClass.rnd(2);
632 break;
633 case "special_force":
634 id3 = "army_palmia";
635 num3 = 4 + EClass.rnd(2);
636 num5 = EClass._zone.DangerLv;
637 break;
638 case "tentacle":
639 num4 = 20 + EClass.rnd(10);
640 radius = 1;
641 break;
642 case "special":
643 CC.SetInt(70, EClass.world.date.GetRaw() + 1440);
644 num3 = Mathf.Clamp(7 + CC.LV / 100, 4, 20);
645 num5 = CC.LV;
646 break;
647 case "special2":
648 num3 = 30;
649 num5 = CC.LV;
650 break;
651 }
652 num3 += CC.Evalue(1240);
653 for (int j = 0; j < num3; j++)
654 {
655 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon)
656 {
657 break;
658 }
659 Point point = null;
660 point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
661 if (point == null || !point.IsValid)
662 {
663 continue;
664 }
665 Chara chara = null;
667 if (num5 != -1)
668 {
669 CardBlueprint.current.lv = num5;
670 }
671 if (!text.IsEmpty())
672 {
673 CardBlueprint.current.idEle = text;
674 }
675 switch (actRef.n1)
676 {
677 case "special":
678 if (j == 0 && !CC.HasMinion("imolonac") && !CC.HasMinion("ygolonac"))
679 {
680 chara = CharaGen.Create((EClass.rnd(20) == 0) ? "imolonac" : "ygolonac");
681 break;
682 }
683 chara = CharaGen.Create("hound", CC.LV);
684 if (text.IsEmpty())
685 {
686 text = chara.MainElement.source.alias;
687 }
688 break;
689 case "special2":
690 chara = CharaGen.Create("cocoon");
691 break;
692 case "yeek":
693 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_yeek", (SourceChara.Row r) => r.race == "yeek"), power / 10);
694 break;
695 case "orc":
696 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_orc", (SourceChara.Row r) => r.race == "orc"), power / 10);
697 break;
698 case "dragon":
699 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_dragon", (SourceChara.Row r) => r.race == "dragon" || r.race == "drake" || r.race == "wyvern"), power / 5);
700 break;
701 case "undead":
702 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_undead", (SourceChara.Row r) => r.HasTag(CTAG.undead) || (EClass.sources.races.map.TryGetValue(r.race)?.IsUndead ?? false)), power / 5);
703 break;
704 case "pawn":
705 chara = CharaGen.CreateFromFilter("c_pawn", power / 10);
706 break;
707 case "machine":
708 chara = CharaGen.CreateFromFilter("c_machine", power / 10);
709 break;
710 case "monster":
711 chara = CharaGen.CreateFromFilter("c_dungeon", power / 10);
712 break;
713 case "animal":
714 chara = CharaGen.CreateFromFilter("c_animal", power / 15);
715 break;
716 case "fire":
717 chara = CharaGen.CreateFromElement("Fire", power / 10);
718 break;
719 case "fish":
720 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_fish", (SourceChara.Row r) => r.ContainsTag("water") || r.model.Chara.race.tag.Contains("water")), power / 10);
721 break;
722 case "octopus":
723 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_octopus", (SourceChara.Row r) => r.race == "octopus"), power / 10);
724 break;
725 default:
726 chara = CharaGen.Create(id3, power / 10);
727 break;
728 }
729 if (chara == null)
730 {
731 continue;
732 }
733 if (chara.rarity >= Rarity.Legendary && !flag4)
734 {
735 j--;
736 continue;
737 }
738 int num6 = -1;
739 n = actRef.n1;
740 if (!(n == "shadow"))
741 {
742 if (n == "special2")
743 {
744 point.PlayEffect("darkwomb2");
745 }
746 else
747 {
748 int num7 = 1;
749 if (!CC.IsPC)
750 {
751 num7 = (CC.IsPCFactionOrMinion ? (CC.LV / 2) : (CC.LV / 3 * 2));
752 }
753 num6 = chara.LV * (100 + power / 10) / 100 + power / 30;
754 if (num6 < num7)
755 {
756 num6 = num7;
757 }
758 }
759 }
760 else
761 {
762 num6 = power / 10 + 1;
763 }
764 if (chara.LV < num6)
765 {
766 chara.SetLv(num6);
767 }
768 chara.interest = 0;
769 if (chara.HaveFur())
770 {
771 chara.c_fur = -1;
772 }
773 n = actRef.n1;
774 if (!(n == "shadow"))
775 {
776 if (n == "special_force")
777 {
778 chara.homeZone = EClass._zone;
779 }
780 }
781 else
782 {
783 chara.hp = chara.MaxHP / 2;
784 }
785 EClass._zone.AddCard(chara, point);
786 if (flag)
787 {
788 Chara chara2 = chara;
789 Hostility hostility2 = (chara.c_originalHostility = Hostility.Enemy);
790 chara2.hostility = hostility2;
791 }
792 else if (!(chara.id == "cocoon") && (!(actRef.n1 == "monster") || actRef.refThing == null))
793 {
794 chara.MakeMinion(CC);
795 }
796 if (num4 != -1)
797 {
798 chara.SetSummon(num4);
799 }
800 flag3 = true;
801 }
802 if (!flag3)
803 {
804 CC.Say("summon_ally_fail", CC);
805 }
806 return;
807 }
808 case EffectId.Funnel:
809 case EffectId.Bit:
810 {
811 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
812 {
813 CC.Say("summon_ally_fail", CC);
814 return;
815 }
816 CC.Say("spell_funnel", CC, element.Name.ToLower());
817 CC.PlaySound("spell_funnel");
818 Chara chara3 = CharaGen.Create((id == EffectId.Bit) ? "bit2" : "bit");
819 chara3.SetMainElement(element.source.alias, element.Value, elemental: true);
820 chara3.SetSummon(20 + power / 20 + EClass.rnd(10));
821 chara3.SetLv(power / 15);
822 chara3.interest = 0;
823 EClass._zone.AddCard(chara3, tp.GetNearestPoint(allowBlock: false, allowChara: false));
824 chara3.PlayEffect("teleport");
825 chara3.MakeMinion(CC);
826 return;
827 }
828 case EffectId.Breathe:
829 {
830 List<Point> list2 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
831 if (list2.Count == 0)
832 {
833 list2.Add(CC.pos.Copy());
834 }
835 CC.Say("spell_breathe", CC, element.Name.ToLower());
836 EClass.Wait(0.8f, CC);
837 TryDelay(delegate
838 {
839 CC.PlaySound("spell_breathe");
840 });
842 {
843 Shaker.ShakeCam("breathe");
844 }
845 DamageEle(CC, id, power, element, list2, actRef, "spell_breathe");
846 return;
847 }
848 case EffectId.Scream:
849 CC.PlaySound("scream");
850 CC.PlayEffect("scream");
851 {
852 foreach (Point item2 in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
853 {
854 foreach (Chara chara4 in item2.Charas)
855 {
856 if (chara4.ResistLv(957) <= 0)
857 {
858 chara4.AddCondition<ConParalyze>(power);
859 }
860 }
861 }
862 return;
863 }
864 case EffectId.Ball:
865 case EffectId.Explosive:
866 case EffectId.BallBubble:
867 case EffectId.Suicide:
868 case EffectId.Rocket:
869 case EffectId.Flare:
870 case EffectId.GravityGun:
871 {
872 float radius2 = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
873 if ((id == EffectId.Explosive || id == EffectId.Rocket) && actRef.refThing != null)
874 {
875 radius2 = 2 + actRef.refThing.Evalue(666);
876 }
877 if (id == EffectId.Suicide)
878 {
879 if (CC.MainElement != Element.Void)
880 {
881 element = CC.MainElement;
882 }
884 {
885 element = Element.Create(919, 10);
886 }
887 if (CC.HasTag(CTAG.kamikaze))
888 {
889 radius2 = 1.5f;
890 }
891 }
892 bool flag5 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
893 List<Point> list5 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius2, !flag5, !flag5);
894 if (list5.Count == 0)
895 {
896 list5.Add(cc.pos.Copy());
897 }
898 cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
899 EClass.Wait(0.8f, cc);
900 TryDelay(delegate
901 {
902 if (id == EffectId.Flare)
903 {
904 tp.PlayEffect("flare");
905 }
906 if (id != EffectId.GravityGun)
907 {
908 cc.PlaySound((id == EffectId.Flare) ? "spell_flare" : "spell_ball");
909 }
910 });
911 if (id != EffectId.GravityGun && cc.IsInMutterDistance() && !EClass.core.config.graphic.disableShake)
912 {
913 Shaker.ShakeCam("ball");
914 }
915 DamageEle(actRef.origin ?? cc, id, power, element, list5, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
916 if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
917 {
918 CC.Die();
919 }
920 return;
921 }
922 case EffectId.Bolt:
923 {
924 List<Point> list4 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
925 if (list4.Count == 0)
926 {
927 list4.Add(CC.pos.Copy());
928 }
929 CC.Say("spell_bolt", CC, element.Name.ToLower());
930 EClass.Wait(0.8f, CC);
931 TryDelay(delegate
932 {
933 CC.PlaySound("spell_bolt");
934 });
936 {
937 Shaker.ShakeCam("bolt");
938 }
939 DamageEle(CC, id, power, element, list4, actRef, "spell_bolt");
940 return;
941 }
942 case EffectId.Bubble:
943 case EffectId.Web:
944 case EffectId.MistOfDarkness:
945 case EffectId.Puddle:
946 {
947 if (LangGame.Has("ab" + id))
948 {
949 CC.Say("ab" + id, CC);
950 }
951 tp.PlaySound("vomit");
952 int num = 2 + EClass.rnd(3);
953 int id2 = ((id == EffectId.Puddle) ? 4 : ((id == EffectId.Bubble) ? 5 : ((id == EffectId.MistOfDarkness) ? 6 : 7)));
954 EffectId idEffect = ((id == EffectId.Bubble) ? EffectId.BallBubble : EffectId.PuddleEffect);
955 Color matColor = EClass.Colors.elementColors.TryGetValue(element.source.alias);
956 if (id == EffectId.Bubble && CC.id == "cancer")
957 {
958 idEffect = EffectId.Nothing;
959 num = 1 + EClass.rnd(3);
960 }
961 for (int i = 0; i < num; i++)
962 {
963 Point randomPoint = tp.GetRandomPoint(2);
964 if (randomPoint != null && !randomPoint.HasBlock && (id != EffectId.Puddle || !randomPoint.cell.IsTopWaterAndNoSnow))
965 {
966 int num2 = 4 + EClass.rnd(5);
967 if (id == EffectId.Web)
968 {
969 num2 *= 3;
970 }
971 EClass._map.SetEffect(randomPoint.x, randomPoint.z, new CellEffect
972 {
973 id = id2,
974 amount = num2,
975 idEffect = idEffect,
976 idEle = element.id,
977 power = power,
978 isHostileAct = CC.IsPCParty,
979 color = BaseTileMap.GetColorInt(ref matColor, 100)
980 });
981 }
982 }
983 return;
984 }
985 }
986 List<Card> list8 = tp.ListCards().ToList();
987 list8.Reverse();
988 if (list8.Contains(CC))
989 {
990 list8.Remove(CC);
991 list8.Insert(0, CC);
992 }
993 bool flag6 = true;
994 foreach (Card item3 in list8)
995 {
996 if (tc == null || item3 == tc)
997 {
998 Proc(id, power, state, CC, item3, actRef);
999 if (flag2 && item3.isChara && item3 != CC)
1000 {
1001 CC.DoHostileAction(item3);
1002 }
1003 if (actRef.refThing == null || !(actRef.refThing.trait is TraitRod))
1004 {
1005 return;
1006 }
1007 EffectId effectId = id;
1008 if ((uint)(effectId - 200) <= 4u)
1009 {
1010 return;
1011 }
1012 flag6 = false;
1013 }
1014 }
1015 if (flag6)
1016 {
1017 CC.SayNothingHappans();
1018 }
1019 }
1020
1021 public static void Proc(EffectId id, Card cc, Card tc = null, int power = 100, ActRef actRef = default(ActRef))
1022 {
1023 Proc(id, power, BlessedState.Normal, cc, tc, actRef);
1024 }
1025
1026 public static void Proc(EffectId id, int power, BlessedState state, Card cc, Card tc = null, ActRef actRef = default(ActRef))
1027 {
1028 if (tc == null)
1029 {
1030 tc = cc;
1031 }
1032 Chara TC = tc.Chara;
1033 Chara CC = cc.Chara;
1034 bool blessed = state >= BlessedState.Blessed;
1035 bool flag = state <= BlessedState.Cursed;
1036 int orgPower = power;
1037 if (blessed || flag)
1038 {
1039 power *= 2;
1040 }
1041 switch (id)
1042 {
1043 case EffectId.Duplicate:
1044 {
1045 Point randomPoint = CC.pos.GetRandomPoint(2, requireLos: false, allowChara: false, allowBlocked: false, 200);
1046 if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || !CC.CanDuplicate())
1047 {
1048 CC.Say("split_fail", CC);
1049 return;
1050 }
1051 Chara t2 = CC.Duplicate();
1052 EClass._zone.AddCard(t2, randomPoint);
1053 CC.Say("split", CC);
1054 break;
1055 }
1056 case EffectId.Escape:
1057 if (CC.IsPCFaction || (EClass._zone.Boss == CC && EClass.rnd(30) != 0))
1058 {
1059 return;
1060 }
1061 CC.Say("escape", CC);
1062 CC.PlaySound("escape");
1063 if (EClass._zone.Boss == CC)
1064 {
1065 CC.TryDropBossLoot();
1066 }
1067 CC.Destroy();
1068 break;
1069 case EffectId.BurnMana:
1070 CC.PlaySound("fire");
1071 CC.PlayEffect("Element/eleFire");
1072 CC.Say("burn_mana", CC);
1073 CC.mana.Mod(-CC.mana.max / 3 - 1);
1074 break;
1075 case EffectId.Exterminate:
1076 {
1077 CC.PlaySound("clean_floor");
1078 Msg.Say("exterminate");
1079 List<Chara> list2 = EClass._map.charas.Where((Chara c) => c.isCopy && !c.IsPCFaction).ToList();
1080 if (list2.Count == 0)
1081 {
1083 return;
1084 }
1085 foreach (Chara item in list2)
1086 {
1087 item.Say("split_fail", item);
1088 item.PlayEffect("vanish");
1089 item.Die();
1090 }
1091 break;
1092 }
1093 case EffectId.DropMine:
1094 {
1095 if (CC.pos.Installed != null || EClass._zone.IsPCFaction)
1096 {
1097 return;
1098 }
1099 Thing thing = ThingGen.Create("mine");
1100 thing.c_idRefCard = "dog_mine";
1101 Zone.ignoreSpawnAnime = true;
1102 EClass._zone.AddCard(thing, CC.pos).Install();
1103 break;
1104 }
1105 case EffectId.LittleSisterMigration:
1106 {
1108 {
1110 return;
1111 }
1112 List<Chara> list3 = new List<Chara>();
1113 bool flag5 = false;
1114 foreach (Chara chara2 in EClass._map.charas)
1115 {
1116 if (!chara2.IsPCFactionOrMinion && chara2.id == "littleOne")
1117 {
1118 if (flag5)
1119 {
1120 flag5 = false;
1121 continue;
1122 }
1123 list3.Add(chara2);
1124 flag5 = true;
1125 }
1126 }
1127 if (list3.Count == 0)
1128 {
1130 return;
1131 }
1132 EClass.pc.PlaySound("chime_angel");
1133 foreach (Chara item2 in list3)
1134 {
1135 item2.PlayEffect("revive");
1136 item2.Destroy();
1137 }
1138 Msg.Say("little_migration", list3.Count.ToString() ?? "");
1139 EClass._zone.ModInfluence(list3.Count);
1140 EClass.player.stats.sistersDepart += list3.Count;
1141 break;
1142 }
1143 case EffectId.MagicMap:
1144 if (!CC.IsPC)
1145 {
1146 CC.SayNothingHappans();
1147 break;
1148 }
1149 if (flag)
1150 {
1151 CC.Say("abMagicMap_curse", CC);
1152 CC.PlaySound("curse3");
1153 CC.PlayEffect("curse");
1154 CC.AddCondition<ConConfuse>(200, force: true);
1155 break;
1156 }
1157 CC.Say("abMagicMap", CC);
1158 CC.PlayEffect("identify");
1159 CC.PlaySound("identify");
1160 if (blessed)
1161 {
1163 }
1164 else
1165 {
1166 EClass._map.Reveal(CC.pos, power);
1167 }
1168 break;
1169 case EffectId.AbsorbMana:
1170 {
1171 if (CC == TC)
1172 {
1173 EClass.game.religions.Element.Talk("ability");
1174 }
1175 Dice dice = Dice.Create("ActManaAbsorb", power, CC, (actRef.refThing != null) ? null : actRef.act);
1176 TC.mana.Mod(dice.Roll());
1177 TC.PlaySound("heal");
1178 TC.PlayEffect("heal");
1179 if (TC == CC)
1180 {
1181 CC.Say("absorbMana", CC);
1182 }
1183 break;
1184 }
1185 case EffectId.ModPotential:
1186 {
1187 Element element = cc.elements.ListElements((Element e) => e.HasTag("primary")).RandomItem();
1188 cc.elements.ModTempPotential(element.id, power / 10);
1189 break;
1190 }
1191 case EffectId.ForgetItems:
1192 {
1193 TC.PlaySound("curse3");
1194 TC.PlayEffect("curse");
1195 TC.Say("forgetItems", TC);
1196 int num5 = power / 50 + 1 + EClass.rnd(3);
1197 List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
1198 for (int j = 0; j < num5; j++)
1199 {
1200 source.RandomItem().c_IDTState = 5;
1201 }
1202 break;
1203 }
1204 case EffectId.EnchantWeapon:
1205 case EffectId.EnchantArmor:
1206 case EffectId.EnchantWeaponGreat:
1207 case EffectId.EnchantArmorGreat:
1208 {
1209 bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
1210 bool flag4 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
1211 if (!tc.isThing)
1212 {
1213 LayerDragGrid.CreateEnchant(CC, armor, flag4, state);
1214 return;
1215 }
1216 cc.PlaySound("identify");
1217 cc.PlayEffect("identify");
1218 if (flag)
1219 {
1220 cc.Say("enc_curse", tc);
1221 tc.ModEncLv(-1);
1222 break;
1223 }
1224 int num4 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
1225 if (tc.encLV >= num4)
1226 {
1227 cc.Say("enc_resist", tc);
1228 break;
1229 }
1230 cc.Say("enc", tc);
1231 tc.ModEncLv(1);
1232 break;
1233 }
1234 case EffectId.Identify:
1235 case EffectId.GreaterIdentify:
1236 {
1237 bool flag6 = id == EffectId.GreaterIdentify;
1238 if (flag)
1239 {
1240 Redirect(EffectId.ForgetItems, flag6 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
1241 break;
1242 }
1243 if (!tc.isThing)
1244 {
1245 int count = ((!blessed) ? 1 : (flag6 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
1246 LayerDragGrid.CreateIdentify(CC, flag6, state, 0, count);
1247 return;
1248 }
1249 cc.PlaySound("identify");
1250 cc.PlayEffect("identify");
1251 tc.Thing.Identify(cc.IsPCParty, (!flag6) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
1252 break;
1253 }
1254 case EffectId.Uncurse:
1255 {
1256 if (!tc.isThing)
1257 {
1258 LayerDragGrid.CreateUncurse(CC, state);
1259 return;
1260 }
1261 Thing thing2 = tc.Thing;
1262 if (thing2.blessedState == BlessedState.Cursed)
1263 {
1264 thing2.SetBlessedState(BlessedState.Normal);
1265 }
1266 else if (thing2.blessedState == BlessedState.Doomed)
1267 {
1268 thing2.SetBlessedState(BlessedState.Normal);
1269 }
1270 thing2.GetRootCard()?.TryStack(thing2);
1271 LayerInventory.SetDirty(thing2);
1272 break;
1273 }
1274 case EffectId.Lighten:
1275 {
1276 if (!tc.isThing)
1277 {
1278 LayerDragGrid.CreateLighten(CC, state);
1279 return;
1280 }
1281 if (tc.Num > 1)
1282 {
1283 tc = tc.Split(1);
1284 }
1285 cc.PlaySound("offering");
1286 cc.PlayEffect("buff");
1287 int num3 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
1288 tc.isWeightChanged = true;
1289 Element orCreateElement = tc.elements.GetOrCreateElement(64);
1290 Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
1291 Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
1292 Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
1293 bool flag3 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
1294 if (flag)
1295 {
1296 num3 = (int)(0.01f * (float)num3 * (float)power * 0.75f + 500f);
1297 if (num3 < 0 || num3 > 10000000)
1298 {
1299 num3 = 10000000;
1300 flag3 = false;
1301 }
1302 if (flag3)
1303 {
1304 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1305 {
1306 tc.elements.ModBase(67, Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1307 tc.elements.ModBase(66, -Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1308 }
1309 else
1310 {
1311 tc.elements.ModBase(65, Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1312 tc.elements.ModBase(64, -Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1313 }
1314 }
1315 cc.Say("lighten_curse", cc, tc);
1316 }
1317 else
1318 {
1319 num3 = num3 * (100 - power / 10) / 100;
1320 if (blessed)
1321 {
1322 power /= 4;
1323 }
1324 if (flag3)
1325 {
1326 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1327 {
1328 tc.elements.ModBase(67, -Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1329 tc.elements.ModBase(66, Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1330 }
1331 else
1332 {
1333 tc.elements.ModBase(65, -Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1334 tc.elements.ModBase(64, Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1335 }
1336 }
1337 cc.Say("lighten", cc, tc);
1338 }
1339 tc.c_weight = num3;
1340 tc.SetDirtyWeight();
1341 if (tc.parent == null)
1342 {
1343 CC.Pick(tc.Thing, msg: false);
1344 }
1346 break;
1347 }
1348 case EffectId.Reconstruction:
1349 {
1350 if (!tc.isThing)
1351 {
1353 return;
1354 }
1355 if (tc.Num > 1)
1356 {
1357 tc = tc.Split(1);
1358 }
1359 cc.PlaySound("mutation");
1360 cc.PlayEffect("identify");
1361 cc.Say("reconstruct", cc, tc);
1362 EClass.game.cards.uidNext += EClass.rnd(30);
1363 int num6 = Mathf.Max(tc.genLv, tc.LV, EClass.player.stats.deepest);
1365 {
1366 blesstedState = state
1367 });
1368 Thing thing3 = ThingGen.Create(tc.id, -1, (int)((long)num6 * (long)power / 400));
1369 thing3.genLv = num6;
1370 tc.Destroy();
1371 CC.Pick(thing3, msg: false);
1372 if (!CC.IsPC)
1373 {
1374 CC.TryEquip(thing3);
1375 }
1376 break;
1377 }
1378 case EffectId.ChangeMaterialLesser:
1379 case EffectId.ChangeMaterial:
1380 case EffectId.ChangeMaterialGreater:
1381 {
1382 SourceMaterial.Row row = EClass.sources.materials.alias.TryGetValue(actRef.n1);
1383 if (!tc.isThing)
1384 {
1385 LayerDragGrid.CreateChangeMaterial(CC, actRef.refThing, row, id, state);
1386 return;
1387 }
1388 if (tc.Num > 1)
1389 {
1390 tc = tc.Split(1);
1391 }
1392 string name = tc.Name;
1393 if (row == null)
1394 {
1395 bool num = id == EffectId.ChangeMaterialGreater;
1396 bool flag2 = id == EffectId.ChangeMaterialLesser;
1397 string text2 = tc.Thing.source.tierGroup;
1398 Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
1399 int num2 = 1;
1400 if (flag)
1401 {
1402 num2 -= 2;
1403 }
1404 if (blessed)
1405 {
1406 num2++;
1407 }
1408 if (num)
1409 {
1410 num2++;
1411 }
1412 if (flag2)
1413 {
1414 num2 -= 2;
1415 }
1416 num2 = Mathf.Clamp(num2 + EClass.rnd(2), 0, 4);
1417 if (EClass.rnd(10) == 0)
1418 {
1419 text2 = ((text2 == "metal") ? "leather" : "metal");
1420 }
1421 SourceMaterial.TierList tierList = (text2.IsEmpty() ? tierMap.RandomItem() : tierMap[text2]);
1422 for (int i = 0; i < 1000; i++)
1423 {
1424 row = tierList.tiers[num2].Select();
1425 if (row != tc.material)
1426 {
1427 break;
1428 }
1429 }
1430 }
1431 cc.PlaySound("offering");
1432 cc.PlayEffect("buff");
1433 if ((tc.id == "log" || tc.id == "branch") && tc.material.alias == "carbone")
1434 {
1435 foreach (Element item3 in tc.elements.dict.Values.ToList())
1436 {
1437 if (item3.IsTrait && item3.vBase != 0)
1438 {
1439 tc.elements.ModBase(item3.id, -item3.vBase);
1440 }
1441 }
1442 }
1443 tc.ChangeMaterial(row);
1444 if (tc.trait is TraitGene && tc.c_DNA != null)
1445 {
1446 DNA.Type type = DNA.GetType(tc.material.alias);
1447 tc.c_DNA.Generate(type);
1448 }
1449 cc.Say("materialChanged", name, row.GetName());
1450 if (CC != null)
1451 {
1452 if (tc.parent == null)
1453 {
1454 CC.Pick(tc.Thing, msg: false);
1455 }
1457 }
1458 break;
1459 }
1460 case EffectId.ReturnVoid:
1461 {
1463 if (EClass.game.IsSurvival || root == null || root.visitCount == 0 || EClass.player.stats.deepestVoid < 1 || (!EClass.debug.enable && EClass.player.CountKeyItem("license_void") == 0))
1464 {
1466 return;
1467 }
1468 int max = Mathf.Min(EClass.player.stats.deepestVoid, -root.MinLv);
1469 int destLv = 1;
1470 Dialog.InputName("dialogVoidReturn".lang(max.ToString() ?? ""), max.ToString() ?? "", delegate(bool cancel, string text)
1471 {
1472 if (!cancel)
1473 {
1474 destLv = Mathf.Abs(text.ToInt());
1475 destLv = Mathf.Clamp(destLv, 1, max) * -1;
1476 Zone zone = ((root.lv == destLv) ? root : (root.children.Find((Spatial t) => t.lv == destLv) as Zone));
1477 Debug.Log(destLv + "/" + zone);
1478 if (zone == null)
1479 {
1480 zone = SpatialGen.Create(root.GetNewZoneID(destLv), root, register: true) as Zone;
1481 zone.lv = destLv;
1482 }
1483 Msg.Say("returnComplete");
1484 EClass.player.uidLastTravelZone = 0;
1486 EClass.player.lastZonePos = null;
1487 EClass.player.returnInfo = null;
1488 }
1489 });
1490 break;
1491 }
1492 case EffectId.Return:
1493 case EffectId.Evac:
1494 if (!cc.IsPC)
1495 {
1496 Redirect(EffectId.Teleport, state, default(ActRef));
1497 return;
1498 }
1499 cc.PlaySound("return_cast");
1500 if (EClass.player.returnInfo == null)
1501 {
1502 if (id == EffectId.Evac)
1503 {
1504 EClass.player.returnInfo = new Player.ReturnInfo
1505 {
1506 turns = EClass.rnd(10) + 10,
1507 isEvac = true
1508 };
1509 }
1510 else
1511 {
1512 if (EClass.game.spatials.ListReturnLocations().Count == 0)
1513 {
1514 Msg.Say("returnNowhere");
1515 break;
1516 }
1517 EClass.player.returnInfo = new Player.ReturnInfo
1518 {
1519 turns = EClass.rnd(10) + 10,
1520 askDest = true
1521 };
1522 }
1523 Msg.Say("returnBegin");
1524 }
1525 else
1526 {
1527 EClass.player.returnInfo = null;
1528 Msg.Say("returnAbort");
1529 }
1530 break;
1531 case EffectId.Teleport:
1532 case EffectId.TeleportShort:
1533 case EffectId.Gate:
1534 if (!tc.HasHost)
1535 {
1536 if (!flag)
1537 {
1538 if (id == EffectId.TeleportShort)
1539 {
1540 tc.Teleport(GetTeleportPos(tc.pos));
1541 }
1542 else
1543 {
1544 tc.Teleport(GetTeleportPos(tc.pos, EClass._map.bounds.Width));
1545 }
1546 }
1547 if (id == EffectId.Gate && CC.IsPC)
1548 {
1549 foreach (Chara chara3 in EClass._map.charas)
1550 {
1551 if (!chara3.HasHost && chara3 != tc && (chara3.IsPCParty || chara3.IsPCPartyMinion))
1552 {
1553 chara3.Teleport(tc.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? tc.pos);
1554 }
1555 }
1556 }
1557 }
1558 if (flag)
1559 {
1560 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
1561 }
1562 if (blessed)
1563 {
1564 Redirect(EffectId.Levitate, BlessedState.Normal, default(ActRef));
1565 }
1566 break;
1567 }
1568 if (TC == null)
1569 {
1570 return;
1571 }
1572 switch (id)
1573 {
1574 case EffectId.ThrowPotion:
1575 if (!CC.pos.Equals(TC.pos))
1576 {
1577 Thing t3 = ThingGen.Create(new string[6] { "330", "331", "334", "335", "336", "1142" }.RandomItem());
1578 ActThrow.Throw(CC, TC.pos, t3, ThrowMethod.Punish, 0.7f);
1579 }
1580 break;
1581 case EffectId.StripBlessing:
1582 {
1583 List<Condition> list9 = new List<Condition>();
1584 foreach (Condition condition4 in TC.conditions)
1585 {
1586 if (GetBlessingDifficulty(condition4) > 0 && EClass.rnd(GetBlessingDifficulty(condition4)) == 0)
1587 {
1588 list9.Add(condition4);
1589 }
1590 }
1591 if (list9.Count == 0)
1592 {
1593 CC.SayNothingHappans();
1594 break;
1595 }
1596 TC.pos.PlayEffect("holyveil");
1597 TC.pos.PlaySound("holyveil");
1598 TC.Say("unpolluted", TC);
1599 list9.Shuffle();
1600 {
1601 foreach (Condition item4 in list9)
1602 {
1603 item4.Kill();
1604 if (CC.IsHostile(TC))
1605 {
1606 break;
1607 }
1608 }
1609 break;
1610 }
1611 }
1612 case EffectId.ShutterHex:
1613 {
1614 if (!CC.IsHostile(TC))
1615 {
1616 break;
1617 }
1618 int num12 = 0;
1619 foreach (Condition condition5 in TC.conditions)
1620 {
1621 if (condition5.Type == ConditionType.Debuff)
1622 {
1623 num12++;
1624 }
1625 }
1626 if (num12 == 0)
1627 {
1628 CC.SayNothingHappans();
1629 break;
1630 }
1631 TC.pos.PlayEffect("holyveil");
1632 TC.pos.PlaySound("holyveil");
1633 TC.pos.PlaySound("atk_eleSound");
1634 TC.conditions.ForeachReverse(delegate(Condition c)
1635 {
1636 if (c.Type == ConditionType.Debuff && EClass.rnd(3) == 0)
1637 {
1638 c.Kill();
1639 }
1640 });
1641 TC.Say("abShutterHex", TC);
1642 Point center = CC.pos.Copy();
1643 List<Chara> list10 = TC.pos.ListCharasInRadius(TC, 4, (Chara c) => c == TC || c.IsHostile(CC));
1644 for (int m = 0; m < num12; m++)
1645 {
1646 TweenUtil.Delay((float)m * 0.1f, delegate
1647 {
1648 center.PlaySound("shutterhex");
1649 });
1650 foreach (Chara item5 in list10)
1651 {
1652 if (item5.ExistsOnMap)
1653 {
1654 Effect effect = Effect.Get("spell_moonspear");
1655 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
1656 Color startColor = (componentInChildren.endColor = EClass.Colors.elementColors["eleHoly"]);
1657 componentInChildren.startColor = startColor;
1658 Point pos = item5.pos.Copy();
1659 TweenUtil.Delay((float)m * 0.1f, delegate
1660 {
1661 effect.Play(center, 0f, pos);
1662 });
1663 int num13 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
1664 item5.DamageHP(num13, 919, power, AttackSource.None, CC, showEffect: false);
1665 }
1666 }
1667 }
1668 break;
1669 }
1670 case EffectId.Draw:
1671 {
1672 if (CC.Dist(TC) <= 1 || (CC.IsPCFactionOrMinion && TC.IsPCFactionOrMinion && TC.isRestrained))
1673 {
1674 break;
1675 }
1676 Point point = CC.GetFirstStep(TC.pos, PathManager.MoveType.Combat);
1677 if (!point.IsValid)
1678 {
1679 point = CC.pos.GetRandomPoint(1)?.GetNearestPoint(allowBlock: false, allowChara: false);
1680 }
1681 if (point == null || !CC.CanSeeLos(point))
1682 {
1683 break;
1684 }
1685 CC.Say("abDraw", CC, TC);
1686 if (TC.HasCondition<ConGravity>())
1687 {
1688 CC.SayNothingHappans();
1689 break;
1690 }
1691 TC.MoveImmediate(point, !EClass.core.config.camera.smoothFollow);
1692 if (CC.id == "tentacle")
1693 {
1694 TC.AddCondition<ConEntangle>();
1695 }
1696 break;
1697 }
1698 case EffectId.CatSniff:
1699 {
1700 Chara nearbyCatToSniff = CC.GetNearbyCatToSniff();
1701 if (nearbyCatToSniff != null)
1702 {
1703 CC.Sniff(nearbyCatToSniff);
1704 }
1705 break;
1706 }
1707 case EffectId.Steal:
1708 {
1710 {
1711 break;
1712 }
1713 if (TC.Evalue(426) > 0)
1714 {
1715 TC.Say((actRef.n1 == "money") ? "abStealNegateMoney" : "abStealNegate", TC);
1716 break;
1717 }
1718 Thing thing5 = null;
1719 bool flag7 = actRef.n1 == "food";
1720 if (actRef.n1 == "money")
1721 {
1722 int currency = TC.GetCurrency();
1723 if (currency > 0)
1724 {
1725 currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(CC.LV * 200));
1726 thing5 = ThingGen.Create("money").SetNum(currency);
1727 TC.ModCurrency(-currency);
1728 }
1729 }
1730 else
1731 {
1732 Func<Thing, bool> func = (Thing t) => true;
1733 if (flag7)
1734 {
1735 func = (Thing t) => t.IsFood;
1736 }
1737 List<Thing> list5 = TC.things.List(delegate(Thing t)
1738 {
1740 {
1741 return false;
1742 }
1743 return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
1744 }, onlyAccessible: true);
1745 if (list5.Count > 0)
1746 {
1747 thing5 = list5.RandomItem();
1748 if (thing5.Num > 1)
1749 {
1750 thing5 = thing5.Split(1);
1751 }
1752 }
1753 CC.AddCooldown(6640, 200);
1754 }
1755 if (thing5 == null)
1756 {
1757 CC.Say("abStealNothing", CC, TC);
1758 break;
1759 }
1760 thing5.SetInt(116, 1);
1761 TC.PlaySound(thing5.material.GetSoundDrop(thing5.sourceCard));
1762 CC.Pick(thing5, msg: false);
1763 CC.Say("abSteal", CC, TC, thing5.Name);
1764 if (actRef.n1 == "food")
1765 {
1766 if (CC.hunger.value != 0)
1767 {
1768 CC.InstantEat(thing5);
1769 }
1770 }
1771 else
1772 {
1773 CC.Say("abStealEscape", CC);
1774 CC.Teleport(GetTeleportPos(tc.pos, 30), silent: true);
1775 }
1776 break;
1777 }
1778 case EffectId.NeckHunt:
1779 CC.TryNeckHunt(TC, power);
1780 break;
1781 case EffectId.CurseEQ:
1782 {
1783 if (CC != null && CC != TC)
1784 {
1785 TC.Say("curse", CC, TC);
1786 }
1787 TC.PlaySound("curse3");
1788 TC.PlayEffect("curse");
1789 if (EClass.rnd(150 + TC.LUC * 5 + TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) || TC.TryNullifyCurse())
1790 {
1791 break;
1792 }
1793 List<Thing> list4 = TC.things.List(delegate(Thing t)
1794 {
1795 if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
1796 {
1797 return false;
1798 }
1799 return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
1800 });
1801 if (list4.Count == 0)
1802 {
1803 CC.SayNothingHappans();
1804 break;
1805 }
1806 Thing thing4 = list4.RandomItem();
1807 TC.Say("curse_hit", TC, thing4);
1808 thing4.SetBlessedState((thing4.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
1809 LayerInventory.SetDirty(thing4);
1810 break;
1811 }
1812 case EffectId.UncurseEQ:
1813 case EffectId.UncurseEQGreater:
1814 {
1815 TC.Say("uncurseEQ" + (blessed ? "_bless" : (flag ? "_curse" : "")), TC);
1816 TC.PlaySound("uncurse");
1817 TC.PlayEffect("uncurse");
1818 if (flag)
1819 {
1820 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
1821 break;
1822 }
1823 int success = 0;
1824 int fail = 0;
1825 List<Thing> list = new List<Thing>();
1826 TC.things.Foreach(delegate(Thing t)
1827 {
1828 int num14 = 0;
1829 if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
1830 {
1831 if (t.blessedState == BlessedState.Cursed)
1832 {
1833 num14 = EClass.rnd(200);
1834 }
1835 if (t.blessedState == BlessedState.Doomed)
1836 {
1837 num14 = EClass.rnd(1000);
1838 }
1839 if (blessed)
1840 {
1841 num14 /= 2;
1842 }
1843 if (id == EffectId.UncurseEQGreater)
1844 {
1845 num14 /= 10;
1846 }
1847 if (power >= num14)
1848 {
1849 TC.Say("uncurseEQ_success", t);
1850 t.SetBlessedState(BlessedState.Normal);
1851 if (t.isEquipped && t.HasElement(656))
1852 {
1853 TC.body.Unequip(t);
1854 }
1856 success++;
1857 list.Add(t);
1858 }
1859 else
1860 {
1861 fail++;
1862 }
1863 }
1864 });
1865 foreach (Thing item6 in list)
1866 {
1867 item6.GetRootCard()?.TryStack(item6);
1868 }
1869 if (success == 0 && fail == 0)
1870 {
1871 TC.SayNothingHappans();
1872 }
1873 else if (fail > 0)
1874 {
1875 TC.Say("uncurseEQ_fail");
1876 }
1877 break;
1878 }
1879 case EffectId.Buff:
1880 {
1881 string text3 = actRef.n1;
1882 string text4 = "";
1883 if (flag)
1884 {
1885 text4 = EClass.sources.stats.alias[text3].curse;
1886 if (!text4.IsEmpty())
1887 {
1888 text3 = text4;
1889 }
1890 }
1891 Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
1892 {
1893 if (!actRef.aliasEle.IsEmpty())
1894 {
1895 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1896 }
1897 });
1898 condition2.isPerfume = TC.IsPC && actRef.isPerfume;
1899 Condition condition3 = TC.AddCondition(condition2);
1900 if (condition3 != null && condition3.isPerfume)
1901 {
1902 condition3.value = 3;
1903 Msg.Say("perfume", TC);
1904 }
1905 if (!text4.IsEmpty())
1906 {
1907 CC.DoHostileAction(TC);
1908 }
1909 break;
1910 }
1911 case EffectId.KizuamiTrick:
1912 {
1913 EClass.game.religions.Trickery.Talk("ability");
1914 bool hex = CC.IsHostile(TC);
1915 List<SourceStat.Row> list6 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
1916 int power2 = power;
1917 for (int k = 0; k < 4 + EClass.rnd(2); k++)
1918 {
1919 SourceStat.Row row2 = list6.RandomItem();
1920 list6.Remove(row2);
1921 Proc(hex ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
1922 {
1923 n1 = row2.alias
1924 });
1925 }
1927 {
1928 EClass.Wait(0.3f, TC);
1929 }
1930 break;
1931 }
1932 case EffectId.Debuff:
1933 case EffectId.DebuffKizuami:
1934 {
1935 CC.DoHostileAction(TC);
1936 bool isPowerful = TC.IsPowerful;
1937 string n = actRef.n1;
1938 if (n == "ConSuffocation")
1939 {
1940 power = power * 2 / 3;
1941 }
1942 int a2 = power;
1943 int num7 = TC.WIL * (isPowerful ? 20 : 5);
1944 ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
1945 if (condition != null)
1946 {
1947 num7 += condition.power * 5;
1948 }
1949 if (id != EffectId.DebuffKizuami && EClass.rnd(a2) < num7 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
1950 {
1951 TC.Say("debuff_resist", TC);
1952 CC.DoHostileAction(TC);
1953 break;
1954 }
1955 TC.AddCondition(Condition.Create(n, power, delegate(Condition con)
1956 {
1957 con.givenByPcParty = CC.IsPCParty;
1958 if (!actRef.aliasEle.IsEmpty())
1959 {
1960 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1961 }
1962 }));
1963 if (n == "ConBane" && CC.HasElement(1416))
1964 {
1965 TC.AddCondition<ConExcommunication>(power);
1966 }
1967 CC.DoHostileAction(TC);
1969 {
1970 EClass.Wait(0.3f, TC);
1971 }
1972 break;
1973 }
1974 case EffectId.Mutation:
1975 TC.MutateRandom(1, 100, ether: false, state);
1977 {
1978 EClass.Wait(0.3f, TC);
1979 }
1980 break;
1981 case EffectId.CureMutation:
1982 TC.MutateRandom(-1, 100, ether: false, state);
1983 break;
1984 case EffectId.Ally:
1985 {
1986 Msg.Say("gainAlly");
1987 Chara chara = CharaGen.CreateFromFilter("chara", cc.LV);
1988 EClass._zone.AddCard(chara, cc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
1989 if (cc.IsPCFactionOrMinion)
1990 {
1991 chara.MakeAlly(msg: false);
1992 }
1993 chara.PlaySound("identify");
1994 chara.PlayEffect("teleport");
1995 break;
1996 }
1997 case EffectId.Wish:
1998 if (!TC.IsPC)
1999 {
2000 break;
2001 }
2002 if (blessed || flag)
2003 {
2004 power /= 2;
2005 }
2006 Dialog.InputName("dialogWish", "q", delegate(bool cancel, string text)
2007 {
2008 if (!cancel)
2009 {
2010 Msg.Say("wish", TC, text);
2011 Wish(text, EClass.pc.NameTitled, power, state);
2012 }
2013 });
2014 break;
2015 case EffectId.Faith:
2016 {
2018 tc.PlayEffect("aura_heaven");
2019 tc.PlaySound("aura_heaven");
2020 tc.Say("faith", tc, faith.Name);
2021 if (flag)
2022 {
2023 tc.Say("faith_curse", tc, faith.Name);
2024 break;
2025 }
2026 if (blessed)
2027 {
2028 tc.Say("faith_bless", tc, faith.Name);
2029 }
2030 tc.ModExp(306, power * 10);
2031 tc.ModExp(85, power * 10);
2032 if (tc.elements.Base(85) >= tc.elements.Value(306))
2033 {
2034 tc.elements.SetBase(85, tc.elements.Value(306));
2035 }
2036 break;
2037 }
2038 case EffectId.TransGender:
2039 {
2040 tc.PlaySound("mutation");
2041 tc.PlayEffect("mutation");
2042 int gender = tc.bio.gender;
2043 int gender2 = gender switch
2044 {
2045 1 => 2,
2046 2 => 1,
2047 _ => (EClass.rnd(2) != 0) ? 1 : 2,
2048 };
2049 if (gender != 0 && EClass.rnd(10) == 0)
2050 {
2051 gender2 = 0;
2052 }
2053 tc.bio.SetGender(gender2);
2054 tc.Say("transGender", tc, Gender.Name(tc.bio.gender));
2055 tc.Talk("tail");
2056 int age = tc.bio.GetAge(tc.Chara);
2057 if (blessed && age > 1)
2058 {
2059 tc.Say("ageDown", tc);
2060 tc.bio.SetAge(tc.Chara, age - 1);
2061 }
2062 else if (flag)
2063 {
2064 tc.Say("ageUp", tc);
2065 tc.bio.SetAge(tc.Chara, age + 1);
2066 }
2067 break;
2068 }
2069 case EffectId.TransBlood:
2070 {
2071 tc.PlaySound("mutation");
2072 tc.PlayEffect("mutation");
2073 int num8 = ((actRef.refThing != null) ? actRef.refThing.GetInt(118) : actRef.refVal);
2074 if (num8 == 0)
2075 {
2076 num8 = tc.GetInt(118);
2077 if (num8 == 0)
2078 {
2079 num8 = EClass.game.seed + tc.uid;
2080 }
2081 num8++;
2082 }
2083 tc.Say("transBlood", tc);
2084 tc.Talk("tail");
2085 tc.c_bloodData = null;
2086 tc.SetInt(118, num8);
2087 break;
2088 }
2089 case EffectId.Youth:
2090 {
2091 tc.PlaySound("mutation");
2092 tc.PlayEffect("mutation");
2093 int age3 = tc.bio.GetAge(tc.Chara);
2094 if (!flag && age3 <= 0)
2095 {
2096 tc.SayNothingHappans();
2097 break;
2098 }
2099 age3 = Mathf.Max(0, age3 * 100 / (flag ? 75 : (blessed ? 400 : 200))) + (flag ? 1 : 0);
2100 tc.Say(flag ? "ageUp" : "ageDown", tc);
2101 tc.bio.SetAge(tc.Chara, age3);
2102 break;
2103 }
2104 case EffectId.EternalYouth:
2105 {
2106 tc.PlaySound("mutation");
2107 tc.PlayEffect("mutation");
2108 if (tc.IsUnique)
2109 {
2110 tc.SayNothingHappans();
2111 break;
2112 }
2113 int age2 = tc.bio.GetAge(tc.Chara);
2114 if (flag)
2115 {
2116 if (tc.c_lockedAge != 0)
2117 {
2118 tc.Say("eternalYouth2", tc);
2119 tc.c_lockedAge = 0;
2120 tc.elements.Remove(1243);
2121 tc.bio.SetAge(tc.Chara, age2);
2122 }
2123 Redirect(EffectId.Youth, BlessedState.Cursed, default(ActRef));
2124 }
2125 else if (tc.c_lockedAge != 0)
2126 {
2127 tc.SayNothingHappans();
2128 }
2129 else
2130 {
2131 tc.PlaySound("dropRewardXmas");
2132 tc.Say("eternalYouth1", tc);
2133 tc.c_lockedAge = age2 + 1;
2134 tc.elements.SetBase(1243, 1);
2135 if (blessed)
2136 {
2137 Redirect(EffectId.Youth, BlessedState.Blessed, default(ActRef));
2138 }
2139 }
2140 break;
2141 }
2142 case EffectId.BuffStats:
2143 case EffectId.DebuffStats:
2144 case EffectId.LulwyTrick:
2145 Debug.Log(power + "/" + id.ToString() + "/" + actRef.n1);
2146 if (id == EffectId.LulwyTrick)
2147 {
2148 EClass.game.religions.Wind.Talk("ability");
2149 }
2150 if (power < 0 || id == EffectId.DebuffStats)
2151 {
2152 power = Mathf.Abs(power);
2153 if (blessed)
2154 {
2155 power /= 4;
2156 }
2157 flag = true;
2158 }
2159 TC.AddCondition(Condition.Create(power, delegate(ConBuffStats con)
2160 {
2161 con.SetRefVal(Element.GetId(actRef.n1), (int)id);
2162 }));
2163 break;
2164 case EffectId.Revive:
2165 {
2166 List<KeyValuePair<int, Chara>> list8 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
2167 if (TC.IsPCFaction || TC.IsPCFactionMinion)
2168 {
2169 if (TC.IsPC && list8.Count == 0)
2170 {
2171 list8 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
2172 }
2173 if (list8.Count > 0)
2174 {
2175 list8.RandomItem().Value.Chara.GetRevived();
2176 break;
2177 }
2178 }
2179 TC.SayNothingHappans();
2180 break;
2181 }
2182 case EffectId.DamageBody:
2183 case EffectId.DamageMind:
2184 case EffectId.DamageBodyGreat:
2185 case EffectId.DamageMindGreat:
2186 case EffectId.Weaken:
2187 {
2188 bool flag10 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
2189 bool mind2 = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
2190 int num11 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
2191 if (id == EffectId.Weaken)
2192 {
2193 flag10 = EClass.rnd(2) == 0;
2194 mind2 = !flag10;
2195 num11 = 1;
2196 }
2197 else
2198 {
2199 TC.PlayEffect("debuff");
2200 TC.PlaySound("debuff");
2201 }
2202 TC.Say(flag10 ? "damageBody" : "damageMind", TC);
2203 for (int l = 0; l < num11; l++)
2204 {
2205 TC.DamageTempElements(power, flag10, mind2, id != EffectId.Weaken);
2206 }
2207 if (TC.IsPC)
2208 {
2209 Tutorial.Play("healer");
2210 }
2211 break;
2212 }
2213 case EffectId.EnhanceBody:
2214 case EffectId.EnhanceMind:
2215 case EffectId.EnhanceBodyGreat:
2216 case EffectId.EnhanceMindGreat:
2217 {
2218 bool flag8 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
2219 bool mind = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
2220 if (id != EffectId.EnhanceBody && id != EffectId.EnhanceMind)
2221 {
2222 EClass.rnd(4);
2223 }
2224 TC.Say(flag8 ? "enhanceBody" : "enhanceMind", TC);
2225 TC.PlayEffect("buff");
2226 TC.PlaySound("buff");
2227 TC.EnhanceTempElements(power, flag8, mind, onlyRenew: true);
2228 break;
2229 }
2230 case EffectId.RestoreBody:
2231 case EffectId.RestoreMind:
2232 {
2233 bool flag9 = id == EffectId.RestoreBody;
2234 if (flag)
2235 {
2236 Redirect(flag9 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
2237 break;
2238 }
2239 TC.Say(flag9 ? "restoreBody" : "restoreMind", TC);
2240 TC.PlaySound("heal");
2241 TC.PlayEffect("heal");
2242 TC.CureHost(flag9 ? CureType.CureBody : CureType.CureMind, power, state);
2243 if (blessed)
2244 {
2245 Redirect(flag9 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
2246 }
2247 break;
2248 }
2249 case EffectId.HealComplete:
2250 TC.HealHPHost(100000000, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
2251 TC.CureHost(CureType.HealComplete, power, state);
2252 TC.Say("heal_heavy", TC);
2253 break;
2254 case EffectId.Heal:
2255 case EffectId.JureHeal:
2256 {
2257 if (id == EffectId.JureHeal)
2258 {
2259 EClass.game.religions.Healing.Talk("ability");
2260 }
2261 int num10 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
2262 if (actRef.refThing != null)
2263 {
2264 num10 = num10 * (100 + actRef.refThing.Evalue(750) * 10) / 100;
2265 }
2266 if (flag)
2267 {
2268 TC.DamageHP(num10 / 2, 919, power);
2269 break;
2270 }
2271 TC.HealHPHost(num10, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item);
2272 TC.CureHost(CureType.Heal, power, state);
2273 TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
2274 break;
2275 }
2276 case EffectId.RemedyJure:
2277 TC.HealHP(1000000, HealSource.Magic);
2278 TC.CureHost(CureType.Jure, power, state);
2279 TC.Say("heal_jure", TC);
2280 break;
2281 case EffectId.Headpat:
2282 CC.Cuddle(TC, headpat: true);
2283 break;
2284 case EffectId.RemoveHex:
2285 case EffectId.RemoveHexAll:
2286 if (flag)
2287 {
2288 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
2289 break;
2290 }
2291 foreach (Condition item7 in TC.conditions.Copy())
2292 {
2293 if (item7.Type == ConditionType.Debuff && !item7.IsKilled && EClass.rnd(power * (CC.IsPowerful ? 5 : 2)) > EClass.rnd(item7.power))
2294 {
2295 CC.Say("removeHex", TC, item7.Name.ToLower());
2296 item7.Kill();
2297 if (id == EffectId.RemoveHex)
2298 {
2299 break;
2300 }
2301 }
2302 }
2303 TC.AddCondition<ConHolyVeil>(power / 2);
2304 break;
2305 case EffectId.CureCorruption:
2306 TC.PlaySound("heal");
2307 TC.PlayEffect("heal");
2308 if (flag)
2309 {
2310 TC.Say("cureCorruption_curse", TC);
2311 TC.mana.Mod(9999);
2312 TC.ModCorruption(power);
2313 }
2314 else
2315 {
2316 TC.Say("cureCorruption", TC);
2317 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
2318 }
2319 break;
2320 case EffectId.Drink:
2321 case EffectId.DrinkRamune:
2322 case EffectId.DrinkMilk:
2323 if (id == EffectId.DrinkRamune)
2324 {
2325 TC.Say("drinkRamune", TC);
2326 }
2327 if (TC.IsPC)
2328 {
2329 TC.Say("drinkGood", TC);
2330 }
2331 if (id == EffectId.DrinkMilk)
2332 {
2333 if (TC.IsPC)
2334 {
2335 TC.Say("drinkMilk", TC);
2336 }
2337 if (blessed)
2338 {
2339 TC.ModHeight(EClass.rnd(5) + 3);
2340 }
2341 else if (flag)
2342 {
2343 TC.ModHeight((EClass.rnd(5) + 3) * -1);
2344 }
2345 }
2346 break;
2347 case EffectId.DrinkWater:
2348 if (flag)
2349 {
2350 if (TC.IsPC)
2351 {
2352 TC.Say("drinkWater_dirty", TC);
2353 }
2355 }
2356 else if (TC.IsPC)
2357 {
2358 TC.Say("drinkWater_clear", TC);
2359 }
2360 break;
2361 case EffectId.DrinkWaterDirty:
2362 if (TC.IsPC)
2363 {
2364 TC.Say("drinkWater_dirty", TC);
2365 }
2366 if (TC.IsPCFaction)
2367 {
2368 TC.Vomit();
2369 }
2370 break;
2371 case EffectId.SaltWater:
2372 if (TC.HasElement(1211))
2373 {
2374 TC.Say("drinkSaltWater_snail", TC);
2375 int num9 = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
2376 TC.DamageHP(num9, AttackSource.None, CC);
2377 }
2378 else if (TC.IsPC)
2379 {
2380 TC.Say("drinkSaltWater", TC);
2381 }
2382 break;
2383 case EffectId.Booze:
2384 TC.AddCondition<ConDrunk>(power);
2385 if (TC.HasElement(1215))
2386 {
2387 TC.Say("drunk_dwarf", TC);
2388 TC.AddCondition(Condition.Create(power + EClass.rnd(power), delegate(ConBuffStats con)
2389 {
2390 con.SetRefVal(Element.List_MainAttributes.RandomItem(), (int)id);
2391 }));
2392 }
2393 break;
2394 case EffectId.CatsEye:
2395 if (flag)
2396 {
2397 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2398 }
2399 else
2400 {
2401 TC.AddCondition<ConNightVision>(power);
2402 }
2403 break;
2404 case EffectId.Hero:
2405 if (flag)
2406 {
2407 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2408 }
2409 else
2410 {
2411 TC.AddCondition<ConHero>(power);
2412 }
2413 break;
2414 case EffectId.HolyVeil:
2415 if (flag)
2416 {
2417 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2418 }
2419 else
2420 {
2421 TC.AddCondition<ConHolyVeil>(power);
2422 }
2423 break;
2424 case EffectId.Levitate:
2425 if (flag)
2426 {
2427 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
2428 }
2429 else
2430 {
2431 TC.AddCondition<ConLevitate>(power);
2432 }
2433 break;
2434 case EffectId.Gravity:
2435 if (blessed)
2436 {
2437 power /= 4;
2438 }
2439 TC.AddCondition<ConGravity>(power);
2440 if (flag)
2441 {
2442 Redirect(EffectId.BuffStats, BlessedState.Cursed, new ActRef
2443 {
2444 aliasEle = "STR"
2445 });
2446 }
2447 break;
2448 case EffectId.Fear:
2449 if (blessed)
2450 {
2451 power /= 4;
2452 }
2453 TC.AddCondition<ConFear>(power);
2454 if (flag)
2455 {
2456 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2457 }
2458 break;
2459 case EffectId.Faint:
2460 if (blessed)
2461 {
2462 power /= 4;
2463 }
2464 TC.AddCondition<ConFaint>(power);
2465 if (flag)
2466 {
2467 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2468 }
2469 break;
2470 case EffectId.Paralyze:
2471 if (blessed)
2472 {
2473 power /= 4;
2474 }
2475 TC.AddCondition<ConParalyze>(power);
2476 if (flag)
2477 {
2478 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2479 }
2480 break;
2481 case EffectId.Poison:
2482 if (blessed)
2483 {
2484 power /= 4;
2485 }
2486 TC.AddCondition<ConPoison>(power);
2487 if (flag)
2488 {
2489 Redirect(EffectId.Paralyze, BlessedState.Normal, default(ActRef));
2490 }
2491 break;
2492 case EffectId.Sleep:
2493 if (blessed)
2494 {
2495 power /= 4;
2496 }
2497 TC.AddCondition<ConSleep>(power);
2498 if (flag)
2499 {
2500 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2501 }
2502 break;
2503 case EffectId.Confuse:
2504 if (blessed)
2505 {
2506 power /= 4;
2507 }
2508 TC.AddCondition<ConConfuse>(power);
2509 if (flag)
2510 {
2511 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2512 }
2513 break;
2514 case EffectId.Blind:
2515 if (blessed)
2516 {
2517 power /= 4;
2518 }
2519 TC.AddCondition<ConBlind>(power);
2520 if (flag)
2521 {
2522 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2523 }
2524 break;
2525 case EffectId.Disease:
2526 if (blessed)
2527 {
2528 power /= 4;
2529 }
2530 TC.AddCondition<ConDisease>(power);
2531 if (flag)
2532 {
2533 Redirect(EffectId.Poison, BlessedState.Normal, default(ActRef));
2534 }
2535 break;
2536 case EffectId.Acid:
2537 {
2538 if (blessed)
2539 {
2540 power /= 4;
2541 }
2542 List<Thing> list7 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
2543 if (list7.Count != 0)
2544 {
2545 Thing thing6 = list7.RandomItem();
2546 TC.Say("acid_hit", TC);
2547 if (thing6.isAcidproof)
2548 {
2549 TC.Say("acid_nullify", thing6);
2550 }
2551 else if (thing6.encLV > -5)
2552 {
2553 TC.Say("acid_rust", TC, thing6);
2554 thing6.ModEncLv(-1);
2555 LayerInventory.SetDirty(thing6);
2556 }
2557 if (TC.IsPCParty)
2558 {
2559 Tutorial.Reserve("rust");
2560 }
2561 }
2562 break;
2563 }
2564 case EffectId.PuddleEffect:
2565 TC.DamageHP(power / 5, actRef.idEle, power);
2566 break;
2567 case EffectId.Acidproof:
2568 if (blessed)
2569 {
2570 power /= 4;
2571 }
2572 if (TC.IsPC)
2573 {
2574 TC.Say("pc_pain");
2575 }
2576 TC.Say("drink_acid", TC);
2577 TC.DamageHP(power / 5, 923, power);
2578 break;
2579 case EffectId.LevelDown:
2580 Msg.Say("nothingHappens");
2581 break;
2582 case EffectId.Love:
2583 case EffectId.LovePlus:
2584 if (flag)
2585 {
2586 if (CC == TC)
2587 {
2588 TC.Say("love_curse_self", TC);
2589 }
2590 else
2591 {
2592 TC.Say("love_curse", CC, TC);
2593 TC.ModAffinity(CC, -power / 4, show: false);
2594 }
2595 TC.ShowEmo(Emo.angry);
2596 }
2597 else
2598 {
2599 LoveMiracle(TC, CC, power, id, state);
2600 }
2601 break;
2602 case EffectId.HairGrowth:
2603 if (flag)
2604 {
2605 if (TC.HasElement(1532))
2606 {
2607 TC.SetMutation(1532);
2608 }
2609 else
2610 {
2611 TC.SetMutation(1533, 1);
2612 }
2613 TC.c_fur = 0;
2614 break;
2615 }
2616 if (blessed)
2617 {
2618 if (TC.HasElement(1533))
2619 {
2620 TC.SetMutation(1533);
2621 }
2622 else
2623 {
2624 TC.SetMutation(1532, 1);
2625 }
2626 }
2627 TC.PlayEffect("aura_heaven");
2628 TC.PlaySound("godbless");
2629 if (!TC.HaveFur())
2630 {
2631 TC.Say("grow_hair_fail", TC);
2632 break;
2633 }
2634 TC.Say("grow_hair", TC);
2635 TC.c_fur = 100;
2636 break;
2637 case EffectId.Gene:
2638 GeneMiracle(TC, CC, blessed ? DNA.Type.Superior : (flag ? DNA.Type.Brain : DNA.Type.Default));
2639 break;
2640 }
2641 int GetBlessingDifficulty(Condition c)
2642 {
2643 if (c.Type != ConditionType.Buff)
2644 {
2645 return 0;
2646 }
2647 if (c is ConTransmuteBat && TC.HasCooldown(8793))
2648 {
2649 return 0;
2650 }
2651 if (!CC.IsHostile(TC))
2652 {
2653 return 1;
2654 }
2655 if (c is ConBoost)
2656 {
2657 return 5;
2658 }
2659 if (c is ConRebirth)
2660 {
2661 return 10;
2662 }
2663 if (c is ConInvulnerable)
2664 {
2665 return 100;
2666 }
2667 return 2;
2668 }
2669 void Redirect(EffectId _id, BlessedState _state, ActRef _ref1)
2670 {
2671 Proc(_id, orgPower, _state, cc, tc, _ref1);
2672 }
2673 }
2674
2675 public static void Poison(Chara tc, Chara c, int power)
2676 {
2677 tc.Say("eat_poison", tc);
2678 tc.Talk("scream");
2679 if (power > 100000000)
2680 {
2681 power = 100000000;
2682 }
2683 int num = (int)Mathf.Sqrt(power * 100);
2684 tc.DamageHP(num * 2 + EClass.rnd(num), 915, power);
2685 if (!tc.isDead && !tc.IsPC)
2686 {
2688 }
2689 }
2690
2691 public static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect = EffectId.Love, BlessedState? state = null)
2692 {
2693 if (c == tc)
2694 {
2695 tc.Say("love_ground", tc);
2696 }
2697 else
2698 {
2699 tc.Say("love_chara", c, tc);
2700 }
2701 tc.ModAffinity(EClass.pc, power / 4);
2702 if ((idEffect != EffectId.Love || EClass.rnd(2) != 0) && (!EClass._zone.IsUserZone || tc.IsPCFaction || !EClass.game.principal.disableUsermapBenefit))
2703 {
2704 if (idEffect == EffectId.MoonSpear && EClass.rnd(EClass.debug.enable ? 2 : 20) == 0)
2705 {
2706 Thing thing = tc.MakeGene();
2707 tc.GiveBirth(thing, effect: true);
2708 tc.Say("item_drop", thing);
2709 }
2710 else if (idEffect != EffectId.LovePlus && EClass.rnd(2) == 0)
2711 {
2712 Thing c2 = tc.MakeMilk(effect: true, 1, addToZone: true, state);
2713 tc.Say("item_drop", c2);
2714 }
2715 else
2716 {
2717 Thing c3 = tc.MakeEgg(effect: true, 1, addToZone: true, (idEffect == EffectId.LovePlus) ? 3 : 20, state);
2718 tc.Say("item_drop", c3);
2719 }
2720 }
2721 }
2722
2723 public static void GeneMiracle(Chara tc, Chara c, DNA.Type type)
2724 {
2726 {
2728 return;
2729 }
2730 if (c == tc)
2731 {
2732 tc.Say("love_ground", tc);
2733 }
2734 else
2735 {
2736 tc.Say("love_chara", c, tc);
2737 }
2738 Thing t = tc.MakeGene(type);
2739 tc.GiveBirth(t, effect: true);
2740 }
2741
2742 public static Point GetTeleportPos(Point org, int radius = 6)
2743 {
2744 Point point = new Point();
2745 for (int i = 0; i < 10000; i++)
2746 {
2747 point.Set(org);
2748 point.x += EClass.rnd(radius) - EClass.rnd(radius);
2749 point.z += EClass.rnd(radius) - EClass.rnd(radius);
2750 if (point.IsValid && point.IsInBounds && !point.cell.blocked && point.Distance(org) >= radius / 3 + 1 - i / 50 && !point.cell.HasZoneStairs())
2751 {
2752 return point;
2753 }
2754 }
2755 return org.GetRandomNeighbor().GetNearestPoint();
2756 }
2757
2758 public static bool Wish(string s, string name, int power, BlessedState state)
2759 {
2761 string netMsg = GameLang.Parse("wish".langGame(), thirdPerson: true, name, s);
2762 bool net = EClass.core.config.net.enable && EClass.core.config.net.sendEvent;
2763 List<WishItem> list = new List<WishItem>();
2764 int wishLv = 10 + power / 4;
2765 int wishValue = 5000 + power * 50;
2766 if (state >= BlessedState.Blessed)
2767 {
2768 wishLv = wishLv * 150 / 100;
2769 }
2770 else if (state <= BlessedState.Cursed)
2771 {
2772 wishLv = wishLv * 150 / 100;
2773 wishValue = 1;
2774 }
2775 Debug.Log(power + "/" + wishValue);
2776 string _s = s.ToLower();
2777 foreach (CardRow r in EClass.sources.cards.rows)
2778 {
2779 if (r.HasTag(CTAG.godArtifact))
2780 {
2781 bool flag = false;
2782 foreach (Religion item in EClass.game.religions.list)
2783 {
2784 if (item.giftRank >= 2 && item.IsValidArtifact(r.id))
2785 {
2786 flag = true;
2787 }
2788 }
2789 if (!flag)
2790 {
2791 continue;
2792 }
2793 }
2794 else if (r.quality >= 4 || r.HasTag(CTAG.noWish))
2795 {
2796 switch (r.id)
2797 {
2798 case "medal":
2799 case "plat":
2800 case "money":
2801 case "money2":
2802 break;
2803 default:
2804 continue;
2805 }
2806 }
2807 if (r.isChara)
2808 {
2809 continue;
2810 }
2811 string text = r.GetName().ToLower();
2812 int score = Compare(_s, text);
2813 if (score == 0)
2814 {
2815 continue;
2816 }
2817 list.Add(new WishItem
2818 {
2819 score = score,
2820 n = text,
2821 action = delegate
2822 {
2823 Debug.Log(r.id);
2824 SourceCategory.Row category = EClass.sources.cards.map[r.id].Category;
2825 if (category.IsChildOf("weapon") || category.IsChildOf("armor") || category.IsChildOf("ranged"))
2826 {
2827 CardBlueprint.SetRarity(Rarity.Legendary);
2828 }
2829 Thing thing = ThingGen.Create(r.id, -1, wishLv);
2830 int num = 1;
2831 int price = thing.GetPrice(CurrencyType.Money, sell: false, PriceType.Tourism);
2832 bool flag2 = thing.trait is TraitDeed || thing.rarity >= Rarity.Artifact || thing.source._origin == "artifact_summon";
2833 switch (thing.id)
2834 {
2835 case "rod_wish":
2836 thing.c_charges = 0;
2837 break;
2838 case "money":
2839 num = EClass.rndHalf(wishValue * 3);
2840 break;
2841 case "plat":
2842 num = EClass.rndHalf(wishValue / 500 + 4);
2843 break;
2844 case "money2":
2845 num = EClass.rndHalf(wishValue / 500 + 4);
2846 break;
2847 case "medal":
2848 num = EClass.rndHalf(wishValue / 2000 + 4);
2849 break;
2850 default:
2851 if (!flag2 && thing.trait.CanStack)
2852 {
2853 int num2 = wishValue;
2854 num2 -= price;
2855 for (int i = 1; i < 1000; i++)
2856 {
2857 int num3 = price + i * 2 * (price + 500);
2858 if (num3 > 0 && num2 > num3)
2859 {
2860 num++;
2861 num2 -= num3;
2862 }
2863 }
2864 }
2865 break;
2866 }
2867 if (price > 2500 && num > 3)
2868 {
2869 num = 3 + (int)Mathf.Sqrt(num - 3);
2870 }
2871 if (price > 5000 && num > 2)
2872 {
2873 num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
2874 }
2875 if (price > 10000 && num > 1)
2876 {
2877 num = 1 + Mathf.Min((int)Mathf.Sqrt(num - 1) / 3, 2);
2878 }
2879 if (num < 1)
2880 {
2881 num = 1;
2882 }
2883 thing.SetNum(num);
2884 Debug.Log(_s + "/" + num + "/" + score);
2885 if (thing.HasTag(CTAG.godArtifact))
2886 {
2887 Religion.Reforge(thing.id);
2888 }
2889 else
2890 {
2891 EClass._zone.AddCard(thing, EClass.pc.pos);
2892 }
2893 netMsg = netMsg + Lang.space + GameLang.Parse("wishNet".langGame(), Msg.IsThirdPerson(thing), Msg.GetName(thing).ToTitleCase());
2894 if (net)
2895 {
2896 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2897 }
2898 Msg.Say("dropReward");
2899 }
2900 });
2901 }
2902 if (list.Count == 0)
2903 {
2904 netMsg = netMsg + Lang.space + "wishFail".langGame();
2905 if (net)
2906 {
2907 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2908 }
2909 Msg.Say("wishFail");
2910 return false;
2911 }
2912 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2913 foreach (WishItem item2 in list)
2914 {
2915 Debug.Log(item2.score + "/" + s + "/" + item2.n);
2916 }
2917 list[0].action();
2918 return true;
2919 }
2920
2921 public static int Compare(string s, string t)
2922 {
2923 if (s.IsEmpty())
2924 {
2925 return 0;
2926 }
2927 int num = 0;
2928 if (t == s)
2929 {
2930 num += 100 + EClass.rnd(30);
2931 }
2932 if (t.Contains(s))
2933 {
2934 num += 100 + EClass.rnd(30);
2935 }
2936 return num;
2937 }
2938}
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
BlessedState
Definition: BlessedState.cs:2
CTAG
Definition: CTAG.cs:2
@ currency
ChatCategory
Definition: ChatCategory.cs:2
ConditionType
Definition: ConditionType.cs:2
CureType
Definition: CureType.cs:2
CurrencyType
Definition: CurrencyType.cs:2
EffectId
Definition: EffectId.cs:2
Emo
Definition: Emo.cs:2
HealSource
Definition: HealSource.cs:2
Hostility
Definition: Hostility.cs:2
IDTSource
Definition: IDTSource.cs:2
PriceType
Definition: PriceType.cs:2
Rarity
Definition: Rarity.cs:2
ThrowMethod
Definition: ThrowMethod.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
static void Poison(Chara tc, Chara c, int power)
Definition: ActEffect.cs:2675
static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
Definition: ActEffect.cs:2691
static void Proc(EffectId id, int power, BlessedState state, Card cc, Card tc=null, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:1026
static void GeneMiracle(Chara tc, Chara c, DNA.Type type)
Definition: ActEffect.cs:2723
static Point GetTeleportPos(Point org, int radius=6)
Definition: ActEffect.cs:2742
static int angle
Definition: ActEffect.cs:21
static int Compare(string s, string t)
Definition: ActEffect.cs:2921
static float RapidDelay
Definition: ActEffect.cs:19
static int RapidCount
Definition: ActEffect.cs:17
static void TryDelay(Action a)
Definition: ActEffect.cs:23
static void Proc(EffectId id, Card cc, Card tc=null, int power=100, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:1021
static bool DamageEle(Card CC, EffectId id, int power, Element e, List< Point > points, ActRef actref, string lang=null)
Definition: ActEffect.cs:36
static bool Wish(string s, string name, int power, BlessedState state)
Definition: ActEffect.cs:2758
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:485
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:97
virtual int ElementPowerMod
Definition: ACT.cs:111
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
void SetElement(int id)
virtual string Name
void SetRefVal(int a, int b)
virtual ConditionType Type
Definition: BaseStats.cs:19
static int GetColorInt(ref Color matColor, int p)
void SetGender(int g)
Definition: Biography.cs:473
int GetAge(Chara c)
Definition: Biography.cs:276
void SetAge(Chara c, int a)
Definition: Biography.cs:297
int gender
Definition: Biography.cs:29
static void Set(CardBlueprint _bp=null)
GlobalCharaList globalCharas
Definition: CardManager.cs:46
virtual string GetName(int i)
Definition: CardRow.cs:95
int quality
Definition: CardRow.cs:19
bool isChara
Definition: CardRow.cs:55
string id
Definition: CardRow.cs:7
Definition: Card.cs:11
int c_lockedAge
Definition: Card.cs:1353
bool IsPCFactionOrMinion
Definition: Card.cs:2272
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:5872
virtual bool IsMultisize
Definition: Card.cs:2158
virtual bool isThing
Definition: Card.cs:2081
bool IsAmmo
Definition: Card.cs:2247
virtual Chara Chara
Definition: Card.cs:2070
Thing Split(int a)
Definition: Card.cs:3484
ElementContainerCard elements
Definition: Card.cs:41
string id
Definition: Card.cs:35
bool IsUnique
Definition: Card.cs:2091
bool IsThrownWeapon
Definition: Card.cs:2245
SourceMaterial.Row material
Definition: Card.cs:2051
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6178
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3041
bool isCopy
Definition: Card.cs:878
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7303
virtual bool IsPCParty
Definition: Card.cs:2149
int c_uidMaster
Definition: Card.cs:1449
Biography bio
Definition: Card.cs:44
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6734
Card SetLv(int a)
Definition: Card.cs:2905
Rarity rarity
Definition: Card.cs:314
string Name
Definition: Card.cs:2137
bool IsRangedWeapon
Definition: Card.cs:2243
ICardParent parent
Definition: Card.cs:55
bool ExistsOnMap
Definition: Card.cs:2085
Thing SetNum(int a)
Definition: Card.cs:3495
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:5782
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3895
bool isAcidproof
Definition: Card.cs:686
bool IsToolbelt
Definition: Card.cs:2169
bool HasTag(CTAG tag)
Definition: Card.cs:2595
Point pos
Definition: Card.cs:59
bool IsInMutterDistance(int d=10)
Definition: Card.cs:7742
void SetDirtyWeight()
Definition: Card.cs:2554
int uid
Definition: Card.cs:122
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6212
bool IsEquipmentOrRanged
Definition: Card.cs:2218
void TryStack(Thing t)
Definition: Card.cs:7010
Trait trait
Definition: Card.cs:53
bool IsPowerful
Definition: Card.cs:2094
int encLV
Definition: Card.cs:326
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2127
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
Definition: Card.cs:5751
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4063
void ModEncLv(int a)
Definition: Card.cs:3846
void SayNothingHappans()
Definition: Card.cs:6846
void Destroy()
Definition: Card.cs:5070
bool HaveFur()
Definition: Card.cs:7903
virtual bool IsPC
Definition: Card.cs:2143
virtual bool isChara
Definition: Card.cs:2083
virtual Thing Thing
Definition: Card.cs:2058
Card GetRootCard()
Definition: Card.cs:3426
int Evalue(int ele)
Definition: Card.cs:2571
int Dist(Card c)
Definition: Card.cs:7698
int ResistLv(int res)
Definition: Card.cs:5928
bool IsLightsource
Definition: Card.cs:2171
virtual bool HasHost
Definition: Card.cs:2423
BlessedState blessedState
Definition: Card.cs:278
Card Install()
Definition: Card.cs:3741
Card parentCard
Definition: Card.cs:103
void ModExp(string alias, int a)
Definition: Card.cs:2648
DNA c_DNA
Definition: Card.cs:1881
int genLv
Definition: Card.cs:194
int Num
Definition: Card.cs:158
bool IsWeapon
Definition: Card.cs:2206
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5933
int LV
Definition: Card.cs:386
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6851
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
Definition: Card.cs:5728
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
SourceMaterial.Row matObj
Definition: Cell.cs:1036
bool HasZoneStairs(bool includeLocked=true)
Definition: Cell.cs:1717
void UnqeuipIfTooHeavy(Thing t)
Definition: CharaBody.cs:169
static Chara CreateFromElement(string idEle, int lv=-1, string idFilter="chara")
Definition: CharaGen.cs:32
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:561
Element MainElement
Definition: Chara.cs:717
CharaBody body
Definition: Chara.cs:94
bool IsLevitating
Definition: Chara.cs:597
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:9629
void Cuddle(Chara c, bool headpat=false)
Definition: Chara.cs:6267
void InstantEat(Thing t=null, bool sound=true)
Definition: Chara.cs:7569
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9250
Faction faction
Definition: Chara.cs:427
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7937
override bool IsPC
Definition: Chara.cs:612
Chara host
Definition: Chara.cs:33
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Definition: Chara.cs:2571
Chara GetNearbyCatToSniff()
Definition: Chara.cs:8076
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1250
override bool IsPCParty
Definition: Chara.cs:615
bool RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:8380
bool HasCondition(string alias)
Definition: Chara.cs:9411
void SetMainElement(string id, int v=0, bool elemental=false)
Definition: Chara.cs:2075
Stats hunger
Definition: Chara.cs:1142
bool HasMinion(string id)
Definition: Chara.cs:2350
override bool HasHost
Definition: Chara.cs:688
override bool IsPCFaction
Definition: Chara.cs:671
override bool IsPCPartyMinion
Definition: Chara.cs:639
int MaxSummon
Definition: Chara.cs:714
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2339
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Chara.cs:5311
Chara Duplicate()
Definition: Chara.cs:1783
void MakeAlly(bool msg=true)
Definition: Chara.cs:2276
bool CanDuplicate()
Definition: Chara.cs:1758
Stats mana
Definition: Chara.cs:1154
void TryDropBossLoot()
Definition: Chara.cs:5614
string NameTitled
Definition: Chara.cs:516
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8661
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8155
Religion faith
Definition: Chara.cs:439
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6355
bool TryEquip(Thing t, bool useFav=false)
Definition: Chara.cs:7727
void SetSummon(int duration)
Definition: Chara.cs:2379
bool IsHostile()
Definition: Chara.cs:6532
bool isDead
Definition: Chara.cs:389
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4303
void Sniff(Chara c)
Definition: Chara.cs:8088
void MoveZone(string alias)
Definition: Chara.cs:3319
UD_String_Color elementColors
Definition: ConWet.cs:2
virtual bool IsKilled
Definition: Condition.cs:7
void Kill(bool silent=false)
Definition: Condition.cs:91
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
Definition: Condition.cs:46
new GameConfig game
Definition: CoreConfig.cs:609
GraphicSetting graphic
Definition: CoreConfig.cs:607
CameraConfig camera
Definition: CoreConfig.cs:617
NetSetting net
Definition: CoreConfig.cs:611
bool enable
Definition: CoreDebug.cs:286
CoreConfig config
Definition: Core.cs:70
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
static Type GetType(string idMat)
Definition: DNA.cs:510
void Generate(Type _type, Chara model=null)
Definition: DNA.cs:267
int GetRaw(int offsetHours=0)
Definition: Date.cs:326
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:528
Definition: Dice.cs:5
static int RollMax(int num, int sides, int bonus=0)
Definition: Dice.cs:70
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:48
static Dice Create(Element ele, Card c)
Definition: Dice.cs:120
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static ColorProfile Colors
Definition: EClass.cs:39
static Core core
Definition: EClass.cs:7
static void Wait(float a, Card c)
Definition: EClass.cs:112
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 int rndHalf(int a)
Definition: EClass.cs:97
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
static GameSetting setting
Definition: EClass.cs:35
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:261
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
Definition: EffectMeteor.cs:33
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
Effect SetStartDelay(float a)
Definition: Effect.cs:199
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
Effect SetParticleColor(Color c)
Definition: Effect.cs:289
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Dictionary< int, Element > dict
int Value(int ele)
Element ModTempPotential(int ele, int v, int threshMsg=0)
Element ModBase(int ele, int v)
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
Element GetOrCreateElement(Element ele)
int id
Definition: ELEMENT.cs:250
int vBase
Definition: ELEMENT.cs:252
SourceElement.Row source
Definition: ELEMENT.cs:273
bool HasTag(string tag)
Definition: ELEMENT.cs:473
static int[] List_MainAttributes
Definition: ELEMENT.cs:240
static int GetId(string alias)
Definition: ELEMENT.cs:1121
int Value
Definition: ELEMENT.cs:292
virtual string Name
Definition: ELEMENT.cs:304
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1102
static Element Void
Definition: ELEMENT.cs:238
bool IsTrait
Definition: ELEMENT.cs:362
bool HasItemProtection
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
Definition: GameLang.cs:141
bool disableUsermapBenefit
UD_String_ElementRef elements
Definition: GameSetting.cs:315
ReligionManager religions
Definition: Game.cs:158
GamePrincipal principal
Definition: Game.cs:224
SpatialManager spatials
Definition: Game.cs:152
CardManager cards
Definition: Game.cs:155
bool IsSurvival
Definition: Game.cs:275
Definition: Gender.cs:2
static string Name(int g)
Definition: Gender.cs:9
static bool Has(string id)
Definition: LangGame.cs:46
Definition: Lang.cs:6
static string langCode
Definition: Lang.cs:28
static string[] GetList(string id)
Definition: Lang.cs:114
static LayerDragGrid CreateEnchant(Chara cc, bool armor, bool superior=false, BlessedState state=BlessedState.Normal, int count=1)
static LayerDragGrid CreateChangeMaterial(Chara cc, Thing consume, SourceMaterial.Row mat, EffectId idEffect, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateLighten(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateUncurse(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateReconstruction(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateIdentify(Chara cc, bool superior=false, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static void SetDirty(Thing t)
Point GetRandomSurface(int x, int z, int radius, bool walkable=true, bool allowWater=false)
Definition: MapBounds.cs:182
int Width
Definition: MapBounds.cs:26
Chara FindChara(string id)
Definition: Map.cs:2568
void TryShatter(Point pos, int ele, int power)
Definition: Map.cs:1200
List< Point > ListPointsInArc(Point center, Point to, int radius, float angle)
Definition: Map.cs:2309
void Reveal(Point center, int power=100)
Definition: Map.cs:918
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1840
void MineBlock(Point point, bool recoverBlock=false, Chara c=null, bool mineObj=true)
Definition: Map.cs:1668
List< Point > ListPointsInLine(Point center, Point to, int radius)
Definition: Map.cs:2326
void SetEffect(int x, int z, CellEffect effect=null)
Definition: Map.cs:1508
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2278
List< Chara > charas
Definition: Map.cs:81
void RevealAll(bool reveal=true)
Definition: Map.cs:905
MapBounds bounds
Definition: Map.cs:52
Definition: Msg.cs:5
static bool IsThirdPerson(Card c)
Definition: Msg.cs:291
static ThirstPersonInfo thirdPerson1
Definition: Msg.cs:6
static string SayNothingHappen()
Definition: Msg.cs:96
static string GetName(Card c)
Definition: Msg.cs:274
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
Definition: Net.cs:11
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
Definition: Net.cs:318
int deepest
Definition: Player.cs:114
int deepestVoid
Definition: Player.cs:117
void ModKarma(int a)
Definition: Player.cs:2516
Stats stats
Definition: Player.cs:1016
int CountKeyItem(string alias)
Definition: Player.cs:2168
ReturnInfo returnInfo
Definition: Player.cs:866
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:327
SourceMaterial.Row matBlock
Definition: Point.cs:55
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1051
Point Copy()
Definition: Point.cs:491
Point Set(int _x, int _z)
Definition: Point.cs:503
int x
Definition: Point.cs:36
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:619
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:933
int z
Definition: Point.cs:39
bool IsSync
Definition: Point.cs:344
List< Chara > Charas
Definition: Point.cs:340
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1253
bool Equals(int _x, int _z)
Definition: Point.cs:960
bool IsValid
Definition: Point.cs:88
Effect PlayEffect(string id)
Definition: Point.cs:1248
bool HasObj
Definition: Point.cs:137
int Distance(Point p)
Definition: Point.cs:989
Chara FirstChara
Definition: Point.cs:288
bool HasBlock
Definition: Point.cs:141
bool IsInBounds
Definition: Point.cs:104
Cell cell
Definition: Point.cs:51
Point GetRandomNeighbor()
Definition: Point.cs:759
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1302
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:769
ReligionWind Wind
ReligionTrickery Trickery
ReligionElement Element
List< Religion > list
ReligionHealing Healing
static Thing Reforge(string id, Point pos=null, bool first=true)
Definition: Religion.cs:275
void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:153
bool HasTag(CTAG _tag)
Definition: RenderRow.cs:125
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25
List< CardRow > rows
Definition: SourceCard.cs:6
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceMaterial materials
SourceRace races
SourceStat stats
SourceCalc calc
SourceCard cards
SourceElement elements
static Dictionary< string, TierList > tierMap
static Spatial Create(string id, Spatial parent, bool register, int x=-99999, int y=-99999, int icon=0)
Definition: SpatialGen.cs:16
Zone Find(string id)
List< Zone > ListReturnLocations()
int lv
Definition: Spatial.cs:142
int visitCount
Definition: Spatial.cs:154
List< Spatial > children
Definition: Spatial.cs:37
static SpawnList Get(string id, Func< SourceChara.Row, bool > func)
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Definition: TC.cs:4
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
bool isEquipped
Definition: Thing.cs:17
override CardRow sourceCard
Definition: Thing.cs:47
Thing Identify(bool show=true, IDTSource idtSource=IDTSource.Identify)
Definition: Thing.cs:2077
void Set(string n)
virtual SourceElement.Row source
Definition: TraitScroll.cs:5
static void BadEffect(Chara c)
Definition: TraitWell.cs:143
virtual bool CanBeAttacked
Definition: Trait.cs:166
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
static void Play(string idStep)
Definition: Tutorial.cs:7
bool ContainsKey(TKey key)
Definition: UDictionary.cs:151
bool TryGetValue(TKey key, out TValue value)
Definition: UDictionary.cs:178
GameDate date
Definition: World.cs:6
Definition: Zone.cs:12
virtual string GetNewZoneID(int level)
Definition: Zone.cs:547
int CountMinions(Chara c)
Definition: Zone.cs:3733
FactionBranch branch
Definition: Zone.cs:34
bool HasField(int idEle)
Definition: Zone.cs:2879
virtual bool IsUserZone
Definition: Zone.cs:271
Chara Boss
Definition: Zone.cs:86
void ModInfluence(int a)
Definition: Zone.cs:3614
override int DangerLv
Definition: Zone.cs:110
virtual int MinLv
Definition: Zone.cs:281
bool IsPCFaction
Definition: Zone.cs:473
ZoneInstance instance
Definition: Zone.cs:55
Card AddCard(Card t, Point point)
Definition: Zone.cs:1977
Definition: ActRef.cs:2
Act act
Definition: ActRef.cs:3
Thing refThing
Definition: ActRef.cs:9