Elin Decompiled Documentation EA 23.102 Nightly
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
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 && 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 : (text.ToLower() + "_"));
60 foreach (Point p in points)
61 {
62 bool flag2 = true;
63 switch (id)
64 {
65 case EffectId.Explosive:
66 text2 = "ball_";
67 flag = false;
68 break;
69 case EffectId.BallBubble:
70 text2 = "ball_";
71 break;
72 case EffectId.Earthquake:
73 text2 = "SpEarthquake";
74 flag2 = false;
75 flag = true;
76 break;
77 case EffectId.Meteor:
78 text2 = "SpMeteor";
79 break;
80 default:
81 if (CC.isChara && p.Equals(CC.pos) && points.Count >= 2)
82 {
83 continue;
84 }
85 break;
86 case EffectId.Suicide:
87 break;
88 }
89 Effect effect = null;
90 Effect effect2 = (flag2 ? Effect.Get("trail1") : null);
91 Point from = p;
92 switch (id)
93 {
94 case EffectId.Arrow:
95 {
96 effect = Effect.Get("spell_arrow");
97 effect.sr.color = elementRef.colorSprite;
98 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
99 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
100 componentInChildren.startColor = startColor;
101 from = CC.pos;
102 break;
103 }
104 case EffectId.Earthquake:
105 {
106 if (EClass.rnd(4) == 0 && p.IsSync)
107 {
108 effect = Effect.Get("smoke_earthquake");
109 }
110 float num3 = 0.06f * (float)CC.pos.Distance(p);
111 Point pos = p.Copy();
112 TweenUtil.Tween(num3, null, delegate
113 {
114 pos.Animate(AnimeID.Quake, animeBlock: true);
115 });
116 if (effect != null)
117 {
118 effect.SetStartDelay(num3);
119 }
120 break;
121 }
122 default:
123 {
124 effect = Effect.Get("Element/ball_" + ((e.id == 0) ? "Void" : e.source.alias.Remove(0, 3)));
125 if (effect == null)
126 {
127 effect = Effect.Get("Element/ball_Fire");
128 }
129 float startDelay = ((id == EffectId.Meteor) ? 0.1f : 0.04f) * (float)CC.pos.Distance(p);
130 effect.SetStartDelay(startDelay);
131 effect2.SetStartDelay(startDelay);
132 break;
133 }
134 }
135 if (effect2 != null)
136 {
137 effect2.SetParticleColor(elementRef.colorTrail, changeMaterial: true, "_TintColor").Play(from);
138 }
139 if (effect != null)
140 {
141 if (id == EffectId.Arrow)
142 {
143 TryDelay(delegate
144 {
145 effect.Play(CC.pos, 0f, p);
146 });
147 }
148 else
149 {
150 TryDelay(delegate
151 {
152 effect.Play(p).Flip(p.x > CC.pos.x);
153 });
154 }
155 }
156 bool flag3 = false;
157 if (CC.IsPCFactionOrMinion && (CC.HasElement(1651) || EClass.pc.Evalue(1651) >= 2))
158 {
159 bool flag4 = false;
160 foreach (Card item in p.ListCards())
161 {
162 if (item.isChara)
163 {
164 if (item.IsPCFactionOrMinion)
165 {
166 flag4 = true;
167 }
168 }
169 else if (e.id != 910 || !item.IsFood || !item.category.IsChildOf("foodstuff"))
170 {
171 flag4 = true;
172 }
173 }
174 flag3 = flag4;
175 }
176 if (!flag3)
177 {
178 if (e.id == 910)
179 {
180 EClass._map.TryShatter(p, 910, power);
181 }
182 if (e.id == 911)
183 {
184 EClass._map.TryShatter(p, 911, power);
185 }
186 }
187 foreach (Card item2 in p.ListCards().ToList())
188 {
189 Card c = item2;
190 if ((!c.isChara && !c.trait.CanBeAttacked) || (c.IsMultisize && item2 == CC) || (c.isChara && (c.Chara.host == CC || c.Chara.parasite == CC || c.Chara.ride == CC)))
191 {
192 continue;
193 }
194 if ((uint)(id - 250) <= 1u && c.isChara && CC.isChara)
195 {
196 c.Chara.RequestProtection(CC.Chara, delegate(Chara a)
197 {
198 c = a;
199 });
200 }
201 int num4 = 0;
202 bool isChara = CC.isChara;
203 if (id == EffectId.Suicide)
204 {
205 num4 = CC.MaxHP * 2;
206 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
207 if (c.HasTag(CTAG.suicide) && !c.HasCondition<ConWet>())
208 {
209 list.Add(c);
210 }
211 }
212 else
213 {
214 Dice dice = Dice.Create(text2, power, CC, (actref.refThing != null) ? null : actref.act);
215 if (dice == null)
216 {
217 Debug.Log(text2);
218 }
219 num4 = dice.Roll();
220 if (id == EffectId.Earthquake)
221 {
222 if (c.HasCondition<ConGravity>())
223 {
224 num4 = dice.RollMax() * 2;
225 }
226 else if (c.isChara && c.Chara.IsLevitating)
227 {
228 num4 /= 2;
229 }
230 }
231 if (id == EffectId.Ball || id == EffectId.BallBubble || id == EffectId.Explosive)
232 {
233 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
234 }
235 }
236 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as Chara)) || (flag && c == CC))
237 {
238 continue;
239 }
240 if (isChara && points.Count > 1 && c != null && c.isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.Chara))
241 {
242 int num5 = CC.Evalue(302);
243 if (!CC.IsPC && CC.IsPCFactionOrMinion)
244 {
245 num5 += EClass.pc.Evalue(302);
246 }
247 if (CC.HasElement(1214))
248 {
249 num5 *= 2;
250 }
251 if (num5 > 0)
252 {
253 if (num5 * 10 > EClass.rnd(num4 + 1))
254 {
255 if (c == c.pos.FirstChara)
256 {
257 CC.ModExp(302, CC.IsPC ? 10 : 50);
258 }
259 continue;
260 }
261 num4 = EClass.rnd(num4 * 100 / (100 + num5 * 10 + 1));
262 if (c == c.pos.FirstChara)
263 {
264 CC.ModExp(302, CC.IsPC ? 20 : 100);
265 }
266 if (num4 == 0)
267 {
268 continue;
269 }
270 }
271 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) && EClass.pc.HasElement(1214))) && EClass.rnd(5) != 0)
272 {
273 continue;
274 }
275 }
276 if (!lang.IsEmpty())
277 {
278 if (lang == "spell_hand")
279 {
280 string[] list2 = Lang.GetList("attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty("Touch") : "Touch"));
281 string @ref = "_elehand".lang(e.source.GetAltname(2), list2[4]);
282 CC.Say(c.IsPCParty ? "cast_hand_ally" : "cast_hand", CC, c, @ref, c.IsPCParty ? list2[1] : list2[2]);
283 }
284 else
285 {
286 CC.Say(lang + "_hit", CC, c, e.Name.ToLower());
287 }
288 }
289 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing != null) ? EClass._map.FindChara(actref.refThing.c_uidRefCard) : null));
290 if (c.IsMultisize)
291 {
292 switch (id)
293 {
294 case EffectId.Ball:
295 case EffectId.Explosive:
296 case EffectId.BallBubble:
297 case EffectId.Meteor:
298 case EffectId.Earthquake:
299 case EffectId.Suicide:
300 num4 /= 2;
301 break;
302 }
303 }
304 if (RapidCount > 0)
305 {
306 num4 = num4 * 100 / (100 + RapidCount * 50);
307 }
308 num4 = num4 * Act.powerMod / 100;
309 c.DamageHP(num4, e.id, power * num / 100, AttackSource.None, chara ?? CC);
310 if (c.IsAliveInCurrentZone && CC.IsAliveInCurrentZone && id == EffectId.DrainMana && c.isChara && CC.isChara && c.Chara.mana.value > 0)
311 {
312 int num6 = num4 * num / 100;
313 Debug.Log(num4 + " v:" + num6 + " evalue:" + e.Value + " power:" + power + " elepMod:" + num);
314 if (num6 > c.Chara.mana.value)
315 {
316 num6 = c.Chara.mana.value;
317 }
318 c.Chara.mana.Mod(-num6);
319 CC.Chara.mana.Mod(num6);
320 }
321 if (id == EffectId.Explosive && CC.trait is TraitCookerMicrowave)
322 {
323 chara = EClass.pc;
324 }
325 if (chara != null && chara.IsAliveInCurrentZone)
326 {
327 chara.DoHostileAction(c);
328 }
329 num2++;
330 }
331 if ((id == EffectId.Explosive || id == EffectId.Suicide) && ((id != EffectId.Suicide && id != EffectId.Meteor) || !EClass._zone.IsPCFaction))
332 {
333 int num7 = id switch
334 {
335 EffectId.Suicide => CC.LV / 3 + 40,
336 EffectId.Meteor => 50 + power / 20,
337 _ => (actref.refThing != null) ? actref.refThing.material.hardness : (30 + power / 20),
338 };
339 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (id == EffectId.Explosive && actref.refThing == null)) && !(EClass._zone is Zone_Vernis);
340 if (p.HasObj && p.cell.matObj.hardness <= num7)
341 {
343 if (flag5)
344 {
346 }
347 }
348 if (!p.HasObj && p.HasBlock && p.matBlock.hardness <= num7)
349 {
351 if (flag5)
352 {
354 }
355 }
356 }
357 if (e.id == 910)
358 {
359 int num8 = 0;
360 if (id == EffectId.Meteor)
361 {
362 num8 = 2;
363 }
365 {
366 num8 = 0;
367 }
368 if (num8 > EClass.rnd(10))
369 {
370 p.ModFire(4 + EClass.rnd(10));
371 }
372 }
373 if (e.id == 911)
374 {
375 p.ModFire(-20, extinguish: true);
376 }
377 }
378 if (RapidCount == 0)
379 {
380 foreach (Card item3 in list)
381 {
382 if (item3.ExistsOnMap)
383 {
384 RapidCount += 2;
385 ProcAt(id, power, BlessedState.Normal, item3, null, item3.pos, isNeg: true, actref);
386 }
387 }
388 }
389 return num2 > 0;
390 }
391
392 public static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef = default(ActRef))
393 {
394 Chara CC = cc.Chara;
395 bool flag = state <= BlessedState.Cursed;
396 bool flag2 = isNeg || flag;
397 Element element = Element.Create(actRef.aliasEle.IsEmpty("eleFire"), power / 10);
399 {
400 angle += 5;
401 if (angle > 100)
402 {
403 angle = 30;
404 }
405 Debug.Log(angle);
406 }
407 switch (id)
408 {
409 case EffectId.Earthquake:
410 {
411 List<Point> list4 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
412 if (list4.Count == 0)
413 {
414 list4.Add(CC.pos.Copy());
415 }
416 CC.Say("spell_earthquake", CC, element.Name.ToLower());
417 TryDelay(delegate
418 {
419 CC.PlaySound("spell_earthquake");
420 });
421 if (CC.IsInMutterDistance())
422 {
423 Shaker.ShakeCam("ball");
424 }
425 EClass.Wait(1f, CC);
426 DamageEle(CC, id, power, element, list4, actRef, "spell_earthquake");
427 break;
428 }
429 case EffectId.Meteor:
430 {
431 EffectMeteor.Create(cc.pos, 6, 10, delegate
432 {
433 });
434 List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 10f);
435 if (list3.Count == 0)
436 {
437 list3.Add(CC.pos.Copy());
438 }
439 CC.Say("spell_ball", CC, element.Name.ToLower());
440 TryDelay(delegate
441 {
442 CC.PlaySound("spell_ball");
443 });
444 if (CC.IsInMutterDistance())
445 {
446 Shaker.ShakeCam("ball");
447 }
448 EClass.Wait(1f, CC);
449 DamageEle(CC, id, power, element, list3, actRef, "spell_ball");
450 return;
451 }
452 case EffectId.Hand:
453 case EffectId.DrainBlood:
454 case EffectId.DrainMana:
455 {
456 List<Point> list5 = new List<Point>();
457 list5.Add(tp.Copy());
458 EClass.Wait(0.3f, CC);
459 TryDelay(delegate
460 {
461 CC.PlaySound("spell_hand");
462 });
463 if (!DamageEle(CC, id, power, element, list5, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : "spell_hand"))
464 {
465 CC.Say("spell_hand_miss", CC, element.Name.ToLower());
466 }
467 return;
468 }
469 case EffectId.Arrow:
470 {
471 List<Point> list = new List<Point>();
472 list.Add(tp.Copy());
473 CC.Say("spell_arrow", CC, element.Name.ToLower());
474 EClass.Wait(0.5f, CC);
475 TryDelay(delegate
476 {
477 CC.PlaySound("spell_arrow");
478 });
479 DamageEle(CC, id, power, element, list, actRef, "spell_arrow");
480 return;
481 }
482 case EffectId.Summon:
483 {
484 CC.Say("summon_ally", CC);
485 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
486 {
487 CC.Say("summon_ally_fail", CC);
488 return;
489 }
490 string id3 = actRef.n1;
491 int num3 = 1;
492 int num4 = -1;
493 int radius = 3;
494 bool flag3 = false;
495 int num5 = -1;
496 switch (actRef.n1)
497 {
498 case "shadow":
499 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
500 break;
501 case "monster":
502 case "fire":
503 case "animal":
504 num3 = 1 + EClass.rnd(2);
505 break;
506 case "special_force":
507 id3 = "army_palmia";
508 num3 = 4 + EClass.rnd(2);
509 num5 = EClass._zone.DangerLv;
510 break;
511 case "tentacle":
512 num4 = 20 + EClass.rnd(10);
513 radius = 1;
514 break;
515 }
516 for (int j = 0; j < num3; j++)
517 {
518 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon)
519 {
520 break;
521 }
522 Point point = tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false);
523 if (point == null || !point.IsValid)
524 {
525 continue;
526 }
527 Chara chara2 = null;
528 if (num5 != -1)
529 {
531 {
532 lv = num5
533 });
534 }
535 chara2 = actRef.n1 switch
536 {
537 "yeek" => CharaGen.CreateFromFilter(SpawnListChara.Get("summon_yeek", (SourceChara.Row r) => r.race == "yeek"), power / 10),
538 "orc" => CharaGen.CreateFromFilter(SpawnListChara.Get("summon_orc", (SourceChara.Row r) => r.race == "orc"), power / 10),
539 "pawn" => CharaGen.CreateFromFilter("c_pawn", power / 10),
540 "monster" => CharaGen.CreateFromFilter("c_dungeon", power / 10),
541 "animal" => CharaGen.CreateFromFilter("c_animal", power / 15),
542 "fire" => CharaGen.CreateFromElement("Fire", power / 10),
543 _ => CharaGen.Create(id3, power / 10),
544 };
545 if (chara2 == null)
546 {
547 continue;
548 }
549 int num6 = -1;
550 num6 = ((!(actRef.n1 == "shadow")) ? (chara2.LV * (100 + power / 10) / 100 + power / 30) : (power / 10 + 1));
551 if (chara2.LV < num6)
552 {
553 chara2.SetLv(num6);
554 }
555 chara2.interest = 0;
556 if (chara2.HaveFur())
557 {
558 chara2.c_fur = -1;
559 }
560 string n = actRef.n1;
561 if (!(n == "shadow"))
562 {
563 if (n == "special_force")
564 {
565 chara2.homeZone = EClass._zone;
566 }
567 }
568 else
569 {
570 chara2.hp = chara2.MaxHP / 2;
571 }
572 EClass._zone.AddCard(chara2, point);
573 if (!(actRef.n1 == "monster") || actRef.refThing == null)
574 {
575 chara2.MakeMinion(CC);
576 }
577 if (num4 != -1)
578 {
579 chara2.SetSummon(num4);
580 }
581 flag3 = true;
582 }
583 if (!flag3)
584 {
585 CC.Say("summon_ally_fail", CC);
586 }
587 return;
588 }
589 case EffectId.Funnel:
590 {
591 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
592 {
593 CC.Say("summon_ally_fail", CC);
594 return;
595 }
596 CC.Say("spell_funnel", CC, element.Name.ToLower());
597 CC.PlaySound("spell_funnel");
598 Chara chara = CharaGen.Create("bit");
599 chara.SetMainElement(element.source.alias, element.Value, elemental: true);
600 chara.SetSummon(20 + power / 20 + EClass.rnd(10));
601 chara.SetLv(power / 15);
602 chara.interest = 0;
603 EClass._zone.AddCard(chara, tp.GetNearestPoint(allowBlock: false, allowChara: false));
604 chara.PlayEffect("teleport");
605 chara.MakeMinion(CC);
606 return;
607 }
608 case EffectId.Breathe:
609 {
610 List<Point> list7 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
611 if (list7.Count == 0)
612 {
613 list7.Add(CC.pos.Copy());
614 }
615 CC.Say("spell_breathe", CC, element.Name.ToLower());
616 EClass.Wait(0.8f, CC);
617 TryDelay(delegate
618 {
619 CC.PlaySound("spell_breathe");
620 });
622 {
623 Shaker.ShakeCam("breathe");
624 }
625 DamageEle(CC, id, power, element, list7, actRef, "spell_breathe");
626 return;
627 }
628 case EffectId.Scream:
629 CC.PlaySound("scream");
630 CC.PlayEffect("scream");
631 {
632 foreach (Point item in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
633 {
634 foreach (Chara chara3 in item.Charas)
635 {
636 if (chara3.ResistLv(957) <= 0)
637 {
638 chara3.AddCondition<ConParalyze>(power);
639 }
640 }
641 }
642 return;
643 }
644 case EffectId.Ball:
645 case EffectId.Explosive:
646 case EffectId.BallBubble:
647 case EffectId.Suicide:
648 {
649 float radius2 = ((id == EffectId.Suicide) ? 3.5f : ((float)((id == EffectId.BallBubble) ? 2 : 5)));
650 if (id == EffectId.Explosive && actRef.refThing != null)
651 {
652 radius2 = 2f;
653 }
654 if (id == EffectId.Suicide)
655 {
656 if (CC.MainElement != Element.Void)
657 {
658 element = CC.MainElement;
659 }
660 if (CC.HasTag(CTAG.kamikaze))
661 {
662 radius2 = 1.5f;
663 }
664 }
665 bool flag4 = id == EffectId.Explosive || id == EffectId.Suicide;
666 List<Point> list6 = EClass._map.ListPointsInCircle(cc.pos, radius2, !flag4, !flag4);
667 if (list6.Count == 0)
668 {
669 list6.Add(cc.pos.Copy());
670 }
671 cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
672 EClass.Wait(0.8f, cc);
673 TryDelay(delegate
674 {
675 cc.PlaySound("spell_ball");
676 });
678 {
679 Shaker.ShakeCam("ball");
680 }
681 DamageEle(actRef.origin ?? cc, id, power, element, list6, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
682 if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
683 {
684 CC.Die();
685 }
686 return;
687 }
688 case EffectId.Bolt:
689 {
690 List<Point> list2 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
691 if (list2.Count == 0)
692 {
693 list2.Add(CC.pos.Copy());
694 }
695 CC.Say("spell_bolt", CC, element.Name.ToLower());
696 EClass.Wait(0.8f, CC);
697 TryDelay(delegate
698 {
699 CC.PlaySound("spell_bolt");
700 });
702 {
703 Shaker.ShakeCam("bolt");
704 }
705 DamageEle(CC, id, power, element, list2, actRef, "spell_bolt");
706 return;
707 }
708 case EffectId.Bubble:
709 case EffectId.Web:
710 case EffectId.MistOfDarkness:
711 case EffectId.Puddle:
712 {
713 if (LangGame.Has("ab" + id))
714 {
715 CC.Say("ab" + id, CC);
716 }
717 tp.PlaySound("vomit");
718 int num = 2 + EClass.rnd(3);
719 int id2 = id switch
720 {
721 EffectId.MistOfDarkness => 6,
722 EffectId.Bubble => 5,
723 EffectId.Puddle => 4,
724 _ => 7,
725 };
726 EffectId idEffect = ((id == EffectId.Bubble) ? EffectId.BallBubble : EffectId.PuddleEffect);
727 Color matColor = EClass.Colors.elementColors.TryGetValue(element.source.alias);
728 if (id == EffectId.Bubble && CC.id == "cancer")
729 {
730 idEffect = EffectId.Nothing;
731 num = 1 + EClass.rnd(3);
732 }
733 for (int i = 0; i < num; i++)
734 {
735 Point randomPoint = tp.GetRandomPoint(2);
736 if (randomPoint != null && !randomPoint.HasBlock && (id != EffectId.Puddle || !randomPoint.cell.IsTopWaterAndNoSnow))
737 {
738 int num2 = 4 + EClass.rnd(5);
739 if (id == EffectId.Web)
740 {
741 num2 *= 3;
742 }
743 EClass._map.SetEffect(randomPoint.x, randomPoint.z, new CellEffect
744 {
745 id = id2,
746 amount = num2,
747 idEffect = idEffect,
748 idEle = element.id,
749 power = power,
750 isHostileAct = CC.IsPCParty,
751 color = BaseTileMap.GetColorInt(ref matColor, 100)
752 });
753 }
754 }
755 return;
756 }
757 }
758 List<Card> list8 = tp.ListCards().ToList();
759 list8.Reverse();
760 if (list8.Contains(CC))
761 {
762 list8.Remove(CC);
763 list8.Insert(0, CC);
764 }
765 bool flag5 = true;
766 foreach (Card item2 in list8)
767 {
768 if (tc == null || item2 == tc)
769 {
770 Proc(id, power, state, CC, item2, actRef);
771 if (flag2 && item2.isChara && item2 != CC)
772 {
773 CC.DoHostileAction(item2);
774 }
775 if (actRef.refThing == null || !(actRef.refThing.trait is TraitRod) || (uint)(id - 200) <= 4u)
776 {
777 return;
778 }
779 flag5 = false;
780 }
781 }
782 if (flag5)
783 {
784 CC.SayNothingHappans();
785 }
786 }
787
788 public static void Proc(EffectId id, Card cc, Card tc = null, int power = 100, ActRef actRef = default(ActRef))
789 {
790 Proc(id, power, BlessedState.Normal, cc, tc, actRef);
791 }
792
793 public static void Proc(EffectId id, int power, BlessedState state, Card cc, Card tc = null, ActRef actRef = default(ActRef))
794 {
795 if (tc == null)
796 {
797 tc = cc;
798 }
799 Chara TC = tc.Chara;
800 Chara CC = cc.Chara;
801 bool blessed = state >= BlessedState.Blessed;
802 bool flag = state <= BlessedState.Cursed;
803 int orgPower = power;
804 if (blessed || flag)
805 {
806 power *= 2;
807 }
808 switch (id)
809 {
810 case EffectId.Duplicate:
811 {
812 Point randomPoint = CC.pos.GetRandomPoint(2, requireLos: false, allowChara: false, allowBlocked: false, 200);
813 if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || EClass._zone.IsRegion || CC.HasCondition<ConPoison>() || CC.HasCondition<ConConfuse>() || CC.HasCondition<ConDim>() || CC.HasCondition<ConParalyze>() || CC.HasCondition<ConSleep>() || CC.HasCondition<ConBurning>() || CC.HasCondition<ConFreeze>() || CC.HasCondition<ConMiasma>() || CC.corruption >= 100)
814 {
815 CC.Say("split_fail", CC);
816 return;
817 }
818 Chara t2 = CC.Duplicate();
819 EClass._zone.AddCard(t2, randomPoint);
820 CC.Say("split", CC);
821 break;
822 }
823 case EffectId.Escape:
824 if (CC.IsPCFaction || (EClass._zone.Boss == CC && EClass.rnd(30) != 0))
825 {
826 return;
827 }
828 CC.Say("escape", CC);
829 CC.PlaySound("escape");
830 if (EClass._zone.Boss == CC)
831 {
832 CC.TryDropBossLoot();
833 }
834 CC.Destroy();
835 break;
836 case EffectId.Exterminate:
837 {
838 CC.PlaySound("clean_floor");
839 Msg.Say("exterminate");
840 List<Chara> list2 = EClass._map.charas.Where((Chara c) => c.isCopy && !c.IsPCFaction).ToList();
841 if (list2.Count == 0)
842 {
844 return;
845 }
846 foreach (Chara item in list2)
847 {
848 item.Say("split_fail", item);
849 item.PlayEffect("vanish");
850 item.Die();
851 }
852 break;
853 }
854 case EffectId.DropMine:
855 {
856 if (CC.pos.Installed != null || EClass._zone.IsPCFaction)
857 {
858 return;
859 }
860 Thing thing = ThingGen.Create("mine");
861 thing.c_idRefCard = "dog_mine";
862 Zone.ignoreSpawnAnime = true;
863 EClass._zone.AddCard(thing, CC.pos).Install();
864 break;
865 }
866 case EffectId.MagicMap:
867 if (!CC.IsPC)
868 {
870 break;
871 }
872 if (flag)
873 {
874 CC.Say("abMagicMap_curse", CC);
875 CC.PlaySound("curse3");
876 CC.PlayEffect("curse");
877 CC.AddCondition<ConConfuse>(200, force: true);
878 break;
879 }
880 CC.Say("abMagicMap", CC);
881 CC.PlayEffect("identify");
882 CC.PlaySound("identify");
883 if (blessed)
884 {
886 }
887 else
888 {
889 EClass._map.Reveal(CC.pos, power);
890 }
891 break;
892 case EffectId.AbsorbMana:
893 {
894 EClass.game.religions.Element.Talk("ability");
895 Dice dice = Dice.Create("ActManaAbsorb", power, CC, (actRef.refThing != null) ? null : actRef.act);
896 TC.mana.Mod(dice.Roll());
897 TC.PlaySound("heal");
898 TC.PlayEffect("heal");
899 if (TC.IsPC)
900 {
901 CC.Say("absorbMana", CC);
902 }
903 break;
904 }
905 case EffectId.ModPotential:
906 {
907 Element element = cc.elements.ListElements((Element e) => e.HasTag("primary")).RandomItem();
908 cc.elements.ModTempPotential(element.id, power / 10);
909 break;
910 }
911 case EffectId.ForgetItems:
912 {
913 TC.PlaySound("curse3");
914 TC.PlayEffect("curse");
915 TC.Say("forgetItems", TC);
916 int num2 = power / 50 + 1 + EClass.rnd(3);
917 List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
918 for (int i = 0; i < num2; i++)
919 {
920 source.RandomItem().c_IDTState = 5;
921 }
922 break;
923 }
924 case EffectId.EnchantWeapon:
925 case EffectId.EnchantArmor:
926 case EffectId.EnchantWeaponGreat:
927 case EffectId.EnchantArmorGreat:
928 {
929 bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
930 bool flag4 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
931 if (!tc.isThing)
932 {
933 LayerDragGrid.CreateEnchant(CC, armor, flag4, state);
934 return;
935 }
936 cc.PlaySound("identify");
937 cc.PlayEffect("identify");
938 if (flag)
939 {
940 cc.Say("enc_curse", tc);
941 tc.ModEncLv(-1);
942 break;
943 }
944 int num5 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
945 if (tc.encLV >= num5)
946 {
947 cc.Say("enc_resist", tc);
948 break;
949 }
950 cc.Say("enc", tc);
951 tc.ModEncLv(1);
952 break;
953 }
954 case EffectId.Identify:
955 case EffectId.GreaterIdentify:
956 {
957 bool flag5 = id == EffectId.GreaterIdentify;
958 if (flag)
959 {
960 Redirect(EffectId.ForgetItems, flag5 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
961 break;
962 }
963 if (!tc.isThing)
964 {
965 int count = ((!blessed) ? 1 : (flag5 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
966 LayerDragGrid.CreateIdentify(CC, flag5, state, 0, count);
967 return;
968 }
969 cc.PlaySound("identify");
970 cc.PlayEffect("identify");
971 tc.Thing.Identify(cc.IsPCParty, (!flag5) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
972 break;
973 }
974 case EffectId.Uncurse:
975 {
976 if (!tc.isThing)
977 {
978 LayerDragGrid.CreateUncurse(CC, state);
979 return;
980 }
981 Thing thing2 = tc.Thing;
982 if (thing2.blessedState == BlessedState.Cursed)
983 {
984 thing2.SetBlessedState(BlessedState.Normal);
985 }
986 else if (thing2.blessedState == BlessedState.Doomed)
987 {
988 thing2.SetBlessedState(BlessedState.Normal);
989 }
990 thing2.GetRootCard()?.TryStack(thing2);
991 LayerInventory.SetDirty(thing2);
992 break;
993 }
994 case EffectId.Lighten:
995 {
996 if (!tc.isThing)
997 {
998 LayerDragGrid.CreateLighten(CC, state);
999 return;
1000 }
1001 if (tc.Num > 1)
1002 {
1003 tc = tc.Split(1);
1004 }
1005 cc.PlaySound("offering");
1006 cc.PlayEffect("buff");
1007 int num = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
1008 tc.isWeightChanged = true;
1009 Element orCreateElement = tc.elements.GetOrCreateElement(64);
1010 Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
1011 Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
1012 Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
1013 bool flag2 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
1014 if (flag)
1015 {
1016 num = (int)(0.01f * (float)num * (float)power * 0.75f + 500f);
1017 if (num < 0 || num > 10000000)
1018 {
1019 num = 10000000;
1020 flag2 = false;
1021 }
1022 if (flag2)
1023 {
1024 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1025 {
1026 tc.elements.ModBase(67, Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1027 tc.elements.ModBase(66, -Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1028 }
1029 else
1030 {
1031 tc.elements.ModBase(65, Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1032 tc.elements.ModBase(64, -Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1033 }
1034 }
1035 cc.Say("lighten_curse", cc, tc);
1036 }
1037 else
1038 {
1039 num = num * (100 - power / 10) / 100;
1040 if (blessed)
1041 {
1042 power /= 4;
1043 }
1044 if (flag2)
1045 {
1046 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1047 {
1048 tc.elements.ModBase(67, -Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1049 tc.elements.ModBase(66, Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1050 }
1051 else
1052 {
1053 tc.elements.ModBase(65, -Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1054 tc.elements.ModBase(64, Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1055 }
1056 }
1057 cc.Say("lighten", cc, tc);
1058 }
1059 tc.c_weight = num;
1060 tc.SetDirtyWeight();
1061 if (tc.parent == null)
1062 {
1063 CC.Pick(tc.Thing, msg: false);
1064 }
1066 break;
1067 }
1068 case EffectId.Reconstruction:
1069 {
1070 if (!tc.isThing)
1071 {
1073 return;
1074 }
1075 if (tc.Num > 1)
1076 {
1077 tc = tc.Split(1);
1078 }
1079 cc.PlaySound("mutation");
1080 cc.PlayEffect("identify");
1081 cc.Say("reconstruct", cc, tc);
1082 EClass.game.cards.uidNext += EClass.rnd(30);
1083 Thing thing3 = ThingGen.Create(tc.id, -1, tc.LV * power / 100);
1084 thing3.SetBlessedState(state);
1085 tc.Destroy();
1086 CC.Pick(thing3, msg: false);
1087 if (!CC.IsPC)
1088 {
1089 CC.TryEquip(thing3);
1090 }
1091 break;
1092 }
1093 case EffectId.ChangeMaterialLesser:
1094 case EffectId.ChangeMaterial:
1095 case EffectId.ChangeMaterialGreater:
1096 {
1097 SourceMaterial.Row row = EClass.sources.materials.alias.TryGetValue(actRef.n1);
1098 if (!tc.isThing)
1099 {
1100 LayerDragGrid.CreateChangeMaterial(CC, actRef.refThing, row, id, state);
1101 return;
1102 }
1103 if (tc.Num > 1)
1104 {
1105 tc = tc.Split(1);
1106 }
1107 string name = tc.Name;
1108 if (row == null)
1109 {
1110 bool num3 = id == EffectId.ChangeMaterialGreater;
1111 bool flag3 = id == EffectId.ChangeMaterialLesser;
1112 string text2 = tc.Thing.source.tierGroup;
1113 Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
1114 int num4 = 1;
1115 if (flag)
1116 {
1117 num4 -= 2;
1118 }
1119 if (blessed)
1120 {
1121 num4++;
1122 }
1123 if (num3)
1124 {
1125 num4++;
1126 }
1127 if (flag3)
1128 {
1129 num4 -= 2;
1130 }
1131 num4 = Mathf.Clamp(num4 + EClass.rnd(2), 0, 4);
1132 if (EClass.rnd(10) == 0)
1133 {
1134 text2 = ((text2 == "metal") ? "leather" : "metal");
1135 }
1136 SourceMaterial.TierList tierList = (text2.IsEmpty() ? tierMap.RandomItem() : tierMap[text2]);
1137 for (int j = 0; j < 1000; j++)
1138 {
1139 row = tierList.tiers[num4].Select();
1140 if (row != tc.material)
1141 {
1142 break;
1143 }
1144 }
1145 }
1146 cc.PlaySound("offering");
1147 cc.PlayEffect("buff");
1148 if ((tc.id == "log" || tc.id == "branch") && tc.material.alias == "carbone")
1149 {
1150 foreach (Element item2 in tc.elements.dict.Values.ToList())
1151 {
1152 if (item2.IsTrait && item2.vBase != 0)
1153 {
1154 tc.elements.ModBase(item2.id, -item2.vBase);
1155 }
1156 }
1157 }
1158 tc.ChangeMaterial(row);
1159 if (tc.trait is TraitGene && tc.c_DNA != null)
1160 {
1161 DNA.Type type = DNA.GetType(tc.material.alias);
1162 tc.c_DNA.Generate(type);
1163 }
1164 cc.Say("materialChanged", name, row.GetName());
1165 if (CC != null)
1166 {
1167 if (tc.parent == null)
1168 {
1169 CC.Pick(tc.Thing, msg: false);
1170 }
1172 }
1173 break;
1174 }
1175 case EffectId.Return:
1176 case EffectId.Evac:
1177 if (!cc.IsPC)
1178 {
1179 Redirect(EffectId.Teleport, state, default(ActRef));
1180 return;
1181 }
1182 cc.PlaySound("return_cast");
1183 if (EClass.player.returnInfo == null)
1184 {
1185 if (id == EffectId.Evac)
1186 {
1187 EClass.player.returnInfo = new Player.ReturnInfo
1188 {
1189 turns = EClass.rnd(10) + 10,
1190 isEvac = true
1191 };
1192 }
1193 else
1194 {
1195 if (EClass.game.spatials.ListReturnLocations().Count == 0)
1196 {
1197 Msg.Say("returnNowhere");
1198 break;
1199 }
1200 EClass.player.returnInfo = new Player.ReturnInfo
1201 {
1202 turns = EClass.rnd(10) + 10,
1203 askDest = true
1204 };
1205 }
1206 Msg.Say("returnBegin");
1207 }
1208 else
1209 {
1210 EClass.player.returnInfo = null;
1211 Msg.Say("returnAbort");
1212 }
1213 break;
1214 case EffectId.Teleport:
1215 case EffectId.TeleportShort:
1216 case EffectId.Gate:
1217 if (!tc.HasHost)
1218 {
1219 if (!flag)
1220 {
1221 if (id == EffectId.TeleportShort)
1222 {
1223 tc.Teleport(GetTeleportPos(tc.pos));
1224 }
1225 else
1226 {
1227 tc.Teleport(GetTeleportPos(tc.pos, EClass._map.bounds.Width));
1228 }
1229 }
1230 if (id == EffectId.Gate && CC.IsPC)
1231 {
1232 foreach (Chara chara2 in EClass._map.charas)
1233 {
1234 if (!chara2.HasHost && chara2 != tc && (chara2.IsPCParty || chara2.IsPCPartyMinion))
1235 {
1236 chara2.Teleport(tc.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? tc.pos);
1237 }
1238 }
1239 }
1240 }
1241 if (flag)
1242 {
1243 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
1244 }
1245 if (blessed)
1246 {
1247 Redirect(EffectId.Levitate, BlessedState.Normal, default(ActRef));
1248 }
1249 break;
1250 }
1251 if (TC == null)
1252 {
1253 return;
1254 }
1255 switch (id)
1256 {
1257 case EffectId.ThrowPotion:
1258 if (!CC.pos.Equals(TC.pos))
1259 {
1260 Thing t3 = ThingGen.Create(new string[6] { "330", "331", "334", "335", "336", "1142" }.RandomItem());
1261 ActThrow.Throw(CC, TC.pos, t3, ThrowMethod.Punish, 0.7f);
1262 }
1263 break;
1264 case EffectId.ShutterHex:
1265 {
1266 if (!CC.IsHostile(TC))
1267 {
1268 break;
1269 }
1270 int hex2 = 0;
1271 foreach (Condition condition4 in TC.conditions)
1272 {
1273 if (condition4.Type == ConditionType.Debuff)
1274 {
1275 hex2++;
1276 }
1277 }
1278 if (hex2 == 0)
1279 {
1280 CC.SayNothingHappans();
1281 break;
1282 }
1283 TC.pos.PlayEffect("holyveil");
1284 TC.pos.PlaySound("holyveil");
1285 TC.pos.PlaySound("atk_eleSound");
1286 TC.conditions.ForeachReverse(delegate(Condition c)
1287 {
1288 if (c.Type == ConditionType.Debuff)
1289 {
1290 c.Kill();
1291 }
1292 });
1293 TC.Say("abShutterHex", TC);
1294 TC.pos.ForeachNeighbor(delegate(Point p)
1295 {
1296 foreach (Chara item3 in p.ListCharas())
1297 {
1298 if (!item3.IsHostile(CC))
1299 {
1300 break;
1301 }
1302 int dmg2 = Dice.Create("SpShutterHex", power * hex2, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
1303 item3.DamageHP(dmg2, 919, power, AttackSource.None, CC);
1304 }
1305 });
1306 break;
1307 }
1308 case EffectId.Draw:
1309 {
1310 Point point = CC.pos.GetRandomPoint(1)?.GetNearestPoint(allowBlock: false, allowChara: false);
1311 if (point == null || !CC.CanSeeLos(point) || (CC.IsPCFactionOrMinion && TC.IsPCFactionOrMinion && TC.isRestrained))
1312 {
1313 break;
1314 }
1315 CC.Say("abDraw", CC, TC);
1316 if (TC.HasCondition<ConGravity>())
1317 {
1318 CC.SayNothingHappans();
1319 break;
1320 }
1321 TC.MoveImmediate(point, !EClass.core.config.camera.smoothFollow);
1322 if (CC.id == "tentacle")
1323 {
1324 TC.AddCondition<ConEntangle>();
1325 }
1326 break;
1327 }
1328 case EffectId.Steal:
1329 {
1331 {
1332 break;
1333 }
1334 if (TC.Evalue(426) > 0)
1335 {
1336 TC.Say((actRef.n1 == "money") ? "abStealNegateMoney" : "abStealNegate", TC);
1337 break;
1338 }
1339 Thing thing6 = null;
1340 bool flag9 = actRef.n1 == "food";
1341 if (actRef.n1 == "money")
1342 {
1343 int currency = TC.GetCurrency();
1344 if (currency > 0)
1345 {
1346 currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(CC.LV * 200));
1347 thing6 = ThingGen.Create("money").SetNum(currency);
1348 TC.ModCurrency(-currency);
1349 }
1350 }
1351 else
1352 {
1353 Func<Thing, bool> func = (Thing t) => true;
1354 if (flag9)
1355 {
1356 func = (Thing t) => t.IsFood;
1357 }
1358 List<Thing> list7 = TC.things.List(delegate(Thing t)
1359 {
1361 {
1362 return false;
1363 }
1364 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);
1365 }, onlyAccessible: true);
1366 if (list7.Count > 0)
1367 {
1368 thing6 = list7.RandomItem();
1369 if (thing6.Num > 1)
1370 {
1371 thing6 = thing6.Split(1);
1372 }
1373 }
1374 CC.AddCooldown(6640, 200);
1375 }
1376 if (thing6 == null)
1377 {
1378 CC.Say("abStealNothing", CC, TC);
1379 break;
1380 }
1381 thing6.SetInt(116, 1);
1382 TC.PlaySound(thing6.material.GetSoundDrop(thing6.sourceCard));
1383 CC.Pick(thing6, msg: false);
1384 CC.Say("abSteal", CC, TC, thing6.Name);
1385 if (actRef.n1 == "food")
1386 {
1387 if (CC.hunger.value != 0)
1388 {
1389 CC.InstantEat(thing6);
1390 }
1391 }
1392 else
1393 {
1394 CC.Say("abStealEscape", CC);
1395 CC.Teleport(GetTeleportPos(tc.pos, 30), silent: true);
1396 }
1397 break;
1398 }
1399 case EffectId.NeckHunt:
1400 CC.TryNeckHunt(TC, power);
1401 break;
1402 case EffectId.CurseEQ:
1403 {
1404 if (CC != null && CC != TC)
1405 {
1406 TC.Say("curse", CC, TC);
1407 }
1408 TC.PlaySound("curse3");
1409 TC.PlayEffect("curse");
1410 if (EClass.rnd(150 + TC.LUC * 5 + TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) || TC.TryNullifyCurse())
1411 {
1412 break;
1413 }
1414 List<Thing> list5 = TC.things.List(delegate(Thing t)
1415 {
1416 if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
1417 {
1418 return false;
1419 }
1420 return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
1421 });
1422 if (list5.Count == 0)
1423 {
1424 CC.SayNothingHappans();
1425 break;
1426 }
1427 Thing thing5 = list5.RandomItem();
1428 TC.Say("curse_hit", TC, thing5);
1429 thing5.SetBlessedState((thing5.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
1430 LayerInventory.SetDirty(thing5);
1431 break;
1432 }
1433 case EffectId.UncurseEQ:
1434 case EffectId.UncurseEQGreater:
1435 {
1436 TC.Say("uncurseEQ" + (blessed ? "_bless" : (flag ? "_curse" : "")), TC);
1437 TC.PlaySound("uncurse");
1438 TC.PlayEffect("uncurse");
1439 if (flag)
1440 {
1441 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
1442 break;
1443 }
1444 int success = 0;
1445 int fail = 0;
1446 List<Thing> list = new List<Thing>();
1447 TC.things.Foreach(delegate(Thing t)
1448 {
1449 int num10 = 0;
1450 if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
1451 {
1452 if (t.blessedState == BlessedState.Cursed)
1453 {
1454 num10 = EClass.rnd(200);
1455 }
1456 if (t.blessedState == BlessedState.Doomed)
1457 {
1458 num10 = EClass.rnd(1000);
1459 }
1460 if (blessed)
1461 {
1462 num10 /= 2;
1463 }
1464 if (id == EffectId.UncurseEQGreater)
1465 {
1466 num10 /= 10;
1467 }
1468 if (power >= num10)
1469 {
1470 TC.Say("uncurseEQ_success", t);
1471 t.SetBlessedState(BlessedState.Normal);
1472 if (t.isEquipped && t.HasElement(656))
1473 {
1474 TC.body.Unequip(t);
1475 }
1477 success++;
1478 list.Add(t);
1479 }
1480 else
1481 {
1482 fail++;
1483 }
1484 }
1485 });
1486 foreach (Thing item4 in list)
1487 {
1488 item4.GetRootCard()?.TryStack(item4);
1489 }
1490 if (success == 0 && fail == 0)
1491 {
1492 TC.SayNothingHappans();
1493 }
1494 else if (fail > 0)
1495 {
1496 TC.Say("uncurseEQ_fail");
1497 }
1498 break;
1499 }
1500 case EffectId.Buff:
1501 {
1502 string text3 = actRef.n1;
1503 string text4 = "";
1504 if (flag)
1505 {
1506 text4 = EClass.sources.stats.alias[text3].curse;
1507 if (!text4.IsEmpty())
1508 {
1509 text3 = text4;
1510 }
1511 }
1512 Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
1513 {
1514 if (!actRef.aliasEle.IsEmpty())
1515 {
1516 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1517 }
1518 });
1519 condition2.isPerfume = TC.IsPC && actRef.isPerfume;
1520 Condition condition3 = TC.AddCondition(condition2);
1521 if (condition3 != null && condition3.isPerfume)
1522 {
1523 condition3.value = 3;
1524 Msg.Say("perfume", TC);
1525 }
1526 if (!text4.IsEmpty())
1527 {
1528 CC.DoHostileAction(TC);
1529 }
1530 break;
1531 }
1532 case EffectId.KizuamiTrick:
1533 {
1534 EClass.game.religions.Trickery.Talk("ability");
1535 bool hex = CC.IsHostile(TC);
1536 List<SourceStat.Row> list4 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
1537 int power2 = power;
1538 for (int k = 0; k < 4 + EClass.rnd(2); k++)
1539 {
1540 SourceStat.Row row2 = list4.RandomItem();
1541 list4.Remove(row2);
1542 Proc(hex ? EffectId.Debuff : EffectId.Buff, CC, TC, power2, new ActRef
1543 {
1544 n1 = row2.alias
1545 });
1546 }
1547 if (EClass.core.config.game.waitOnDebuff && !CC.IsPC)
1548 {
1549 EClass.Wait(0.3f, TC);
1550 }
1551 break;
1552 }
1553 case EffectId.Debuff:
1554 {
1555 CC.DoHostileAction(TC);
1556 bool isPowerful = TC.IsPowerful;
1557 string n = actRef.n1;
1558 if (n == "ConSuffocation")
1559 {
1560 power = power * 2 / 3;
1561 }
1562 int a2 = power;
1563 int num6 = TC.WIL * (isPowerful ? 20 : 5);
1564 ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
1565 if (condition != null)
1566 {
1567 num6 += condition.power * 5;
1568 }
1569 if (EClass.rnd(a2) < num6 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
1570 {
1571 TC.Say("debuff_resist", TC);
1572 CC.DoHostileAction(TC);
1573 break;
1574 }
1575 TC.AddCondition(Condition.Create(n, power, delegate(Condition con)
1576 {
1577 con.givenByPcParty = CC.IsPCParty;
1578 if (!actRef.aliasEle.IsEmpty())
1579 {
1580 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1581 }
1582 }));
1583 if (n == "ConBane" && CC.HasElement(1416))
1584 {
1585 TC.AddCondition<ConExcommunication>(power);
1586 }
1587 CC.DoHostileAction(TC);
1588 if (EClass.core.config.game.waitOnDebuff && !CC.IsPC)
1589 {
1590 EClass.Wait(0.3f, TC);
1591 }
1592 break;
1593 }
1594 case EffectId.Mutation:
1595 TC.MutateRandom(1, 100, ether: false, state);
1597 {
1598 EClass.Wait(0.3f, TC);
1599 }
1600 break;
1601 case EffectId.CureMutation:
1602 TC.MutateRandom(-1, 100, ether: false, state);
1603 break;
1604 case EffectId.Ally:
1605 {
1606 Msg.Say("gainAlly");
1607 Chara chara = CharaGen.CreateFromFilter("chara", cc.LV);
1608 EClass._zone.AddCard(chara, cc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
1609 if (cc.IsPCFactionOrMinion)
1610 {
1611 chara.MakeAlly(msg: false);
1612 }
1613 chara.PlaySound("identify");
1614 chara.PlayEffect("teleport");
1615 break;
1616 }
1617 case EffectId.Wish:
1618 if (!TC.IsPC)
1619 {
1620 break;
1621 }
1622 if (blessed || flag)
1623 {
1624 power /= 2;
1625 }
1626 Dialog.InputName("dialogWish", "q", delegate(bool cancel, string text)
1627 {
1628 if (!cancel)
1629 {
1630 Msg.Say("wish", TC, text);
1631 Wish(text, EClass.pc.NameTitled, power, state);
1632 }
1633 });
1634 break;
1635 case EffectId.Faith:
1636 {
1638 if (faith.IsEyth)
1639 {
1640 tc.SayNothingHappans();
1641 break;
1642 }
1643 tc.PlayEffect("aura_heaven");
1644 tc.PlaySound("aura_heaven");
1645 tc.Say("faith", tc, faith.Name);
1646 if (flag)
1647 {
1648 tc.Say("faith_curse", tc, faith.Name);
1649 break;
1650 }
1651 if (blessed)
1652 {
1653 tc.Say("faith_bless", tc, faith.Name);
1654 }
1655 tc.ModExp(306, power * 10);
1656 tc.ModExp(85, power * 10);
1657 if (tc.elements.Base(85) >= tc.elements.Value(306))
1658 {
1659 tc.elements.SetBase(85, tc.elements.Value(306));
1660 }
1661 break;
1662 }
1663 case EffectId.TransGender:
1664 {
1665 tc.PlaySound("mutation");
1666 tc.PlayEffect("mutation");
1667 int gender = tc.bio.gender;
1668 int gender2 = gender switch
1669 {
1670 1 => 2,
1671 2 => 1,
1672 _ => (EClass.rnd(2) != 0) ? 1 : 2,
1673 };
1674 if (gender != 0 && EClass.rnd(10) == 0)
1675 {
1676 gender2 = 0;
1677 }
1678 tc.bio.SetGender(gender2);
1679 tc.Say("transGender", tc, Gender.Name(tc.bio.gender));
1680 tc.Talk("tail");
1681 if (blessed && tc.bio.age > 1)
1682 {
1683 tc.Say("ageDown", tc);
1684 tc.bio.age--;
1685 }
1686 else if (flag)
1687 {
1688 tc.Say("ageUp", tc);
1689 tc.bio.age++;
1690 }
1691 break;
1692 }
1693 case EffectId.BuffStats:
1694 case EffectId.DebuffStats:
1695 case EffectId.LulwyTrick:
1696 Debug.Log(power + "/" + id.ToString() + "/" + actRef.n1);
1697 if (id == EffectId.LulwyTrick)
1698 {
1699 EClass.game.religions.Wind.Talk("ability");
1700 }
1701 if (power < 0 || id == EffectId.DebuffStats)
1702 {
1703 power = Mathf.Abs(power);
1704 if (blessed)
1705 {
1706 power /= 4;
1707 }
1708 flag = true;
1709 }
1710 TC.AddCondition(Condition.Create(power, delegate(ConBuffStats con)
1711 {
1712 con.SetRefVal(Element.GetId(actRef.n1), (int)id);
1713 }));
1714 break;
1715 case EffectId.Revive:
1716 {
1717 List<KeyValuePair<int, Chara>> list6 = 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();
1718 if (TC.IsPCFaction || TC.IsPCFactionMinion)
1719 {
1720 if (TC.IsPC && list6.Count == 0)
1721 {
1722 list6 = 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();
1723 }
1724 if (list6.Count > 0)
1725 {
1726 list6.RandomItem().Value.Chara.GetRevived();
1727 break;
1728 }
1729 }
1730 TC.SayNothingHappans();
1731 break;
1732 }
1733 case EffectId.DamageBody:
1734 case EffectId.DamageMind:
1735 case EffectId.DamageBodyGreat:
1736 case EffectId.DamageMindGreat:
1737 case EffectId.Weaken:
1738 {
1739 bool flag7 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
1740 bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
1741 int num7 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
1742 if (id == EffectId.Weaken)
1743 {
1744 flag7 = EClass.rnd(2) == 0;
1745 mind = !flag7;
1746 num7 = 1;
1747 }
1748 else
1749 {
1750 TC.PlayEffect("debuff");
1751 TC.PlaySound("debuff");
1752 }
1753 TC.Say(flag7 ? "damageBody" : "damageMind", TC);
1754 for (int l = 0; l < num7; l++)
1755 {
1756 TC.DamageTempElements(power, flag7, mind);
1757 }
1758 if (TC.IsPC)
1759 {
1760 Tutorial.Play("healer");
1761 }
1762 break;
1763 }
1764 case EffectId.EnhanceBody:
1765 case EffectId.EnhanceMind:
1766 case EffectId.EnhanceBodyGreat:
1767 case EffectId.EnhanceMindGreat:
1768 {
1769 bool flag8 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
1770 bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
1771 int num8 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4)));
1772 TC.Say(flag8 ? "enhanceBody" : "enhanceMind", TC);
1773 TC.PlayEffect("buff");
1774 TC.PlaySound("buff");
1775 for (int m = 0; m < num8; m++)
1776 {
1777 TC.EnhanceTempElements(power, flag8, mind2);
1778 }
1779 break;
1780 }
1781 case EffectId.RestoreBody:
1782 case EffectId.RestoreMind:
1783 {
1784 bool flag6 = id == EffectId.RestoreBody;
1785 if (flag)
1786 {
1787 Redirect(flag6 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
1788 break;
1789 }
1790 TC.Say(flag6 ? "restoreBody" : "restoreMind", TC);
1791 TC.PlaySound("heal");
1792 TC.PlayEffect("heal");
1793 TC.CureHost(flag6 ? CureType.CureBody : CureType.CureMind, power, state);
1794 if (blessed)
1795 {
1796 Redirect(flag6 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
1797 }
1798 break;
1799 }
1800 case EffectId.HealComplete:
1801 Dice.Create("SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act);
1802 TC.HealHPHost(9999, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
1803 TC.CureHost(CureType.HealComplete, power, state);
1804 TC.Say("heal_heavy", TC);
1805 break;
1806 case EffectId.Heal:
1807 case EffectId.JureHeal:
1808 {
1809 if (id == EffectId.JureHeal)
1810 {
1811 EClass.game.religions.Healing.Talk("ability");
1812 }
1813 if (actRef.act != null)
1814 {
1815 Debug.Log(actRef.act.id);
1816 }
1817 int num9 = 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();
1818 if (flag)
1819 {
1820 TC.DamageHP(num9 / 2, 919, power);
1821 break;
1822 }
1823 TC.HealHPHost(num9, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
1824 TC.CureHost(CureType.Heal, power, state);
1825 TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
1826 break;
1827 }
1828 case EffectId.RemedyJure:
1829 TC.HealHP(1000000, HealSource.Magic);
1830 TC.CureHost(CureType.Jure, power, state);
1831 TC.Say("heal_jure", TC);
1832 break;
1833 case EffectId.Headpat:
1834 CC.Cuddle(TC, headpat: true);
1835 break;
1836 case EffectId.RemoveHex:
1837 case EffectId.RemoveHexAll:
1838 if (flag)
1839 {
1840 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
1841 break;
1842 }
1843 foreach (Condition item5 in TC.conditions.Copy())
1844 {
1845 if (item5.Type == ConditionType.Debuff && !item5.IsKilled && EClass.rnd(power * 2) > EClass.rnd(item5.power))
1846 {
1847 CC.Say("removeHex", TC, item5.Name.ToLower());
1848 item5.Kill();
1849 if (id == EffectId.RemoveHex)
1850 {
1851 break;
1852 }
1853 }
1854 }
1855 TC.AddCondition<ConHolyVeil>(power / 2);
1856 break;
1857 case EffectId.CureCorruption:
1858 TC.PlaySound("heal");
1859 TC.PlayEffect("heal");
1860 if (flag)
1861 {
1862 TC.Say("cureCorruption_curse", TC);
1863 TC.mana.Mod(9999);
1864 TC.ModCorruption(power);
1865 }
1866 else
1867 {
1868 TC.Say("cureCorruption", TC);
1869 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
1870 }
1871 break;
1872 case EffectId.Drink:
1873 case EffectId.DrinkRamune:
1874 case EffectId.DrinkMilk:
1875 if (id == EffectId.DrinkRamune)
1876 {
1877 TC.Say("drinkRamune", TC);
1878 }
1879 if (TC.IsPC)
1880 {
1881 TC.Say("drinkGood", TC);
1882 }
1883 if (id == EffectId.DrinkMilk)
1884 {
1885 if (TC.IsPC)
1886 {
1887 TC.Say("drinkMilk", TC);
1888 }
1889 if (blessed)
1890 {
1891 TC.ModHeight(EClass.rnd(5) + 3);
1892 }
1893 else if (flag)
1894 {
1895 TC.ModHeight((EClass.rnd(5) + 3) * -1);
1896 }
1897 }
1898 break;
1899 case EffectId.DrinkWater:
1900 if (flag)
1901 {
1902 if (TC.IsPC)
1903 {
1904 TC.Say("drinkWater_dirty", TC);
1905 }
1907 }
1908 else if (TC.IsPC)
1909 {
1910 TC.Say("drinkWater_clear", TC);
1911 }
1912 break;
1913 case EffectId.DrinkWaterDirty:
1914 if (TC.IsPC)
1915 {
1916 TC.Say("drinkWater_dirty", TC);
1917 }
1918 if (TC.IsPCFaction)
1919 {
1920 TC.Vomit();
1921 }
1922 break;
1923 case EffectId.SaltWater:
1924 if (TC.HasElement(1211))
1925 {
1926 TC.Say("drinkSaltWater_snail", TC);
1927 int dmg = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
1928 TC.DamageHP(dmg, AttackSource.None, CC);
1929 }
1930 else if (TC.IsPC)
1931 {
1932 TC.Say("drinkSaltWater", TC);
1933 }
1934 break;
1935 case EffectId.Booze:
1936 TC.AddCondition<ConDrunk>(power);
1937 if (TC.HasElement(1215))
1938 {
1939 TC.Say("drunk_dwarf", TC);
1940 TC.AddCondition(Condition.Create(power + EClass.rnd(power), delegate(ConBuffStats con)
1941 {
1942 con.SetRefVal(Element.List_MainAttributes.RandomItem(), (int)id);
1943 }));
1944 }
1945 break;
1946 case EffectId.CatsEye:
1947 if (flag)
1948 {
1949 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
1950 }
1951 else
1952 {
1953 TC.AddCondition<ConNightVision>(power);
1954 }
1955 break;
1956 case EffectId.Hero:
1957 if (flag)
1958 {
1959 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
1960 }
1961 else
1962 {
1963 TC.AddCondition<ConHero>(power);
1964 }
1965 break;
1966 case EffectId.HolyVeil:
1967 if (flag)
1968 {
1969 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
1970 }
1971 else
1972 {
1973 TC.AddCondition<ConHolyVeil>(power);
1974 }
1975 break;
1976 case EffectId.Levitate:
1977 if (flag)
1978 {
1979 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
1980 }
1981 else
1982 {
1983 TC.AddCondition<ConLevitate>(power);
1984 }
1985 break;
1986 case EffectId.Gravity:
1987 if (blessed)
1988 {
1989 power /= 4;
1990 }
1991 TC.AddCondition<ConGravity>(power);
1992 if (flag)
1993 {
1994 Redirect(EffectId.BuffStats, BlessedState.Cursed, new ActRef
1995 {
1996 aliasEle = "STR"
1997 });
1998 }
1999 break;
2000 case EffectId.Fear:
2001 if (blessed)
2002 {
2003 power /= 4;
2004 }
2005 TC.AddCondition<ConFear>(power);
2006 if (flag)
2007 {
2008 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2009 }
2010 break;
2011 case EffectId.Faint:
2012 if (blessed)
2013 {
2014 power /= 4;
2015 }
2016 TC.AddCondition<ConFaint>(power);
2017 if (flag)
2018 {
2019 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2020 }
2021 break;
2022 case EffectId.Paralyze:
2023 if (blessed)
2024 {
2025 power /= 4;
2026 }
2027 TC.AddCondition<ConParalyze>(power);
2028 if (flag)
2029 {
2030 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2031 }
2032 break;
2033 case EffectId.Poison:
2034 if (blessed)
2035 {
2036 power /= 4;
2037 }
2038 TC.AddCondition<ConPoison>(power);
2039 if (flag)
2040 {
2041 Redirect(EffectId.Paralyze, BlessedState.Normal, default(ActRef));
2042 }
2043 break;
2044 case EffectId.Sleep:
2045 if (blessed)
2046 {
2047 power /= 4;
2048 }
2049 TC.AddCondition<ConSleep>(power);
2050 if (flag)
2051 {
2052 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2053 }
2054 break;
2055 case EffectId.Confuse:
2056 if (blessed)
2057 {
2058 power /= 4;
2059 }
2060 TC.AddCondition<ConConfuse>(power);
2061 if (flag)
2062 {
2063 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2064 }
2065 break;
2066 case EffectId.Blind:
2067 if (blessed)
2068 {
2069 power /= 4;
2070 }
2071 TC.AddCondition<ConBlind>(power);
2072 if (flag)
2073 {
2074 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2075 }
2076 break;
2077 case EffectId.Disease:
2078 if (blessed)
2079 {
2080 power /= 4;
2081 }
2082 TC.AddCondition<ConDisease>(power);
2083 if (flag)
2084 {
2085 Redirect(EffectId.Poison, BlessedState.Normal, default(ActRef));
2086 }
2087 break;
2088 case EffectId.Acid:
2089 {
2090 if (blessed)
2091 {
2092 power /= 4;
2093 }
2094 List<Thing> list3 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
2095 if (list3.Count != 0)
2096 {
2097 Thing thing4 = list3.RandomItem();
2098 TC.Say("acid_hit", TC);
2099 if (thing4.isAcidproof)
2100 {
2101 TC.Say("acid_nullify", thing4);
2102 }
2103 else if (thing4.encLV > -5)
2104 {
2105 TC.Say("acid_rust", TC, thing4);
2106 thing4.ModEncLv(-1);
2107 LayerInventory.SetDirty(thing4);
2108 }
2109 if (TC.IsPCParty)
2110 {
2111 Tutorial.Reserve("rust");
2112 }
2113 }
2114 break;
2115 }
2116 case EffectId.PuddleEffect:
2117 TC.DamageHP(power / 5, actRef.idEle, power);
2118 break;
2119 case EffectId.Acidproof:
2120 if (blessed)
2121 {
2122 power /= 4;
2123 }
2124 if (TC.IsPC)
2125 {
2126 TC.Say("pc_pain");
2127 }
2128 TC.Say("drink_acid", TC);
2129 TC.DamageHP(power / 5, 923, power);
2130 break;
2131 case EffectId.LevelDown:
2132 Msg.Say("nothingHappens");
2133 break;
2134 case EffectId.Love:
2135 if (flag)
2136 {
2137 if (CC == TC)
2138 {
2139 TC.Say("love_curse_self", TC);
2140 }
2141 else
2142 {
2143 TC.Say("love_curse", CC, TC);
2144 TC.ModAffinity(CC, -power / 4, show: false);
2145 }
2146 TC.ShowEmo(Emo.angry);
2147 }
2148 else
2149 {
2150 LoveMiracle(TC, CC, power);
2151 }
2152 break;
2153 }
2154 void Redirect(EffectId _id, BlessedState _state, ActRef _ref1)
2155 {
2156 Proc(_id, orgPower, _state, cc, tc, _ref1);
2157 }
2158 }
2159
2160 public static void Poison(Chara tc, Chara c, int power)
2161 {
2162 tc.Say("eat_poison", tc);
2163 tc.Talk("scream");
2164 int num = (int)Mathf.Sqrt(power * 100);
2165 tc.DamageHP(num * 2 + EClass.rnd(num), 915, power);
2166 if (!tc.isDead && !tc.IsPC)
2167 {
2169 }
2170 }
2171
2172 public static void LoveMiracle(Chara tc, Chara c, int power)
2173 {
2174 if (c == tc)
2175 {
2176 tc.Say("love_ground", tc);
2177 }
2178 else
2179 {
2180 tc.Say("love_chara", c, tc);
2181 }
2182 tc.ModAffinity(EClass.pc, power / 4);
2184 {
2185 if (EClass.rnd(2) == 0)
2186 {
2187 tc.MakeMilk();
2188 }
2189 else
2190 {
2191 tc.MakeEgg();
2192 }
2193 }
2194 }
2195
2196 public static Point GetTeleportPos(Point org, int radius = 6)
2197 {
2198 Point point = new Point();
2199 for (int i = 0; i < 10000; i++)
2200 {
2201 point.Set(org);
2202 point.x += EClass.rnd(radius) - EClass.rnd(radius);
2203 point.z += EClass.rnd(radius) - EClass.rnd(radius);
2204 if (point.IsValid && point.IsInBounds && !point.cell.blocked && point.Distance(org) >= radius / 3 + 1 - i / 50 && !point.cell.HasZoneStairs())
2205 {
2206 return point;
2207 }
2208 }
2209 return org.GetRandomNeighbor().GetNearestPoint();
2210 }
2211
2212 public static bool Wish(string s, string name, int power, BlessedState state)
2213 {
2215 string netMsg = GameLang.Parse("wish".langGame(), thirdPerson: true, name, s);
2216 bool net = EClass.core.config.net.enable && EClass.core.config.net.sendEvent;
2217 List<WishItem> list = new List<WishItem>();
2218 int wishLv = 10 + power / 4;
2219 int wishValue = power * 200;
2220 if (state >= BlessedState.Blessed)
2221 {
2222 wishLv = wishLv * 150 / 100;
2223 }
2224 else if (state <= BlessedState.Cursed)
2225 {
2226 wishLv = wishLv * 150 / 100;
2227 wishValue = 1;
2228 }
2229 Debug.Log(power + "/" + wishValue);
2230 string _s = s.ToLower();
2231 foreach (CardRow r in EClass.sources.cards.rows)
2232 {
2233 if (r.HasTag(CTAG.godArtifact))
2234 {
2235 bool flag = false;
2236 foreach (Religion item in EClass.game.religions.list)
2237 {
2238 if (item.IsValidArtifact(r.id))
2239 {
2240 flag = true;
2241 }
2242 }
2243 if (!flag)
2244 {
2245 continue;
2246 }
2247 }
2248 else if (r.quality >= 4 || r.HasTag(CTAG.noWish))
2249 {
2250 switch (r.id)
2251 {
2252 case "medal":
2253 case "plat":
2254 case "money":
2255 case "money2":
2256 break;
2257 default:
2258 continue;
2259 }
2260 }
2261 if (r.isChara)
2262 {
2263 continue;
2264 }
2265 string text = r.GetName().ToLower();
2266 int score = Compare(_s, text);
2267 if (score == 0)
2268 {
2269 continue;
2270 }
2271 list.Add(new WishItem
2272 {
2273 score = score,
2274 n = text,
2275 action = delegate
2276 {
2277 Debug.Log(r.id);
2278 SourceCategory.Row category = EClass.sources.cards.map[r.id].Category;
2279 if (category.IsChildOf("weapon") || category.IsChildOf("armor") || category.IsChildOf("ranged"))
2280 {
2281 CardBlueprint.SetRarity(Rarity.Legendary);
2282 }
2283 Thing thing = ThingGen.Create(r.id, -1, wishLv);
2284 int num = 1;
2285 bool flag2 = thing.trait is TraitDeed || thing.rarity >= Rarity.Artifact || thing.source._origin == "artifact_summon";
2286 switch (thing.id)
2287 {
2288 case "rod_wish":
2289 thing.c_charges = 0;
2290 break;
2291 case "money":
2292 num = EClass.rndHalf(wishValue);
2293 break;
2294 case "plat":
2295 num = EClass.rndHalf(wishValue / 2000 + 4);
2296 break;
2297 case "money2":
2298 num = EClass.rndHalf(wishValue / 1000 + 4);
2299 break;
2300 case "medal":
2301 num = EClass.rndHalf(wishValue / 3000 + 4);
2302 break;
2303 default:
2304 if (!flag2 && thing.trait.CanStack)
2305 {
2306 int num2 = wishValue;
2307 int price = thing.GetPrice();
2308 for (int i = 0; i < 1000; i++)
2309 {
2310 int num3 = price + 500 + i * Mathf.Max(price, 200);
2311 if (num2 > num3)
2312 {
2313 num++;
2314 num2 -= num3;
2315 }
2316 }
2317 }
2318 break;
2319 }
2320 if (num < 1)
2321 {
2322 num = 1;
2323 }
2324 thing.SetNum(num);
2325 Debug.Log(_s + "/" + num + "/" + score);
2326 if (thing.HasTag(CTAG.godArtifact))
2327 {
2328 Religion.Reforge(thing.id);
2329 }
2330 else
2331 {
2332 EClass._zone.AddCard(thing, EClass.pc.pos);
2333 }
2334 netMsg = netMsg + Lang.space + GameLang.Parse("wishNet".langGame(), Msg.IsThirdPerson(thing), Msg.GetName(thing).ToTitleCase());
2335 if (net)
2336 {
2337 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2338 }
2339 Msg.Say("dropReward");
2340 }
2341 });
2342 }
2343 if (list.Count == 0)
2344 {
2345 netMsg = netMsg + Lang.space + "wishFail".langGame();
2346 if (net)
2347 {
2348 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2349 }
2350 Msg.Say("wishFail");
2351 return false;
2352 }
2353 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2354 foreach (WishItem item2 in list)
2355 {
2356 Debug.Log(item2.score + "/" + s + "/" + item2.n);
2357 }
2358 list[0].action();
2359 return true;
2360 }
2361
2362 public static int Compare(string s, string t)
2363 {
2364 if (s.IsEmpty())
2365 {
2366 return 0;
2367 }
2368 int num = 0;
2369 if (t == s)
2370 {
2371 num += 100;
2372 }
2373 if (t.Contains(s))
2374 {
2375 num += 100;
2376 }
2377 return num;
2378 }
2379}
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
EffectId
Definition: EffectId.cs:2
Emo
Definition: Emo.cs:2
HealSource
Definition: HealSource.cs:2
IDTSource
Definition: IDTSource.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:2160
static void Proc(EffectId id, int power, BlessedState state, Card cc, Card tc=null, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:793
static Point GetTeleportPos(Point org, int radius=6)
Definition: ActEffect.cs:2196
static int angle
Definition: ActEffect.cs:21
static int Compare(string s, string t)
Definition: ActEffect.cs:2362
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:788
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:2212
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:392
static void LoveMiracle(Chara tc, Chara c, int power)
Definition: ActEffect.cs:2172
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:93
virtual int ElementPowerMod
Definition: ACT.cs:109
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:450
int gender
Definition: Biography.cs:29
static void Set(CardBlueprint _bp)
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
bool IsPCFactionOrMinion
Definition: Card.cs:2132
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:5153
virtual bool IsMultisize
Definition: Card.cs:2034
virtual bool isThing
Definition: Card.cs:1957
bool IsAmmo
Definition: Card.cs:2107
virtual Chara Chara
Definition: Card.cs:1946
Thing Split(int a)
Definition: Card.cs:3231
ElementContainerCard elements
Definition: Card.cs:37
string id
Definition: Card.cs:31
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:3735
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
bool IsThrownWeapon
Definition: Card.cs:2105
SourceMaterial.Row material
Definition: Card.cs:1927
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:2838
bool isCopy
Definition: Card.cs:850
virtual bool IsPCParty
Definition: Card.cs:2025
int c_uidMaster
Definition: Card.cs:1373
Biography bio
Definition: Card.cs:40
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:5949
Card SetLv(int a)
Definition: Card.cs:2735
string Name
Definition: Card.cs:2013
bool IsRangedWeapon
Definition: Card.cs:2103
ICardParent parent
Definition: Card.cs:51
bool ExistsOnMap
Definition: Card.cs:1961
Thing SetNum(int a)
Definition: Card.cs:3242
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3572
bool isAcidproof
Definition: Card.cs:658
bool IsToolbelt
Definition: Card.cs:2045
bool HasTag(CTAG tag)
Definition: Card.cs:2455
Point pos
Definition: Card.cs:55
bool IsInMutterDistance(int d=10)
Definition: Card.cs:6821
void SetDirtyWeight()
Definition: Card.cs:2414
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5438
bool IsEquipmentOrRanged
Definition: Card.cs:2078
void TryStack(Thing t)
Definition: Card.cs:6176
Trait trait
Definition: Card.cs:49
int encLV
Definition: Card.cs:310
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2003
void ModEncLv(int a)
Definition: Card.cs:3549
void SayNothingHappans()
Definition: Card.cs:6041
void Destroy()
Definition: Card.cs:4538
bool HaveFur()
Definition: Card.cs:6982
virtual bool IsPC
Definition: Card.cs:2019
virtual bool isChara
Definition: Card.cs:1959
virtual Thing Thing
Definition: Card.cs:1934
Card GetRootCard()
Definition: Card.cs:3173
int Evalue(int ele)
Definition: Card.cs:2431
int ResistLv(int res)
Definition: Card.cs:5209
bool IsLightsource
Definition: Card.cs:2047
virtual bool HasHost
Definition: Card.cs:2283
BlessedState blessedState
Definition: Card.cs:262
Card Install()
Definition: Card.cs:3448
Card parentCard
Definition: Card.cs:99
void ModExp(string alias, int a)
Definition: Card.cs:2508
DNA c_DNA
Definition: Card.cs:1781
int Num
Definition: Card.cs:154
bool IsWeapon
Definition: Card.cs:2066
int LV
Definition: Card.cs:370
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
SourceMaterial.Row matObj
Definition: Cell.cs:1036
bool HasZoneStairs(bool includeLocked=true)
Definition: Cell.cs:1713
void UnqeuipIfTooHeavy(Thing t)
Definition: CharaBody.cs:165
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:546
Element MainElement
Definition: Chara.cs:702
CharaBody body
Definition: Chara.cs:91
bool IsLevitating
Definition: Chara.cs:582
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:8747
void InstantEat(Thing t=null, bool sound=true)
Definition: Chara.cs:6840
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8415
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7166
override bool IsPC
Definition: Chara.cs:597
Chara host
Definition: Chara.cs:33
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1059
override bool IsPCParty
Definition: Chara.cs:600
int corruption
Definition: Chara.cs:362
bool HasCondition(string alias)
Definition: Chara.cs:8568
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None)
Definition: Chara.cs:4800
void SetMainElement(string id, int v=0, bool elemental=false)
Definition: Chara.cs:1804
Stats hunger
Definition: Chara.cs:951
override bool HasHost
Definition: Chara.cs:673
override bool IsPCFaction
Definition: Chara.cs:656
override bool IsPCPartyMinion
Definition: Chara.cs:624
int MaxSummon
Definition: Chara.cs:699
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2058
Chara Duplicate()
Definition: Chara.cs:1530
void MakeAlly(bool msg=true)
Definition: Chara.cs:2004
Stats mana
Definition: Chara.cs:963
void TryDropBossLoot()
Definition: Chara.cs:5082
string NameTitled
Definition: Chara.cs:501
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:7889
Religion faith
Definition: Chara.cs:424
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:5707
void RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:7623
bool TryEquip(Thing t, bool useFav=false)
Definition: Chara.cs:6961
void SetSummon(int duration)
Definition: Chara.cs:2087
bool IsHostile()
Definition: Chara.cs:5884
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true)
Definition: Chara.cs:7376
bool isDead
Definition: Chara.cs:374
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:3920
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true)
Definition: Chara.cs:7396
UD_String_Color elementColors
Definition: ConDim.cs:2
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:596
GraphicSetting graphic
Definition: CoreConfig.cs:594
CameraConfig camera
Definition: CoreConfig.cs:604
NetSetting net
Definition: CoreConfig.cs:598
bool enable
Definition: CoreDebug.cs:285
CoreConfig config
Definition: Core.cs:70
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
static Type GetType(string idMat)
Definition: DNA.cs:494
void Generate(Type _type, Chara model=null)
Definition: DNA.cs:254
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:4
static int RollMax(int num, int sides, int bonus=0)
Definition: Dice.cs:46
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:15
static Dice Create(Element ele, Card c)
Definition: Dice.cs:96
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static ColorProfile Colors
Definition: EClass.cs:38
static int rnd(int a)
Definition: EClass.cs:50
static Core core
Definition: EClass.cs:6
static void Wait(float a, Card c)
Definition: EClass.cs:89
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static SourceManager sources
Definition: EClass.cs:42
static int rndHalf(int a)
Definition: EClass.cs:74
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
static GameSetting setting
Definition: EClass.cs:34
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:261
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
Definition: EffectMeteor.cs:33
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
Effect SetStartDelay(float a)
Definition: Effect.cs:199
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
Effect SetParticleColor(Color c)
Definition: Effect.cs:289
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Dictionary< int, Element > dict
int Value(int ele)
Element ModTempPotential(int ele, int v, int threshMsg=0)
Element ModBase(int ele, int v)
Element SetBase(string alias, int v, int potential=0)
Element GetOrCreateElement(Element ele)
int id
Definition: ELEMENT.cs:240
int vBase
Definition: ELEMENT.cs:242
SourceElement.Row source
Definition: ELEMENT.cs:263
bool HasTag(string tag)
Definition: ELEMENT.cs:463
static int[] List_MainAttributes
Definition: ELEMENT.cs:230
static int GetId(string alias)
Definition: ELEMENT.cs:932
int Value
Definition: ELEMENT.cs:282
virtual string Name
Definition: ELEMENT.cs:294
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:913
static Element Void
Definition: ELEMENT.cs:228
bool IsTrait
Definition: ELEMENT.cs:352
bool HasItemProtection
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
Definition: GameLang.cs:123
bool disableUsermapBenefit
UD_String_ElementRef elements
Definition: GameSetting.cs:315
ReligionManager religions
Definition: Game.cs:158
GamePrincipal principal
Definition: Game.cs:221
SpatialManager spatials
Definition: Game.cs:152
CardManager cards
Definition: Game.cs:155
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 string space
Definition: Lang.cs:32
static LayerDragGrid CreateEnchant(Chara cc, bool armor, bool superior=false, BlessedState state=BlessedState.Normal, int count=1)
static LayerDragGrid CreateChangeMaterial(Chara cc, Thing consume, SourceMaterial.Row mat, EffectId idEffect, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateLighten(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateUncurse(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateReconstruction(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateIdentify(Chara cc, bool superior=false, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static void SetDirty(Thing t)
int Width
Definition: MapBounds.cs:26
Chara FindChara(string id)
Definition: Map.cs:2546
void TryShatter(Point pos, int ele, int power)
Definition: Map.cs:1194
List< Point > ListPointsInArc(Point center, Point to, int radius, float angle)
Definition: Map.cs:2287
void Reveal(Point center, int power=100)
Definition: Map.cs:912
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1827
void MineBlock(Point point, bool recoverBlock=false, Chara c=null, bool mineObj=true)
Definition: Map.cs:1655
List< Point > ListPointsInLine(Point center, Point to, int radius)
Definition: Map.cs:2304
void SetEffect(int x, int z, CellEffect effect=null)
Definition: Map.cs:1495
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2256
List< Chara > charas
Definition: Map.cs:81
void RevealAll(bool reveal=true)
Definition: Map.cs:899
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:306
void ModKarma(int a)
Definition: Player.cs:2289
ReturnInfo returnInfo
Definition: Player.cs:673
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:303
SourceMaterial.Row matBlock
Definition: Point.cs:55
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1015
Point Copy()
Definition: Point.cs:467
Point Set(int _x, int _z)
Definition: Point.cs:479
int x
Definition: Point.cs:36
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:897
int z
Definition: Point.cs:39
bool IsSync
Definition: Point.cs:320
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1217
bool Equals(int _x, int _z)
Definition: Point.cs:924
List< Chara > ListCharas()
Definition: Point.cs:1135
bool IsValid
Definition: Point.cs:88
bool HasObj
Definition: Point.cs:137
int Distance(Point p)
Definition: Point.cs:953
Chara FirstChara
Definition: Point.cs:264
bool HasBlock
Definition: Point.cs:141
bool IsInBounds
Definition: Point.cs:104
Cell cell
Definition: Point.cs:51
Point GetRandomNeighbor()
Definition: Point.cs:731
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1266
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false)
Definition: Point.cs:595
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:741
ReligionWind Wind
ReligionTrickery Trickery
ReligionElement Element
List< Religion > list
ReligionHealing Healing
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
SourceStat stats
SourceCalc calc
SourceCard cards
SourceElement elements
static Dictionary< string, TierList > tierMap
List< Zone > ListReturnLocations()
virtual bool IsRegion
Definition: Spatial.cs:501
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
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:1959
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:159
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
int CountMinions(Chara c)
Definition: Zone.cs:3420
FactionBranch branch
Definition: Zone.cs:34
virtual bool IsUserZone
Definition: Zone.cs:264
Chara Boss
Definition: Zone.cs:83
override int DangerLv
Definition: Zone.cs:107
bool IsPCFaction
Definition: Zone.cs:464
ZoneInstance instance
Definition: Zone.cs:52
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893
Definition: ActRef.cs:2
Act act
Definition: ActRef.cs:3
Thing refThing
Definition: ActRef.cs:9