EA 23.124 Nightly
April 13, 2025
18 files modified. 1 new file created.
Important Changes
None.
ACT
@@ -35,7 +35,7 @@ public static void Init()
public static Act Create(int id)
{
return Create(EClass.sources.elements.map[id]);
return Create(EClass.sources.elements.map.TryGetValue(id, 6003));
}
public static Act Create(string id)
AI_Drink
@@ -32,6 +32,10 @@ public override void OnSetOwner()
if (target != null && (target.GetRootCard() == owner || target.parent == null))
{
owner.Drink(target);
if (owner == EClass.pc)
{
EClass.player.EndTurn();
}
Success();
}
}
ActSwarm
using System.Collections.Generic;
using System.Linq;
public class ActSwarm : Ability
@@ -17,15 +18,21 @@ public override bool Perform()
{
float num = 0f;
Card tC = Act.TC;
HashSet<int> hashSet = new HashSet<int>();
foreach (Card item in EClass._map.Cards.ToList())
{
if (!Act.CC.IsAliveInCurrentZone)
{
break;
}
if (item.IsAliveInCurrentZone && item != Act.CC && (!item.isChara || item == tC || item.Chara.IsHostile(Act.CC)) && (item.isChara || item.trait.CanBeAttacked) && item.Dist(Act.CC) <= PerformDistance && Act.CC.CanSeeLos(item))
if (!item.IsAliveInCurrentZone || item == Act.CC || (item.isChara && item != tC && !item.Chara.IsHostile(Act.CC)) || (!item.isChara && !item.trait.CanBeAttacked) || item.Dist(Act.CC) > PerformDistance || !Act.CC.CanSeeLos(item))
{
Point pos = item.pos;
continue;
}
Point pos = item.pos;
if (!hashSet.Contains(pos.index))
{
hashSet.Add(pos.index);
TweenUtil.Delay(num, delegate
{
pos.PlayEffect("ab_swarm");
ButtonGrid
@@ -577,7 +577,12 @@ public void RefreshCraftable()
{
ThingStack thingStack = EClass.pc.things.GetThingStack(recipe.GetIdThing(), recipe.GetRefVal());
bool flag = recipe.IsCraftable();
mainText.SetText(recipe.Name, flag ? FontColor.Good : FontColor.Bad);
string text = recipe.Name;
if (recipe.Mold != null && recipe.Mold.trait.CraftNum > 1)
{
text = text + " x " + recipe.Mold.trait.CraftNum;
}
mainText.SetText(text, flag ? FontColor.Good : FontColor.Bad);
subText.text = thingStack.count.ToString() ?? "";
recipe.SetTextDifficulty(subText2);
}
CINT
@@ -147,4 +147,6 @@ public class CINT
public const int isSleepBeside = 123;
public const int dateDeathLock = 130;
public const int fixedValue = 131;
}
Card
@@ -1117,6 +1117,18 @@ public int c_priceAdd
}
}
public int c_fixedValue
{
get
{
return GetInt(131);
}
set
{
SetInt(131, value);
}
}
public int c_dyeMat
{
get
}
if (dmg > 0)
{
int a3 = 100 * (dmg * 100 / MaxHP) / 100;
int a3 = (int)(100L * (long)(dmg * 100 / MaxHP) / 100) + 1;
a3 = Mathf.Min(a3, Chara.isRestrained ? 15 : 200);
elements.ModExp(GetArmorSkill(), a3);
if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
if (a3 > 0)
{
elements.ModExp(123, a3);
elements.ModExp(GetArmorSkill(), a3);
if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
{
elements.ModExp(123, a3);
}
}
}
int num11 = ((EClass.rnd(2) == 0) ? 1 : 0);
@@ -6510,64 +6525,64 @@ public void SetSale(bool sale)
public int GetValue(PriceType priceType = PriceType.Default, bool sell = false)
{
int value = trait.GetValue();
if (value == 0)
int num = ((c_fixedValue == 0) ? trait.GetValue() : c_fixedValue);
if (num == 0)
{
return 0;
}
float num = value;
num = ((priceType != PriceType.CopyShop) ? (num * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f) : (num * (float)Mathf.Max(150 + rarityLv, 150) / 100f));
float num2 = num;
num2 = ((priceType != PriceType.CopyShop) ? (num2 * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f) : (num2 * (float)Mathf.Max(150 + rarityLv, 150) / 100f));
if (IsFood && !material.tag.Contains("food"))
{
num *= 0.5f;
num2 *= 0.5f;
}
float num2;
float num3;
if (IsEquipmentOrRangedOrAmmo || trait is TraitMod)
{
if (sell)
{
num *= 0.3f;
num2 *= 0.3f;
}
num2 = 2f;
num3 = 2f;
}
else
{
num2 = 0.5f;
num3 = 0.5f;
}
if (isReplica)
{
num *= 0.15f;
num2 *= 0.15f;
}
if (!IsUnique)
{
if (IsEquipmentOrRanged && rarity >= Rarity.Legendary)
{
num = Mathf.Max(num, 1800f + num / 5f);
num2 = Mathf.Max(num2, 1800f + num2 / 5f);
}
num = num * (100f + num2 * (float)(material.value - 100)) / 100f;
num2 = num2 * (100f + num3 * (float)(material.value - 100)) / 100f;
if (IsEquipmentOrRanged)
{
int num3 = 0;
foreach (Element value2 in elements.dict.Values)
int num4 = 0;
foreach (Element value in elements.dict.Values)
{
num3 += value2.source.value;
num4 += value.source.value;
}
num = num * (float)(100 + (sell ? ((int)MathF.Sqrt(num3) * 10) : num3)) / 100f;
num2 = num2 * (float)(100 + (sell ? ((int)MathF.Sqrt(num4) * 10) : num4)) / 100f;
if (rarity >= Rarity.Legendary)
{
num = Mathf.Max(num, 3600f + num / 5f);
num2 = Mathf.Max(num2, 3600f + num2 / 5f);
}
}
}
if (trait is TraitRecipe && sell)
{
num *= 0.1f;
num2 *= 0.1f;
}
if (encLV != 0 && !category.tag.Contains("noEnc"))
{
num = (category.tag.Contains("enc") ? (num * (0.7f + (float)(encLV - 1) * 0.2f)) : ((!IsFood) ? (num * (1f + (float)encLV * 0.01f)) : ((!(id == "honey")) ? (num * Mathf.Min(1f + 0.1f * (float)encLV, 2f) + (float)(encLV * 100)) : (num + (float)(encLV * 10)))));
num2 = (category.tag.Contains("enc") ? (num2 * (0.7f + (float)(encLV - 1) * 0.2f)) : ((!IsFood) ? (num2 * (1f + (float)encLV * 0.01f)) : ((!(id == "honey")) ? (num2 * Mathf.Min(1f + 0.1f * (float)encLV, 2f) + (float)(encLV * 100)) : (num2 + (float)(encLV * 10)))));
}
return (int)num;
return (int)num2;
}
public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sell = false, PriceType priceType = PriceType.Default, Chara c = null)
CoreDebug
@@ -925,6 +925,7 @@ public void UpdateInput()
}
if (Input.GetKeyDown(KeyCode.F2))
{
EClass.game.world.date.year = 3000;
EClass._zone.development += 10;
EClass._zone.development *= EClass._zone.development;
EClass.pc.Pick(ThingGen.CreateSpellbook(8550));
CraftUtil
@@ -146,6 +146,7 @@ public static Card MixIngredients(Card product, List<Thing> ings, MixType type,
bool noMix = type == MixType.NoMix || product.HasTag(CTAG.noMix);
bool isFood = type == MixType.Food;
int nutFactor = 100 - (ings.Count - 1) * 5;
Thing thing = ((ings.Count > 0) ? ings[0] : null);
if (crafter != null && crafter.Evalue(1650) >= 3)
{
nutFactor -= 10;
@@ -193,6 +194,15 @@ public static Card MixIngredients(Card product, List<Thing> ings, MixType type,
product.c_weight = num;
product.c_priceAdd = num2;
}
if (thing != null && product.trait is TraitFoodFishSlice)
{
product.elements.SetTo(10, thing.Evalue(10) / 4);
product.isWeightChanged = true;
product.c_weight = Mathf.Min(thing.SelfWeight / 6, 800);
product.c_idRefCard = thing.id;
product.c_fixedValue = thing.sourceCard.value / 8;
product.decay = thing.decay;
}
if (product.HasElement(652))
{
product.ChangeWeight((isFood ? num : product.Thing.source.weight) * 100 / (100 + product.Evalue(652)));
DNA
@@ -433,6 +433,10 @@ void AddVal(int id, int v, bool allowStack, Func<int, int> funcCost)
{
bool flag = false;
int num = EClass.curve(v, 20, 10, 90);
if (v < -100)
{
num = EClass.curve(Mathf.Abs(v + 100), 20, 10, 90);
}
v = EClass.curve(v, 20, 10, 80);
for (int k = 0; k < vals.Count; k += 2)
{
ELEMENT
@@ -458,7 +458,7 @@ public bool IsActive(Card c)
public int SortVal(bool charaSheet = false)
{
int num = ((source.sort != 0) ? source.sort : id);
return (IsFlag ? 100000 : 0) + ((!charaSheet && IsGlobalElement) ? (-1000000) : 0) + num;
return (IsFlag ? 100000 : 0) + ((!charaSheet && IsGlobalElement) ? (-1000000) : 0) + (((IsFoodTrait || IsTrait) && owner != null && owner.Card != null && owner.Card.ShowFoodEnc) ? 10000 : 0) + num;
}
public virtual bool CanLink(ElementContainer owner)
GameDate
@@ -131,6 +131,10 @@ public void AdvanceHour()
{
Tutorial.Reserve("season2");
}
if (base.year >= 2500)
{
Tutorial.Reserve("worldend");
}
else
{
Tutorial.Remove("season2");
TaskHarvest
@@ -481,6 +481,10 @@ public bool ShouldGenerateDismantled(string dest)
{
return false;
}
if (target.trait is TraitFoodFishSlice)
{
return false;
}
if (dest.Contains("$") || dest.Contains("#") || dest.Contains("@") || dest.Contains("-"))
{
return false;
TaskWater
using System.Collections.Generic;
using UnityEngine;
public class TaskWater : Task
{
@@ -35,6 +36,7 @@ public override IEnumerable<Status> Run()
List<Point> list = ListPoints();
while (list.Count != 0)
{
Debug.Log(list.Count);
list.Sort((Point a, Point b) => a.Distance(dest) - b.Distance(dest));
Point p = list[0];
dest.Set(p);
@@ -48,15 +50,16 @@ public override IEnumerable<Status> Run()
yield return Cancel();
}
bool fail = false;
yield return DoGoto(p, 1, ignoreConnection: false, delegate
Status status = DoGoto(p, 1, ignoreConnection: false, delegate
{
fail = true;
return Status.Running;
});
if (fail)
if (fail || status == Status.Fail)
{
continue;
}
yield return Status.Running;
if (!IsWaterCanValid())
{
yield return Cancel();
Thing
text2 = array[0] + Environment.NewLine + text3 + array[1];
}
}
if (flag && !(trait is TraitPotionAlchemy))
if (flag)
{
text2 = recipe.GetName();
if (!(trait is TraitPotionAlchemy))
{
text2 = recipe.GetName();
}
if (trait.CraftNum > 1)
{
text2 = text2 + " x " + trait.CraftNum;
}
}
if (mode != IInspect.NoteMode.Recipe)
{
{
AddText("isNoMix", FontColor.Default);
}
if (trait is TraitFoodFishSlice)
{
AddText("isNoProcessIng", FontColor.Default);
}
if (!trait.CanBeDestroyed)
{
AddText("isIndestructable", FontColor.Default);
TraitBrewery
@@ -37,6 +37,10 @@ public override bool CanChildDecay(Card c)
public override bool OnChildDecay(Card c, bool firstDecay)
{
if (c.trait is TraitFoodFishSlice)
{
return true;
}
switch (type)
{
case Type.Food:
TraitCrafter
@@ -105,6 +105,10 @@ public bool IsIngredient(int idx, SourceRecipe.Row r, Card c)
{
return false;
}
if (c.trait is TraitFoodFishSlice)
{
return false;
}
string[] array = ((idx == 0) ? r.ing1 : r.ing2);
if (r.type.ToEnum<MixType>() == MixType.Grind && idx == 1)
{
+TraitFoodFishSlice
File Created
public class TraitFoodFishSlice : TraitFoodFish
{
public override int CraftNum => 4;
}
TraitItemProc
@@ -15,7 +15,7 @@ public int GetCraftNum()
{
if (owner.id == "bandage")
{
return 2 + EClass.rnd(2);
return 3;
}
return 0;
}
TraitKettle
@@ -56,6 +56,10 @@ public override bool CanCopy(Thing t)
{
return true;
}
if (t.trait is TraitFoodFishSlice)
{
return false;
}
if (t.HasElement(759))
{
return false;