10 public static void TryDelay(Action a)
24 public static bool DamageEle(
Card CC, EffectId
id,
int power,
Element e, List<Point> points,
ActRef actref,
string lang =
null)
26 if (points.Count == 0)
28 CC.SayNothingHappans();
31 if (!
EClass.setting.elements.ContainsKey(e.source.alias))
33 Debug.Log(e.source.alias);
38 int num = (act !=
null) ? act.ElementPowerMod : 50;
40 Point point = CC.pos.Copy();
41 List<Card> list =
new List<Card>();
43 if (
id == EffectId.Explosive)
45 power = power * actref.refThing.material.hardness / 10;
48 string text =
id.ToString();
49 string text2 =
EClass.sources.calc.map.ContainsKey(text) ? text : (text.ToLower() +
"_");
50 using (List<Point>.Enumerator enumerator = points.GetEnumerator())
52 while (enumerator.MoveNext())
54 Point p = enumerator.Current;
56 if (
id <= EffectId.Meteor)
58 if (
id - EffectId.Explosive <= 1)
63 if (
id == EffectId.Meteor)
71 if (
id == EffectId.Earthquake)
73 text2 =
"SpEarthquake";
78 if (
id == EffectId.Suicide)
83 if (CC.isChara && p.Equals(CC.pos) && points.Count >= 2)
91 if (
id != EffectId.Arrow)
93 if (
id != EffectId.Earthquake)
95 effect =
Effect.Get(
"Element/ball_" + ((e.id == 0) ?
"Void" : e.source.alias.Remove(0, 3)));
98 effect =
Effect.Get(
"Element/ball_Fire");
100 float startDelay = ((
id == EffectId.Meteor) ? 0.1f : 0.04f) * (
float)CC.pos.Distance(p);
101 effect.SetStartDelay(startDelay);
102 effect2.SetStartDelay(startDelay);
106 if (
EClass.rnd(4) == 0 && p.IsSync)
108 effect =
Effect.Get(
"smoke_earthquake");
110 float num3 = 0.06f * (float)CC.pos.Distance(p);
111 Point pos = p.Copy();
112 TweenUtil.Tween(num3,
null, delegate()
114 pos.Animate(AnimeID.Quake,
true);
118 effect.SetStartDelay(num3);
124 effect =
Effect.Get(
"spell_arrow");
125 effect.sr.color = elementRef.colorSprite;
126 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
127 componentInChildren.startColor = (componentInChildren.endColor = elementRef.colorSprite);
132 effect2.SetParticleColor(elementRef.colorTrail,
true,
"_TintColor").Play(from, 0f,
null,
null);
136 if (
id == EffectId.Arrow)
140 effect.Play(CC.pos, 0f, p,
null);
147 effect.Play(p, 0f,
null,
null).Flip(p.x > CC.pos.x,
false);
151 bool flag3 = CC.HasElement(1651, 1) && CC.IsPCFactionOrMinion;
152 if (CC.IsPCFactionOrMinion &&
EClass.pc.Evalue(1651) >= 2)
160 EClass._map.TryShatter(p, 910, power);
164 EClass._map.TryShatter(p, 911, power);
167 foreach (
Card card
in p.ListCards(
false).ToList<
Card>())
170 if ((c.isChara || c.trait.CanBeAttacked) && (!c.IsMultisize || card != CC) && (!c.isChara || (c.Chara.host != CC && c.Chara.parasite != CC && c.Chara.ride != CC)))
172 if (
id - EffectId.Arrow <= 1 && c.isChara && CC.isChara)
174 c.Chara.RequestProtection(CC.Chara, delegate(
Chara a)
179 bool isChara = CC.isChara;
181 if (
id == EffectId.Suicide)
184 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
185 if (c.HasTag(CTAG.suicide) && !c.HasCondition<
ConWet>())
192 Dice dice =
Dice.Create(text2, power, CC, actref.act);
198 if (
id == EffectId.Earthquake)
202 num4 = dice.RollMax() * 2;
204 else if (c.isChara && c.Chara.isLevitating)
209 if (
id == EffectId.Ball ||
id == EffectId.BallBubble ||
id == EffectId.Explosive)
211 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
214 if ((!actref.noFriendlyFire || CC.Chara.IsHostile(c as
Chara)) && (!flag || c != CC))
216 if (isChara && points.Count > 1 && c !=
null && c.isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.Chara))
218 int num5 = CC.Evalue(302);
219 if (!CC.IsPC && CC.IsPCFactionOrMinion)
221 num5 +=
EClass.pc.Evalue(302);
225 if (num5 * 10 >
EClass.rnd(num4 + 1))
227 CC.ModExp(302, CC.IsPC ? 10 : 50);
230 num4 =
EClass.rnd(num4 * 100 / (100 + num5 * 10 + 1));
231 CC.ModExp(302, CC.IsPC ? 20 : 100);
237 if (CC.HasElement(1214, 1) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) &&
EClass.pc.HasElement(1214, 1) &&
EClass.rnd(5) != 0))
244 if (lang ==
"spell_hand")
246 string[] list2 = Lang.GetList(
"attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty(
"Touch") :
"Touch"));
247 string @ref =
"_elehand".lang(e.source.GetAltname(2), list2[4],
null,
null,
null);
248 CC.Say(c.IsPCParty ?
"cast_hand_ally" :
"cast_hand", CC, c, @ref, c.IsPCParty ? list2[1] : list2[2]);
252 CC.Say(lang +
"_hit", CC, c, e.Name.ToLower(),
null);
255 Chara chara = CC.isChara ? CC.Chara :
EClass._map.FindChara(actref.refThing.c_uidRefCard);
256 c.DamageHP(num4, e.id, power * num / 100, AttackSource.None, chara ?? CC,
true);
257 if (chara !=
null && chara.IsAliveInCurrentZone)
259 chara.DoHostileAction(c,
false);
265 if (
id == EffectId.Explosive)
267 int hardness = actref.refThing.material.hardness;
268 bool flag4 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && CC.IsPC && !(EClass._zone is
Zone_Vernis);
269 if (p.HasObj && p.cell.matObj.hardness <= hardness)
271 EClass._map.MineObj(p,
null,
null);
274 EClass.player.ModKarma(-1);
277 if (!p.HasObj && p.HasBlock && p.matBlock.hardness <= hardness)
279 EClass._map.MineBlock(p,
false,
null);
282 EClass.player.ModKarma(-1);
294 foreach (
Card card2
in list)
296 if (card2.ExistsOnMap)
298 ActEffect.RapidCount += 2;
299 ActEffect.ProcAt(
id, power, BlessedState.Normal, card2,
null, card2.pos,
true, actref);
307 public static void ProcAt(EffectId
id,
int power, BlessedState state,
Card cc,
Card tc,
Point tp,
bool isNeg,
ActRef actRef =
default(
ActRef))
310 bool flag = state <= BlessedState.Cursed;
311 bool flag2 = isNeg || flag;
312 Element element =
Element.Create(actRef.aliasEle.IsEmpty(
"eleFire"), power / 10);
313 if (
EClass.debug.enable && EInput.isShiftDown)
315 ActEffect.angle += 5;
318 ActEffect.angle = 30;
324 power = power * 100 / (100 + ActEffect.RapidCount * 50);
326 if (
id <= EffectId.Earthquake)
330 case EffectId.Breathe:
332 List<Point> list =
EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
335 list.Add(CC.pos.Copy());
337 CC.Say(
"spell_breathe", CC, element.Name.ToLower(),
null);
341 CC.PlaySound(
"spell_breathe", 1f,
true);
343 if (CC.IsInMutterDistance(10) && !
EClass.core.config.graphic.disableShake)
345 Shaker.ShakeCam(
"breathe", 1f);
347 ActEffect.DamageEle(CC,
id, power, element, list, actRef,
"spell_breathe");
351 case EffectId.Explosive:
352 case EffectId.BallBubble:
356 List<Point> list2 =
EClass._map.ListPointsInLine(CC.pos, tp, 10);
357 if (list2.Count == 0)
359 list2.Add(CC.pos.Copy());
361 CC.Say(
"spell_bolt", CC, element.Name.ToLower(),
null);
365 CC.PlaySound(
"spell_bolt", 1f,
true);
367 if (CC.IsInMutterDistance(10) && !
EClass.core.config.graphic.disableShake)
369 Shaker.ShakeCam(
"bolt", 1f);
371 ActEffect.DamageEle(CC,
id, power, element, list2, actRef,
"spell_bolt");
376 List<Point> list3 =
new List<Point>();
377 list3.Add(tp.Copy());
378 CC.Say(
"spell_arrow", CC, element.Name.ToLower(),
null);
382 CC.PlaySound(
"spell_arrow", 1f,
true);
384 ActEffect.DamageEle(CC,
id, power, element, list3, actRef,
"spell_arrow");
389 case EffectId.Funnel:
391 if (
EClass._zone.CountMinions(CC) > CC.MaxSummon || CC.c_uidMaster != 0)
393 CC.Say(
"summon_ally_fail", CC,
null,
null);
396 CC.Say(
"spell_funnel", CC, element.Name.ToLower(),
null);
397 CC.PlaySound(
"spell_funnel", 1f,
true);
399 chara.SetMainElement(element.source.alias, element.Value,
true);
400 chara.SetSummon(20 + power / 20 +
EClass.rnd(10));
401 chara.SetLv(power / 15);
402 EClass._zone.AddCard(chara, tp.GetNearestPoint(
false,
false,
true,
false));
403 chara.PlayEffect(
"teleport",
true, 0f,
default(Vector3));
404 chara.MakeMinion(CC, MinionType.Default);
407 case EffectId.TransGender:
408 case EffectId.ModPotential:
410 case EffectId.Debuff:
411 case EffectId.Weaken:
412 case EffectId.NeckHunt:
414 case EffectId.Summon:
416 CC.Say(
"summon_ally", CC,
null,
null);
417 if (
EClass._zone.CountMinions(CC) > CC.MaxSummon || CC.c_uidMaster != 0)
419 CC.Say(
"summon_ally_fail", CC,
null,
null);
422 string id2 = actRef.n1;
428 string n = actRef.n1;
429 if (!(n ==
"shadow"))
431 if (!(n ==
"monster") && !(n ==
"fire") && !(n ==
"animal"))
433 if (!(n ==
"special_force"))
437 num2 = 20 +
EClass.rnd(10);
445 num3 =
EClass._zone.DangerLv;
455 num = Mathf.Clamp(power / 100, 1, 5) + ((power < 100) ? 0 :
EClass.rnd(2));
458 while (num4 < num &&
EClass._zone.CountMinions(CC) <= CC.MaxSummon)
460 Point randomPoint = tp.GetRandomPoint(radius,
true,
true,
false, 100);
461 Point point = (randomPoint !=
null) ? randomPoint.GetNearestPoint(
false,
false,
true,
false) :
null;
462 if (point !=
null && point.IsValid)
475 if (!(n ==
"monster"))
477 if (!(n ==
"animal"))
481 chara2 =
CharaGen.Create(id2, power / 10);
485 chara2 =
CharaGen.CreateFromElement(
"Fire", power / 10,
"chara");
490 chara2 =
CharaGen.CreateFromFilter(
"c_animal", power / 15, -1);
495 chara2 =
CharaGen.CreateFromFilter(
"c_dungeon", power / 10, -1);
500 chara2 =
CharaGen.CreateFromFilter(
"c_pawn", power / 10, -1);
505 if (actRef.n1 ==
"shadow")
507 num5 = power / 10 + 1;
511 num5 = chara2.LV * (100 + power / 10) / 100 + power / 30;
513 if (chara2.LV < num5)
518 if (!(n ==
"shadow"))
520 if (n ==
"special_force")
522 chara2.homeZone =
EClass._zone;
527 chara2.hp = chara2.MaxHP / 2;
529 EClass._zone.AddCard(chara2, point);
530 if (!(actRef.n1 ==
"monster") || actRef.refThing ==
null)
532 chara2.MakeMinion(CC, MinionType.Default);
536 chara2.SetSummon(num2);
545 CC.Say(
"summon_ally_fail", CC,
null,
null);
549 case EffectId.Bubble:
551 case EffectId.MistOfDarkness:
552 case EffectId.Puddle:
554 if (LangGame.Has(
"ab" +
id.ToString()))
556 CC.Say(
"ab" +
id.ToString(), CC,
null,
null);
558 tp.PlaySound(
"vomit",
true, 1f,
true);
559 int num6 = 2 +
EClass.rnd(3);
560 int id3 = (
id == EffectId.Puddle) ? 4 : ((
id == EffectId.Bubble) ? 5 : ((
id == EffectId.MistOfDarkness) ? 6 : 7));
561 EffectId idEffect = (
id == EffectId.Bubble) ? EffectId.BallBubble : EffectId.PuddleEffect;
562 Color color =
EClass.Colors.elementColors.TryGetValue(element.source.alias,
default(Color));
563 if (
id == EffectId.Bubble && CC.id ==
"cancer")
565 idEffect = EffectId.Nothing;
568 for (
int i = 0; i < num6; i++)
570 Point randomPoint2 = tp.GetRandomPoint(2,
true,
true,
false, 100);
571 if (randomPoint2 !=
null && !randomPoint2.HasBlock && (
id != EffectId.Puddle || !randomPoint2.cell.IsTopWaterAndNoSnow))
573 int num7 = 4 +
EClass.rnd(5);
574 if (
id == EffectId.Web)
585 isHostileAct = CC.IsPCParty,
586 color = BaseTileMap.GetColorInt(ref color, 100)
594 if (
id == EffectId.Meteor)
599 List<Point> list4 =
EClass._map.ListPointsInCircle(CC.pos, 10f,
true,
true);
600 if (list4.Count == 0)
602 list4.Add(CC.pos.Copy());
604 CC.Say(
"spell_ball", CC, element.Name.ToLower(),
null);
607 CC.PlaySound(
"spell_ball", 1f,
true);
609 if (CC.IsInMutterDistance(10))
611 Shaker.ShakeCam(
"ball", 1f);
614 ActEffect.DamageEle(CC,
id, power, element, list4, actRef,
"spell_ball");
617 if (
id != EffectId.Earthquake)
621 List<Point> list5 =
EClass._map.ListPointsInCircle(CC.pos, 12f,
false,
true);
622 if (list5.Count == 0)
624 list5.Add(CC.pos.Copy());
626 CC.Say(
"spell_earthquake", CC, element.Name.ToLower(),
null);
629 CC.PlaySound(
"spell_earthquake", 1f,
true);
631 if (CC.IsInMutterDistance(10))
633 Shaker.ShakeCam(
"ball", 1f);
636 ActEffect.DamageEle(CC,
id, power, element, list5, actRef,
"spell_earthquake");
643 if (
id == EffectId.Suicide)
647 if (
id != EffectId.DrainBlood)
649 if (
id != EffectId.Scream)
653 CC.PlaySound(
"scream", 1f,
true);
654 CC.PlayEffect(
"scream",
true, 0f,
default(Vector3));
655 foreach (
Point point2
in EClass._map.ListPointsInCircle(cc.pos, 6f,
false,
false))
657 foreach (
Chara chara3
in point2.Charas)
659 if (chara3.ResistLv(957) <= 0)
668 List<Point> list6 =
new List<Point>();
669 list6.Add(tp.Copy());
673 CC.PlaySound(
"spell_hand", 1f,
true);
675 if (!
ActEffect.DamageEle(CC,
id, power, element, list6, actRef, (
id == EffectId.DrainBlood) ?
"" :
"spell_hand"))
677 CC.Say(
"spell_hand_miss", CC, element.Name.ToLower(),
null);
681 float radius2 = (
id == EffectId.Suicide) ? 3.5f : ((float)((
id == EffectId.BallBubble) ? 2 : ((
id == EffectId.Explosive) ? 2 : 5)));
682 if (
id == EffectId.Suicide)
684 if (CC.MainElement !=
Element.Void)
686 element = CC.MainElement;
688 if (CC.HasTag(CTAG.kamikaze))
693 List<Point> list7 =
EClass._map.ListPointsInCircle(cc.pos, radius2,
id != EffectId.Explosive,
id != EffectId.Explosive);
694 if (list7.Count == 0)
696 list7.Add(cc.pos.Copy());
698 cc.Say((
id == EffectId.Suicide) ?
"abSuicide" :
"spell_ball", cc, element.Name.ToLower(),
null);
702 cc.PlaySound(
"spell_ball", 1f,
true);
704 if (cc.IsInMutterDistance(10) && !
EClass.core.config.graphic.disableShake)
706 Shaker.ShakeCam(
"ball", 1f);
708 ActEffect.DamageEle(actRef.origin ?? cc,
id, power, element, list7, actRef, (
id == EffectId.Suicide) ?
"suicide" :
"spell_ball");
709 if (
id == EffectId.Suicide && CC.IsAliveInCurrentZone)
711 CC.Die(
null,
null, AttackSource.None);
715 List<Card> list8 = tp.ListCards(
false);
717 if (list8.Contains(CC))
721 foreach (
Card card
in list8)
723 if (tc ==
null || card == tc)
725 ActEffect.Proc(
id, power, state, CC, card, actRef);
726 if (flag2 && card.isChara && card != CC)
728 CC.DoHostileAction(card,
false);
733 CC.SayNothingHappans();
737 public static void Proc(EffectId
id,
Card cc,
Card tc =
null,
int power = 100,
ActRef actRef =
default(
ActRef))
739 ActEffect.Proc(
id, power, BlessedState.Normal, cc, tc, actRef);
743 public static void Proc(EffectId
id,
int power, BlessedState state,
Card cc,
Card tc =
null,
ActRef actRef =
default(
ActRef))
745 ActEffect.<>c__DisplayClass7_0 CS$<>8__locals1 =
new ActEffect.<>c__DisplayClass7_0();
746 CS$<>8__locals1.cc = cc;
747 CS$<>8__locals1.tc = tc;
748 CS$<>8__locals1.power = power;
749 CS$<>8__locals1.actRef = actRef;
750 CS$<>8__locals1.id = id;
751 if (CS$<>8__locals1.tc ==
null)
753 CS$<>8__locals1.tc = CS$<>8__locals1.cc;
755 CS$<>8__locals1.TC = CS$<>8__locals1.tc.Chara;
756 CS$<>8__locals1.CC = CS$<>8__locals1.cc.Chara;
757 CS$<>8__locals1.blessed = (state >= BlessedState.Blessed);
758 bool flag = state <= BlessedState.Cursed;
759 CS$<>8__locals1.orgPower = CS$<>8__locals1.power;
760 if (CS$<>8__locals1.blessed || flag)
762 CS$<>8__locals1.power *= 2;
764 EffectId id2 = CS$<>8__locals1.id;
765 if (id2 <= EffectId.ModPotential)
767 if (id2 <= EffectId.Uncurse)
771 case EffectId.Identify:
772 case EffectId.GreaterIdentify:
774 bool flag2 = CS$<>8__locals1.id == EffectId.GreaterIdentify;
777 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.ForgetItems, flag2 ? BlessedState.Cursed : BlessedState.Normal,
default(
ActRef));
780 if (!CS$<>8__locals1.tc.isThing)
782 int count = CS$<>8__locals1.blessed ? (flag2 ? (2 +
EClass.rnd(2)) : (3 +
EClass.rnd(3))) : 1;
783 LayerDragGrid.CreateIdentify(CS$<>8__locals1.CC, flag2, state, 0, count);
786 CS$<>8__locals1.cc.PlaySound(
"identify", 1f,
true);
787 CS$<>8__locals1.cc.PlayEffect(
"identify",
true, 0f,
default(Vector3));
788 CS$<>8__locals1.tc.Thing.Identify(CS$<>8__locals1.cc.IsPCParty, flag2 ? IDTSource.SuperiorIdentify : IDTSource.Identify);
791 case EffectId.Teleport:
792 case EffectId.TeleportShort:
795 if (CS$<>8__locals1.id == EffectId.TeleportShort)
797 CS$<>8__locals1.tc.Teleport(
ActEffect.GetTeleportPos(CS$<>8__locals1.tc.pos, 6),
false,
false);
801 CS$<>8__locals1.tc.Teleport(
ActEffect.GetTeleportPos(CS$<>8__locals1.tc.pos,
EClass._map.bounds.Width),
false,
false);
806 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Gravity, BlessedState.Normal,
default(
ActRef));
808 if (CS$<>8__locals1.blessed)
810 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Levitate, BlessedState.Normal,
default(
ActRef));
814 case EffectId.CreateWall:
816 case EffectId.Return:
818 if (!CS$<>8__locals1.cc.IsPC)
820 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Teleport, state,
default(
ActRef));
823 if (
EClass.player.returnInfo ==
null)
825 if (CS$<>8__locals1.id == EffectId.Evac)
829 turns =
EClass.rnd(10) + 10,
835 if (
EClass.game.spatials.ListReturnLocations().Count == 0)
837 Msg.Say(
"returnNowhere");
842 turns =
EClass.rnd(10) + 10,
846 Msg.Say(
"returnBegin");
849 EClass.player.returnInfo =
null;
850 Msg.Say(
"returnAbort");
852 case EffectId.ChangeMaterialLesser:
853 case EffectId.ChangeMaterial:
854 case EffectId.ChangeMaterialGreater:
857 if (!CS$<>8__locals1.tc.isThing)
859 LayerDragGrid.CreateChangeMaterial(CS$<>8__locals1.CC, CS$<>8__locals1.actRef.refThing, row, CS$<>8__locals1.id, state, 0, 1);
862 if (CS$<>8__locals1.tc.Num > 1)
864 CS$<>8__locals1.tc = CS$<>8__locals1.tc.Split(1);
866 string name = CS$<>8__locals1.tc.Name;
869 bool flag3 = CS$<>8__locals1.id == EffectId.ChangeMaterialGreater;
870 bool flag4 = CS$<>8__locals1.id == EffectId.ChangeMaterialLesser;
871 string text4 = CS$<>8__locals1.tc.Thing.source.tierGroup;
878 if (CS$<>8__locals1.blessed)
890 num = Mathf.Clamp(num +
EClass.rnd(2), 0, 4);
893 text4 = ((text4 ==
"metal") ?
"leather" :
"metal");
896 for (
int i = 0; i < 1000; i++)
898 row = tierList.tiers[num].Select();
899 if (row != CS$<>8__locals1.tc.material)
905 CS$<>8__locals1.cc.PlaySound(
"offering", 1f,
true);
906 CS$<>8__locals1.cc.PlayEffect(
"buff",
true, 0f,
default(Vector3));
907 CS$<>8__locals1.tc.ChangeMaterial(row);
908 if (CS$<>8__locals1.tc.trait is
TraitGene && CS$<>8__locals1.tc.c_DNA !=
null)
910 DNA.Type type =
DNA.GetType(CS$<>8__locals1.tc.material.alias);
911 CS$<>8__locals1.tc.c_DNA.Generate(type,
null);
913 CS$<>8__locals1.cc.Say(
"materialChanged", name, row.GetName());
914 if (CS$<>8__locals1.tc.parent ==
null)
916 CS$<>8__locals1.CC.Pick(CS$<>8__locals1.tc.Thing,
false,
true);
918 CS$<>8__locals1.CC.body.UnqeuipIfTooHeavy(CS$<>8__locals1.tc.Thing);
923 if (id2 != EffectId.Uncurse)
927 if (!CS$<>8__locals1.tc.isThing)
929 LayerDragGrid.CreateUncurse(CS$<>8__locals1.CC, state, 0, 1);
932 Thing thing = CS$<>8__locals1.tc.Thing;
933 if (thing.blessedState == BlessedState.Cursed)
935 thing.SetBlessedState(BlessedState.Normal);
937 else if (thing.blessedState == BlessedState.Doomed)
939 thing.SetBlessedState(BlessedState.Normal);
941 Card rootCard = thing.GetRootCard();
942 if (rootCard !=
null)
944 rootCard.TryStack(thing);
955 case EffectId.EnchantWeapon:
956 case EffectId.EnchantArmor:
958 case EffectId.Lighten:
960 if (!CS$<>8__locals1.tc.isThing)
962 LayerDragGrid.CreateLighten(CS$<>8__locals1.CC, state, 0, 1);
965 if (CS$<>8__locals1.tc.Num > 1)
967 CS$<>8__locals1.tc = CS$<>8__locals1.tc.Split(1);
969 CS$<>8__locals1.cc.PlaySound(
"offering", 1f,
true);
970 CS$<>8__locals1.cc.PlayEffect(
"buff",
true, 0f,
default(Vector3));
971 int num2 = CS$<>8__locals1.tc.isWeightChanged ? CS$<>8__locals1.tc.c_weight : CS$<>8__locals1.tc.Thing.source.weight;
972 CS$<>8__locals1.tc.isWeightChanged =
true;
973 Element orCreateElement = CS$<>8__locals1.tc.elements.GetOrCreateElement(64);
974 Element orCreateElement2 = CS$<>8__locals1.tc.elements.GetOrCreateElement(65);
975 Element orCreateElement3 = CS$<>8__locals1.tc.elements.GetOrCreateElement(67);
976 Element orCreateElement4 = CS$<>8__locals1.tc.elements.GetOrCreateElement(66);
977 bool flag5 = CS$<>8__locals1.tc.IsEquipmentOrRanged || CS$<>8__locals1.tc.IsThrownWeapon || CS$<>8__locals1.tc.IsAmmo;
980 num2 = (int)(0.01f * (
float)num2 * (
float)CS$<>8__locals1.power * 0.75f + 500f);
987 if (CS$<>8__locals1.tc.IsWeapon || CS$<>8__locals1.tc.IsThrownWeapon)
989 CS$<>8__locals1.tc.elements.ModBase(67, Mathf.Clamp(orCreateElement3.vBase * CS$<>8__locals1.power / 1000, 1, 5));
990 CS$<>8__locals1.tc.elements.ModBase(66, -Mathf.Clamp(orCreateElement4.vBase * CS$<>8__locals1.power / 1000, 1, 5));
994 CS$<>8__locals1.tc.elements.ModBase(65, Mathf.Clamp(orCreateElement2.vBase * CS$<>8__locals1.power / 1000, 1, 5));
995 CS$<>8__locals1.tc.elements.ModBase(64, -Mathf.Clamp(orCreateElement.vBase * CS$<>8__locals1.power / 1000, 1, 5));
998 CS$<>8__locals1.cc.Say(
"lighten_curse", CS$<>8__locals1.cc, CS$<>8__locals1.tc,
null,
null);
1002 num2 = num2 * (100 - CS$<>8__locals1.power / 10) / 100;
1003 if (CS$<>8__locals1.blessed)
1005 CS$<>8__locals1.power /= 4;
1009 if (CS$<>8__locals1.tc.IsWeapon || CS$<>8__locals1.tc.IsThrownWeapon)
1011 CS$<>8__locals1.tc.elements.ModBase(67, -Mathf.Clamp(orCreateElement3.vBase * CS$<>8__locals1.power / 1000, 1, 5));
1012 CS$<>8__locals1.tc.elements.ModBase(66, Mathf.Clamp(orCreateElement4.vBase * CS$<>8__locals1.power / 1000, 1, 5));
1016 CS$<>8__locals1.tc.elements.ModBase(65, -Mathf.Clamp(orCreateElement2.vBase * CS$<>8__locals1.power / 1000, 1, 5));
1017 CS$<>8__locals1.tc.elements.ModBase(64, Mathf.Clamp(orCreateElement.vBase * CS$<>8__locals1.power / 1000, 1, 5));
1020 CS$<>8__locals1.cc.Say(
"lighten", CS$<>8__locals1.cc, CS$<>8__locals1.tc,
null,
null);
1022 CS$<>8__locals1.tc.c_weight = num2;
1023 CS$<>8__locals1.tc.SetDirtyWeight();
1024 if (CS$<>8__locals1.tc.parent ==
null)
1026 CS$<>8__locals1.CC.Pick(CS$<>8__locals1.tc.Thing,
false,
true);
1028 CS$<>8__locals1.CC.body.UnqeuipIfTooHeavy(CS$<>8__locals1.tc.Thing);
1031 case EffectId.Naming:
1032 case EffectId.Faith:
1034 case EffectId.ForgetItems:
1036 CS$<>8__locals1.TC.PlaySound(
"curse3", 1f,
true);
1037 CS$<>8__locals1.TC.PlayEffect(
"curse",
true, 0f,
default(Vector3));
1038 CS$<>8__locals1.TC.Say(
"forgetItems", CS$<>8__locals1.TC,
null,
null);
1039 int num3 = CS$<>8__locals1.power / 50 + 1 +
EClass.rnd(3);
1040 List<Thing> source = CS$<>8__locals1.TC.things.List((
Thing t) => t.c_IDTState == 0,
false);
1041 for (
int j = 0; j < num3; j++)
1043 source.RandomItem<
Thing>().c_IDTState = 5;
1049 if (id2 != EffectId.ModPotential)
1053 Element element = CS$<>8__locals1.cc.elements.ListElements((
Element e) => e.HasTag(
"primary"),
null).RandomItem<
Element>();
1054 CS$<>8__locals1.cc.elements.ModTempPotential(element.id, CS$<>8__locals1.power / 10, 0);
1062 if (id2 <= EffectId.Duplicate)
1064 if (id2 == EffectId.AbsorbMana)
1066 EClass.game.religions.Element.Talk(
"ability",
null,
null);
1067 Dice dice =
Dice.Create(
"ActManaAbsorb", CS$<>8__locals1.power, CS$<>8__locals1.CC, CS$<>8__locals1.actRef.act);
1068 CS$<>8__locals1.CC.mana.Mod(dice.Roll());
1069 CS$<>8__locals1.TC.PlaySound(
"heal", 1f,
true);
1070 CS$<>8__locals1.TC.PlayEffect(
"heal",
true, 0f,
default(Vector3));
1071 CS$<>8__locals1.CC.Say(
"absorbMana", CS$<>8__locals1.CC,
null,
null);
1076 case EffectId.Exterminate:
1078 CS$<>8__locals1.CC.PlaySound(
"clean_floor", 1f,
true);
1079 Msg.Say(
"exterminate");
1080 List<Chara> list7 = (from c in EClass._map.charas
1081 where c.isCopy && !c.IsPCFaction
1082 select c).ToList<Chara>();
1083 if (list7.Count == 0)
1085 Msg.SayNothingHappen();
1088 using (List<Chara>.Enumerator enumerator = list7.GetEnumerator())
1090 while (enumerator.MoveNext())
1092 Chara chara = enumerator.Current;
1093 chara.Say(
"split_fail", chara,
null,
null);
1094 chara.PlayEffect(
"vanish",
true, 0f,
default(Vector3));
1095 chara.Die(
null,
null, AttackSource.None);
1101 case EffectId.Earthquake:
1102 case EffectId.Boost:
1103 case EffectId.RemoveHex:
1104 case EffectId.RemoveHexAll:
1106 case EffectId.MagicMap:
1107 if (!CS$<>8__locals1.CC.IsPC)
1109 CS$<>8__locals1.CC.SayNothingHappans();
1114 CS$<>8__locals1.CC.Say(
"abMagicMap_curse", CS$<>8__locals1.CC,
null,
null);
1115 CS$<>8__locals1.CC.PlaySound(
"curse3", 1f,
true);
1116 CS$<>8__locals1.CC.PlayEffect(
"curse",
true, 0f,
default(Vector3));
1117 CS$<>8__locals1.CC.AddCondition<
ConConfuse>(200,
true);
1120 CS$<>8__locals1.CC.Say(
"abMagicMap", CS$<>8__locals1.CC,
null,
null);
1121 CS$<>8__locals1.CC.PlayEffect(
"identify",
true, 0f,
default(Vector3));
1122 CS$<>8__locals1.CC.PlaySound(
"identify", 1f,
true);
1123 if (CS$<>8__locals1.blessed)
1125 EClass._map.RevealAll(
true);
1128 EClass._map.Reveal(CS$<>8__locals1.CC.pos, CS$<>8__locals1.power);
1130 case EffectId.Escape:
1131 if (CS$<>8__locals1.CC.IsPCFaction || (
EClass._zone.Boss == CS$<>8__locals1.CC &&
EClass.rnd(20) != 0))
1135 CS$<>8__locals1.CC.Say(
"escape", CS$<>8__locals1.CC,
null,
null);
1136 CS$<>8__locals1.CC.PlaySound(
"escape", 1f,
true);
1137 if (
EClass._zone.Boss == CS$<>8__locals1.CC)
1139 CS$<>8__locals1.CC.TryDropBossLoot();
1141 CS$<>8__locals1.CC.Destroy();
1143 case EffectId.EnchantWeaponGreat:
1144 case EffectId.EnchantArmorGreat:
1146 case EffectId.Duplicate:
1148 Point randomPoint = CS$<>8__locals1.CC.pos.GetRandomPoint(2,
false,
false,
false, 200);
1149 if (randomPoint ==
null || randomPoint.Equals(CS$<>8__locals1.CC.pos) || !randomPoint.IsValid ||
EClass._zone.IsRegion || CS$<>8__locals1.CC.HasCondition<
ConPoison>() || CS$<>8__locals1.CC.HasCondition<
ConConfuse>() || CS$<>8__locals1.CC.HasCondition<
ConDim>() || CS$<>8__locals1.CC.HasCondition<
ConParalyze>() || CS$<>8__locals1.CC.HasCondition<
ConSleep>() || CS$<>8__locals1.CC.HasCondition<
ConBurning>() || CS$<>8__locals1.CC.HasCondition<
ConFreeze>() || CS$<>8__locals1.CC.HasCondition<
ConMiasma>())
1151 CS$<>8__locals1.CC.Say(
"split_fail", CS$<>8__locals1.CC,
null,
null);
1154 Chara t3 = CS$<>8__locals1.CC.Duplicate();
1155 EClass._zone.AddCard(t3, randomPoint);
1156 CS$<>8__locals1.CC.Say(
"split", CS$<>8__locals1.CC,
null,
null);
1163 else if (id2 != EffectId.Reconstruction)
1165 if (id2 != EffectId.DropMine)
1172 if (!CS$<>8__locals1.tc.isThing)
1174 LayerDragGrid.CreateReconstruction(CS$<>8__locals1.CC, state, 0, 1);
1177 if (CS$<>8__locals1.tc.Num > 1)
1179 CS$<>8__locals1.tc = CS$<>8__locals1.tc.Split(1);
1181 CS$<>8__locals1.cc.PlaySound(
"mutation", 1f,
true);
1182 CS$<>8__locals1.cc.PlayEffect(
"identify",
true, 0f,
default(Vector3));
1183 CS$<>8__locals1.cc.Say(
"reconstruct", CS$<>8__locals1.cc, CS$<>8__locals1.tc,
null,
null);
1184 Thing thing2 =
ThingGen.Create(CS$<>8__locals1.tc.id, -1, CS$<>8__locals1.tc.LV * CS$<>8__locals1.power / 100);
1185 thing2.SetBlessedState(state);
1186 CS$<>8__locals1.tc.Destroy();
1187 CS$<>8__locals1.CC.Pick(thing2,
false,
true);
1188 if (!CS$<>8__locals1.CC.IsPC)
1190 CS$<>8__locals1.CC.TryEquip(thing2,
false);
1195 if (CS$<>8__locals1.CC.pos.Installed !=
null ||
EClass._zone.IsPCFaction)
1200 thing3.c_idRefCard =
"dog_mine";
1201 Zone.ignoreSpawnAnime =
true;
1202 EClass._zone.AddCard(thing3, CS$<>8__locals1.CC.pos).Install();
1206 bool armor = CS$<>8__locals1.id == EffectId.EnchantArmor || CS$<>8__locals1.id == EffectId.EnchantArmorGreat;
1207 bool flag6 = CS$<>8__locals1.id == EffectId.EnchantWeaponGreat || CS$<>8__locals1.id == EffectId.EnchantArmorGreat;
1208 if (!CS$<>8__locals1.tc.isThing)
1210 LayerDragGrid.CreateEnchant(CS$<>8__locals1.CC, armor, flag6, state, 1);
1213 CS$<>8__locals1.cc.PlaySound(
"identify", 1f,
true);
1214 CS$<>8__locals1.cc.PlayEffect(
"identify",
true, 0f,
default(Vector3));
1217 CS$<>8__locals1.cc.Say(
"enc_curse", CS$<>8__locals1.tc,
null,
null);
1218 CS$<>8__locals1.tc.ModEncLv(-1);
1222 int num4 = (flag6 ? 4 : 2) + (CS$<>8__locals1.blessed ? 1 : 0);
1223 if (CS$<>8__locals1.tc.encLV >= num4)
1225 CS$<>8__locals1.cc.Say(
"enc_resist", CS$<>8__locals1.tc,
null,
null);
1229 CS$<>8__locals1.cc.Say(
"enc", CS$<>8__locals1.tc,
null,
null);
1230 CS$<>8__locals1.tc.ModEncLv(1);
1234 if (CS$<>8__locals1.TC ==
null)
1238 id2 = CS$<>8__locals1.id;
1241 case EffectId.Booze:
1242 CS$<>8__locals1.TC.AddCondition<
ConDrunk>(CS$<>8__locals1.power,
false);
1243 if (CS$<>8__locals1.TC.HasElement(1215, 1))
1245 CS$<>8__locals1.TC.Say(
"drunk_dwarf", CS$<>8__locals1.TC,
null,
null);
1248 con.SetRefVal(
Element.List_MainAttributes.RandomItem<
int>(), (
int)CS$<>8__locals1.id);
1253 case EffectId.Drink:
1254 case EffectId.DrinkRamune:
1255 case EffectId.DrinkMilk:
1256 if (CS$<>8__locals1.id == EffectId.DrinkRamune)
1258 CS$<>8__locals1.TC.Say(
"drinkRamune", CS$<>8__locals1.TC,
null,
null);
1260 if (CS$<>8__locals1.TC.IsPC)
1262 CS$<>8__locals1.TC.Say(
"drinkGood", CS$<>8__locals1.TC,
null,
null);
1264 if (CS$<>8__locals1.id == EffectId.DrinkMilk)
1266 if (CS$<>8__locals1.TC.IsPC)
1268 CS$<>8__locals1.TC.Say(
"drinkMilk", CS$<>8__locals1.TC,
null,
null);
1270 if (CS$<>8__locals1.blessed)
1272 CS$<>8__locals1.TC.ModHeight(
EClass.rnd(5) + 3);
1277 CS$<>8__locals1.TC.ModHeight((
EClass.rnd(5) + 3) * -1);
1282 case EffectId.DrinkWater:
1285 if (CS$<>8__locals1.TC.IsPC)
1287 CS$<>8__locals1.TC.Say(
"drinkWater_dirty", CS$<>8__locals1.TC,
null,
null);
1289 TraitWell.BadEffect(CS$<>8__locals1.TC);
1292 if (CS$<>8__locals1.TC.IsPC)
1294 CS$<>8__locals1.TC.Say(
"drinkWater_clear", CS$<>8__locals1.TC,
null,
null);
1298 case EffectId.DrinkWaterDirty:
1299 if (CS$<>8__locals1.TC.IsPC)
1301 CS$<>8__locals1.TC.Say(
"drinkWater_dirty", CS$<>8__locals1.TC,
null,
null);
1303 if (CS$<>8__locals1.TC.IsPCFaction)
1305 CS$<>8__locals1.TC.Vomit();
1309 case EffectId.SaltWater:
1310 if (CS$<>8__locals1.TC.HasElement(1211, 1))
1312 CS$<>8__locals1.TC.Say(
"drinkSaltWater_snail", CS$<>8__locals1.TC,
null,
null);
1313 int dmg = (CS$<>8__locals1.TC.hp > 10) ? (CS$<>8__locals1.TC.hp -
EClass.rnd(10)) : 10000;
1314 CS$<>8__locals1.TC.DamageHP(dmg, AttackSource.None, CS$<>8__locals1.CC);
1317 if (CS$<>8__locals1.TC.IsPC)
1319 CS$<>8__locals1.TC.Say(
"drinkSaltWater", CS$<>8__locals1.TC,
null,
null);
1329 case EffectId.RestoreBody:
1330 case EffectId.RestoreMind:
1332 bool flag7 = CS$<>8__locals1.id == EffectId.RestoreBody;
1335 CS$<>8__locals1.<Proc>g__Redirect|0(flag7 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal,
default(
ActRef));
1338 CS$<>8__locals1.TC.Say(flag7 ?
"restoreBody" :
"restoreMind", CS$<>8__locals1.TC,
null,
null);
1339 CS$<>8__locals1.TC.PlaySound(
"heal", 1f,
true);
1340 CS$<>8__locals1.TC.PlayEffect(
"heal",
true, 0f,
default(Vector3));
1341 CS$<>8__locals1.TC.CureHost(flag7 ? CureType.CureBody : CureType.CureMind, CS$<>8__locals1.power, state);
1342 if (CS$<>8__locals1.blessed)
1344 CS$<>8__locals1.<Proc>g__Redirect|0(flag7 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal,
default(
ActRef));
1349 case EffectId.DamageBody:
1350 case EffectId.DamageMind:
1351 case EffectId.DamageBodyGreat:
1352 case EffectId.DamageMindGreat:
1354 case EffectId.EnhanceBody:
1355 case EffectId.EnhanceMind:
1356 case EffectId.EnhanceBodyGreat:
1357 case EffectId.EnhanceMindGreat:
1359 bool flag8 = CS$<>8__locals1.id == EffectId.EnhanceBody || CS$<>8__locals1.id == EffectId.EnhanceBodyGreat;
1360 bool mind = CS$<>8__locals1.id == EffectId.EnhanceMind || CS$<>8__locals1.id == EffectId.EnhanceMindGreat;
1361 int num5 = (CS$<>8__locals1.id == EffectId.EnhanceBody || CS$<>8__locals1.id == EffectId.EnhanceMind) ? 1 : (4 +
EClass.rnd(4));
1362 CS$<>8__locals1.TC.Say(flag8 ?
"enhanceBody" :
"enhanceMind", CS$<>8__locals1.TC,
null,
null);
1363 CS$<>8__locals1.TC.PlayEffect(
"buff",
true, 0f,
default(Vector3));
1364 CS$<>8__locals1.TC.PlaySound(
"buff", 1f,
true);
1365 for (
int k = 0; k < num5; k++)
1367 CS$<>8__locals1.TC.EnhanceTempElements(CS$<>8__locals1.power, flag8, mind);
1371 case EffectId.Revive:
1373 List<KeyValuePair<int, Chara>> list2 = (from a in EClass.game.cards.globalCharas
1374 where a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.GetInt(103,
null) != 0
1375 select a).ToList<KeyValuePair<int, Chara>>();
1376 if (CS$<>8__locals1.TC.IsPCFaction || CS$<>8__locals1.TC.IsPCFactionMinion)
1378 if (CS$<>8__locals1.TC.IsPC && list2.Count == 0)
1380 list2 = (from a in EClass.game.cards.globalCharas
1381 where a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon
1382 select a).ToList<KeyValuePair<int, Chara>>();
1384 if (list2.Count > 0)
1386 list2.RandomItem<KeyValuePair<int, Chara>>().Value.Chara.GetRevived();
1390 CS$<>8__locals1.TC.SayNothingHappans();
1396 case EffectId.Sleep:
1397 if (CS$<>8__locals1.blessed)
1399 CS$<>8__locals1.power /= 4;
1401 CS$<>8__locals1.TC.AddCondition<
ConSleep>(CS$<>8__locals1.power,
false);
1404 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Disease, BlessedState.Normal,
default(
ActRef));
1408 case EffectId.Paralyze:
1409 if (CS$<>8__locals1.blessed)
1411 CS$<>8__locals1.power /= 4;
1413 CS$<>8__locals1.TC.AddCondition<
ConParalyze>(CS$<>8__locals1.power,
false);
1416 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Blind, BlessedState.Normal,
default(
ActRef));
1420 case EffectId.Blind:
1421 if (CS$<>8__locals1.blessed)
1423 CS$<>8__locals1.power /= 4;
1425 CS$<>8__locals1.TC.AddCondition<
ConBlind>(CS$<>8__locals1.power,
false);
1428 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Confuse, BlessedState.Normal,
default(
ActRef));
1432 case EffectId.Confuse:
1433 if (CS$<>8__locals1.blessed)
1435 CS$<>8__locals1.power /= 4;
1437 CS$<>8__locals1.TC.AddCondition<
ConConfuse>(CS$<>8__locals1.power,
false);
1440 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Fear, BlessedState.Normal,
default(
ActRef));
1444 case EffectId.Poison:
1445 if (CS$<>8__locals1.blessed)
1447 CS$<>8__locals1.power /= 4;
1449 CS$<>8__locals1.TC.AddCondition<
ConPoison>(CS$<>8__locals1.power,
false);
1452 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Paralyze, BlessedState.Normal,
default(
ActRef));
1456 case EffectId.Faint:
1457 if (CS$<>8__locals1.blessed)
1459 CS$<>8__locals1.power /= 4;
1461 CS$<>8__locals1.TC.AddCondition<
ConFaint>(CS$<>8__locals1.power,
false);
1464 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Disease, BlessedState.Normal,
default(
ActRef));
1469 if (CS$<>8__locals1.blessed)
1471 CS$<>8__locals1.power /= 4;
1473 CS$<>8__locals1.TC.AddCondition<
ConFear>(CS$<>8__locals1.power,
false);
1476 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Confuse, BlessedState.Normal,
default(
ActRef));
1480 case EffectId.Disease:
1481 if (CS$<>8__locals1.blessed)
1483 CS$<>8__locals1.power /= 4;
1485 CS$<>8__locals1.TC.AddCondition<
ConDisease>(CS$<>8__locals1.power,
false);
1488 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Poison, BlessedState.Normal,
default(
ActRef));
1494 if (CS$<>8__locals1.blessed)
1496 CS$<>8__locals1.power /= 4;
1498 List<Thing> list3 = CS$<>8__locals1.TC.things.List((
Thing t) => t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped,
false);
1499 if (list3.Count == 0)
1504 CS$<>8__locals1.TC.Say(
"acid_hit", CS$<>8__locals1.TC,
null,
null);
1505 if (thing4.isAcidproof)
1507 CS$<>8__locals1.TC.Say(
"acid_nullify", thing4,
null,
null);
1509 else if (thing4.encLV > -5)
1511 CS$<>8__locals1.TC.Say(
"acid_rust", CS$<>8__locals1.TC, thing4,
null,
null);
1512 thing4.ModEncLv(-1);
1515 if (CS$<>8__locals1.TC.IsPCParty)
1522 case EffectId.HealComplete:
1523 Dice.Create(
"SpHealLight", CS$<>8__locals1.power, CS$<>8__locals1.CC, CS$<>8__locals1.actRef.act);
1524 CS$<>8__locals1.TC.HealHPHost(9999, HealSource.Magic);
1525 CS$<>8__locals1.TC.CureHost(CureType.HealComplete, CS$<>8__locals1.power, state);
1526 CS$<>8__locals1.TC.Say(
"heal_heavy", CS$<>8__locals1.TC,
null,
null);
1528 case EffectId.BuffStats:
1529 case EffectId.DebuffStats:
1530 case EffectId.LulwyTrick:
1531 Debug.Log(
string.Concat(
new string[]
1533 CS$<>8__locals1.power.ToString(),
1535 CS$<>8__locals1.id.ToString(),
1537 CS$<>8__locals1.actRef.n1
1539 if (CS$<>8__locals1.id == EffectId.LulwyTrick)
1541 EClass.game.religions.Wind.Talk(
"ability",
null,
null);
1543 if (CS$<>8__locals1.power < 0 || CS$<>8__locals1.id == EffectId.DebuffStats)
1545 CS$<>8__locals1.power = Mathf.Abs(CS$<>8__locals1.power);
1546 if (CS$<>8__locals1.blessed)
1548 CS$<>8__locals1.power /= 4;
1554 con.SetRefVal(
Element.GetId(CS$<>8__locals1.actRef.n1), (
int)CS$<>8__locals1.id);
1558 if (CS$<>8__locals1.TC.IsPC)
1560 Msg.Say(
"wishHappen");
1561 Dialog.InputName(
"dialogWish",
"q", delegate(
bool cancel,
string text)
1565 Msg.Say(
"wish", CS$<>8__locals1.TC, text,
null,
null);
1568 },
Dialog.InputType.Default);
1574 Msg.Say(
"gainAlly");
1576 EClass._zone.AddCard(chara2, CS$<>8__locals1.cc.pos.GetNearestPoint(
false,
false,
true,
false));
1577 chara2.MakeAlly(
false);
1578 chara2.PlaySound(
"identify", 1f,
true);
1579 chara2.PlayEffect(
"teleport",
true, 0f,
default(Vector3));
1582 case EffectId.CatsEye:
1585 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Blind, BlessedState.Normal,
default(
ActRef));
1588 CS$<>8__locals1.TC.AddCondition<
ConNightVision>(CS$<>8__locals1.power,
false);
1590 case EffectId.LevelDown:
1591 Msg.Say(
"nothingHappens");
1596 if (CS$<>8__locals1.CC == CS$<>8__locals1.TC)
1598 CS$<>8__locals1.TC.Say(
"love_curse_self", CS$<>8__locals1.TC,
null,
null);
1602 CS$<>8__locals1.TC.Say(
"love_curse", CS$<>8__locals1.CC, CS$<>8__locals1.TC,
null,
null);
1603 CS$<>8__locals1.TC.ModAffinity(CS$<>8__locals1.CC, -CS$<>8__locals1.power / 4,
false);
1605 CS$<>8__locals1.TC.ShowEmo(Emo.angry, 0f,
true);
1608 ActEffect.LoveMiracle(CS$<>8__locals1.TC, CS$<>8__locals1.CC, CS$<>8__locals1.power);
1610 case EffectId.Uncurse:
1611 case EffectId.EnchantWeapon:
1612 case EffectId.EnchantArmor:
1613 case EffectId.Lighten:
1614 case EffectId.Naming:
1615 case EffectId.ForgetItems:
1616 case EffectId.Breathe:
1618 case EffectId.Explosive:
1619 case EffectId.BallBubble:
1621 case EffectId.Arrow:
1623 case EffectId.Funnel:
1624 case EffectId.Summon:
1625 case EffectId.ModPotential:
1626 case EffectId.Bubble:
1628 case EffectId.MistOfDarkness:
1629 case EffectId.Puddle:
1630 case EffectId.AbsorbMana:
1631 case EffectId.Meteor:
1632 case EffectId.Exterminate:
1633 case EffectId.Earthquake:
1634 case EffectId.MagicMap:
1635 case EffectId.Escape:
1636 case EffectId.Boost:
1637 case EffectId.EnchantWeaponGreat:
1638 case EffectId.EnchantArmorGreat:
1639 case EffectId.Duplicate:
1640 case EffectId.Suicide:
1641 case EffectId.Reconstruction:
1642 case EffectId.DrainBlood:
1643 case EffectId.Scream:
1644 case EffectId.DropMine:
1646 case EffectId.UncurseEQ:
1647 case EffectId.UncurseEQGreater:
1649 CS$<>8__locals1.TC.Say(
"uncurseEQ" + (CS$<>8__locals1.blessed ?
"_bless" : (flag ?
"_curse" :
"")), CS$<>8__locals1.TC,
null,
null);
1650 CS$<>8__locals1.TC.PlaySound(
"uncurse", 1f,
true);
1651 CS$<>8__locals1.TC.PlayEffect(
"uncurse",
true, 0f,
default(Vector3));
1654 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.CurseEQ, BlessedState.Normal,
default(
ActRef));
1659 List<Thing> list =
new List<Thing>();
1660 CS$<>8__locals1.TC.things.Foreach(delegate(
Thing t)
1663 if (!t.isEquipped && !t.IsRangedWeapon && !CS$<>8__locals1.blessed)
1667 if (t.blessedState >= BlessedState.Normal)
1671 if (t.blessedState == BlessedState.Cursed)
1675 if (t.blessedState == BlessedState.Doomed)
1677 num11 =
EClass.rnd(1000);
1679 if (CS$<>8__locals1.blessed)
1683 if (CS$<>8__locals1.id == EffectId.UncurseEQGreater)
1688 if (CS$<>8__locals1.power >= num11)
1690 CS$<>8__locals1.TC.Say(
"uncurseEQ_success", t,
null,
null);
1691 t.SetBlessedState(BlessedState.Normal);
1692 if (t.isEquipped && t.HasElement(656, 1))
1694 CS$<>8__locals1.TC.body.Unequip(t,
true);
1698 success = num12 + 1;
1705 foreach (
Thing thing5
in list)
1707 Card rootCard2 = thing5.GetRootCard();
1708 if (rootCard2 !=
null)
1710 rootCard2.TryStack(thing5);
1713 if (success == 0 && fail == 0)
1715 CS$<>8__locals1.TC.SayNothingHappans();
1720 CS$<>8__locals1.TC.Say(
"uncurseEQ_fail",
null,
null);
1725 case EffectId.CurseEQ:
1727 if (CS$<>8__locals1.CC !=
null && CS$<>8__locals1.CC != CS$<>8__locals1.TC)
1729 CS$<>8__locals1.TC.Say(
"curse", CS$<>8__locals1.CC, CS$<>8__locals1.TC,
null,
null);
1731 CS$<>8__locals1.TC.PlaySound(
"curse3", 1f,
true);
1732 CS$<>8__locals1.TC.PlayEffect(
"curse",
true, 0f,
default(Vector3));
1733 if (
EClass.rnd(150 + CS$<>8__locals1.TC.LUC * 5 + CS$<>8__locals1.TC.Evalue(972) * 20) >= CS$<>8__locals1.power + (flag ? 200 : 0) || CS$<>8__locals1.TC.TryNullifyCurse())
1737 List<Thing> list4 = CS$<>8__locals1.TC.things.List((
Thing t) => t.isEquipped && t.blessedState != BlessedState.Doomed && !t.IsToolbelt && (t.blessedState < BlessedState.Blessed ||
EClass.rnd(10) == 0),
false);
1738 if (list4.Count == 0)
1740 CS$<>8__locals1.CC.SayNothingHappans();
1744 CS$<>8__locals1.TC.Say(
"curse_hit", CS$<>8__locals1.TC, thing6,
null,
null);
1745 thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
1749 case EffectId.HolyVeil:
1752 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Fear, BlessedState.Normal,
default(
ActRef));
1755 CS$<>8__locals1.TC.AddCondition<
ConHolyVeil>(CS$<>8__locals1.power,
false);
1757 case EffectId.Faith:
1759 Religion faith = CS$<>8__locals1.tc.Chara.faith;
1762 CS$<>8__locals1.tc.SayNothingHappans();
1765 CS$<>8__locals1.tc.PlayEffect(
"aura_heaven",
true, 0f,
default(Vector3));
1766 CS$<>8__locals1.tc.PlaySound(
"aura_heaven", 1f,
true);
1767 CS$<>8__locals1.tc.Say(
"faith", CS$<>8__locals1.tc, faith.Name,
null);
1770 CS$<>8__locals1.tc.Say(
"faith_curse", CS$<>8__locals1.tc, faith.Name,
null);
1773 if (CS$<>8__locals1.blessed)
1775 CS$<>8__locals1.tc.Say(
"faith_bless", CS$<>8__locals1.tc, faith.Name,
null);
1777 CS$<>8__locals1.tc.ModExp(306, CS$<>8__locals1.power * 10);
1778 CS$<>8__locals1.tc.ModExp(85, CS$<>8__locals1.power * 10);
1779 if (CS$<>8__locals1.tc.elements.Base(85) >= CS$<>8__locals1.tc.elements.Value(306))
1781 CS$<>8__locals1.tc.elements.SetBase(85, CS$<>8__locals1.tc.elements.Value(306), 0);
1789 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Fear, BlessedState.Normal,
default(
ActRef));
1792 CS$<>8__locals1.TC.AddCondition<
ConHero>(CS$<>8__locals1.power,
false);
1794 case EffectId.Acidproof:
1795 if (CS$<>8__locals1.blessed)
1797 CS$<>8__locals1.power /= 4;
1799 if (CS$<>8__locals1.TC.IsPC)
1801 CS$<>8__locals1.TC.Say(
"pc_pain",
null,
null);
1803 CS$<>8__locals1.TC.Say(
"drink_acid", CS$<>8__locals1.TC,
null,
null);
1804 CS$<>8__locals1.TC.DamageHP(CS$<>8__locals1.power / 5, 923, CS$<>8__locals1.power, AttackSource.None,
null,
true);
1806 case EffectId.Levitate:
1809 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.Gravity, BlessedState.Normal,
default(
ActRef));
1812 CS$<>8__locals1.TC.AddCondition<
ConLevitate>(CS$<>8__locals1.power,
false);
1814 case EffectId.Gravity:
1815 if (CS$<>8__locals1.blessed)
1817 CS$<>8__locals1.power /= 4;
1819 CS$<>8__locals1.TC.AddCondition<
ConGravity>(CS$<>8__locals1.power,
false);
1822 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.BuffStats, BlessedState.Cursed,
new ActRef
1829 case EffectId.Mutation:
1830 CS$<>8__locals1.TC.MutateRandom(1, 100,
false, state);
1831 if (
EClass.core.config.game.waitOnDebuff)
1833 EClass.Wait(0.3f, CS$<>8__locals1.TC);
1837 case EffectId.CureMutation:
1838 CS$<>8__locals1.TC.MutateRandom(-1, 100,
false, state);
1840 case EffectId.TransGender:
1842 CS$<>8__locals1.tc.PlaySound(
"mutation", 1f,
true);
1843 CS$<>8__locals1.tc.PlayEffect(
"mutation",
true, 0f,
default(Vector3));
1844 int gender = CS$<>8__locals1.tc.bio.gender;
1845 int gender2 = (gender == 2) ? 1 : ((gender == 1) ? 2 : ((
EClass.rnd(2) == 0) ? 2 : 1));
1846 if (gender != 0 &&
EClass.rnd(10) == 0)
1850 CS$<>8__locals1.tc.bio.SetGender(gender2);
1851 CS$<>8__locals1.tc.Say(
"transGender", CS$<>8__locals1.tc, Gender.Name(CS$<>8__locals1.tc.bio.gender),
null);
1852 CS$<>8__locals1.tc.Talk(
"tail",
null,
null,
false);
1853 if (CS$<>8__locals1.blessed && CS$<>8__locals1.tc.bio.age > 1)
1855 CS$<>8__locals1.tc.Say(
"ageDown", CS$<>8__locals1.tc,
null,
null);
1863 CS$<>8__locals1.tc.Say(
"ageUp", CS$<>8__locals1.tc,
null,
null);
1864 Biography bio2 = CS$<>8__locals1.tc.bio;
1865 int num6 = bio2.age;
1866 bio2.age = num6 + 1;
1873 string text2 = CS$<>8__locals1.actRef.n1;
1877 text3 =
EClass.sources.stats.alias[text2].curse;
1878 if (!text3.IsEmpty())
1885 if (!CS$<>8__locals1.actRef.aliasEle.IsEmpty())
1887 con.SetElement(
EClass.sources.elements.alias[CS$<>8__locals1.actRef.aliasEle].id);
1890 condition.isPerfume = (CS$<>8__locals1.TC.IsPC && CS$<>8__locals1.actRef.isPerfume);
1891 Condition condition2 = CS$<>8__locals1.TC.AddCondition(condition,
false);
1892 if (condition2 !=
null && condition2.isPerfume)
1894 condition2.value = 3;
1895 Msg.Say(
"perfume", CS$<>8__locals1.TC,
null,
null,
null);
1897 if (!text3.IsEmpty())
1899 CS$<>8__locals1.CC.DoHostileAction(CS$<>8__locals1.TC,
false);
1904 case EffectId.Debuff:
1906 CS$<>8__locals1.CC.DoHostileAction(CS$<>8__locals1.TC,
false);
1907 bool isPowerful = CS$<>8__locals1.TC.IsPowerful;
1908 string n = CS$<>8__locals1.actRef.n1;
1909 int power2 = CS$<>8__locals1.power;
1910 int num7 = CS$<>8__locals1.TC.WIL * (isPowerful ? 20 : 5);
1912 if (condition3 !=
null)
1914 num7 += condition3.power * 5;
1916 if (
EClass.rnd(power2) < num7 /
EClass.sources.stats.alias[n].hexPower &&
EClass.rnd(10) != 0)
1918 CS$<>8__locals1.TC.Say(
"debuff_resist", CS$<>8__locals1.TC,
null,
null);
1919 CS$<>8__locals1.CC.DoHostileAction(CS$<>8__locals1.TC,
false);
1922 CS$<>8__locals1.TC.AddCondition(
Condition.Create(n, CS$<>8__locals1.power, delegate(
Condition con)
1924 con.givenByPcParty = CS$<>8__locals1.CC.IsPCParty;
1925 if (!CS$<>8__locals1.actRef.aliasEle.IsEmpty())
1927 con.SetElement(
EClass.sources.elements.alias[CS$<>8__locals1.actRef.aliasEle].id);
1930 if (n ==
"ConBane" && CS$<>8__locals1.CC.HasElement(1416, 1))
1934 CS$<>8__locals1.CC.DoHostileAction(CS$<>8__locals1.TC,
false);
1935 if (
EClass.core.config.game.waitOnDebuff && !CS$<>8__locals1.CC.IsPC)
1937 EClass.Wait(0.3f, CS$<>8__locals1.TC);
1942 case EffectId.Weaken:
1944 case EffectId.NeckHunt:
1945 CS$<>8__locals1.CC.TryNeckHunt(CS$<>8__locals1.TC, CS$<>8__locals1.power,
false);
1947 case EffectId.PuddleEffect:
1948 CS$<>8__locals1.TC.DamageHP(CS$<>8__locals1.power / 5, CS$<>8__locals1.actRef.idEle, CS$<>8__locals1.power, AttackSource.None,
null,
true);
1950 case EffectId.RemedyJure:
1951 CS$<>8__locals1.TC.HealHP(1000000, HealSource.Magic);
1952 CS$<>8__locals1.TC.CureHost(CureType.Jure, CS$<>8__locals1.power, state);
1953 CS$<>8__locals1.TC.Say(
"heal_jure", CS$<>8__locals1.TC,
null,
null);
1955 case EffectId.JureHeal:
1957 case EffectId.KizuamiTrick:
1959 EClass.game.religions.Trickery.Talk(
"ability",
null,
null);
1960 bool hex = CS$<>8__locals1.CC.IsHostile(CS$<>8__locals1.TC);
1961 List<
SourceStat.
Row> list5 = (from con in EClass.sources.stats.rows
1962 where con.tag.Contains(
"random") && con.@group == (hex ?
"Debuff" :
"Buff")
1964 int power3 = CS$<>8__locals1.power;
1965 for (
int l = 0; l < 4 +
EClass.rnd(2); l++)
1969 ActEffect.Proc(hex ? EffectId.Debuff : EffectId.Buff, CS$<>8__locals1.CC, CS$<>8__locals1.TC, power3,
new ActRef
1974 if (
EClass.core.config.game.waitOnDebuff && !CS$<>8__locals1.CC.IsPC)
1976 EClass.Wait(0.3f, CS$<>8__locals1.TC);
1981 case EffectId.CureCorruption:
1982 CS$<>8__locals1.TC.PlaySound(
"heal", 1f,
true);
1983 CS$<>8__locals1.TC.PlayEffect(
"heal",
true, 0f,
default(Vector3));
1986 CS$<>8__locals1.TC.Say(
"cureCorruption_curse", CS$<>8__locals1.TC,
null,
null);
1987 CS$<>8__locals1.TC.mana.Mod(9999);
1988 CS$<>8__locals1.TC.ModCorruption(CS$<>8__locals1.power);
1991 CS$<>8__locals1.TC.Say(
"cureCorruption", CS$<>8__locals1.TC,
null,
null);
1992 CS$<>8__locals1.TC.ModCorruption(-CS$<>8__locals1.power * 2);
1994 case EffectId.Headpat:
1995 CS$<>8__locals1.CC.Cuddle(CS$<>8__locals1.TC,
true);
1997 case EffectId.RemoveHex:
1998 case EffectId.RemoveHexAll:
2001 CS$<>8__locals1.<Proc>g__Redirect|0(EffectId.CurseEQ, BlessedState.Normal,
default(
ActRef));
2006 if (condition4.Type == ConditionType.Debuff && !condition4.IsKilled &&
EClass.rnd(CS$<>8__locals1.power * 2) >
EClass.rnd(condition4.power))
2008 CS$<>8__locals1.CC.Say(
"removeHex", CS$<>8__locals1.TC, condition4.Name.ToLower(),
null);
2009 condition4.Kill(
false);
2010 if (CS$<>8__locals1.id == EffectId.RemoveHex)
2016 CS$<>8__locals1.TC.AddCondition<
ConHolyVeil>(CS$<>8__locals1.power / 2,
false);
2018 case EffectId.ShutterHex:
2020 if (!CS$<>8__locals1.CC.IsHostile(CS$<>8__locals1.TC))
2025 using (List<Condition>.Enumerator enumerator4 = CS$<>8__locals1.TC.conditions.GetEnumerator())
2027 while (enumerator4.MoveNext())
2029 if (enumerator4.Current.Type == ConditionType.Debuff)
2038 CS$<>8__locals1.CC.SayNothingHappans();
2041 CS$<>8__locals1.TC.pos.PlayEffect(
"holyveil");
2042 CS$<>8__locals1.TC.pos.PlaySound(
"holyveil",
true, 1f,
true);
2043 CS$<>8__locals1.TC.pos.PlaySound(
"atk_eleSound",
true, 1f,
true);
2044 CS$<>8__locals1.TC.conditions.ForeachReverse(delegate(
Condition c)
2046 if (c.Type == ConditionType.Debuff)
2051 CS$<>8__locals1.TC.Say(
"abShutterHex", CS$<>8__locals1.TC,
null,
null);
2052 CS$<>8__locals1.TC.pos.ForeachNeighbor(delegate(
Point p)
2054 foreach (
Chara chara3
in p.ListCharas())
2056 if (!chara3.IsHostile(CS$<>8__locals1.CC))
2060 int dmg2 =
Dice.Create(
"SpShutterHex", CS$<>8__locals1.power * hex, CS$<>8__locals1.CC, CS$<>8__locals1.actRef.act).Roll();
2061 chara3.DamageHP(dmg2, 919, CS$<>8__locals1.power, AttackSource.None, CS$<>8__locals1.CC,
true);
2068 Point randomPoint2 = CS$<>8__locals1.CC.pos.GetRandomPoint(1,
true,
true,
false, 100);
2069 Point point = (randomPoint2 !=
null) ? randomPoint2.GetNearestPoint(
false,
false,
true,
false) :
null;
2070 if (point ==
null || !CS$<>8__locals1.CC.CanSeeLos(point, -1))
2074 CS$<>8__locals1.CC.Say(
"abDraw", CS$<>8__locals1.CC, CS$<>8__locals1.TC,
null,
null);
2075 if (CS$<>8__locals1.TC.HasCondition<
ConGravity>())
2077 CS$<>8__locals1.CC.SayNothingHappans();
2080 CS$<>8__locals1.TC.MoveImmediate(point, !
EClass.core.config.camera.smoothFollow,
true);
2081 if (CS$<>8__locals1.CC.id ==
"tentacle")
2083 CS$<>8__locals1.TC.AddCondition<
ConEntangle>(100,
false);
2088 case EffectId.Steal:
2094 if (CS$<>8__locals1.TC.Evalue(426) > 0)
2096 CS$<>8__locals1.TC.Say((CS$<>8__locals1.actRef.n1 ==
"money") ?
"abStealNegateMoney" :
"abStealNegate", CS$<>8__locals1.TC,
null,
null);
2099 Thing thing7 =
null;
2100 bool flag9 = CS$<>8__locals1.actRef.n1 ==
"food";
2101 if (CS$<>8__locals1.actRef.n1 ==
"money")
2103 int num8 = CS$<>8__locals1.TC.GetCurrency(
"money");
2106 num8 = Mathf.Clamp(
EClass.rnd(num8 / 10), 1,
EClass.rndHalf(CS$<>8__locals1.CC.LV * 200));
2107 thing7 =
ThingGen.Create(
"money", -1, -1).SetNum(num8);
2108 CS$<>8__locals1.TC.ModCurrency(-num8,
"money");
2113 Func<Thing, bool> func = (
Thing t) =>
true;
2116 func = ((
Thing t) => t.IsFood);
2118 List<Thing> list6 = CS$<>8__locals1.TC.things.List(delegate(
Thing t)
2120 Card parentCard = t.parentCard;
2121 return !(((parentCard !=
null) ? parentCard.trait :
null) is
TraitChestMerchant) && !(t.trait is
TraitTool) && (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);
2123 if (list6.Count > 0)
2125 thing7 = list6.RandomItem<
Thing>();
2128 thing7 = thing7.Split(1);
2134 CS$<>8__locals1.CC.Say(
"abStealNothing", CS$<>8__locals1.CC, CS$<>8__locals1.TC,
null,
null);
2137 thing7.SetInt(116, 1);
2138 CS$<>8__locals1.TC.PlaySound(thing7.material.GetSoundDrop(thing7.sourceCard), 1f,
true);
2139 CS$<>8__locals1.CC.Pick(thing7,
false,
true);
2140 CS$<>8__locals1.CC.Say(
"abSteal", CS$<>8__locals1.CC, CS$<>8__locals1.TC, thing7.Name,
null);
2141 if (!(CS$<>8__locals1.actRef.n1 ==
"food"))
2143 CS$<>8__locals1.CC.Say(
"abStealEscape", CS$<>8__locals1.CC,
null,
null);
2144 CS$<>8__locals1.CC.Teleport(
ActEffect.GetTeleportPos(CS$<>8__locals1.tc.pos, 30),
true,
false);
2147 if (CS$<>8__locals1.CC.hunger.value != 0)
2149 CS$<>8__locals1.CC.InstantEat(thing7,
true);
2154 case EffectId.ThrowPotion:
2155 if (!CS$<>8__locals1.CC.pos.Equals(CS$<>8__locals1.TC.pos))
2165 }.RandomItem<
string>(), -1, -1);
2166 ActThrow.Throw(CS$<>8__locals1.CC, CS$<>8__locals1.TC.pos, t2, ThrowMethod.Punish, 0.7f);
2175 bool flag10 = CS$<>8__locals1.id == EffectId.DamageBody || CS$<>8__locals1.id == EffectId.DamageBodyGreat;
2176 bool mind2 = CS$<>8__locals1.id == EffectId.DamageMind || CS$<>8__locals1.id == EffectId.DamageMindGreat;
2177 int num9 = (CS$<>8__locals1.id == EffectId.DamageBody || CS$<>8__locals1.id == EffectId.DamageMind) ? 1 : (4 +
EClass.rnd(4));
2178 if (CS$<>8__locals1.id == EffectId.Weaken)
2180 flag10 = (
EClass.rnd(2) == 0);
2186 CS$<>8__locals1.TC.PlayEffect(
"debuff",
true, 0f,
default(Vector3));
2187 CS$<>8__locals1.TC.PlaySound(
"debuff", 1f,
true);
2189 CS$<>8__locals1.TC.Say(flag10 ?
"damageBody" :
"damageMind", CS$<>8__locals1.TC,
null,
null);
2190 for (
int m = 0; m < num9; m++)
2192 CS$<>8__locals1.TC.DamageTempElements(CS$<>8__locals1.power, flag10, mind2);
2194 if (CS$<>8__locals1.TC.IsPC)
2201 if (CS$<>8__locals1.id == EffectId.JureHeal)
2203 EClass.game.religions.Healing.Talk(
"ability",
null,
null);
2205 int num10 =
Dice.Create((CS$<>8__locals1.actRef.act !=
null &&
EClass.sources.calc.map.ContainsKey(CS$<>8__locals1.actRef.act.ID)) ? CS$<>8__locals1.actRef.act.ID :
"SpHealLight", CS$<>8__locals1.power, CS$<>8__locals1.CC, CS$<>8__locals1.actRef.act).Roll();
2208 CS$<>8__locals1.TC.DamageHP(num10 / 2, 919, CS$<>8__locals1.power, AttackSource.None,
null,
true);
2211 CS$<>8__locals1.TC.HealHPHost(num10, HealSource.Magic);
2212 CS$<>8__locals1.TC.CureHost(CureType.Heal, CS$<>8__locals1.power, state);
2213 CS$<>8__locals1.TC.Say((CS$<>8__locals1.power >= 300) ?
"heal_heavy" :
"heal_light", CS$<>8__locals1.TC,
null,
null);
2220 public static void Poison(
Chara tc,
Chara c,
int power)
2222 tc.Say(
"eat_poison", tc,
null,
null);
2223 tc.Talk(
"scream",
null,
null,
false);
2224 int num = (int)Mathf.Sqrt((
float)(power * 100));
2225 tc.DamageHP(num * 2 +
EClass.rnd(num), 915, power, AttackSource.None,
null,
true);
2226 if (!tc.isDead && !tc.IsPC)
2228 EClass.player.ModKarma(-5);
2233 public static void LoveMiracle(
Chara tc,
Chara c,
int power)
2237 tc.Say(
"love_ground", tc,
null,
null);
2241 tc.Say(
"love_chara", c, tc,
null,
null);
2243 tc.ModAffinity(
EClass.pc, power / 4,
true);
2250 tc.MakeMilk(
true, 1,
true);
2253 tc.MakeEgg(
true, 1,
true);
2257 public static Point GetTeleportPos(
Point org,
int radius = 6)
2260 for (
int i = 0; i < 10000; i++)
2265 if (point.IsValid && point.IsInBounds && !point.cell.blocked && point.Distance(org) >= radius / 3 + 1 && !point.cell.HasZoneStairs(
true))
2270 return org.GetRandomNeighbor().GetNearestPoint(
false,
true,
true,
false);
2274 public static bool Wish(
string s,
string name,
int power)
2277 string netMsg =
GameLang.Parse(
"wish".langGame(),
true, name, s,
null,
null);
2278 bool net = EClass.core.config.net.enable &&
EClass.core.config.net.sendEvent;
2280 int wishLv = 10 + power / 4;
2281 int wishValue = power * 200;
2282 Debug.Log(power.ToString() +
"/" + wishValue.ToString());
2283 string _s = s.ToLower();
2284 using (List<CardRow>.Enumerator enumerator =
EClass.sources.cards.rows.GetEnumerator())
2286 while (enumerator.MoveNext())
2288 CardRow r = enumerator.Current;
2289 if (r.quality >= 4 || r.HasTag(CTAG.noWish))
2292 if (!(
id ==
"medal") && !(
id ==
"plat") && !(
id ==
"money") && !(
id ==
"money2"))
2299 string text = r.GetName(1).ToLower();
2300 int score =
ActEffect.Compare(_s, text);
2310 SourceCategory.Row category = EClass.sources.cards.map[r.id].Category;
2311 if (category.IsChildOf(
"weapon") || category.IsChildOf(
"armor") || category.IsChildOf(
"ranged"))
2313 CardBlueprint.SetRarity(Rarity.Legendary);
2315 Thing thing = ThingGen.Create(r.id, -1, wishLv);
2317 string id2 = thing.id;
2318 if (!(id2 ==
"rod_wish"))
2320 if (!(id2 ==
"money"))
2322 if (!(id2 ==
"plat"))
2324 if (!(id2 ==
"money2"))
2328 num = EClass.rndHalf(wishValue / 3000 + 4);
2333 num = EClass.rndHalf(wishValue / 1000 + 4);
2338 num = EClass.rndHalf(wishValue / 2000 + 4);
2343 num = EClass.rndHalf(wishValue);
2348 thing.c_charges = 0;
2354 if (num == 1 && thing.trait.CanStack)
2356 int num2 = wishValue;
2357 for (int i = 0; i < 1000; i++)
2359 int num3 = thing.GetPrice(CurrencyType.Money, false, PriceType.Default, null) + 500 + i * 200;
2367 if (thing.trait is TraitDeed)
2372 Debug.Log(string.Concat(new string[]
2380 EClass._zone.AddCard(thing, EClass.pc.pos);
2381 netMsg = netMsg + Lang.space + GameLang.Parse(
"wishNet".langGame(), Msg.IsThirdPerson(thing), Msg.GetName(thing).ToTitleCase(false), null, null, null);
2384 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2386 Msg.Say(
"dropReward");
2393 if (list.Count == 0)
2395 netMsg = netMsg + Lang.space +
"wishFail".langGame();
2398 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2400 Msg.Say(
"wishFail");
2406 Debug.Log(
string.Concat(
new string[]
2408 wishItem.score.ToString(),
2420 public static int Compare(
string s,
string t)
2439 public static int RapidCount;
2442 public static float RapidDelay;
2445 public static int angle = 20;
2448 private class WishItem
2457 public Action action;