2using System.Collections.Generic;
38 if (points.Count == 0)
52 List<Card> list =
new List<Card>();
56 power = power * actref.refThing.material.hardness / 10;
58 string text =
id.ToString();
59 string text2 = (
EClass.
sources.
calc.map.ContainsKey(text) ? text : (
EClass.
sources.
calc.map.ContainsKey(
"Sp" + text) ? (
"Sp" + text) : (text.ToLowerInvariant() +
"_")));
60 foreach (
Point p
in points)
74 text2 =
"SpEarthquake";
82 if (CC.isChara && p.
Equals(CC.pos) && points.Count >= 2)
102 effect.sr.color = elementRef.colorSprite;
104 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
105 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
106 componentInChildren.startColor = startColor;
116 float num3 = 0.06f * (float)CC.pos.Distance(p);
118 TweenUtil.Tween(num3,
null, delegate
130 effect =
Effect.
Get(
"Element/ball_" + ((e.id == 0) ?
"Void" : e.source.alias.Remove(0, 3)));
133 effect =
Effect.
Get(
"Element/ball_Fire");
135 float startDelay = ((
id ==
EffectId.Meteor) ? 0.1f : 0.04f) * (float)CC.pos.Distance(p);
151 effect.
Play(CC.pos, 0f, p);
158 effect.
Play(p).Flip(p.
x > CC.pos.x);
163 if (CC.IsPCFactionOrMinion && (CC.HasElement(1651) ||
EClass.
pc.
Evalue(1651) >= 2))
170 if (
item.IsPCFactionOrMinion)
175 else if ((e.id != 910 && e.id != 911) || !
item.IsFood || !
item.category.IsChildOf(
"foodstuff"))
233 bool isChara = CC.isChara;
237 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
245 Dice dice =
Dice.
Create(text2, power, CC, (actref.refThing !=
null) ? null : actref.act);
264 num4 = num4 * (int)Mathf.Min(70f + Mathf.Sqrt(CC.Evalue(101)) * 3f, 200f) / 100;
269 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
277 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as
Chara)) || (flag && c == CC))
281 if (isChara && points.Count > 1 && c !=
null && c.
isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.
Chara))
283 int num5 = CC.Evalue(302);
284 if (!CC.IsPC && CC.IsPCFactionOrMinion)
288 if (CC.HasElement(1214))
298 CC.ModExp(302, CC.IsPC ? 10 : 50);
302 num4 =
EClass.
rnd(num4 * 100 / (100 + num5 * 10 + 1));
305 CC.ModExp(302, CC.IsPC ? 20 : 100);
312 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) &&
EClass.
pc.
HasElement(1214))) &&
EClass.
rnd(5) != 0)
319 if (lang ==
"spell_hand")
321 string[] list2 =
Lang.
GetList(
"attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty(
"Touch") :
"Touch"));
322 string @ref =
"_elehand".lang(e.source.GetAltname(2), list2[4]);
323 CC.Say(c.
IsPCParty ?
"cast_hand_ally" :
"cast_hand", CC, c, @ref, c.
IsPCParty ? list2[1] : list2[2]);
327 CC.Say(lang +
"_hit", CC, c, e.
Name.ToLower());
330 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing !=
null) ?
EClass.
_map.
FindChara(actref.refThing.c_uidRefCard) :
null));
349 num4 = num4 * Act.powerMod / 100;
354 c.
DamageHP((
int)num4, e.id, power * num / 100, attackSource, chara ?? CC);
357 long num6 = num4 * num / 100;
358 Debug.Log(num4 +
" v:" + num6 +
" evalue:" + e.Value +
" power:" + power +
" elepMod:" + num);
364 CC.Chara.mana.Mod((
int)num6);
380 EffectId.Suicide => CC.LV / 3 + 40,
381 EffectId.Meteor => 50 + power / 20,
382 _ => (actref.refThing !=
null) ? actref.refThing.material.hardness : (30 + power / 20),
384 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (
id == EffectId.Explosive && actref.refThing ==
null)) && !(EClass._zone is
Zone_Vernis);
420 p.
ModFire(-20, extinguish:
true);
425 foreach (
Card item3
in list)
441 bool flag2 = isNeg || flag;
457 if (list3.Count == 0)
461 CC.
Say(
"spell_earthquake", CC, element.
Name.ToLower());
471 DamageEle(CC,
id, power, element, list3, actRef,
"spell_earthquake");
480 if (list2.Count == 0)
484 CC.
Say(
"spell_ball", CC, element.
Name.ToLower());
494 DamageEle(CC,
id, power, element, list2, actRef,
"spell_ball");
502 List<Point> list4 =
new List<Point>();
503 list4.Add(tp.
Copy());
509 if (!
DamageEle(CC,
id, power, element, list4, actRef, (
id ==
EffectId.DrainBlood ||
id ==
EffectId.DrainMana) ?
"" : ((
id ==
EffectId.Sword) ?
"spell_sword" :
"spell_hand")))
511 CC.
Say(
"spell_hand_miss", CC, element.
Name.ToLower());
519 List<Point> list =
new List<Point>();
521 CC.
Say((
id ==
EffectId.MoonSpear) ?
"spell_spear" :
"spell_arrow", CC, element.
Name.ToLower());
527 DamageEle(CC,
id, power, element, list, actRef, (
id ==
EffectId.MoonSpear) ?
"spell_spear" :
"spell_arrow");
532 if (actRef.n1 ==
"special")
537 CC.
Say(
"summon_ally", CC);
540 CC.
Say(
"summon_ally_fail", CC);
543 string id3 = actRef.n1;
548 bool flag4 = actRef.n1 ==
"special";
555 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ?
EClass.
rnd(2) : 0);
562 case "special_force":
573 num3 = Mathf.Clamp(7 + CC.
LV / 100, 4, 20);
578 for (
int j = 0; j < num3; j++)
585 if (point ==
null || !point.
IsValid)
593 CardBlueprint.current.lv = num5;
597 CardBlueprint.current.idEle = text;
652 string n = actRef.n1;
653 if (!(n ==
"shadow"))
655 if (!(n ==
"special"))
657 num6 = chara.LV * (100 + power / 10) / 100 + power / 30;
662 num6 = power / 10 + 1;
674 if (!(n ==
"shadow"))
676 if (n ==
"special_force")
683 chara.hp = chara.MaxHP / 2;
688 Chara chara2 = chara;
690 chara2.hostility = hostility2;
692 else if (!(actRef.n1 ==
"monster") || actRef.refThing ==
null)
704 CC.
Say(
"summon_ally_fail", CC);
712 CC.
Say(
"summon_ally_fail", CC);
715 CC.
Say(
"spell_funnel", CC, element.
Name.ToLower());
720 chara3.
SetLv(power / 15);
730 if (list5.Count == 0)
734 CC.
Say(
"spell_breathe", CC, element.
Name.ToLower());
744 DamageEle(CC,
id, power, element, list5, actRef,
"spell_breathe");
768 float radius2 = ((
id ==
EffectId.Suicide) ? 3.5f : ((
float)((
id ==
EffectId.BallBubble) ? 2 : 5)));
769 if (
id ==
EffectId.Explosive && actRef.refThing !=
null)
771 radius2 = 2 + actRef.refThing.Evalue(666);
788 bool flag5 =
id == EffectId.Explosive ||
id ==
EffectId.Suicide;
790 if (list7.Count == 0)
794 cc.
Say((
id ==
EffectId.Suicide) ?
"abSuicide" :
"spell_ball", cc, element.
Name.ToLower());
804 DamageEle(actRef.origin ?? cc,
id, power, element, list7, actRef, (
id ==
EffectId.Suicide) ?
"suicide" :
"spell_ball");
814 if (list6.Count == 0)
818 CC.
Say(
"spell_bolt", CC, element.
Name.ToLower());
828 DamageEle(CC,
id, power, element, list6, actRef,
"spell_bolt");
838 CC.
Say(
"ab" +
id, CC);
842 int id2 = ((
id ==
EffectId.Puddle) ? 4 : ((
id ==
EffectId.Bubble) ? 5 : ((
id ==
EffectId.MistOfDarkness) ? 6 : 7)));
845 if (
id ==
EffectId.Bubble && CC.
id ==
"cancer")
850 for (
int i = 0; i < num; i++)
875 List<Card> list8 = tp.
ListCards().ToList();
877 if (list8.Contains(CC))
883 foreach (
Card item2
in list8)
885 if (tc ==
null || item2 == tc)
887 Proc(
id, power, state, CC, item2, actRef);
888 if (flag2 && item2.
isChara && item2 != CC)
890 CC.DoHostileAction(item2);
892 if (actRef.refThing ==
null || !(actRef.refThing.trait is
TraitRod))
897 if ((uint)(effectId - 200) <= 4u)
906 CC.SayNothingHappans();
925 int orgPower = power;
934 Point randomPoint = CC.
pos.
GetRandomPoint(2, requireLos:
false, allowChara:
false, allowBlocked:
false, 200);
937 CC.
Say(
"split_fail", CC);
950 CC.
Say(
"escape", CC);
961 CC.
Say(
"burn_mana", CC);
969 if (list2.Count == 0)
977 item.PlayEffect(
"vanish");
989 thing.c_idRefCard =
"dog_mine";
990 Zone.ignoreSpawnAnime =
true;
994 case EffectId.LittleSisterMigration:
1001 List<Chara> list3 =
new List<Chara>();
1016 if (list3.Count == 0)
1022 foreach (
Chara item2
in list3)
1027 Msg.
Say(
"little_migration", list3.Count.ToString() ??
"");
1029 EClass.player.stats.sistersDepart += list3.Count;
1040 CC.
Say(
"abMagicMap_curse", CC);
1046 CC.
Say(
"abMagicMap", CC);
1064 Dice dice =
Dice.
Create(
"ActManaAbsorb", power, CC, (actRef.refThing !=
null) ? null : actRef.act);
1065 TC.mana.Mod(dice.
Roll());
1066 TC.PlaySound(
"heal");
1067 TC.PlayEffect(
"heal");
1070 CC.
Say(
"absorbMana", CC);
1082 TC.PlaySound(
"curse3");
1083 TC.PlayEffect(
"curse");
1084 TC.Say(
"forgetItems",
TC);
1085 int num5 = power / 50 + 1 +
EClass.
rnd(3);
1086 List<Thing> source =
TC.things.List((
Thing t) => t.c_IDTState == 0);
1087 for (
int j = 0; j < num5; j++)
1089 source.RandomItem().c_IDTState = 5;
1098 bool armor =
id == EffectId.EnchantArmor ||
id ==
EffectId.EnchantArmorGreat;
1099 bool flag4 =
id == EffectId.EnchantWeaponGreat ||
id ==
EffectId.EnchantArmorGreat;
1109 cc.
Say(
"enc_curse", tc);
1113 int num4 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
1114 if (tc.
encLV >= num4)
1116 cc.
Say(
"enc_resist", tc);
1126 bool flag6 =
id ==
EffectId.GreaterIdentify;
1176 int num3 = (tc.isWeightChanged ? tc.c_weight : tc.
Thing.
source.weight);
1177 tc.isWeightChanged =
true;
1185 num3 = (int)(0.01f * (
float)num3 * (float)power * 0.75f + 500f);
1186 if (num3 < 0 || num3 > 10000000)
1204 cc.
Say(
"lighten_curse", cc, tc);
1208 num3 = num3 * (100 - power / 10) / 100;
1226 cc.
Say(
"lighten", cc, tc);
1250 cc.
Say(
"reconstruct", cc, tc);
1251 EClass.game.cards.uidNext +=
EClass.
rnd(30);
1255 blesstedState = state
1258 thing3.genLv = num6;
1260 CC.
Pick(thing3, msg:
false);
1267 case EffectId.ChangeMaterialLesser:
1269 case EffectId.ChangeMaterialGreater:
1281 string name = tc.
Name;
1284 bool num =
id ==
EffectId.ChangeMaterialGreater;
1285 bool flag2 =
id ==
EffectId.ChangeMaterialLesser;
1305 num2 = Mathf.Clamp(num2 +
EClass.
rnd(2), 0, 4);
1308 text2 = ((text2 ==
"metal") ?
"leather" :
"metal");
1311 for (
int i = 0; i < 1000; i++)
1322 if ((tc.
id ==
"log" || tc.
id ==
"branch") && tc.material.alias ==
"carbone")
1338 cc.
Say(
"materialChanged", name, row.GetName());
1359 Dialog.
InputName(
"dialogVoidReturn".lang(max.ToString() ??
""), max.ToString() ??
"", delegate(
bool cancel,
string text)
1363 destLv = Mathf.Abs(text.ToInt());
1364 destLv = Mathf.Clamp(destLv, 1, max) * -1;
1366 Debug.Log(destLv +
"/" + zone);
1372 Msg.
Say(
"returnComplete");
1373 EClass.player.uidLastTravelZone = 0;
1375 EClass.player.lastZonePos =
null;
1376 EClass.player.returnInfo =
null;
1403 Msg.
Say(
"returnNowhere");
1416 EClass.player.returnInfo =
null;
1466 Thing t3 =
ThingGen.
Create(
new string[6] {
"330",
"331",
"334",
"335",
"336",
"1142" }.RandomItem());
1489 TC.pos.PlayEffect(
"holyveil");
1490 TC.pos.PlaySound(
"holyveil");
1491 TC.pos.PlaySound(
"atk_eleSound");
1492 TC.conditions.ForeachReverse(delegate(
Condition c)
1499 TC.Say(
"abShutterHex",
TC);
1501 List<Chara> list6 =
TC.pos.ListCharasInRadius(
TC, 4, (
Chara c) => !c.IsFriendOrAbove(CC));
1502 for (
int l = 0; l < num10; l++)
1504 TweenUtil.Delay((
float)l * 0.1f, delegate
1508 foreach (
Chara item4
in list6)
1513 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
1515 componentInChildren.startColor = startColor;
1517 TweenUtil.Delay((
float)l * 0.1f, delegate
1519 effect.
Play(center, 0f, pos);
1521 int num11 =
Dice.
Create(
"SpShutterHex", power, CC, (actRef.refThing !=
null) ? null : actRef.act).Roll();
1530 if (CC.
Dist(
TC) <= 1 || (CC.IsPCFactionOrMinion && TC.IsPCFactionOrMinion &&
TC.isRestrained))
1539 if (point ==
null || !CC.
CanSeeLos(point))
1543 CC.
Say(
"abDraw", CC,
TC);
1550 if (CC.
id ==
"tentacle")
1559 if (nearbyCatToSniff !=
null)
1561 CC.
Sniff(nearbyCatToSniff);
1571 if (
TC.Evalue(426) > 0)
1573 TC.Say((actRef.n1 ==
"money") ?
"abStealNegateMoney" :
"abStealNegate",
TC);
1576 Thing thing4 =
null;
1577 bool flag8 = actRef.n1 ==
"food";
1578 if (actRef.n1 ==
"money")
1590 Func<Thing, bool> func = (
Thing t) =>
true;
1593 func = (
Thing t) => t.IsFood;
1595 List<Thing> list5 =
TC.things.List(delegate(
Thing t)
1601 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);
1602 }, onlyAccessible:
true);
1603 if (list5.Count > 0)
1605 thing4 = list5.RandomItem();
1608 thing4 = thing4.
Split(1);
1615 CC.
Say(
"abStealNothing", CC,
TC);
1620 CC.
Pick(thing4, msg:
false);
1622 if (actRef.n1 ==
"food")
1631 CC.
Say(
"abStealEscape", CC);
1632 CC.
Teleport(GetTeleportPos(tc.
pos, 30), silent:
true);
1641 if (CC !=
null && CC !=
TC)
1643 TC.Say(
"curse", CC,
TC);
1645 TC.PlaySound(
"curse3");
1646 TC.PlayEffect(
"curse");
1647 if (
EClass.
rnd(150 +
TC.LUC * 5 +
TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) ||
TC.TryNullifyCurse())
1651 List<Thing> list9 =
TC.things.List(delegate(
Thing t)
1659 if (list9.Count == 0)
1664 Thing thing6 = list9.RandomItem();
1665 TC.Say(
"curse_hit",
TC, thing6);
1673 TC.Say(
"uncurseEQ" + (blessed ?
"_bless" : (flag ?
"_curse" :
"")),
TC);
1674 TC.PlaySound(
"uncurse");
1675 TC.PlayEffect(
"uncurse");
1683 List<Thing> list =
new List<Thing>();
1684 TC.things.Foreach(delegate(
Thing t)
1689 if (t.blessedState == BlessedState.Cursed)
1691 num13 = EClass.rnd(200);
1695 num13 = EClass.rnd(1000);
1701 if (
id ==
EffectId.UncurseEQGreater)
1707 TC.Say(
"uncurseEQ_success", t);
1723 foreach (
Thing item5
in list)
1727 if (success == 0 && fail == 0)
1729 TC.SayNothingHappans();
1733 TC.Say(
"uncurseEQ_fail");
1739 string text3 = actRef.n1;
1744 if (!text4.IsEmpty())
1751 if (!actRef.aliasEle.IsEmpty())
1753 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1756 condition2.isPerfume = TC.IsPC && actRef.
isPerfume;
1757 Condition condition3 =
TC.AddCondition(condition2);
1758 if (condition3 !=
null && condition3.
isPerfume)
1760 condition3.value = 3;
1763 if (!text4.IsEmpty())
1775 for (
int m = 0; m < 4 +
EClass.
rnd(2); m++)
1794 bool isPowerful =
TC.IsPowerful;
1795 string n = actRef.n1;
1796 if (n ==
"ConSuffocation")
1798 power = power * 2 / 3;
1801 int num8 = TC.WIL * (isPowerful ? 20 : 5);
1803 if (condition !=
null)
1805 num8 += condition.power * 5;
1809 TC.Say(
"debuff_resist",
TC);
1816 if (!actRef.aliasEle.IsEmpty())
1833 TC.MutateRandom(1, 100, ether:
false, state);
1840 TC.MutateRandom(-1, 100, ether:
false, state);
1860 if (blessed || flag)
1864 Dialog.
InputName(
"dialogWish",
"q", delegate(
bool cancel,
string text)
1881 tc.
Say(
"faith_curse", tc,
faith.Name);
1886 tc.
Say(
"faith_bless", tc,
faith.Name);
1888 tc.
ModExp(306, power * 10);
1889 tc.
ModExp(85, power * 10);
1901 int gender2 = gender
switch
1915 if (blessed && age > 1)
1917 tc.
Say(
"ageDown", tc);
1922 tc.
Say(
"ageUp", tc);
1932 if (!flag && age3 <= 0)
1937 age3 = Mathf.Max(0, age3 * 100 / (flag ? 75 : (blessed ? 400 : 200))) + (flag ? 1 : 0);
1938 tc.
Say(flag ?
"ageUp" :
"ageDown", tc);
1956 tc.
Say(
"eternalYouth2", tc);
1970 tc.
Say(
"eternalYouth1", tc);
1971 tc.c_lockedAge = age2 + 1;
1983 Debug.Log(power +
"/" +
id.ToString() +
"/" + actRef.n1);
1988 if (power < 0 ||
id ==
EffectId.DebuffStats)
1990 power = Mathf.Abs(power);
2004 List<KeyValuePair<int, Chara>> list4 =
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();
2005 if (
TC.IsPCFaction ||
TC.IsPCFactionMinion)
2007 if (
TC.IsPC && list4.Count == 0)
2011 if (list4.Count > 0)
2013 list4.RandomItem().Value.Chara.GetRevived();
2017 TC.SayNothingHappans();
2026 bool flag9 =
id == EffectId.DamageBody ||
id ==
EffectId.DamageBodyGreat;
2027 bool mind =
id == EffectId.DamageMind ||
id ==
EffectId.DamageMindGreat;
2028 int num9 = ((
id == EffectId.DamageBody ||
id ==
EffectId.DamageMind) ? 1 : (4 +
EClass.
rnd(4)));
2037 TC.PlayEffect(
"debuff");
2038 TC.PlaySound(
"debuff");
2040 TC.Say(flag9 ?
"damageBody" :
"damageMind",
TC);
2041 for (
int k = 0; k < num9; k++)
2043 TC.DamageTempElements(power, flag9, mind,
id !=
EffectId.Weaken);
2056 bool flag10 =
id == EffectId.EnhanceBody ||
id ==
EffectId.EnhanceBodyGreat;
2057 bool mind2 =
id == EffectId.EnhanceMind ||
id ==
EffectId.EnhanceMindGreat;
2062 TC.Say(flag10 ?
"enhanceBody" :
"enhanceMind",
TC);
2063 TC.PlayEffect(
"buff");
2064 TC.PlaySound(
"buff");
2065 TC.EnhanceTempElements(power, flag10, mind2, onlyRenew:
true);
2071 bool flag7 =
id ==
EffectId.RestoreBody;
2077 TC.Say(flag7 ?
"restoreBody" :
"restoreMind",
TC);
2078 TC.PlaySound(
"heal");
2079 TC.PlayEffect(
"heal");
2089 TC.CureHost(
CureType.HealComplete, power, state);
2090 TC.Say(
"heal_heavy",
TC);
2099 if (actRef.act !=
null)
2101 Debug.Log(actRef.act.id);
2103 int num7 =
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();
2104 if (actRef.refThing !=
null)
2106 num7 = num7 * (100 + actRef.refThing.Evalue(750) * 10) / 100;
2110 TC.DamageHP(num7 / 2, 919, power);
2113 TC.HealHPHost(num7, (actRef.refThing ==
null &&
id !=
EffectId.JureHeal) ? HealSource.Magic :
HealSource.Item);
2115 TC.Say((power >= 300) ?
"heal_heavy" :
"heal_light",
TC);
2121 TC.Say(
"heal_jure",
TC);
2137 CC.Say(
"removeHex",
TC, item6.
Name.ToLower());
2148 TC.PlaySound(
"heal");
2149 TC.PlayEffect(
"heal");
2152 TC.Say(
"cureCorruption_curse",
TC);
2154 TC.ModCorruption(power);
2158 TC.Say(
"cureCorruption",
TC);
2159 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
2167 TC.Say(
"drinkRamune",
TC);
2171 TC.Say(
"drinkGood",
TC);
2177 TC.Say(
"drinkMilk",
TC);
2194 TC.Say(
"drinkWater_dirty",
TC);
2200 TC.Say(
"drinkWater_clear",
TC);
2206 TC.Say(
"drinkWater_dirty",
TC);
2214 if (
TC.HasElement(1211))
2216 TC.Say(
"drinkSaltWater_snail",
TC);
2217 int num12 = ((TC.hp > 10) ? (
TC.hp -
EClass.
rnd(10)) : 10000);
2222 TC.Say(
"drinkSaltWater",
TC);
2227 if (
TC.HasElement(1215))
2229 TC.Say(
"drunk_dwarf",
TC);
2385 if (list7.Count != 0)
2387 Thing thing5 = list7.RandomItem();
2388 TC.Say(
"acid_hit",
TC);
2391 TC.Say(
"acid_nullify", thing5);
2393 else if (thing5.
encLV > -5)
2395 TC.Say(
"acid_rust",
TC, thing5);
2407 TC.DamageHP(power / 5, actRef.idEle, power);
2418 TC.Say(
"drink_acid",
TC);
2419 TC.DamageHP(power / 5, 923, power);
2422 Msg.
Say(
"nothingHappens");
2430 TC.Say(
"love_curse_self",
TC);
2434 TC.Say(
"love_curse", CC,
TC);
2435 TC.ModAffinity(CC, -power / 4, show:
false);
2437 TC.ShowEmo(
Emo.angry);
2441 LoveMiracle(
TC, CC, power,
id, state);
2447 if (
TC.HasElement(1532))
2449 TC.SetMutation(1532);
2453 TC.SetMutation(1533, 1);
2460 if (
TC.HasElement(1533))
2462 TC.SetMutation(1533);
2466 TC.SetMutation(1532, 1);
2469 TC.PlayEffect(
"aura_heaven");
2470 TC.PlaySound(
"godbless");
2473 TC.Say(
"grow_hair_fail",
TC);
2476 TC.Say(
"grow_hair",
TC);
2485 Proc(_id, orgPower, _state, cc, tc, _ref1);
2491 tc.
Say(
"eat_poison", tc);
2493 if (power > 100000000)
2497 int num = (int)Mathf.Sqrt(power * 100);
2509 tc.
Say(
"love_ground", tc);
2513 tc.
Say(
"love_chara", c, tc);
2522 tc.
Say(
"item_drop", thing);
2526 Thing c2 = tc.
MakeMilk(effect:
true, 1, addToZone:
true, state);
2527 tc.
Say(
"item_drop", c2);
2531 Thing c3 = tc.
MakeEgg(effect:
true, 1, addToZone:
true, (idEffect ==
EffectId.LovePlus) ? 3 : 20, state);
2532 tc.
Say(
"item_drop", c3);
2546 tc.
Say(
"love_ground", tc);
2550 tc.
Say(
"love_chara", c, tc);
2559 for (
int i = 0; i < 10000; i++)
2575 string netMsg =
GameLang.
Parse(
"wish".langGame(), thirdPerson:
true, name, s);
2577 List<WishItem> list =
new List<WishItem>();
2578 int wishLv = 10 + power / 4;
2579 int wishValue = 5000 + power * 50;
2582 wishLv = wishLv * 150 / 100;
2586 wishLv = wishLv * 150 / 100;
2589 Debug.Log(power +
"/" + wishValue);
2590 string _s = s.ToLower();
2598 if (
item.IsValidArtifact(r.
id))
2625 string text = r.
GetName().ToLower();
2626 int score = Compare(_s, text);
2639 if (category.IsChildOf(
"weapon") || category.IsChildOf(
"armor") || category.IsChildOf(
"ranged"))
2641 CardBlueprint.SetRarity(Rarity.Legendary);
2646 bool flag2 = thing.trait is
TraitDeed || thing.rarity >=
Rarity.Artifact || thing.
source._origin ==
"artifact_summon";
2650 thing.c_charges = 0;
2653 num = EClass.rndHalf(wishValue * 3);
2656 num = EClass.rndHalf(wishValue / 500 + 4);
2659 num = EClass.rndHalf(wishValue / 500 + 4);
2662 num = EClass.rndHalf(wishValue / 2000 + 4);
2665 if (!flag2 && thing.trait.CanStack)
2667 int num2 = wishValue;
2669 for (int i = 1; i < 1000; i++)
2671 int num3 = price + i * 2 * (price + 500);
2672 if (num3 > 0 && num2 > num3)
2681 if (price > 2500 && num > 3)
2683 num = 3 + (int)Mathf.Sqrt(num - 3);
2685 if (price > 5000 && num > 2)
2687 num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
2689 if (price > 10000 && num > 1)
2691 num = 1 + Mathf.Min((
int)Mathf.Sqrt(num - 1) / 3, 2);
2698 Debug.Log(_s +
"/" + num +
"/" + score);
2699 if (thing.HasTag(
CTAG.godArtifact))
2716 if (list.Count == 0)
2718 netMsg = netMsg + Lang.space +
"wishFail".langGame();
2726 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2727 foreach (WishItem item2
in list)
2729 Debug.Log(item2.score +
"/" + s +
"/" + item2.n);
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
static void Poison(Chara tc, Chara c, int power)
static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
static void Proc(EffectId id, int power, BlessedState state, Card cc, Card tc=null, ActRef actRef=default(ActRef))
static void GeneMiracle(Chara tc, Chara c, DNA.Type type)
static Point GetTeleportPos(Point org, int radius=6)
static int Compare(string s, string t)
static void TryDelay(Action a)
static void Proc(EffectId id, Card cc, Card tc=null, int power=100, ActRef actRef=default(ActRef))
static bool DamageEle(Card CC, EffectId id, int power, Element e, List< Point > points, ActRef actref, string lang=null)
static bool Wish(string s, string name, int power, BlessedState state)
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
virtual int ElementPowerMod
void SetInt(int id, int value=0)
void SetRefVal(int a, int b)
virtual ConditionType Type
static int GetColorInt(ref Color matColor, int p)
void SetAge(Chara c, int a)
static void Set(CardBlueprint _bp)
static CardBlueprint current
GlobalCharaList globalCharas
virtual string GetName(int i)
void Teleport(Point point, bool silent=false, bool force=false)
ElementContainerCard elements
bool HasElement(int ele, int req=1)
SourceMaterial.Row material
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Thing GiveBirth(Thing t, bool effect)
virtual void SetBlessedState(BlessedState s)
bool IsInMutterDistance(int d=10)
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
virtual bool IsAliveInCurrentZone
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
BlessedState blessedState
void ModExp(string alias, int a)
void Say(string lang, string ref1=null, string ref2=null)
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
SourceMaterial.Row matObj
bool HasZoneStairs(bool includeLocked=true)
void UnqeuipIfTooHeavy(Thing t)
static Chara CreateFromElement(string idEle, int lv=-1, string idFilter="chara")
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
static Chara Create(string id, int lv=-1)
override bool IsAliveInCurrentZone
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
void Cuddle(Chara c, bool headpat=false)
void InstantEat(Thing t=null, bool sound=true)
Condition AddCondition(string id, int p=100, bool force=false)
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Chara GetNearbyCatToSniff()
bool CanSeeLos(Card c, int dist=-1)
bool RequestProtection(Chara attacker, Action< Chara > action)
bool HasCondition(string alias)
void SetMainElement(string id, int v=0, bool elemental=false)
bool HasMinion(string id)
override bool IsPCFaction
override bool IsPCPartyMinion
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
void MakeAlly(bool msg=true)
void AddCooldown(int idEle, int turns=0)
Thing MakeGene(DNA.Type? type=null)
void DoHostileAction(Card _tg, bool immediate=false)
bool TryEquip(Thing t, bool useFav=false)
void SetSummon(int duration)
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
void MoveZone(string alias)
UD_String_Color elementColors
void Kill(bool silent=false)
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
static Type GetType(string idMat)
void Generate(Type _type, Chara model=null)
int GetRaw(int offsetHours=0)
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
static int RollMax(int num, int sides, int bonus=0)
static int Roll(int num, int sides, int bonus=0, Card card=null)
static Dice Create(Element ele, Card c)
static ColorProfile Colors
static void Wait(float a, Card c)
static SourceManager sources
static int rndHalf(int a)
static GameSetting setting
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
static Effect Get(Effect original)
Effect SetStartDelay(float a)
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Effect SetParticleColor(Color c)
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Dictionary< int, Element > dict
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)
static int[] List_MainAttributes
static int GetId(string alias)
static Element Create(int id, int v=0)
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
bool disableUsermapBenefit
UD_String_ElementRef elements
ReligionManager religions
static string Name(int g)
static bool Has(string id)
static string[] GetList(string id)
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)
Chara FindChara(string id)
void TryShatter(Point pos, int ele, int power)
List< Point > ListPointsInArc(Point center, Point to, int radius, float angle)
void Reveal(Point center, int power=100)
void MineObj(Point point, Task task=null, Chara c=null)
void MineBlock(Point point, bool recoverBlock=false, Chara c=null, bool mineObj=true)
List< Point > ListPointsInLine(Point center, Point to, int radius)
void SetEffect(int x, int z, CellEffect effect=null)
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
void RevealAll(bool reveal=true)
static bool IsThirdPerson(Card c)
static ThirstPersonInfo thirdPerson1
static string SayNothingHappen()
static string GetName(Card c)
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
int CountKeyItem(string alias)
SourceMaterial.Row matBlock
List< Card > ListCards(bool includeMasked=false)
Point Set(int _x, int _z)
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
void ModFire(int value, bool extinguish=false)
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
bool Equals(int _x, int _z)
Point GetRandomNeighbor()
void Animate(AnimeID id, bool animeBlock=false)
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
ReligionTrickery Trickery
static Thing Reforge(string id, Point pos=null, bool first=true)
void Talk(string idTalk, Card c=null, Card agent=null)
static void ShakeCam(string id="default", float magnitude=1f)
Dictionary< string, CardRow > map
static Dictionary< string, TierList > tierMap
static Spatial Create(string id, Spatial parent, bool register, int x=-99999, int y=-99999, int icon=0)
List< Zone > ListReturnLocations()
static SpawnList Get(string id, Func< SourceChara.Row, bool > func)
static Thing Create(string id, int idMat=-1, int lv=-1)
override CardRow sourceCard
Thing Identify(bool show=true, IDTSource idtSource=IDTSource.Identify)
static void BadEffect(Chara c)
virtual bool CanBeAttacked
static void Reserve(string idStep, Action onBeforePlay=null)
static void Play(string idStep)
bool ContainsKey(TKey key)
bool TryGetValue(TKey key, out TValue value)
virtual string GetNewZoneID(int level)
int CountMinions(Chara c)
Card AddCard(Card t, Point point)