EA 23.106 Nightly
March 18, 2025
14 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Card (1)
public int GetValue(bool sell = false)
public int GetValue(PriceType priceType = PriceType.Default, bool sell = false)
RenderRow (1)
public void SetSpriteRenderer(SpriteRenderer sr, Sprite sprite = null, int matCol = 0, bool setTransform = true, int dir = 0)
public void SetSpriteRenderer(SpriteRenderer sr, Sprite sprite = null, int matCol = 0, bool setTransform = true, int dir = 0, int idSkin = 0)
AI_Fish
@@ -288,10 +288,10 @@ public static Thing Makefish(Chara c)
{
return null;
}
int[] array = new int[15]
int[] array = new int[18]
{
233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,
237, 869, 1178, 1179, 1180
237, 869, 1178, 1179, 1180, 1243, 1244, 1245
};
Thing thing = null;
int num2 = 1;
AI_Idle
@@ -514,7 +514,12 @@ public override IEnumerable<Status> Run()
{
thing4 = null;
}
if (thing4 == null && (owner.homeBranch == null || !owner.homeBranch.policies.IsActive(2503)))
bool flag5 = EClass.Branch != null && EClass.Branch.policies.IsActive(2503);
if (owner.homeBranch != null && owner.homeBranch.policies.IsActive(2503))
{
flag5 = true;
}
if (thing4 == null && !flag5)
{
thing4 = ThingGen.Create("crimAle");
owner.Drink(thing4);
@@ -531,12 +536,12 @@ public override IEnumerable<Status> Run()
{
owner.Say("drunk_mess", owner, c);
owner.Talk("drunk_mess");
bool flag5 = EClass.rnd(5) == 0 && !c.IsPC;
bool flag6 = EClass.rnd(5) == 0 && !c.IsPC;
if (c.IsPCParty && owner.hostility >= Hostility.Friend)
{
flag5 = false;
flag6 = false;
}
if (flag5)
if (flag6)
{
owner.Say("drunk_counter", c, owner);
c.Talk("drunk_counter");
BaseListPeople
@@ -166,6 +166,10 @@ public void WriteHobbies(UITooltip t, Chara a, BaseArea roomWork)
t.note.Space(8);
t.note.AddText("workNotActive_party".lang(), FontColor.Warning);
}
if (a.IsPCFactionOrMinion && !a.trait.IsCountAsResident)
{
t.note.AddText("notCountResident".lang(), FontColor.Good);
}
t.note.Build();
void AddText(Hobby h, string lang, bool fix)
{
BaseTileMap
@@ -1256,8 +1256,8 @@ public virtual void DrawTile()
fogged = true;
}
}
goto IL_7b6a;
IL_6faf:
goto IL_7b6d;
IL_6fb2:
if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && !snowed && !this.cell.isClearSnow && ((!this.cell.Front.HasRoof && !this.cell.Front.HasBlock) || (!this.cell.Right.HasRoof && !this.cell.Right.HasBlock)))
{
snowed = true;
@@ -1480,7 +1480,7 @@ public virtual void DrawTile()
param.matColor = 104025f;
renderFootmark.Draw(param);
}
goto IL_7b6a;
goto IL_7b6d;
IL_1668:
if (this.cell.isSlopeEdge)
{
@@ -2245,7 +2245,7 @@ public virtual void DrawTile()
case BlockRenderMode.FullBlock:
{
bool invisible = sourceBlock.tileType.Invisible;
if (invisible && !buildMode && !ActionMode.Cinema.IsActive)
if (invisible && (!buildMode || ActionMode.Cinema.IsActive))
{
break;
}
@@ -2677,19 +2677,19 @@ public virtual void DrawTile()
{
if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
{
goto IL_6f4f;
goto IL_6f52;
}
if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
{
Room obj = this.cell.FrontRight.room;
if (obj == null || !obj.HasRoof)
{
goto IL_6f4f;
goto IL_6f52;
}
}
}
goto IL_6faf;
IL_7b6a:
goto IL_6fb2;
IL_7b6d:
if (detail.things.Count == 0 && detail.charas.Count == 0)
{
return;
@@ -3122,13 +3122,13 @@ public virtual void DrawTile()
param.z = orgZ;
}
return;
IL_6f4f:
IL_6f52:
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
{
param.tile = num14;
rendererFov.Draw(param);
}
goto IL_6faf;
goto IL_6fb2;
void Draw(int tile)
{
pass = passEdge;
ButtonGrid
@@ -525,7 +525,7 @@ public void SetRecipeVariation(UIRecipeInfo.RecipeVariation a)
}
else
{
recipe.renderRow.SetImage(icon, null, recipe.renderRow.GetColorInt(recipe.GetColorMaterial()), setNativeSize: true, a.dir, recipe.idSkin);
recipe.renderRow.SetImage(icon, null, recipe.renderRow.GetColorInt(recipe.GetColorMaterial()), setNativeSize: true, (recipe.renderRow is SourceChara.Row) ? recipe.idSkin : a.dir, (recipe.renderRow is SourceChara.Row) ? a.dir : recipe.idSkin);
}
mainText.SetActive(enable: false);
}
Card
@@ -4633,6 +4633,10 @@ public void SpawnLoot(Card origin)
origin.elements.ModExp(290, 5);
}
}
if (id == "littleOne" && IsPCFactionOrMinion)
{
flag2 = false;
}
if (flag2 && !isUserZone)
{
string text = Chara.race.corpse[0];
@@ -6388,7 +6392,7 @@ public void SetSale(bool sale)
}
}
public int GetValue(bool sell = false)
public int GetValue(PriceType priceType = PriceType.Default, bool sell = false)
{
int value = trait.GetValue();
if (value == 0)
@@ -6396,7 +6400,7 @@ public int GetValue(bool sell = false)
return 0;
}
float num = value;
num = num * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f;
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));
if (IsFood && !material.tag.Contains("food"))
{
num *= 0.5f;
{
return 20;
}
int value = GetValue(sell);
int value = GetValue(priceType, sell);
if (value == 0)
{
return 0;
{
p = Guild.Mage.BuySpellbookPrice((int)p);
}
int num = ((priceType != PriceType.CopyShop) ? 1 : 5);
bool flag = priceType == PriceType.CopyShop;
int num = ((!flag) ? 1 : 5);
float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f);
if (sell)
{
p *= 0.20000000298023224;
if (isCopy)
{
p *= 0.20000000298023224;
}
if (currency == CurrencyType.Money && (category.IsChildOf("meal") || category.IsChildOf("preserved")))
{
p *= 0.5;
{
p *= 1.25;
}
else if (blessedState == BlessedState.Cursed)
{
p *= 0.5;
}
else if (blessedState == BlessedState.Doomed)
else if (blessedState <= BlessedState.Cursed)
{
p *= 0.20000000298023224;
p *= (flag ? 1.25f : 0.3f);
}
if (this.trait.HasCharges)
{
}
if (IsDecayed)
{
p *= 0.5;
p *= (flag ? 1.25f : 0.5f);
}
}
else
Chara
if (trait is TraitLittleOne)
{
MakeEgg();
if (IsPCFaction)
{
EClass.Branch.RemoveMemeber(this);
}
}
PlayEffect("revive");
PlaySound("chime_angel");
Msg.Say("little_pop");
}
}
else if (attackSource != AttackSource.DeathSentense)
else if (attackSource != AttackSource.DeathSentense && !IsPCFaction)
{
EClass.player.flags.little_killed = true;
EClass.player.little_dead++;
@@ -6051,7 +6055,7 @@ public override Sprite GetSprite(int dir = 0)
pCC.Build();
return pCC.variation.idle[0, 0];
}
return sourceCard.GetSprite((sourceCard._tiles.Length > 1) ? ((base.idSkin != 0 || source.staticSkin) ? base.idSkin : (base.uid % sourceCard._tiles.Length / 2 * 2 + ((!base.IsMale) ? 1 : 0))) : 0);
return sourceCard.GetSprite(0, (sourceCard._tiles.Length > 1) ? ((base.idSkin != 0 || source.staticSkin) ? base.idSkin : (base.uid % sourceCard._tiles.Length / 2 * 2 + ((!base.IsMale) ? 1 : 0))) : 0);
}
public void SetTempHand(int right = 0, int left = 0)
@@ -6206,10 +6210,14 @@ public override string GetHoverText2()
{
text2 += Environment.NewLine;
text2 += "<size=14>";
foreach (Hobby item in ListHobbies().Concat(ListWorks()))
foreach (Hobby item in ListWorks())
{
text2 = text2 + item.Name + ", ";
}
foreach (Hobby item2 in ListHobbies())
{
text2 = text2 + item2.Name + ", ";
}
text2 = text2.TrimEnd(", ".ToCharArray()) + "</size>";
}
string text3 = "";
@@ -6219,15 +6227,15 @@ public override string GetHoverText2()
text3 += Environment.NewLine;
text3 += "<size=14>";
int num = 0;
foreach (BaseStats item2 in enumerable)
foreach (BaseStats item3 in enumerable)
{
string text4 = item2.GetPhaseStr();
string text4 = item3.GetPhaseStr();
if (text4.IsEmpty() || text4 == "#")
{
continue;
}
Color c = Color.white;
switch (item2.source.group)
switch (item3.source.group)
{
case "Bad":
case "Debuff":
@@ -6240,10 +6248,10 @@ public override string GetHoverText2()
}
if (EClass.debug.showExtra)
{
text4 = text4 + "(" + item2.GetValue() + ")";
if (resistCon != null && resistCon.ContainsKey(item2.id))
text4 = text4 + "(" + item3.GetValue() + ")";
if (resistCon != null && resistCon.ContainsKey(item3.id))
{
text4 = text4 + "{" + resistCon[item2.id] + "}";
text4 = text4 + "{" + resistCon[item3.id] + "}";
}
}
num++;
@@ -6262,9 +6270,9 @@ public override string GetHoverText2()
if (EClass.debug.showExtra)
{
text3 += Environment.NewLine;
foreach (ActList.Item item3 in ability.list.items)
foreach (ActList.Item item4 in ability.list.items)
{
text3 = text3 + item3.act.Name + ", ";
text3 = text3 + item4.act.Name + ", ";
}
text3 = text3.TrimEnd(", ".ToCharArray());
}
@@ -8826,6 +8834,7 @@ public void ResistCon(Condition con)
public void Sleep(Thing bed = null, Thing pillow = null, bool pickup = false, ItemPosition posBed = null, ItemPosition posPillow = null)
{
RemoveCondition<ConAwakening>();
AddCondition(Condition.Create(100, delegate(ConSleep con)
{
con.pcSleep = 15;
@@ -9236,6 +9245,12 @@ 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 num2 = tempElements.Base(ele) + a;
if (num2 < num || num2 > num)
{
a = 0;
}
Element element = tempElements.ModBase(ele, a);
if (element.vBase == 0)
{
FoodEffect
@@ -460,7 +460,7 @@ public static void ProcTrait(Chara c, Card t)
else
{
c.Say("recharge_stamina", c);
c.stamina.Mod(value.Value * 2 / 3 + EClass.rnd(5));
c.stamina.Mod(c.stamina.max * (value.Value / 10 + 1) / 100 + value.Value * 2 / 3 + EClass.rnd(5));
}
break;
}
@@ -481,7 +481,7 @@ public static void ProcTrait(Chara c, Card t)
break;
case 761:
c.Say("recharge_stamina_negative", c);
c.stamina.Mod(value.Value);
c.stamina.Mod(-c.stamina.max * (-value.Value / 10 + 1) / 100 + value.Value);
break;
}
}
RenderRow
@@ -269,6 +269,12 @@ public Sprite GetSprite(int dir = 0, int skin = 0, bool snow = false)
{
sprites = new Sprite[(skins == null) ? 1 : (skins.Length + 1), (array.Length == 0) ? 1 : array.Length];
}
if (this is SourceChara.Row)
{
dir = skin;
skin = 0;
Debug.Log(idString + "/" + dir + "/" + skin);
}
if (skin != 0 && skin >= sprites.GetLength(0))
{
skin = 0;
@@ -312,9 +318,9 @@ public Sprite GetSprite(int dir = 0, int skin = 0, bool snow = false)
return sprites[skin, dir];
}
public void SetSpriteRenderer(SpriteRenderer sr, Sprite sprite = null, int matCol = 0, bool setTransform = true, int dir = 0)
public void SetSpriteRenderer(SpriteRenderer sr, Sprite sprite = null, int matCol = 0, bool setTransform = true, int dir = 0, int idSkin = 0)
{
sr.sprite = sprite ?? GetSprite(dir);
sr.sprite = sprite ?? GetSprite(dir, idSkin);
if (renderData is RenderDataThing)
{
sr.sprite = EClass.core.refs.spriteThingActor;
Trait
@@ -1784,6 +1784,7 @@ public void OnBarter()
if (num8 > 0)
{
Add("syringe_gene", num8, 0);
Add("diary_little", 1, 0);
}
if (num8 > 10)
{
@@ -2021,7 +2022,10 @@ public Thing CreateStock()
case ShopType.Ecopo:
{
Thing thing = TraitSeed.MakeRandomSeed(enc: true);
TraitSeed.LevelSeed(thing, (thing.trait as TraitSeed).row, 1);
if (EClass.rnd(2) == 0)
{
TraitSeed.LevelSeed(thing, (thing.trait as TraitSeed).row, 1);
}
return thing;
}
case ShopType.Healer:
TraitDrink
@@ -151,6 +151,11 @@ public static void BlendPoison(Chara c, Thing t)
public override void OnDrink(Chara c)
{
if (owner.id == "334" && c.HasCondition<ConAwakening>())
{
c.RemoveCondition<ConAwakening>();
return;
}
ActEffect.Proc(IdEffect, Power, owner.blessedState, c, null, new ActRef
{
n1 = N1,
TraitFigure
@@ -18,9 +18,10 @@ public override void OnSetCardGrid(ButtonGrid b)
{
if (!owner.c_idRefCard.IsEmpty())
{
SourceChara.Row obj = EClass.sources.charas.map.TryGetValue(owner.c_idRefCard) ?? EClass.sources.charas.map["putty"];
SourceChara.Row row = EClass.sources.charas.map.TryGetValue(owner.c_idRefCard) ?? EClass.sources.charas.map["putty"];
Transform transform = b.Attach<Transform>("figure", rightAttach: false);
obj.SetImage(transform.GetChild(0).GetComponent<Image>(), null, 0, setNativeSize: false);
int idSkin = ((EClass.core.config.game.antiSpider && row.race == "spider" && row.tiles.Length > 1) ? 1 : 0);
row.SetImage(transform.GetChild(0).GetComponent<Image>(), null, 0, setNativeSize: false, 0, idSkin);
}
}
TraitKettle
@@ -48,7 +48,7 @@ public override bool CanJoinParty
public override bool CanCopy(Thing t)
{
if (t.noSell || t.HasRune() || t.HasElement(1229))
if (t.noSell || t.isStolen || t.HasRune() || t.HasElement(1229))
{
return false;
}
TraitMerchantFestival
@@ -2,5 +2,7 @@ public class TraitMerchantFestival : TraitMerchant
{
public override int CostRerollShop => 5;
public override bool CanInvite => false;
public override ShopType ShopType => ShopType.Festival;
}