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 : (text.ToLower() +
"_"));
60 foreach (
Point p
in points)
74 text2 =
"SpEarthquake";
82 if (CC.isChara && p.
Equals(CC.pos) && points.Count >= 2)
98 effect.sr.color = elementRef.colorSprite;
99 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
100 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
101 componentInChildren.startColor = startColor;
111 float num3 = 0.06f * (float)CC.pos.Distance(p);
113 TweenUtil.Tween(num3,
null, delegate
125 effect =
Effect.
Get(
"Element/ball_" + ((e.id == 0) ?
"Void" : e.source.alias.Remove(0, 3)));
128 effect =
Effect.
Get(
"Element/ball_Fire");
130 float startDelay = ((
id ==
EffectId.Meteor) ? 0.1f : 0.04f) * (float)CC.pos.Distance(p);
146 effect.
Play(CC.pos, 0f, p);
153 effect.
Play(p).Flip(p.
x > CC.pos.x);
158 if (CC.IsPCFactionOrMinion && (CC.HasElement(1651) ||
EClass.
pc.
Evalue(1651) >= 2))
165 if (
item.IsPCFactionOrMinion)
170 else if (e.id != 910 || !
item.IsFood || !
item.category.IsChildOf(
"foodstuff"))
195 if (((uint)(
id - 250) <= 1u ||
id ==
EffectId.Sword) && c.
isChara && CC.isChara)
207 bool isChara = CC.isChara;
211 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
219 Dice dice =
Dice.
Create(text2, power, CC, (actref.refThing !=
null) ? null : actref.act);
238 num4 = num4 * (int)Mathf.Min(70f + Mathf.Sqrt(CC.Evalue(101)) * 3f, 200f) / 100;
243 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
251 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as
Chara)) || (flag && c == CC))
255 if (isChara && points.Count > 1 && c !=
null && c.
isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.
Chara))
257 int num5 = CC.Evalue(302);
258 if (!CC.IsPC && CC.IsPCFactionOrMinion)
262 if (CC.HasElement(1214))
272 CC.ModExp(302, CC.IsPC ? 10 : 50);
276 num4 =
EClass.
rnd(num4 * 100 / (100 + num5 * 10 + 1));
279 CC.ModExp(302, CC.IsPC ? 20 : 100);
286 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) &&
EClass.
pc.
HasElement(1214))) &&
EClass.
rnd(5) != 0)
293 if (lang ==
"spell_hand")
295 string[] list2 =
Lang.
GetList(
"attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty(
"Touch") :
"Touch"));
296 string @ref =
"_elehand".lang(e.source.GetAltname(2), list2[4]);
297 CC.Say(c.
IsPCParty ?
"cast_hand_ally" :
"cast_hand", CC, c, @ref, c.
IsPCParty ? list2[1] : list2[2]);
301 CC.Say(lang +
"_hit", CC, c, e.
Name.ToLower());
304 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing !=
null) ?
EClass.
_map.
FindChara(actref.refThing.c_uidRefCard) :
null));
323 num4 = num4 * Act.powerMod / 100;
324 c.
DamageHP(num4, e.id, power * num / 100, attackSource, chara ?? CC);
327 int num6 = num4 * num / 100;
328 Debug.Log(num4 +
" v:" + num6 +
" evalue:" + e.Value +
" power:" + power +
" elepMod:" + num);
334 CC.Chara.mana.Mod(num6);
350 EffectId.Suicide => CC.LV / 3 + 40,
351 EffectId.Meteor => 50 + power / 20,
352 _ => (actref.refThing !=
null) ? actref.refThing.material.hardness : (30 + power / 20),
354 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (
id == EffectId.Explosive && actref.refThing ==
null)) && !(EClass._zone is
Zone_Vernis);
390 p.
ModFire(-20, extinguish:
true);
395 foreach (
Card item3
in list)
411 bool flag2 = isNeg || flag;
427 if (list3.Count == 0)
431 CC.
Say(
"spell_earthquake", CC, element.
Name.ToLower());
441 DamageEle(CC,
id, power, element, list3, actRef,
"spell_earthquake");
450 if (list4.Count == 0)
454 CC.
Say(
"spell_ball", CC, element.
Name.ToLower());
464 DamageEle(CC,
id, power, element, list4, actRef,
"spell_ball");
472 List<Point> list5 =
new List<Point>();
473 list5.Add(tp.
Copy());
490 lang =
"spell_sword";
497 if (!
DamageEle(cC, id3, power, e, list5, actref, (
string)lang))
499 CC.
Say(
"spell_hand_miss", CC, element.
Name.ToLower());
505 List<Point> list =
new List<Point>();
507 CC.
Say(
"spell_arrow", CC, element.
Name.ToLower());
513 DamageEle(CC,
id, power, element, list, actRef,
"spell_arrow");
518 CC.
Say(
"summon_ally", CC);
521 CC.
Say(
"summon_ally_fail", CC);
524 string id4 = actRef.n1;
533 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ?
EClass.
rnd(2) : 0);
540 case "special_force":
550 for (
int j = 0; j < num3; j++)
557 if (point ==
null || !point.
IsValid)
569 chara2 = actRef.n1
switch
586 num6 = ((!(actRef.n1 ==
"shadow")) ? (chara2.LV * (100 + power / 10) / 100 + power / 30) : (power / 10 + 1));
587 if (chara2.
LV < num6)
596 string n = actRef.n1;
597 if (!(n ==
"shadow"))
599 if (n ==
"special_force")
606 chara2.hp = chara2.MaxHP / 2;
609 if (!(actRef.n1 ==
"monster") || actRef.refThing ==
null)
621 CC.
Say(
"summon_ally_fail", CC);
629 CC.
Say(
"summon_ally_fail", CC);
632 CC.
Say(
"spell_funnel", CC, element.
Name.ToLower());
637 chara.
SetLv(power / 15);
647 if (list7.Count == 0)
651 CC.
Say(
"spell_breathe", CC, element.
Name.ToLower());
661 DamageEle(CC,
id, power, element, list7, actRef,
"spell_breathe");
685 float radius2 = ((
id ==
EffectId.Suicide) ? 3.5f : ((
float)((
id ==
EffectId.BallBubble) ? 2 : 5)));
686 if (
id ==
EffectId.Explosive && actRef.refThing !=
null)
701 bool flag4 =
id == EffectId.Explosive ||
id ==
EffectId.Suicide;
703 if (list6.Count == 0)
707 cc.
Say((
id ==
EffectId.Suicide) ?
"abSuicide" :
"spell_ball", cc, element.
Name.ToLower());
717 DamageEle(actRef.origin ?? cc,
id, power, element, list6, actRef, (
id ==
EffectId.Suicide) ?
"suicide" :
"spell_ball");
727 if (list2.Count == 0)
731 CC.
Say(
"spell_bolt", CC, element.
Name.ToLower());
741 DamageEle(CC,
id, power, element, list2, actRef,
"spell_bolt");
751 CC.
Say(
"ab" +
id, CC);
757 EffectId.MistOfDarkness => 6,
758 EffectId.Bubble => 5,
759 EffectId.Puddle => 4,
764 if (
id ==
EffectId.Bubble && CC.
id ==
"cancer")
769 for (
int i = 0; i < num; i++)
794 List<Card> list8 = tp.
ListCards().ToList();
796 if (list8.Contains(CC))
802 foreach (
Card item2
in list8)
804 if (tc ==
null || item2 == tc)
806 Proc(
id, power, state, CC, item2, actRef);
807 if (flag2 && item2.
isChara && item2 != CC)
809 CC.DoHostileAction(item2);
811 if (actRef.refThing ==
null || !(actRef.refThing.trait is
TraitRod) || (uint)(
id - 200) <= 4u)
820 CC.SayNothingHappans();
839 int orgPower = power;
848 Point randomPoint = CC.
pos.
GetRandomPoint(2, requireLos:
false, allowChara:
false, allowBlocked:
false, 200);
851 CC.
Say(
"split_fail", CC);
864 CC.
Say(
"escape", CC);
877 if (list2.Count == 0)
885 item.PlayEffect(
"vanish");
897 thing.c_idRefCard =
"dog_mine";
898 Zone.ignoreSpawnAnime =
true;
910 CC.
Say(
"abMagicMap_curse", CC);
916 CC.
Say(
"abMagicMap", CC);
931 Dice dice =
Dice.
Create(
"ActManaAbsorb", power, CC, (actRef.refThing !=
null) ? null : actRef.act);
933 TC.PlaySound(
"heal");
934 TC.PlayEffect(
"heal");
937 CC.
Say(
"absorbMana", CC);
949 TC.PlaySound(
"curse3");
950 TC.PlayEffect(
"curse");
951 TC.Say(
"forgetItems",
TC);
952 int num2 = power / 50 + 1 +
EClass.
rnd(3);
953 List<Thing> source =
TC.things.List((
Thing t) => t.c_IDTState == 0);
954 for (
int i = 0; i < num2; i++)
956 source.RandomItem().c_IDTState = 5;
965 bool armor =
id == EffectId.EnchantArmor ||
id ==
EffectId.EnchantArmorGreat;
966 bool flag4 =
id == EffectId.EnchantWeaponGreat ||
id ==
EffectId.EnchantArmorGreat;
976 cc.
Say(
"enc_curse", tc);
980 int num5 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
981 if (tc.
encLV >= num5)
983 cc.
Say(
"enc_resist", tc);
993 bool flag5 =
id ==
EffectId.GreaterIdentify;
1043 int num = (tc.isWeightChanged ? tc.c_weight : tc.
Thing.
source.weight);
1044 tc.isWeightChanged =
true;
1052 num = (int)(0.01f * (
float)num * (float)power * 0.75f + 500f);
1053 if (num < 0 || num > 10000000)
1071 cc.
Say(
"lighten_curse", cc, tc);
1075 num = num * (100 - power / 10) / 100;
1093 cc.
Say(
"lighten", cc, tc);
1117 cc.
Say(
"reconstruct", cc, tc);
1118 EClass.game.cards.uidNext +=
EClass.
rnd(30);
1122 CC.
Pick(thing3, msg:
false);
1129 case EffectId.ChangeMaterialLesser:
1131 case EffectId.ChangeMaterialGreater:
1143 string name = tc.
Name;
1146 bool num3 =
id ==
EffectId.ChangeMaterialGreater;
1147 bool flag3 =
id ==
EffectId.ChangeMaterialLesser;
1167 num4 = Mathf.Clamp(num4 +
EClass.
rnd(2), 0, 4);
1170 text2 = ((text2 ==
"metal") ?
"leather" :
"metal");
1173 for (
int j = 0; j < 1000; j++)
1184 if ((tc.
id ==
"log" || tc.
id ==
"branch") && tc.material.alias ==
"carbone")
1200 cc.
Say(
"materialChanged", name, row.GetName());
1233 Msg.
Say(
"returnNowhere");
1246 EClass.player.returnInfo =
null;
1296 Thing t3 =
ThingGen.
Create(
new string[6] {
"330",
"331",
"334",
"335",
"336",
"1142" }.RandomItem());
1319 TC.pos.PlayEffect(
"holyveil");
1320 TC.pos.PlaySound(
"holyveil");
1321 TC.pos.PlaySound(
"atk_eleSound");
1322 TC.conditions.ForeachReverse(delegate(
Condition c)
1329 TC.Say(
"abShutterHex",
TC);
1330 TC.pos.ForeachNeighbor(delegate(
Point p)
1334 if (!item3.IsHostile(CC))
1338 int dmg2 =
Dice.
Create(
"SpShutterHex", power * hex, CC, (actRef.refThing !=
null) ?
null : actRef.act).
Roll();
1351 CC.
Say(
"abDraw", CC,
TC);
1358 if (CC.
id ==
"tentacle")
1370 if (
TC.Evalue(426) > 0)
1372 TC.Say((actRef.n1 ==
"money") ?
"abStealNegateMoney" :
"abStealNegate",
TC);
1375 Thing thing6 =
null;
1376 bool flag7 = actRef.n1 ==
"food";
1377 if (actRef.n1 ==
"money")
1389 Func<Thing, bool> func = (
Thing t) =>
true;
1392 func = (
Thing t) => t.IsFood;
1394 List<Thing> list6 =
TC.things.List(delegate(
Thing t)
1400 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);
1401 }, onlyAccessible:
true);
1402 if (list6.Count > 0)
1404 thing6 = list6.RandomItem();
1407 thing6 = thing6.
Split(1);
1414 CC.
Say(
"abStealNothing", CC,
TC);
1419 CC.
Pick(thing6, msg:
false);
1421 if (actRef.n1 ==
"food")
1430 CC.
Say(
"abStealEscape", CC);
1431 CC.
Teleport(GetTeleportPos(tc.
pos, 30), silent:
true);
1440 if (CC !=
null && CC !=
TC)
1442 TC.Say(
"curse", CC,
TC);
1444 TC.PlaySound(
"curse3");
1445 TC.PlayEffect(
"curse");
1446 if (
EClass.
rnd(150 +
TC.LUC * 5 +
TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) ||
TC.TryNullifyCurse())
1450 List<Thing> list3 =
TC.things.List(delegate(
Thing t)
1458 if (list3.Count == 0)
1463 Thing thing4 = list3.RandomItem();
1464 TC.Say(
"curse_hit",
TC, thing4);
1472 TC.Say(
"uncurseEQ" + (blessed ?
"_bless" : (flag ?
"_curse" :
"")),
TC);
1473 TC.PlaySound(
"uncurse");
1474 TC.PlayEffect(
"uncurse");
1482 List<Thing> list =
new List<Thing>();
1483 TC.things.Foreach(delegate(
Thing t)
1488 if (t.blessedState == BlessedState.Cursed)
1490 num10 = EClass.rnd(200);
1494 num10 = EClass.rnd(1000);
1500 if (
id ==
EffectId.UncurseEQGreater)
1506 TC.Say(
"uncurseEQ_success", t);
1522 foreach (
Thing item4
in list)
1526 if (success == 0 && fail == 0)
1528 TC.SayNothingHappans();
1532 TC.Say(
"uncurseEQ_fail");
1538 string text3 = actRef.n1;
1543 if (!text4.IsEmpty())
1550 if (!actRef.aliasEle.IsEmpty())
1552 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1555 condition.isPerfume = TC.IsPC && actRef.
isPerfume;
1556 Condition condition2 =
TC.AddCondition(condition);
1557 if (condition2 !=
null && condition2.
isPerfume)
1559 condition2.value = 3;
1562 if (!text4.IsEmpty())
1564 CC.DoHostileAction(
TC);
1571 bool hex2 = CC.IsHostile(
TC);
1574 for (
int k = 0; k < 4 +
EClass.
rnd(2); k++)
1591 CC.DoHostileAction(
TC);
1592 bool isPowerful =
TC.IsPowerful;
1593 string n = actRef.n1;
1594 if (n ==
"ConSuffocation")
1596 power = power * 2 / 3;
1599 int num8 = TC.WIL * (isPowerful ? 20 : 5);
1601 if (condition3 !=
null)
1603 num8 += condition3.power * 5;
1607 TC.Say(
"debuff_resist",
TC);
1608 CC.DoHostileAction(
TC);
1613 con.givenByPcParty = CC.IsPCParty;
1614 if (!actRef.aliasEle.IsEmpty())
1619 if (n ==
"ConBane" && CC.HasElement(1416))
1623 CC.DoHostileAction(
TC);
1631 TC.MutateRandom(1, 100, ether:
false, state);
1638 TC.MutateRandom(-1, 100, ether:
false, state);
1658 if (blessed || flag)
1662 Dialog.
InputName(
"dialogWish",
"q", delegate(
bool cancel,
string text)
1679 tc.
Say(
"faith_curse", tc,
faith.Name);
1684 tc.
Say(
"faith_bless", tc,
faith.Name);
1686 tc.
ModExp(306, power * 10);
1687 tc.
ModExp(85, power * 10);
1699 int gender2 = gender
switch
1712 if (blessed && tc.
bio.
age > 1)
1714 tc.
Say(
"ageDown", tc);
1719 tc.
Say(
"ageUp", tc);
1727 Debug.Log(power +
"/" +
id.ToString() +
"/" + actRef.n1);
1732 if (power < 0 ||
id ==
EffectId.DebuffStats)
1734 power = Mathf.Abs(power);
1748 List<KeyValuePair<int, Chara>> list7 =
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();
1749 if (
TC.IsPCFaction ||
TC.IsPCFactionMinion)
1751 if (
TC.IsPC && list7.Count == 0)
1753 list7 =
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();
1755 if (list7.Count > 0)
1757 list7.RandomItem().Value.Chara.GetRevived();
1761 TC.SayNothingHappans();
1770 bool flag8 =
id == EffectId.DamageBody ||
id ==
EffectId.DamageBodyGreat;
1771 bool mind =
id == EffectId.DamageMind ||
id ==
EffectId.DamageMindGreat;
1772 int num6 = ((
id == EffectId.DamageBody ||
id ==
EffectId.DamageMind) ? 1 : (4 +
EClass.
rnd(4)));
1781 TC.PlayEffect(
"debuff");
1782 TC.PlaySound(
"debuff");
1784 TC.Say(flag8 ?
"damageBody" :
"damageMind",
TC);
1785 for (
int l = 0; l < num6; l++)
1787 TC.DamageTempElements(power, flag8, mind);
1800 bool flag9 =
id == EffectId.EnhanceBody ||
id ==
EffectId.EnhanceBodyGreat;
1801 bool mind2 =
id == EffectId.EnhanceMind ||
id ==
EffectId.EnhanceMindGreat;
1802 int num7 = ((
id == EffectId.EnhanceBody ||
id ==
EffectId.EnhanceMind) ? 1 : (4 +
EClass.
rnd(4)));
1803 TC.Say(flag9 ?
"enhanceBody" :
"enhanceMind",
TC);
1804 TC.PlayEffect(
"buff");
1805 TC.PlaySound(
"buff");
1806 for (
int m = 0; m < num7; m++)
1808 TC.EnhanceTempElements(power, flag9, mind2);
1815 bool flag6 =
id ==
EffectId.RestoreBody;
1821 TC.Say(flag6 ?
"restoreBody" :
"restoreMind",
TC);
1822 TC.PlaySound(
"heal");
1823 TC.PlayEffect(
"heal");
1833 TC.CureHost(
CureType.HealComplete, power, state);
1834 TC.Say(
"heal_heavy",
TC);
1843 if (actRef.act !=
null)
1845 Debug.Log(actRef.act.id);
1847 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();
1848 if (actRef.refThing !=
null)
1850 num9 = num9 * (100 + actRef.refThing.Evalue(7500)) / 100;
1854 TC.DamageHP(num9 / 2, 919, power);
1857 TC.HealHPHost(num9, (actRef.refThing ==
null) ? HealSource.Magic :
HealSource.Item);
1859 TC.Say((power >= 300) ?
"heal_heavy" :
"heal_light",
TC);
1865 TC.Say(
"heal_jure",
TC);
1868 CC.Cuddle(
TC, headpat:
true);
1881 CC.Say(
"removeHex",
TC, item5.
Name.ToLower());
1892 TC.PlaySound(
"heal");
1893 TC.PlayEffect(
"heal");
1896 TC.Say(
"cureCorruption_curse",
TC);
1898 TC.ModCorruption(power);
1902 TC.Say(
"cureCorruption",
TC);
1903 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
1911 TC.Say(
"drinkRamune",
TC);
1915 TC.Say(
"drinkGood",
TC);
1921 TC.Say(
"drinkMilk",
TC);
1938 TC.Say(
"drinkWater_dirty",
TC);
1944 TC.Say(
"drinkWater_clear",
TC);
1950 TC.Say(
"drinkWater_dirty",
TC);
1958 if (
TC.HasElement(1211))
1960 TC.Say(
"drinkSaltWater_snail",
TC);
1961 int dmg = ((TC.hp > 10) ? (
TC.hp -
EClass.
rnd(10)) : 10000);
1966 TC.Say(
"drinkSaltWater",
TC);
1971 if (
TC.HasElement(1215))
1973 TC.Say(
"drunk_dwarf",
TC);
2129 if (list5.Count != 0)
2131 Thing thing5 = list5.RandomItem();
2132 TC.Say(
"acid_hit",
TC);
2135 TC.Say(
"acid_nullify", thing5);
2137 else if (thing5.
encLV > -5)
2139 TC.Say(
"acid_rust",
TC, thing5);
2151 TC.DamageHP(power / 5, actRef.idEle, power);
2162 TC.Say(
"drink_acid",
TC);
2163 TC.DamageHP(power / 5, 923, power);
2166 Msg.
Say(
"nothingHappens");
2173 TC.Say(
"love_curse_self",
TC);
2177 TC.Say(
"love_curse", CC,
TC);
2178 TC.ModAffinity(CC, -power / 4, show:
false);
2180 TC.ShowEmo(
Emo.angry);
2184 LoveMiracle(
TC, CC, power);
2190 Proc(_id, orgPower, _state, cc, tc, _ref1);
2196 tc.
Say(
"eat_poison", tc);
2198 int num = (int)Mathf.Sqrt(power * 100);
2210 tc.
Say(
"love_ground", tc);
2214 tc.
Say(
"love_chara", c, tc);
2233 for (
int i = 0; i < 10000; i++)
2249 string netMsg =
GameLang.
Parse(
"wish".langGame(), thirdPerson:
true, name, s);
2251 List<WishItem> list =
new List<WishItem>();
2252 int wishLv = 10 + power / 4;
2253 int wishValue = power * 200;
2256 wishLv = wishLv * 150 / 100;
2260 wishLv = wishLv * 150 / 100;
2263 Debug.Log(power +
"/" + wishValue);
2264 string _s = s.ToLower();
2272 if (
item.IsValidArtifact(r.
id))
2299 string text = r.
GetName().ToLower();
2300 int score = Compare(_s, text);
2313 if (category.IsChildOf(
"weapon") || category.IsChildOf(
"armor") || category.IsChildOf(
"ranged"))
2315 CardBlueprint.SetRarity(Rarity.Legendary);
2323 thing.c_charges = 0;
2326 num = EClass.rndHalf(wishValue);
2329 num = EClass.rndHalf(wishValue / 2000 + 4);
2332 num = EClass.rndHalf(wishValue / 1000 + 4);
2335 num = EClass.rndHalf(wishValue / 3000 + 4);
2338 if (!flag2 && thing.trait.CanStack)
2340 int num2 = wishValue;
2341 int price = thing.GetPrice();
2342 for (int i = 0; i < 1000; i++)
2344 int num3 = price + 500 + i * Mathf.Max(price, 200);
2359 Debug.Log(_s +
"/" + num +
"/" + score);
2360 if (thing.HasTag(
CTAG.godArtifact))
2362 Religion.Reforge(thing.id);
2366 EClass._zone.AddCard(thing, EClass.pc.pos);
2377 if (list.Count == 0)
2379 netMsg = netMsg + Lang.space +
"wishFail".langGame();
2387 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2388 foreach (WishItem item2
in list)
2390 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 Proc(EffectId id, int power, BlessedState state, Card cc, Card tc=null, ActRef actRef=default(ActRef))
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 void LoveMiracle(Chara tc, Chara c, int power)
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)
static void Set(CardBlueprint _bp)
GlobalCharaList globalCharas
virtual string GetName(int i)
void Teleport(Point point, bool silent=false, bool force=false)
ElementContainerCard elements
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
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)
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
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
BlessedState blessedState
void ModExp(string alias, int a)
void Say(string lang, string ref1=null, string ref2=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 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)
bool CanSeeLos(Card c, int dist=-1)
bool HasCondition(string alias)
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None)
void SetMainElement(string id, int v=0, bool elemental=false)
override bool IsPCFaction
override bool IsPCPartyMinion
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
void MakeAlly(bool msg=true)
void AddCooldown(int idEle, int turns=0)
void DoHostileAction(Card _tg, bool immediate=false)
void RequestProtection(Chara attacker, Action< Chara > action)
bool TryEquip(Thing t, bool useFav=false)
void SetSummon(int duration)
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true)
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true)
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)
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)
SourceMaterial.Row matBlock
List< Card > ListCards(bool includeMasked=false)
Point Set(int _x, int _z)
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)
List< Chara > ListCharas()
Point GetRandomNeighbor()
void Animate(AnimeID id, bool animeBlock=false)
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false)
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
ReligionTrickery Trickery
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
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)
int CountMinions(Chara c)
Card AddCard(Card t, Point point)