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