EA 23.109 Stable Patch 2
March 20, 2025
15 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
LayerLoadGame (1)
public void RefreshList()
public void RefreshList(string id = null)
Card
@@ -4711,9 +4711,32 @@ public void SpawnLoot(Card origin)
}
if (!isBackerContent && !flag)
{
if (id == "isca")
switch (id)
{
case "isca":
list.Add(ThingGen.Create("blood_angel"));
break;
case "golem_wood":
if (chance(30))
{
list.Add(ThingGen.Create("crystal_earth"));
}
break;
case "golem_stone":
if (chance(30))
{
list.Add(ThingGen.Create("crystal_sun"));
}
break;
case "golem_steel":
if (chance(30))
{
list.Add(ThingGen.Create("crystal_mana"));
}
break;
case "golem_gold":
list.Add(ThingGen.Create("money2"));
break;
}
int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
if (EClass._zone is Zone_Void)
@@ -6177,6 +6200,27 @@ public void SetRandomTone()
c_idTone = MOD.tones.GetToneID(text, bio?.gender ?? 0);
}
public bool HasCraftBonusTrait()
{
return ListCraftBonusTraits().Count > 0;
}
public List<Element> ListCraftBonusTraits()
{
List<Element> list = new List<Element>();
string[] tag = sourceCard.tag;
for (int i = 0; i < tag.Length; i++)
{
string[] array = tag[i].Split('/');
if (!(array[0] != "craft_bonus"))
{
Element item = Element.Create(array[1], array[2].ToInt());
list.Add(item);
}
}
return list;
}
public void TryStack(Thing t)
{
if (t == this)
}
if (IsDecayed)
{
p *= (flag ? 1.25f : 0.5f);
p *= (flag ? 0.9f : 0.5f);
}
}
else
Chara
}
if (newPoint.cell.CanSuffocate())
{
AddCondition<ConSuffocation>((EClass.pc.Evalue(200) != 0) ? (2000 / (100 + EvalueMax(200, -5) * 10)) : 30);
AddCondition<ConSuffocation>((EClass.pc.Evalue(200) != 0) ? (2000 / (100 + EvalueMax(200, -5) * 10)) : 30, force: true);
int num4 = GetCondition<ConSuffocation>()?.GetPhase() ?? 0;
if (num4 >= 2)
{
@@ -3804,7 +3804,7 @@ public override void Tick()
}
if (IsPC && !EClass._zone.IsRegion && cell.CanSuffocate())
{
AddCondition<ConSuffocation>(800 / (100 + EvalueMax(200, -5) * 10));
AddCondition<ConSuffocation>(800 / (100 + EvalueMax(200, -5) * 10), force: true);
}
CellEffect e;
if (cell.effect != null)
}
foreach (Thing thing4 in container.things)
{
if (!thing4.c_isImportant)
if (!thing4.c_isImportant && thing4.IsIdentified)
{
if (num3 > 0 && thing4.id == "polish_powder")
{
@@ -9245,9 +9245,9 @@ public void ModTempElement(int ele, int a, bool naturalDecay = false)
{
a = a * 100 / (200 + (tempElements.Base(ele) - a) * 10);
}
int num = Mathf.Abs(elements.Base(ele)) * 2 + 20;
int num = Mathf.Abs(elements.ValueWithoutLink(ele)) * 2 + 20;
int num2 = tempElements.Base(ele) + a;
if (num2 < num || num2 > num)
if (num2 < -num || num2 > num)
{
a = 0;
}
CraftUtil
product.elements.SetTo(value2.id, 0);
}
}
if (product.HasTag(CTAG.dish_bonus))
if (product.HasCraftBonusTrait())
{
foreach (Element value3 in product.sourceCard.model.elements.dict.Values)
foreach (Element item in product.ListCraftBonusTraits())
{
if (value3.IsTrait || value3.IsFoodTraitMain)
{
product.elements.ModBase(value3.id, value3.Value);
}
product.elements.ModBase(item.id, item.Value);
}
}
if (isFood)
@@ -227,6 +224,14 @@ public static Card MixIngredients(Card product, List<Thing> ings, MixType type,
{
product.elements.ModBase(10, 6);
}
if (product.HasElement(762))
{
product.elements.ModBase(10, product.Evalue(762) / 5);
if (product.Evalue(10) < 1)
{
product.elements.SetTo(10, 1);
}
}
return product;
bool IsValidTrait(Element e)
{
@@ -259,20 +264,20 @@ void MixElements(Card t)
{
if (t != null)
{
foreach (Element value4 in t.elements.dict.Values)
foreach (Element value3 in t.elements.dict.Values)
{
if (IsValidTrait(value4))
if (IsValidTrait(value3))
{
if (isFood && value4.IsFoodTraitMain)
if (isFood && value3.IsFoodTraitMain)
{
product.elements.ModBase(value4.id, value4.Value);
product.elements.ModBase(value3.id, value3.Value);
}
else
{
int num4 = product.elements.Base(value4.id);
if ((num4 <= 0 && value4.Value < 0 && value4.Value < num4) || (value4.Value > 0 && value4.Value > num4))
int num4 = product.elements.Base(value3.id);
if ((num4 <= 0 && value3.Value < 0 && value3.Value < num4) || (value3.Value > 0 && value3.Value > num4))
{
product.elements.SetTo(value4.id, value4.Value);
product.elements.SetTo(value3.id, value3.Value);
}
}
}
DOMAIN
@@ -8,17 +8,17 @@ public class DOMAIN
public const int domMachine = 809;
public const int domEyth = 814;
public const int domOblivion = 813;
public const int domHarmony = 815;
public const int domHarvest = 808;
public const int domEarth = 812;
public const int domEyth = 814;
public const int domMiracle = 803;
public const int domHarmony = 815;
public const int domTest = 800;
public const int domFaith = 802;
public const int domHarvest = 808;
public const int domEarth = 812;
public const int domWind = 807;
@@ -28,16 +28,16 @@ public class DOMAIN
public const int domArcane = 804;
public const int domFaith = 802;
public const int domMiracle = 803;
public const int domSurvival = 801;
public const int domOblivion = 813;
public const int domTest = 800;
public static readonly int[] IDS = new int[16]
{
811, 810, 809, 814, 815, 812, 803, 800, 808, 807,
806, 805, 804, 802, 801, 813
811, 810, 809, 813, 808, 814, 815, 802, 812, 807,
806, 805, 804, 803, 801, 800
};
}
public class Domain : EClass
ELEMENT
public class ELEMENT
{
public const int purity = 759;
public const int roasted = 762;
public const int stimulant = 760;
public const int comfort = 750;
@@ -19,19 +23,17 @@ public class ELEMENT
public const int blood = 755;
public const int hotspring = 756;
public const int recharge = 761;
public const int purity = 759;
public const int hotspring = 756;
public const int _void = 0;
public const int quality = 2;
public const int d = 3;
public const int lv = 1;
public const int d = 3;
public const int quality = 2;
public const int socket = 5;
@@ -71,12 +73,12 @@ public class ELEMENT
public const int poison = 20;
public static readonly int[] IDS = new int[33]
public static readonly int[] IDS = new int[34]
{
760, 750, 751, 752, 753, 754, 755, 756, 761, 759,
0, 2, 1, 3, 5, 10, 11, 12, 13, 14,
16, 17, 18, 15, 21, 22, 23, 24, 25, 26,
29, 85, 20
759, 762, 760, 750, 751, 752, 753, 754, 755, 761,
756, 0, 3, 1, 2, 5, 10, 11, 12, 13,
14, 16, 17, 18, 15, 21, 22, 23, 24, 25,
26, 29, 85, 20
};
}
public class Element : EClass
UIText.globalSizeMod = 0;
}
public void AddEncNote(UINote n, Card Card, ElementContainer.NoteMode mode = ElementContainer.NoteMode.Default, Func<Element, string, string> funcText = null, Action<UINote, Element> onAddNote = null)
{
string text = "";
switch (mode)
{
case ElementContainer.NoteMode.Domain:
n.AddText(Name, FontColor.Default);
return;
case ElementContainer.NoteMode.Default:
case ElementContainer.NoteMode.BonusTrait:
{
bool flag = source.tag.Contains("common");
string categorySub = source.categorySub;
bool flag2 = false;
bool flag3 = (source.tag.Contains("neg") ? (Value > 0) : (Value < 0));
int num = Mathf.Abs(Value);
bool flag4 = Card?.ShowFoodEnc ?? false;
bool flag5 = Card != null && Card.IsWeapon && this is Ability;
if (IsTrait || (flag4 && IsFoodTrait))
{
string[] textArray = source.GetTextArray("textAlt");
int num2 = Mathf.Clamp(Value / 10 + 1, (Value < 0 || textArray.Length <= 2) ? 1 : 2, textArray.Length - 1);
text = "altEnc".lang(textArray[0].IsEmpty(Name), textArray[num2], EClass.debug.showExtra ? (Value + " " + Name) : "");
flag3 = num2 <= 1 || textArray.Length <= 2;
flag2 = true;
}
else if (flag5)
{
text = "isProc".lang(Name);
flag3 = false;
}
else if (categorySub == "resist")
{
text = ("isResist" + (flag3 ? "Neg" : "")).lang(Name);
}
else if (categorySub == "eleAttack")
{
text = "isEleAttack".lang(Name);
}
else if (!source.textPhase.IsEmpty() && Value > 0)
{
text = source.GetText("textPhase");
}
else
{
string name = Name;
bool flag6 = source.category == "skill" || (source.category == "attribute" && !source.textPhase.IsEmpty());
bool flag7 = source.category == "enchant";
if (source.tag.Contains("multiplier"))
{
flag6 = (flag7 = false);
name = EClass.sources.elements.alias[source.aliasRef].GetName();
}
flag2 = !(flag6 || flag7);
text = (flag6 ? "textEncSkill" : (flag7 ? "textEncEnc" : "textEnc")).lang(name, num + (source.tag.Contains("ratio") ? "%" : ""), ((Value > 0) ? "encIncrease" : "encDecrease").lang());
}
int num3 = ((!(this is Resistance)) ? 1 : 0);
int num4 = 5;
if (id == 484)
{
num3 = 0;
num4 = 1;
}
if (!flag && !flag2 && !source.tag.Contains("flag"))
{
text = text + " [" + "*".Repeat(Mathf.Clamp(num * source.mtp / num4 + num3, 1, 5)) + ((num * source.mtp / num4 + num3 > 5) ? "+" : "") + "]";
}
if (HasTag("hidden") && mode != ElementContainer.NoteMode.BonusTrait)
{
text = "(debug)" + text;
}
FontColor color = (flag ? FontColor.Default : (flag3 ? FontColor.Bad : FontColor.Good));
if (IsGlobalElement)
{
text = text + " " + (IsFactionWideElement ? "_factionWide" : "_partyWide").lang();
if (!IsActive(Card))
{
return;
}
color = FontColor.Myth;
}
if (flag4 && IsFoodTrait && !IsFoodTraitMain)
{
color = FontColor.FoodMisc;
}
if (id == 2 && Value >= 0)
{
color = FontColor.FoodQuality;
}
if (funcText != null)
{
text = funcText(this, text);
}
UIItem uIItem = n.AddText("NoteText_enc", text, color);
Sprite sprite = EClass.core.refs.icons.enc.enc;
Thing thing = Card?.Thing;
if (thing != null)
{
if (thing.material.HasEnc(id))
{
sprite = EClass.core.refs.icons.enc.mat;
}
foreach (int key in thing.source.elementMap.Keys)
{
if (key == id)
{
sprite = EClass.core.refs.icons.enc.card;
}
}
if (thing.IsFood && IsFoodTrait)
{
sprite = EClass.core.refs.icons.enc.traitFood;
}
if (id == thing.GetInt(107))
{
sprite = EClass.core.refs.icons.enc.cat;
}
if (thing.GetRuneEnc(id) != null)
{
sprite = EClass.core.refs.icons.enc.rune;
}
}
if ((bool)sprite)
{
uIItem.image1.SetActive(enable: true);
uIItem.image1.sprite = sprite;
}
uIItem.image2.SetActive(source.IsWeaponEnc);
onAddNote?.Invoke(n, this);
return;
}
}
UIItem uIItem2 = n.AddTopic("TopicAttribute", Name, "".TagColor((ValueWithoutLink > 0) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad, ValueWithoutLink.ToString() ?? ""));
if ((bool)uIItem2.button1)
{
uIItem2.button1.tooltip.onShowTooltip = delegate(UITooltip t)
{
WriteNote(t.note, EClass.pc.elements);
};
}
SetImage(uIItem2.image1);
Image image = uIItem2.image2;
int value = (Potential - 80) / 20;
image.enabled = Potential != 80;
image.sprite = EClass.core.refs.spritesPotential[Mathf.Clamp(Mathf.Abs(value), 0, EClass.core.refs.spritesPotential.Count - 1)];
image.color = ((Potential - 80 >= 0) ? Color.white : new Color(1f, 0.7f, 0.7f));
}
public virtual void OnWriteNote(UINote n, ElementContainer owner)
{
}
ENC
public class ENC
{
public const int living = 653;
public const int eco = 652;
public const int r_PV = 651;
@@ -8,26 +10,22 @@ public class ENC
public const int r_mana = 641;
public const int r_life = 640;
public const int mod_frustration = 624;
public const int mod_flurry = 621;
public const int mod_chaser = 620;
public const int mod_cleave = 622;
public const int mod_feint = 623;
public const int mod_cleave = 622;
public const int living = 653;
public const int noDamage = 654;
public const int mod_frustration = 624;
public const int r_life = 640;
public const int noDamage = 654;
public const int onlyPet = 655;
public const int convertCold = 851;
public const int permaCurse = 656;
public const int absorbHP = 660;
public const int absorbMP = 661;
@@ -44,19 +42,19 @@ public class ENC
public const int convertFire = 850;
public const int mod_splash = 608;
public const int mod_chaser = 620;
public const int convertImpact = 865;
public const int convertLightning = 852;
public const int onlyPet = 655;
public const int permaCurse = 656;
public const int mod_scatter = 607;
public const int mod_splash = 608;
public const int bane_animal = 463;
public const int bane_man = 464;
public const int mod_precision = 605;
public const int mod_drill = 606;
public const int allNeckHunt = 428;
@@ -110,7 +108,7 @@ public class ENC
public const int negateTeleport = 400;
public const int mod_drill = 606;
public const int mod_scatter = 607;
public const int breathing = 429;
@@ -118,7 +116,11 @@ public class ENC
public const int negateParalysis = 422;
public const int slot_rune = 484;
public const int sustain_DEX = 442;
public const int mod_precision = 605;
public const int mod_ammo_recover = 604;
public const int mod_ammo_knockback = 603;
@@ -144,10 +146,14 @@ public class ENC
public const int bane_god = 466;
public const int bane_man = 464;
public const int bane_machine = 465;
public const int slot_rune = 484;
public const int bane_animal = 463;
public const int bane_fairy = 462;
public const int bane_undead = 461;
public const int bane_dragon = 460;
@@ -160,24 +166,18 @@ public class ENC
public const int sustain_LER = 444;
public const int bane_fairy = 462;
public const int sustain_PER = 443;
public const int sustain_DEX = 442;
public const int mod_ammo_recover = 604;
public static readonly int[] IDS = new int[84]
{
652, 651, 650, 641, 640, 621, 620, 623, 622, 653,
624, 654, 851, 656, 660, 661, 662, 663, 664, 665,
666, 850, 608, 865, 852, 655, 607, 463, 605, 428,
427, 426, 425, 424, 423, 421, 420, 418, 417, 416,
415, 414, 412, 411, 410, 409, 408, 407, 406, 405,
404, 403, 402, 401, 400, 606, 429, 440, 422, 484,
603, 602, 601, 600, 441, 483, 482, 481, 480, 468,
467, 466, 464, 465, 461, 460, 447, 446, 445, 444,
462, 443, 442, 604
653, 652, 651, 650, 641, 624, 621, 622, 623, 654,
640, 655, 851, 660, 661, 662, 663, 664, 665, 666,
850, 620, 865, 852, 656, 608, 464, 606, 428, 427,
426, 425, 424, 423, 421, 420, 418, 417, 416, 415,
414, 412, 411, 410, 409, 408, 407, 406, 405, 404,
403, 402, 401, 400, 607, 429, 440, 422, 442, 605,
604, 603, 602, 601, 600, 441, 483, 482, 481, 480,
468, 467, 466, 465, 484, 463, 462, 461, 460, 447,
446, 445, 444, 443
};
}
ElementContainer
using System.Runtime.Serialization;
using Newtonsoft.Json;
using UnityEngine;
using UnityEngine.UI;
public class ElementContainer : EClass
{
@@ -14,7 +13,7 @@ public enum NoteMode
CharaMake,
CharaMakeAttributes,
Domain,
Trait
BonusTrait
}
public Dictionary<int, Element> dict = new Dictionary<int, Element>();
@@ -675,11 +674,11 @@ public static int GetSortVal(Element a)
public void AddNote(UINote n, Func<Element, bool> isValid = null, Action onAdd = null, NoteMode mode = NoteMode.Default, bool addRaceFeat = false, Func<Element, string, string> funcText = null, Action<UINote, Element> onAddNote = null)
{
List<Element> list = new List<Element>();
foreach (Element value2 in dict.Values)
foreach (Element value in dict.Values)
{
if ((isValid == null || isValid(value2)) && (mode != NoteMode.CharaMake || value2.ValueWithoutLink != 0) && (value2.Value != 0 || mode == NoteMode.CharaMakeAttributes) && (!value2.HasTag("hidden") || EClass.debug.showExtra))
if ((isValid == null || isValid(value)) && (mode != NoteMode.CharaMake || value.ValueWithoutLink != 0) && (value.Value != 0 || mode == NoteMode.CharaMakeAttributes) && (!value.HasTag("hidden") || EClass.debug.showExtra))
{
list.Add(value2);
list.Add(value);
}
}
if (addRaceFeat)
case NoteMode.CharaMakeAttributes:
list.Sort((Element a, Element b) => a.GetSortVal(UIList.SortMode.ByElementParent) - b.GetSortVal(UIList.SortMode.ByElementParent));
break;
case NoteMode.Trait:
case NoteMode.BonusTrait:
list.Sort((Element a, Element b) => GetSortVal(b) - GetSortVal(a));
break;
default:
list.Sort((Element a, Element b) => a.SortVal() - b.SortVal());
break;
}
string text = "";
foreach (Element e in list)
foreach (Element item in list)
{
switch (mode)
{
case NoteMode.Domain:
n.AddText(e.Name, FontColor.Default);
continue;
case NoteMode.Default:
case NoteMode.Trait:
{
bool flag = e.source.tag.Contains("common");
string categorySub = e.source.categorySub;
bool flag2 = false;
bool flag3 = (e.source.tag.Contains("neg") ? (e.Value > 0) : (e.Value < 0));
int num = Mathf.Abs(e.Value);
bool flag4 = Card != null && Card.ShowFoodEnc;
bool flag5 = Card != null && Card.IsWeapon && e is Ability;
if (e.IsTrait || (flag4 && e.IsFoodTrait))
{
string[] textArray = e.source.GetTextArray("textAlt");
int num2 = Mathf.Clamp(e.Value / 10 + 1, (e.Value < 0 || textArray.Length <= 2) ? 1 : 2, textArray.Length - 1);
text = "altEnc".lang(textArray[0].IsEmpty(e.Name), textArray[num2], EClass.debug.showExtra ? (e.Value + " " + e.Name) : "");
flag3 = num2 <= 1 || textArray.Length <= 2;
flag2 = true;
}
else if (flag5)
{
text = "isProc".lang(e.Name);
flag3 = false;
}
else if (categorySub == "resist")
{
text = ("isResist" + (flag3 ? "Neg" : "")).lang(e.Name);
}
else if (categorySub == "eleAttack")
{
text = "isEleAttack".lang(e.Name);
}
else if (!e.source.textPhase.IsEmpty() && e.Value > 0)
{
text = e.source.GetText("textPhase");
}
else
{
string name = e.Name;
bool flag6 = e.source.category == "skill" || (e.source.category == "attribute" && !e.source.textPhase.IsEmpty());
bool flag7 = e.source.category == "enchant";
if (e.source.tag.Contains("multiplier"))
{
flag6 = (flag7 = false);
name = EClass.sources.elements.alias[e.source.aliasRef].GetName();
}
flag2 = !(flag6 || flag7);
text = (flag6 ? "textEncSkill" : (flag7 ? "textEncEnc" : "textEnc")).lang(name, num + (e.source.tag.Contains("ratio") ? "%" : ""), ((e.Value > 0) ? "encIncrease" : "encDecrease").lang());
}
int num3 = ((!(e is Resistance)) ? 1 : 0);
int num4 = 5;
if (e.id == 484)
{
num3 = 0;
num4 = 1;
}
if (!flag && !flag2 && !e.source.tag.Contains("flag"))
{
text = text + " [" + "*".Repeat(Mathf.Clamp(num * e.source.mtp / num4 + num3, 1, 5)) + ((num * e.source.mtp / num4 + num3 > 5) ? "+" : "") + "]";
}
if (e.HasTag("hidden"))
{
text = "(debug)" + text;
}
FontColor color = (flag ? FontColor.Default : (flag3 ? FontColor.Bad : FontColor.Good));
if (e.IsGlobalElement)
{
text = text + " " + (e.IsFactionWideElement ? "_factionWide" : "_partyWide").lang();
if (!e.IsActive(Card))
{
continue;
}
color = FontColor.Myth;
}
if (flag4 && e.IsFoodTrait && !e.IsFoodTraitMain)
{
color = FontColor.FoodMisc;
}
if (e.id == 2 && e.Value >= 0)
{
color = FontColor.FoodQuality;
}
if (funcText != null)
{
text = funcText(e, text);
}
UIItem uIItem = n.AddText("NoteText_enc", text, color);
Sprite sprite = EClass.core.refs.icons.enc.enc;
Thing thing = Card?.Thing;
if (thing != null)
{
if (thing.material.HasEnc(e.id))
{
sprite = EClass.core.refs.icons.enc.mat;
}
foreach (int key in thing.source.elementMap.Keys)
{
if (key == e.id)
{
sprite = EClass.core.refs.icons.enc.card;
}
}
if (thing.IsFood && e.IsFoodTrait)
{
sprite = EClass.core.refs.icons.enc.traitFood;
}
if (e.id == thing.GetInt(107))
{
sprite = EClass.core.refs.icons.enc.cat;
}
if (thing.GetRuneEnc(e.id) != null)
{
sprite = EClass.core.refs.icons.enc.rune;
}
}
if ((bool)sprite)
{
uIItem.image1.SetActive(enable: true);
uIItem.image1.sprite = sprite;
}
uIItem.image2.SetActive(e.source.IsWeaponEnc);
onAddNote?.Invoke(n, e);
continue;
}
}
UIItem uIItem2 = n.AddTopic("TopicAttribute", e.Name, "".TagColor((e.ValueWithoutLink > 0) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad, e.ValueWithoutLink.ToString() ?? ""));
if ((bool)uIItem2.button1)
{
uIItem2.button1.tooltip.onShowTooltip = delegate(UITooltip t)
{
e.WriteNote(t.note, EClass.pc.elements);
};
}
e.SetImage(uIItem2.image1);
Image image = uIItem2.image2;
int value = (e.Potential - 80) / 20;
image.enabled = e.Potential != 80;
image.sprite = EClass.core.refs.spritesPotential[Mathf.Clamp(Mathf.Abs(value), 0, EClass.core.refs.spritesPotential.Count - 1)];
image.color = ((e.Potential - 80 >= 0) ? Color.white : new Color(1f, 0.7f, 0.7f));
item.AddEncNote(n, Card, mode, funcText, onAddNote);
}
}
FACTION
public class FACTION
{
public const int bfHill = 3603;
public const int bfCave = 3500;
public const int bfPlain = 3600;
@@ -14,25 +12,29 @@ public class FACTION
public const int bfSnow = 3602;
public const int bfHill = 3603;
public const int bfFertile = 3700;
public const int bfSea = 3605;
public const int bfBeach = 3604;
public const int fRation = 2207;
public const int fLoyal = 2117;
public const int bfGeyser = 3701;
public const int bfBeach = 3604;
public const int fAttraction = 2206;
public const int fLoyal = 2117;
public const int fPromo = 2202;
public const int fFood = 2204;
public const int fMoral = 2203;
public const int fPromo = 2202;
public const int fConstruction = 2003;
public const int fElec = 2201;
@@ -40,17 +42,15 @@ public class FACTION
public const int fHeirloom = 2120;
public const int fConstruction = 2003;
public const int bfRuin = 3702;
public const int fEducation = 2116;
public const int fTaxEvasion = 2119;
public const int fAdmin = 2115;
public const int fLuck = 2118;
public const int fAdmin = 2115;
public const int fTaxEvasion = 2119;
public const int fEducation = 2116;
public const int bfRuin = 3702;
public const int fSafety = 2205;
@@ -110,9 +110,9 @@ public class FACTION
public static readonly int[] IDS = new int[52]
{
3603, 3500, 3600, 3601, 3602, 3700, 3605, 3604, 2207, 3701,
2206, 2117, 2204, 2203, 2202, 2201, 2200, 2120, 2003, 3702,
2119, 2118, 2115, 2116, 2205, 3703, 3707, 3705, 4006, 4005,
3500, 3600, 3601, 3602, 3603, 3700, 3605, 2207, 2117, 3701,
3604, 2206, 2202, 2204, 2203, 2003, 2201, 2200, 2120, 2116,
2115, 2118, 2119, 3702, 2205, 3703, 3707, 3705, 4006, 4005,
4004, 4003, 4002, 4001, 3704, 3900, 3805, 3804, 3803, 4000,
3801, 3802, 3708, 3709, 3710, 3780, 3706, 3782, 3783, 3784,
3800, 3781
FEAT
@@ -59,7 +59,7 @@ public class FEAT
public const int featChef = 1658;
public const int featScavenger = 1656;
public const int featManaCost = 1657;
public const int featModelBeliever = 1655;
@@ -103,7 +103,7 @@ public class FEAT
public const int featReboot = 1410;
public const int featManaCost = 1657;
public const int featScavenger = 1656;
public const int featPaladin2 = 1408;
@@ -233,10 +233,10 @@ public class FEAT
{
1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1612,
1412, 1610, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414,
1413, 1629, 1611, 1630, 1645, 1632, 1411, 1658, 1656, 1655,
1413, 1629, 1611, 1630, 1645, 1632, 1411, 1658, 1657, 1655,
1654, 1653, 1652, 1651, 1650, 1649, 1631, 1648, 1646, 1644,
1643, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1647, 1410,
1657, 1408, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232,
1656, 1408, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232,
1234, 1235, 1236, 1237, 1238, 1239, 1300, 1305, 1310, 1315,
1320, 1325, 1330, 1224, 1223, 1222, 1221, 1409, 1200, 1201,
1202, 1203, 1204, 1205, 1206, 1207, 1208, 1335, 1209, 1211,
GrowSystem
@@ -612,7 +612,19 @@ public void PopHarvest(Chara c, Thing t = null, int num = -1)
{
if (t == null)
{
t = ((!idHarvestThing.StartsWith('#')) ? ThingGen.Create(idHarvestThing.IsEmpty("apple")) : ThingGen.CreateFromCategory(idHarvestThing.Replace("#", "")));
if (idHarvestThing.StartsWith('#'))
{
t = ThingGen.CreateFromCategory(idHarvestThing.Replace("#", ""));
}
else
{
string text = idHarvestThing;
if (text == "potato" && EClass.rnd(3) == 0)
{
text = "784";
}
t = ThingGen.Create(text.IsEmpty("apple"));
}
}
ApplySeed(t);
PlantData plantData = EClass._map.TryGetPlant(cell);
LayerLoadGame
@@ -30,6 +30,8 @@ public class LayerLoadGame : ELayer
public UIButton buttonMove;
public UIButton buttonRename;
public List<GameIndex> worlds;
public Portrait portrait;
@@ -103,7 +105,7 @@ public void Init(bool _backup, string _pathBackup = "", string _idDest = "")
}
}
public void RefreshList()
public void RefreshList(string id = null)
{
if (!backup)
{
@@ -142,6 +144,18 @@ public void RefreshList()
buttonDelete.SetActive(enable: false);
goNoInfo.SetActive(value: true);
}
if (id == null)
{
return;
}
list.Select((GameIndex a) => a.id == id);
foreach (GameIndex world2 in worlds)
{
if (world2.id == id)
{
RefreshInfo(world2);
}
}
}
public void RefreshInfo(GameIndex i)
@@ -187,22 +201,59 @@ public void RefreshInfo(GameIndex i)
portrait.SetActive(enable: false);
}
note.Build();
buttonListBackup.SetActive(!backup);
int num = 0;
if (!backup)
{
num = GameIO.GetGameList((cloud ? CorePath.PathBackupCloud : CorePath.PathBackup) + i.id + "/").Count;
}
buttonListBackup.mainText.SetText("listBackup".lang() + " (" + num + ")");
buttonListBackup.SetActive(!backup && num > 0);
buttonDelete.SetActive(!backup && !ELayer.core.IsGameStarted);
buttonBackup.SetActive(!backup && (!ELayer.core.IsGameStarted || i.id == Game.id));
buttonOpen.SetActive(backup);
buttonMove.SetActive(!backup && !ELayer.core.IsGameStarted);
buttonMove.mainText.SetText((cloud ? "fromCloud" : "toCloud").lang());
buttonRename.SetActive(!backup && !cloud && !ELayer.core.IsGameStarted);
buttonRename.SetOnClick(delegate
{
Dialog.InputName("dialogTeleportId", i.id, delegate(bool cancel, string text)
{
if (!cancel && !text.IsEmpty())
{
try
{
if (Directory.Exists(CorePath.RootSave + text))
{
throw new Exception(text + " already exists.");
}
Directory.Move(CorePath.RootSave + i.id, CorePath.RootSave + text);
if (Directory.Exists(CorePath.PathBackup + i.id))
{
if (Directory.Exists(CorePath.PathBackup + text))
{
throw new Exception("Backup/" + text + " already exists.");
}
Directory.Move(CorePath.PathBackup + i.id, CorePath.PathBackup + text);
}
RefreshList(text);
}
catch (Exception ex2)
{
ELayer.ui.Say(ex2.Message);
}
}
});
});
buttonMove.SetOnClick(delegate
{
Dialog.YesNo("dialog_switchCloud", delegate
{
string sourceDirName = (cloud ? CorePath.RootSaveCloud : CorePath.RootSave) + i.id;
string text = (cloud ? CorePath.RootSave : CorePath.RootSaveCloud) + i.id;
string text2 = (cloud ? CorePath.PathBackupCloud : CorePath.PathBackup) + i.id;
string text3 = (cloud ? CorePath.PathBackup : CorePath.PathBackupCloud) + i.id;
bool flag2 = Directory.Exists(text2);
if (Directory.Exists(text) || Directory.Exists(text3))
string text2 = (cloud ? CorePath.RootSave : CorePath.RootSaveCloud) + i.id;
string text3 = (cloud ? CorePath.PathBackupCloud : CorePath.PathBackup) + i.id;
string text4 = (cloud ? CorePath.PathBackup : CorePath.PathBackupCloud) + i.id;
bool flag2 = Directory.Exists(text3);
if (Directory.Exists(text2) || Directory.Exists(text4))
{
SE.Beep();
ELayer.ui.Say("cloud_conflict");
@@ -215,7 +266,7 @@ public void RefreshInfo(GameIndex i)
if (flag2)
{
Debug.Log("Converting Backup files:");
Directory.Move(text2, text3);
Directory.Move(text3, text4);
foreach (GameIndex game in GameIO.GetGameList(((!cloud) ? CorePath.PathBackupCloud : CorePath.PathBackup) + i.id + "/"))
{
Debug.Log("Processing:" + game.id + ": " + game.path);
@@ -226,8 +277,8 @@ public void RefreshInfo(GameIndex i)
}
}
Debug.Log("Converting Current World:");
Directory.Move(sourceDirName, text);
i.path = text;
Directory.Move(sourceDirName, text2);
i.path = text2;
i.cloud = !cloud;
GameIO.UpdateGameIndex(i);
if (i.cloud)
@@ -302,6 +353,7 @@ public void RefreshInfo(GameIndex i)
GameIO.MakeBackup(i);
ELayer.ui.Say("backupDone");
SE.WriteJournal();
RefreshInfo(i);
});
buttonOpen.SetOnClick(delegate
{
Map
@@ -1314,7 +1314,7 @@ public void TryShatter(Point pos, int ele, int power)
continue;
}
}
if (row.components[0] == item3.id || row.components[0] == item3.sourceCard._origin)
if (row.components[0].Split('|').Contains(item3.id) || row.components[0].Split('|').Contains(item3.sourceCard._origin))
{
list3.Add(row);
}
RecipeManager
@@ -295,7 +295,7 @@ public static RecipeSource GetUnlearnedRecipe(int lvBonus, string cat, bool only
List<RecipeSource> list = new List<RecipeSource>();
foreach (RecipeSource item in RecipeManager.list)
{
if ((item.NeedFactory || item.IsQuickCraft) && (cat == null || item.row.Category.IsChildOf(cat)) && (!onlyUnlearned || !EClass.player.recipes.knownRecipes.ContainsKey(item.id)) && EClass.pc.Evalue(item.GetReqSkill().id) + 5 + lvBonus >= item.row.LV && !item.row.ContainsTag("hiddenRecipe"))
if (!item.alwaysKnown && (item.NeedFactory || item.IsQuickCraft) && (cat == null || item.row.Category.IsChildOf(cat)) && (!onlyUnlearned || !EClass.player.recipes.knownRecipes.ContainsKey(item.id)) && EClass.pc.Evalue(item.GetReqSkill().id) + 5 + lvBonus >= item.row.LV && !item.row.ContainsTag("hiddenRecipe"))
{
list.Add(item);
}
SourceThingV
@@ -213,6 +213,9 @@ public override void OnAfterImportData()
string[] array2 = parse[i].Split('/');
switch (array2[0])
{
case "elec":
row.electricity = array2[1].ToInt();
break;
case "render":
row._idRenderData = array2[1];
break;
Thing
{
list = list2;
}
elements.AddNote(n, (Element e) => list.Contains(e), null, ElementContainer.NoteMode.Trait, addRaceFeat: false, delegate(Element e, string s)
elements.AddNote(n, (Element e) => list.Contains(e), null, ElementContainer.NoteMode.BonusTrait, addRaceFeat: false, delegate(Element e, string s)
{
string text12 = s;
string text13 = e.source.GetText("textExtra");
{
AddText("traitOther".lang((list2.Count - list.Count).ToString() ?? ""), FontColor.Default);
}
if (mode == IInspect.NoteMode.Product && HasTag(CTAG.dish_bonus))
if (mode == IInspect.NoteMode.Product && HasCraftBonusTrait())
{
n.AddHeader("HeaderAdditionalTrait", "additional_trait");
source.model.elements.AddNote(n, (Element e) => e.IsTrait || e.IsFoodTraitMain, null, ElementContainer.NoteMode.Trait, addRaceFeat: false, delegate(Element e, string s)
foreach (Element item in ListCraftBonusTraits())
{
string text9 = s;
string text10 = e.source.GetText("textExtra");
if (!text10.IsEmpty())
item.AddEncNote(n, this, ElementContainer.NoteMode.BonusTrait, delegate(Element e, string s)
{
string text11 = "";
int num = e.Value / 10;
num = ((e.Value < 0) ? (num - 1) : (num + 1));
text10 = "Lv." + num + text11 + " " + text10;
if (infoMode && e.IsFoodTraitMain)
string text9 = s;
string text10 = e.source.GetText("textExtra");
if (!text10.IsEmpty())
{
text10 += "traitAdditive".lang();
string text11 = "";
int num = e.Value / 10;
num = ((e.Value < 0) ? (num - 1) : (num + 1));
text10 = "Lv." + num + text11 + " " + text10;
if (infoMode && e.IsFoodTraitMain)
{
text10 += "traitAdditive".lang();
}
text9 += (" <size=12>" + text10 + "</size>").TagColor(FontColor.Passive);
}
text9 += (" <size=12>" + text10 + "</size>").TagColor(FontColor.Passive);
}
return text9;
});
return text9;
});
}
}
}
if (EClass.debug.showExtra)