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 && e.id != 911) || !
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;
328 c.
DamageHP((
int)num4, e.id, power * num / 100, attackSource, chara ?? CC);
331 long num6 = num4 * num / 100;
332 Debug.Log(num4 +
" v:" + num6 +
" evalue:" + e.Value +
" power:" + power +
" elepMod:" + num);
338 CC.Chara.mana.Mod((
int)num6);
354 EffectId.Suicide => CC.LV / 3 + 40,
355 EffectId.Meteor => 50 + power / 20,
356 _ => (actref.refThing !=
null) ? actref.refThing.material.hardness : (30 + power / 20),
358 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (
id == EffectId.Explosive && actref.refThing ==
null)) && !(EClass._zone is
Zone_Vernis);
394 p.
ModFire(-20, extinguish:
true);
399 foreach (
Card item3
in list)
415 bool flag2 = isNeg || flag;
431 if (list5.Count == 0)
435 CC.
Say(
"spell_earthquake", CC, element.
Name.ToLower());
445 DamageEle(CC,
id, power, element, list5, actRef,
"spell_earthquake");
458 CC.
Say(
"spell_ball", CC, element.
Name.ToLower());
468 DamageEle(CC,
id, power, element, list, actRef,
"spell_ball");
476 List<Point> list7 =
new List<Point>();
477 list7.Add(tp.
Copy());
494 lang =
"spell_sword";
501 if (!
DamageEle(cC, id4, power, e, list7, actref, (
string)lang))
503 CC.
Say(
"spell_hand_miss", CC, element.
Name.ToLower());
509 List<Point> list4 =
new List<Point>();
510 list4.Add(tp.
Copy());
511 CC.
Say(
"spell_arrow", CC, element.
Name.ToLower());
517 DamageEle(CC,
id, power, element, list4, actRef,
"spell_arrow");
522 if (actRef.n1 ==
"special")
527 CC.
Say(
"summon_ally", CC);
530 CC.
Say(
"summon_ally_fail", CC);
533 string id3 = actRef.n1;
538 bool flag4 = actRef.n1 ==
"special";
545 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ?
EClass.
rnd(2) : 0);
552 case "special_force":
563 num3 = Mathf.Clamp(7 + CC.
LV / 100, 4, 20);
568 for (
int j = 0; j < num3; j++)
575 if (point ==
null || !point.
IsValid)
583 CardBlueprint.current.lv = num5;
587 CardBlueprint.current.idEle = text;
642 string n = actRef.n1;
643 if (!(n ==
"shadow"))
645 if (!(n ==
"special"))
647 num6 = chara.LV * (100 + power / 10) / 100 + power / 30;
652 num6 = power / 10 + 1;
664 if (!(n ==
"shadow"))
666 if (n ==
"special_force")
673 chara.hp = chara.MaxHP / 2;
678 Chara chara2 = chara;
680 chara2.hostility = hostility2;
682 else if (!(actRef.n1 ==
"monster") || actRef.refThing ==
null)
694 CC.
Say(
"summon_ally_fail", CC);
702 CC.
Say(
"summon_ally_fail", CC);
705 CC.
Say(
"spell_funnel", CC, element.
Name.ToLower());
710 chara3.
SetLv(power / 15);
720 if (list3.Count == 0)
724 CC.
Say(
"spell_breathe", CC, element.
Name.ToLower());
734 DamageEle(CC,
id, power, element, list3, actRef,
"spell_breathe");
758 float radius2 = ((
id ==
EffectId.Suicide) ? 3.5f : ((
float)((
id ==
EffectId.BallBubble) ? 2 : 5)));
759 if (
id ==
EffectId.Explosive && actRef.refThing !=
null)
761 radius2 = 2 + actRef.refThing.Evalue(666);
778 bool flag5 =
id == EffectId.Explosive ||
id ==
EffectId.Suicide;
780 if (list6.Count == 0)
784 cc.
Say((
id ==
EffectId.Suicide) ?
"abSuicide" :
"spell_ball", cc, element.
Name.ToLower());
794 DamageEle(actRef.origin ?? cc,
id, power, element, list6, actRef, (
id ==
EffectId.Suicide) ?
"suicide" :
"spell_ball");
804 if (list2.Count == 0)
808 CC.
Say(
"spell_bolt", CC, element.
Name.ToLower());
818 DamageEle(CC,
id, power, element, list2, actRef,
"spell_bolt");
828 CC.
Say(
"ab" +
id, CC);
834 EffectId.MistOfDarkness => 6,
835 EffectId.Bubble => 5,
836 EffectId.Puddle => 4,
841 if (
id ==
EffectId.Bubble && CC.
id ==
"cancer")
846 for (
int i = 0; i < num; i++)
871 List<Card> list8 = tp.
ListCards().ToList();
873 if (list8.Contains(CC))
879 foreach (
Card item2
in list8)
881 if (tc ==
null || item2 == tc)
883 Proc(
id, power, state, CC, item2, actRef);
884 if (flag2 && item2.
isChara && item2 != CC)
886 CC.DoHostileAction(item2);
888 if (actRef.refThing ==
null || !(actRef.refThing.trait is
TraitRod) || (uint)(
id - 200) <= 4u)
897 CC.SayNothingHappans();
916 int orgPower = power;
925 Point randomPoint = CC.
pos.
GetRandomPoint(2, requireLos:
false, allowChara:
false, allowBlocked:
false, 200);
928 CC.
Say(
"split_fail", CC);
941 CC.
Say(
"escape", CC);
954 if (list2.Count == 0)
962 item.PlayEffect(
"vanish");
974 thing.c_idRefCard =
"dog_mine";
975 Zone.ignoreSpawnAnime =
true;
987 CC.
Say(
"abMagicMap_curse", CC);
993 CC.
Say(
"abMagicMap", CC);
1011 Dice dice =
Dice.
Create(
"ActManaAbsorb", power, CC, (actRef.refThing !=
null) ? null : actRef.act);
1012 TC.mana.Mod(dice.
Roll());
1013 TC.PlaySound(
"heal");
1014 TC.PlayEffect(
"heal");
1017 CC.
Say(
"absorbMana", CC);
1029 TC.PlaySound(
"curse3");
1030 TC.PlayEffect(
"curse");
1031 TC.Say(
"forgetItems",
TC);
1032 int num2 = power / 50 + 1 +
EClass.
rnd(3);
1033 List<Thing> source =
TC.things.List((
Thing t) => t.c_IDTState == 0);
1034 for (
int i = 0; i < num2; i++)
1036 source.RandomItem().c_IDTState = 5;
1045 bool armor =
id == EffectId.EnchantArmor ||
id ==
EffectId.EnchantArmorGreat;
1046 bool flag4 =
id == EffectId.EnchantWeaponGreat ||
id ==
EffectId.EnchantArmorGreat;
1056 cc.
Say(
"enc_curse", tc);
1060 int num5 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
1061 if (tc.
encLV >= num5)
1063 cc.
Say(
"enc_resist", tc);
1073 bool flag5 =
id ==
EffectId.GreaterIdentify;
1123 int num = (tc.isWeightChanged ? tc.c_weight : tc.
Thing.
source.weight);
1124 tc.isWeightChanged =
true;
1132 num = (int)(0.01f * (
float)num * (float)power * 0.75f + 500f);
1133 if (num < 0 || num > 10000000)
1151 cc.
Say(
"lighten_curse", cc, tc);
1155 num = num * (100 - power / 10) / 100;
1173 cc.
Say(
"lighten", cc, tc);
1197 cc.
Say(
"reconstruct", cc, tc);
1198 EClass.game.cards.uidNext +=
EClass.
rnd(30);
1202 CC.
Pick(thing3, msg:
false);
1209 case EffectId.ChangeMaterialLesser:
1211 case EffectId.ChangeMaterialGreater:
1223 string name = tc.
Name;
1226 bool num3 =
id ==
EffectId.ChangeMaterialGreater;
1227 bool flag3 =
id ==
EffectId.ChangeMaterialLesser;
1247 num4 = Mathf.Clamp(num4 +
EClass.
rnd(2), 0, 4);
1250 text2 = ((text2 ==
"metal") ?
"leather" :
"metal");
1253 for (
int j = 0; j < 1000; j++)
1264 if ((tc.
id ==
"log" || tc.
id ==
"branch") && tc.material.alias ==
"carbone")
1280 cc.
Say(
"materialChanged", name, row.GetName());
1313 Msg.
Say(
"returnNowhere");
1326 EClass.player.returnInfo =
null;
1376 Thing t3 =
ThingGen.
Create(
new string[6] {
"330",
"331",
"334",
"335",
"336",
"1142" }.RandomItem());
1399 TC.pos.PlayEffect(
"holyveil");
1400 TC.pos.PlaySound(
"holyveil");
1401 TC.pos.PlaySound(
"atk_eleSound");
1402 TC.conditions.ForeachReverse(delegate(
Condition c)
1409 TC.Say(
"abShutterHex",
TC);
1410 TC.pos.ForeachNeighbor(delegate(
Point p)
1414 if (!item3.IsFriendOrAbove(CC))
1416 int num9 = Dice.Create(
"SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
1417 item3.DamageHP(num9 * hex2, 919, power, AttackSource.None, CC);
1430 CC.
Say(
"abDraw", CC,
TC);
1437 if (CC.
id ==
"tentacle")
1446 if (nearbyCatToSniff !=
null)
1448 CC.
Sniff(nearbyCatToSniff);
1458 if (
TC.Evalue(426) > 0)
1460 TC.Say((actRef.n1 ==
"money") ?
"abStealNegateMoney" :
"abStealNegate",
TC);
1463 Thing thing4 =
null;
1464 bool flag7 = actRef.n1 ==
"food";
1465 if (actRef.n1 ==
"money")
1477 Func<Thing, bool> func = (
Thing t) =>
true;
1480 func = (
Thing t) => t.IsFood;
1482 List<Thing> list4 =
TC.things.List(delegate(
Thing t)
1488 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);
1489 }, onlyAccessible:
true);
1490 if (list4.Count > 0)
1492 thing4 = list4.RandomItem();
1495 thing4 = thing4.
Split(1);
1502 CC.
Say(
"abStealNothing", CC,
TC);
1507 CC.
Pick(thing4, msg:
false);
1509 if (actRef.n1 ==
"food")
1518 CC.
Say(
"abStealEscape", CC);
1519 CC.
Teleport(GetTeleportPos(tc.
pos, 30), silent:
true);
1528 if (CC !=
null && CC !=
TC)
1530 TC.Say(
"curse", CC,
TC);
1532 TC.PlaySound(
"curse3");
1533 TC.PlayEffect(
"curse");
1534 if (
EClass.
rnd(150 +
TC.LUC * 5 +
TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) ||
TC.TryNullifyCurse())
1538 List<Thing> list7 =
TC.things.List(delegate(
Thing t)
1546 if (list7.Count == 0)
1551 Thing thing6 = list7.RandomItem();
1552 TC.Say(
"curse_hit",
TC, thing6);
1560 TC.Say(
"uncurseEQ" + (blessed ?
"_bless" : (flag ?
"_curse" :
"")),
TC);
1561 TC.PlaySound(
"uncurse");
1562 TC.PlayEffect(
"uncurse");
1570 List<Thing> list =
new List<Thing>();
1571 TC.things.Foreach(delegate(
Thing t)
1576 if (t.blessedState == BlessedState.Cursed)
1578 num10 = EClass.rnd(200);
1582 num10 = EClass.rnd(1000);
1588 if (
id ==
EffectId.UncurseEQGreater)
1594 TC.Say(
"uncurseEQ_success", t);
1610 foreach (
Thing item4
in list)
1614 if (success == 0 && fail == 0)
1616 TC.SayNothingHappans();
1620 TC.Say(
"uncurseEQ_fail");
1626 string text3 = actRef.n1;
1631 if (!text4.IsEmpty())
1638 if (!actRef.aliasEle.IsEmpty())
1640 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1643 condition2.isPerfume = TC.IsPC && actRef.
isPerfume;
1644 Condition condition3 =
TC.AddCondition(condition2);
1645 if (condition3 !=
null && condition3.
isPerfume)
1647 condition3.value = 3;
1650 if (!text4.IsEmpty())
1652 CC.DoHostileAction(
TC);
1659 bool hex = CC.IsHostile(
TC);
1662 for (
int l = 0; l < 4 +
EClass.
rnd(2); l++)
1680 CC.DoHostileAction(
TC);
1681 bool isPowerful =
TC.IsPowerful;
1682 string n = actRef.n1;
1683 if (n ==
"ConSuffocation")
1685 power = power * 2 / 3;
1688 int num7 = TC.WIL * (isPowerful ? 20 : 5);
1690 if (condition !=
null)
1692 num7 += condition.power * 5;
1696 TC.Say(
"debuff_resist",
TC);
1697 CC.DoHostileAction(
TC);
1702 con.givenByPcParty = CC.IsPCParty;
1703 if (!actRef.aliasEle.IsEmpty())
1708 if (n ==
"ConBane" && CC.HasElement(1416))
1712 CC.DoHostileAction(
TC);
1720 TC.MutateRandom(1, 100, ether:
false, state);
1727 TC.MutateRandom(-1, 100, ether:
false, state);
1747 if (blessed || flag)
1751 Dialog.
InputName(
"dialogWish",
"q", delegate(
bool cancel,
string text)
1768 tc.
Say(
"faith_curse", tc,
faith.Name);
1773 tc.
Say(
"faith_bless", tc,
faith.Name);
1775 tc.
ModExp(306, power * 10);
1776 tc.
ModExp(85, power * 10);
1788 int gender2 = gender
switch
1802 if (blessed && age > 1)
1804 tc.
Say(
"ageDown", tc);
1809 tc.
Say(
"ageUp", tc);
1819 if (!flag && age3 <= 0)
1824 age3 = Mathf.Max(0, age3 * 100 / (flag ? 75 : (blessed ? 400 : 200))) + (flag ? 1 : 0);
1825 tc.
Say(flag ?
"ageUp" :
"ageDown", tc);
1843 tc.
Say(
"eternalYouth2", tc);
1857 tc.
Say(
"eternalYouth1", tc);
1858 tc.c_lockedAge = age2 + 1;
1870 Debug.Log(power +
"/" +
id.ToString() +
"/" + actRef.n1);
1875 if (power < 0 ||
id ==
EffectId.DebuffStats)
1877 power = Mathf.Abs(power);
1891 List<KeyValuePair<int, Chara>> list3 =
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();
1892 if (
TC.IsPCFaction ||
TC.IsPCFactionMinion)
1894 if (
TC.IsPC && list3.Count == 0)
1898 if (list3.Count > 0)
1900 list3.RandomItem().Value.Chara.GetRevived();
1904 TC.SayNothingHappans();
1913 bool flag8 =
id == EffectId.DamageBody ||
id ==
EffectId.DamageBodyGreat;
1914 bool mind =
id == EffectId.DamageMind ||
id ==
EffectId.DamageMindGreat;
1915 int num8 = ((
id == EffectId.DamageBody ||
id ==
EffectId.DamageMind) ? 1 : (4 +
EClass.
rnd(4)));
1924 TC.PlayEffect(
"debuff");
1925 TC.PlaySound(
"debuff");
1927 TC.Say(flag8 ?
"damageBody" :
"damageMind",
TC);
1928 for (
int k = 0; k < num8; k++)
1930 TC.DamageTempElements(power, flag8, mind,
id !=
EffectId.Weaken);
1943 bool flag9 =
id == EffectId.EnhanceBody ||
id ==
EffectId.EnhanceBodyGreat;
1944 bool mind2 =
id == EffectId.EnhanceMind ||
id ==
EffectId.EnhanceMindGreat;
1949 TC.Say(flag9 ?
"enhanceBody" :
"enhanceMind",
TC);
1950 TC.PlayEffect(
"buff");
1951 TC.PlaySound(
"buff");
1952 TC.EnhanceTempElements(power, flag9, mind2, onlyRenew:
true);
1958 bool flag6 =
id ==
EffectId.RestoreBody;
1964 TC.Say(flag6 ?
"restoreBody" :
"restoreMind",
TC);
1965 TC.PlaySound(
"heal");
1966 TC.PlayEffect(
"heal");
1976 TC.CureHost(
CureType.HealComplete, power, state);
1977 TC.Say(
"heal_heavy",
TC);
1986 if (actRef.act !=
null)
1988 Debug.Log(actRef.act.id);
1990 int num6 =
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();
1991 if (actRef.refThing !=
null)
1993 num6 = num6 * (100 + actRef.refThing.Evalue(7500)) / 100;
1997 TC.DamageHP(num6 / 2, 919, power);
2000 TC.HealHPHost(num6, (actRef.refThing ==
null &&
id !=
EffectId.JureHeal) ? HealSource.Magic :
HealSource.Item);
2002 TC.Say((power >= 300) ?
"heal_heavy" :
"heal_light",
TC);
2008 TC.Say(
"heal_jure",
TC);
2011 CC.Cuddle(
TC, headpat:
true);
2024 CC.Say(
"removeHex",
TC, item5.
Name.ToLower());
2035 TC.PlaySound(
"heal");
2036 TC.PlayEffect(
"heal");
2039 TC.Say(
"cureCorruption_curse",
TC);
2041 TC.ModCorruption(power);
2045 TC.Say(
"cureCorruption",
TC);
2046 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
2054 TC.Say(
"drinkRamune",
TC);
2058 TC.Say(
"drinkGood",
TC);
2064 TC.Say(
"drinkMilk",
TC);
2081 TC.Say(
"drinkWater_dirty",
TC);
2087 TC.Say(
"drinkWater_clear",
TC);
2093 TC.Say(
"drinkWater_dirty",
TC);
2101 if (
TC.HasElement(1211))
2103 TC.Say(
"drinkSaltWater_snail",
TC);
2104 int dmg = ((TC.hp > 10) ? (
TC.hp -
EClass.
rnd(10)) : 10000);
2109 TC.Say(
"drinkSaltWater",
TC);
2114 if (
TC.HasElement(1215))
2116 TC.Say(
"drunk_dwarf",
TC);
2272 if (list5.Count != 0)
2274 Thing thing5 = list5.RandomItem();
2275 TC.Say(
"acid_hit",
TC);
2278 TC.Say(
"acid_nullify", thing5);
2280 else if (thing5.
encLV > -5)
2282 TC.Say(
"acid_rust",
TC, thing5);
2294 TC.DamageHP(power / 5, actRef.idEle, power);
2305 TC.Say(
"drink_acid",
TC);
2306 TC.DamageHP(power / 5, 923, power);
2309 Msg.
Say(
"nothingHappens");
2317 TC.Say(
"love_curse_self",
TC);
2321 TC.Say(
"love_curse", CC,
TC);
2322 TC.ModAffinity(CC, -power / 4, show:
false);
2324 TC.ShowEmo(
Emo.angry);
2328 LoveMiracle(
TC, CC, power,
id ==
EffectId.LovePlus, state);
2334 if (
TC.HasElement(1532))
2336 TC.SetMutation(1532);
2340 TC.SetMutation(1533, 1);
2347 if (
TC.HasElement(1533))
2349 TC.SetMutation(1533);
2353 TC.SetMutation(1532, 1);
2356 TC.PlayEffect(
"aura_heaven");
2357 TC.PlaySound(
"godbless");
2360 TC.Say(
"grow_hair_fail",
TC);
2363 TC.Say(
"grow_hair",
TC);
2372 Proc(_id, orgPower, _state, cc, tc, _ref1);
2378 tc.
Say(
"eat_poison", tc);
2380 if (power > 100000000)
2384 int num = (int)Mathf.Sqrt(power * 100);
2396 tc.
Say(
"love_ground", tc);
2400 tc.
Say(
"love_chara", c, tc);
2407 Thing c2 = tc.
MakeMilk(effect:
true, 1, addToZone:
true, state);
2408 tc.
Say(
"item_drop", c2);
2412 Thing c3 = tc.
MakeEgg(effect:
true, 1, addToZone:
true, plus ? 3 : 20, state);
2413 tc.
Say(
"item_drop", c3);
2427 tc.
Say(
"love_ground", tc);
2431 tc.
Say(
"love_chara", c, tc);
2440 for (
int i = 0; i < 10000; i++)
2456 string netMsg =
GameLang.
Parse(
"wish".langGame(), thirdPerson:
true, name, s);
2458 List<WishItem> list =
new List<WishItem>();
2459 int wishLv = 10 + power / 4;
2460 int wishValue = 5000 + power * 50;
2463 wishLv = wishLv * 150 / 100;
2467 wishLv = wishLv * 150 / 100;
2470 Debug.Log(power +
"/" + wishValue);
2471 string _s = s.ToLower();
2479 if (
item.IsValidArtifact(r.
id))
2506 string text = r.
GetName().ToLower();
2507 int score = Compare(_s, text);
2520 if (category.IsChildOf(
"weapon") || category.IsChildOf(
"armor") || category.IsChildOf(
"ranged"))
2522 CardBlueprint.SetRarity(Rarity.Legendary);
2527 bool flag2 = thing.trait is
TraitDeed || thing.rarity >=
Rarity.Artifact || thing.
source._origin ==
"artifact_summon";
2531 thing.c_charges = 0;
2534 num = EClass.rndHalf(wishValue * 3);
2537 num = EClass.rndHalf(wishValue / 500 + 4);
2540 num = EClass.rndHalf(wishValue / 500 + 4);
2543 num = EClass.rndHalf(wishValue / 2000 + 4);
2546 if (!flag2 && thing.trait.CanStack)
2548 int num2 = wishValue;
2550 for (int i = 1; i < 1000; i++)
2552 int num3 = price + i * 2 * (price + 500);
2553 if (num3 > 0 && num2 > num3)
2562 if (price > 2500 && num > 3)
2564 num = 3 + (int)Mathf.Sqrt(num - 3);
2566 if (price > 5000 && num > 2)
2568 num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
2570 if (price > 10000 && num > 1)
2572 num = 1 + Mathf.Min((
int)Mathf.Sqrt(num - 1) / 3, 2);
2579 Debug.Log(_s +
"/" + num +
"/" + score);
2580 if (thing.HasTag(
CTAG.godArtifact))
2597 if (list.Count == 0)
2599 netMsg = netMsg + Lang.space +
"wishFail".langGame();
2607 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2608 foreach (WishItem item2
in list)
2610 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 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 void LoveMiracle(Chara tc, Chara c, int power, bool plus=false, BlessedState? state=null)
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
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)
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)
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 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)
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)
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)
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
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
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)