EA 23.65
December 23, 2024
30 files modified. 2 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Core (1)
public override void FreezeScreen(float duration)
public override void FreezeScreen(float duration = 0.3f)
AI_Fuck
@@ -146,7 +146,6 @@ public void Finish()
chara3.ModExp(77, 250);
chara3.ModExp(71, 250);
chara3.ModExp(75, 250);
chara3.SAN.Mod(10);
}
if (!chara2.HasElement(1216))
{
ActEffect
@@ -2266,6 +2266,10 @@ public static bool Wish(string s, string name, int power)
{
num = 1;
}
if (r._origin == "artifact_summon")
{
num = 1;
}
thing.SetNum(num);
Debug.Log(_s + "/" + num + "/" + score);
if (thing.HasTag(CTAG.godArtifact))
ActMelee
@@ -119,6 +119,7 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
bool usedTalisman = false;
int count = 0;
int num = Act.CC.Dist(Act.TC);
Point obj = Act.TC.pos.Copy();
foreach (BodySlot slot in Act.CC.body.slots)
{
if (Act.TC == null || !Act.TC.IsAliveInCurrentZone)
@@ -148,7 +149,6 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
Attack(Act.TC, Act.TP);
if (num2 > 0)
{
Point obj = Act.TC.pos.Copy();
foreach (Point item in list)
{
if (!item.Equals(obj))
Card
@@ -2226,18 +2226,6 @@ public Thing Tool
public int QualityLv => Quality / 10;
public Point ThisOrParentPos
{
get
{
if (!(parent is Card))
{
return pos;
}
return (parent as Card).pos;
}
}
public LightData LightData
{
get
{
Chara.AddCondition<ConSleep>(eleP);
}
if (Chance(50, 100))
{
Chara.SAN.Mod(EClass.rnd(2));
}
break;
case 917:
if (Chance(50 + eleP / 10, 100))
@@ -5149,13 +5133,14 @@ public void PlaySoundDead(bool spatial = true)
public SoundSource PlaySound(string id, float v = 1f, bool spatial = true)
{
if (IsPC)
Card rootCard = GetRootCard();
if (rootCard.IsPC)
{
spatial = false;
}
if (Dist(EClass.pc) < EClass.player.lightRadius + 1 || !spatial)
if (rootCard.Dist(EClass.pc) < EClass.player.lightRadius + 1 || !spatial)
{
return ThisOrParentPos.PlaySound(id, isSynced || !spatial, v, spatial);
return rootCard.pos.PlaySound(id, isSynced || !spatial, v, spatial);
}
return null;
}
@@ -5186,7 +5171,8 @@ public void PlayAnimeLoot()
{
return null;
}
return Effect.Get(id)._Play(pos, fix + ((isSynced && useRenderPos) ? renderer.position : pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
Card rootCard = GetRootCard();
return Effect.Get(id)._Play(rootCard.pos, fix + ((isSynced && useRenderPos) ? rootCard.renderer.position : rootCard.pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
}
public void PlayEffect(int ele, bool useRenderPos = true, float range = 0f)
@@ -5195,11 +5181,10 @@ public void PlayEffect(int ele, bool useRenderPos = true, float range = 0f)
if (effect == null)
{
Debug.Log(ele);
return;
}
else
{
effect._Play(pos, ((isSynced && useRenderPos) ? renderer.position : pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
}
Card rootCard = GetRootCard();
effect._Play(rootCard.pos, ((isSynced && useRenderPos) ? rootCard.renderer.position : rootCard.pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
}
public virtual void SetDir(int d)
Chara
@@ -1689,7 +1689,7 @@ public void RefreshSpeed(Element.BonusInfo info = null)
info?.AddFix(EClass.player.lastEmptyAlly * 10 - 10, "exceedParty".lang());
}
}
else if (base.LV >= 1000 && currentZone is Zone_Void)
else if (base.LV >= 1000)
{
num += EClass.curve((base.LV - 900) / 100 * 10, 500, 100);
info?.AddFix(EClass.curve((base.LV - 900) / 100 * 10, 500, 100), "enemySpeedBuff".lang());
CureCondition<ConBleed>(2 * p / 100 + 10);
if (flag)
{
SAN.Mod(-5);
SAN.Mod(-15);
}
break;
case CureType.CureBody:
}
CureCondition<ConWait>();
CureCondition<ConSleep>();
if (type == CureType.Death || type == CureType.Boss)
{
SAN.Mod(-20);
}
if (type == CureType.Jure)
{
SAN.Mod(-999);
ConSleep
@@ -310,13 +310,21 @@ public override void OnRemoved()
}
}
}
if (!EClass.pc.isDead && slept)
if (EClass.pc.isDead || !slept)
{
EClass.player.recipes.OnSleep(traitPillow is TraitPillowEhekatl);
EClass.player.DreamSpell();
if (traitPillow is TraitPillowGod traitPillowGod)
return;
}
EClass.player.recipes.OnSleep(traitPillow is TraitPillowEhekatl);
EClass.player.DreamSpell();
if (traitPillow is TraitPillowGod traitPillowGod)
{
traitPillowGod.Deity.Talk("morning");
}
foreach (Chara member in EClass.pc.party.members)
{
if (traitPillow is TraitPillowJure)
{
traitPillowGod.Deity.Talk("morning");
member.SAN.Mod(-15);
}
}
static void TryPick(Thing t, ItemPosition pos)
Core
@@ -644,7 +644,7 @@ public void Halt()
{
}
public override void FreezeScreen(float duration)
public override void FreezeScreen(float duration = 0.3f)
{
ui.FreezeScreen(duration);
}
CoreDebug
@@ -905,22 +905,12 @@ public void UpdateInput()
}
if (Input.GetKeyDown(KeyCode.F2))
{
EClass.pc.Pick(EClass.pc.MakeMilk(effect: true, 10));
EClass.pc.Pick(EClass.pc.MakeEgg(effect: true, 10));
Chara targetChara = EClass.scene.mouseTarget.TargetChara;
if (targetChara != null)
{
EClass.pc.Pick(targetChara.MakeMilk());
EClass.pc.Pick(targetChara.MakeGene());
EClass.pc.Pick(targetChara.MakeBraineCell());
EClass.pc.Pick(targetChara.MakeEgg(effect: true, 10));
}
EClass.player.recipes.OnSleep();
return;
}
if (Input.GetKeyDown(KeyCode.F3))
{
EClass.pc.AddCondition<ConDisease>();
(EClass.pc.AddCondition<ConStrife>() as ConStrife).lv = 6;
for (int i = 0; i < 10; i++)
{
Thing thing = ThingGen.Create("egg_fertilized");
CraftUtil
{
product.elements.SetTo(2, maxQuality);
}
if (product.id == "map")
string id2 = product.id;
if (!(id2 == "zassouni"))
{
int num3 = 1 + product.Evalue(2) + product.Evalue(751);
if (num3 < 1)
if (id2 == "map")
{
num3 = 1;
}
foreach (Thing ing2 in ings)
{
if (ing2 != null && ing2.Thing != null && !(ing2.id != "gem"))
int num3 = 1 + product.Evalue(2) + product.Evalue(751);
if (num3 < 1)
{
num3 *= ing2.Thing.material.hardness / 20 + 2;
num3 = 1;
}
foreach (Thing ing2 in ings)
{
if (ing2 != null && ing2.Thing != null && !(ing2.id != "gem"))
{
num3 *= ing2.Thing.material.hardness / 20 + 2;
}
}
if (num3 > EClass.pc.FameLv + 10 - 1)
{
num3 = EClass.pc.FameLv + 10 - 1;
}
product.SetInt(25, num3);
}
if (num3 > EClass.pc.FameLv + 10 - 1)
{
num3 = EClass.pc.FameLv + 10 - 1;
}
product.SetInt(25, num3);
}
else
{
product.elements.ModBase(10, 6);
}
return product;
bool IsValidTrait(Element e)
DramaCustomSequence
@@ -266,6 +266,13 @@ public void Build(Chara c)
{
Choice2("daExtraTax", "_extraTax");
}
if ((c.trait is TraitMiko_Mifu || c.trait is TraitMiko_Nefu || c.trait is TraitEureka) && EClass.world.date.IsExpired(c.c_dateStockExpire))
{
Choice2("daBlessing", "_blessing");
}
}
if (c.IsHomeMember())
{
if (c.IsMaid)
{
if (EClass.Branch.meetings.CanStartMeeting)
@@ -275,13 +282,6 @@ public void Build(Chara c)
Choice2("daBuyLand", "_buyLand");
Choice2("daChangeTitle", "_changeTitle");
}
if ((c.trait is TraitMiko_Mifu || c.trait is TraitMiko_Nefu || c.trait is TraitEureka) && EClass.world.date.IsExpired(c.c_dateStockExpire))
{
Choice2("daBlessing", "_blessing");
}
}
if (c.IsHomeMember())
{
if (c.noMove)
{
Choice2("enableMove", "_enableMove");
FactionBranch
@@ -1320,7 +1320,10 @@ public void AddMemeber(Chara c)
c.hostility = Hostility.Ally;
c.enemy = null;
c.orgPos = null;
c.memberType = FactionMemberType.Default;
if (c.memberType != 0 && c.memberType != FactionMemberType.Livestock)
{
c.memberType = FactionMemberType.Default;
}
if (c.hp > c.MaxHP)
{
c.hp = c.MaxHP;
FortuneRollData
@@ -174,7 +174,7 @@ public List<List<string>> GetPrizeList()
new List<string>
{
"microchip", "1089", "150", "855", "medal", "water", "goods_charm", "electronicsS", "electronics", "plat",
"plat", "ration", "backpack2", "sister", "rp_food", "rp_block", "157"
"plat", "ration", "backpack2", "sister", "rp_food", "rp_block", "157", "sleepingbag"
},
new List<string>
{
@@ -223,6 +223,7 @@ public void GetPrize(int grade, int seed)
break;
case "mathammer":
card.ChangeMaterial(prize.idRef);
card.noSell = true;
break;
case "panty":
card.c_idRefCard = prize.idRef;
HomeResourceWorth
@@ -73,10 +73,6 @@ public List<Thing> ListHeirloom()
list3.Sort((Thing a, Thing b) => b.sortVal - a.sortVal);
foreach (Thing item2 in list3)
{
if (!item2.HasTag(CTAG.tourism))
{
continue;
}
bool flag = item2.trait is TraitFigure;
if (flag)
{
HotItemHeld
@@ -396,7 +396,7 @@ public bool TrySetToolAct(ActPlan p)
{
return true;
}
if (thing.HasElement(225) && p.TrySetAct(new TaskChopWoord
if (thing.HasElement(225) && p.TrySetAct(new TaskChopWood
{
pos = pos.Copy()
}))
+InvOwnerChaosOffering
File Created
public class InvOwnerChaosOffering : InvOwnerDraglet
{
public TraitAltarChaos altar;
public override string langTransfer => "invOffering";
public override ProcessType processType => ProcessType.Consume;
public override bool DenyImportant => true;
public InvOwnerChaosOffering(Card owner = null, Card container = null, CurrencyType _currency = CurrencyType.Money)
: base(owner, container, _currency)
{
}
public override bool ShouldShowGuide(Thing t)
{
return t.source._origin == "artifact_summon";
}
public override void _OnProcess(Thing t)
{
string id = "swordkeeper";
if (!EClass.player.codex.Has(id))
{
Msg.SayNothingHappen();
return;
}
count = 1;
SE.Change();
t.ModNum(-1);
owner.PlayEffect("curse");
Chara chara = CharaGen.Create(id);
EClass._zone.AddCard(chara, owner.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? owner.pos);
chara.PlayEffect("aura_heaven");
Msg.Say("summon_god");
Msg.Say("summon_god2", chara);
}
}
LayerDragGrid
return ELayer.ui.AddLayer<LayerDragGrid>("LayerInventory/LayerDragGrid").SetInv(owner, refuelFromLayerDragGrid);
}
public static LayerDragGrid CreateChaosOffering(TraitAltarChaos altar)
{
Msg.Say("offer_what");
return Create(new InvOwnerChaosOffering(altar.owner)
{
altar = altar
});
}
public static LayerDragGrid CreateOffering(TraitAltar altar)
{
Msg.Say("offer_what");
ListPeopleCallReserve
@@ -46,11 +46,10 @@ public override void OnInstantiate(Chara a, ItemGeneral b)
public override void OnClick(Chara c, ItemGeneral i)
{
GameLang.refDrama1 = "";
c.ShowDialog("_chara", "4-1").onKill.AddListener(delegate
{
list.List();
});
BaseCore.Instance.FreezeScreen(0.1f);
EClass.Branch.Recruit(c);
EClass.Sound.Play("good");
list.List();
}
public override void OnList()
Player
@@ -972,6 +972,8 @@ public void OnLeaveZone()
public int lastEmptyAlly;
public int ignoreFallOver;
public float lightPower;
public float baseActTime;
Quest
@@ -184,6 +184,8 @@ public virtual string TextExtra2
public virtual bool ForbidTeleport => false;
public virtual bool TrackOnStart => true;
public virtual bool RequireClientInSameZone => true;
public virtual DifficultyType difficultyType => DifficultyType.Default;
@@ -339,7 +341,7 @@ public void Init()
uid = EClass.game.quests.uid;
EClass.game.quests.uid++;
isNew = true;
track = true;
track = TrackOnStart;
switch (difficultyType)
{
case DifficultyType.Deliver:
QuestHome
@@ -9,4 +9,12 @@ public class QuestHome : QuestSequence
public override string TitlePrefix => "★";
public override bool CanAutoAdvance => false;
public override void OnChangePhase(int a)
{
if (a == 2)
{
track = false;
}
}
}
QuestMain
@@ -16,6 +16,8 @@ public class QuestMain : QuestSequence
public override string TitlePrefix => "★";
public override bool TrackOnStart => false;
public override string idSource => id;
public static int Phase => EClass.game.quests.Get<QuestMain>()?.phase ?? 0;
RecipeCard
else
{
MakeDish(thing);
if (EClass.pc.HasElement(1658))
{
thing.elements.SetBase(757, 1);
thing.c_dateCooked = EClass.world.date.GetRaw();
}
}
}
else
@@ -321,6 +316,11 @@ public void MakeDish(Thing t)
}
CraftUtil.MakeDish(t, list, GetQualityBonus(), EClass.pc);
Rand.SetSeed();
if (EClass.pc.HasElement(1658))
{
t.elements.SetBase(757, 1);
t.c_dateCooked = EClass.world.date.GetRaw();
}
}
public void MixIngredients(Thing t)
RecipeManager
@@ -123,6 +123,17 @@ public void Add(string id, bool showEffect = true)
EClass.pc.ShowEmo(Emo.idea, 0.5f, skipSame: false);
}
EClass.pc.Say("learnRecipe" + ((num == 1) ? "New" : ""), dict[id].Name.ToTitleCase(), num.ToString() ?? "");
if (num == 1)
{
if (recipeSource.NeedFactory)
{
EClass.pc.Say("recipe_factory", recipeSource.NameFactory);
}
else
{
EClass.pc.Say("recipe_nofactory");
}
}
if (recipeSource.row.category == "floor")
{
recipeSource = Get(id + "-b");
Scene
@@ -554,6 +554,7 @@ public void OnUpdate()
{
EMono.player.deathDialog = true;
EMono.player.returnInfo = null;
EMono.player.ignoreFallOver = 1;
Msg.Say("diebye");
EMono.Sound.Play("dead_pc2");
EMono.Sound.Play("dead_pc");
@@ -708,6 +709,11 @@ public void OnUpdate()
{
flag = false;
}
if (EMono.player.ignoreFallOver > 0)
{
flag = flag;
EMono.player.ignoreFallOver--;
}
if (flag)
{
EMono.pc.Stumble();
+TaskChopWood
File Created
using System.Collections.Generic;
using UnityEngine;
public class TaskChopWood : TaskDesignation
{
public override CursorInfo CursorIcon => CursorSystem.Cut;
public override int destDist => 1;
public override bool Loop => GetLog() != null;
public override bool CanManualCancel()
{
return true;
}
public Thing GetLog()
{
return pos.FindThing((Thing t) => t.id == "log");
}
public override HitResult GetHitResult()
{
if (GetLog() != null)
{
return HitResult.Valid;
}
return HitResult.Invalid;
}
public override bool CanProgress()
{
if (base.CanProgress() && GetLog() != null && owner.Tool != null && owner.Tool.trait is TraitTool)
{
return owner.Tool.HasElement(225);
}
return false;
}
public override void OnCreateProgress(Progress_Custom p)
{
p.textHint = Name;
p.maxProgress = Mathf.Max((15 + EClass.rnd(20)) * 100 / (100 + owner.Tool.material.hardness * 3), 2);
p.onProgressBegin = delegate
{
if (owner.Tool != null)
{
owner.Say("chopwood_start", owner, GetLog().GetName(NameStyle.Full, 1));
}
};
p.onProgress = delegate
{
Thing log2 = GetLog();
SourceMaterial.Row material2 = log2.material;
log2.PlaySoundImpact();
material2.AddBlood(pos);
log2.PlayAnime(AnimeID.HitObj);
material2.PlayHitEffect(pos);
owner.renderer.NextFrame();
};
p.onProgressComplete = delegate
{
Thing log = GetLog();
SourceMaterial.Row material = log.material;
log.PlaySoundDead();
material.AddBlood(pos, 3 + EClass.rnd(2));
log.material.PlayHitEffect(pos, 10);
Thing thing = ThingGen.Create("plank", material.id).SetNum(1 + EClass.rnd(2));
CraftUtil.MixIngredients(thing, new List<Thing> { log }, CraftUtil.MixType.General, 999);
log.ModNum(-1);
owner.elements.ModExp(225, 30);
owner.stamina.Mod(-1);
EClass._map.TrySmoothPick(pos, thing, EClass.pc);
};
}
}
TaskDig
@@ -100,7 +100,7 @@ public override HitResult GetHitResult()
{
return HitResult.Invalid;
}
if (pos.IsWater || pos.HasObj || (!EClass._zone.IsPCFaction && pos.HasBlock))
if (!pos.IsInBounds || pos.IsWater || pos.HasObj || (!EClass._zone.IsPCFaction && pos.HasBlock))
{
return HitResult.Invalid;
}
Thing
@@ -1996,7 +1996,7 @@ public override bool MatchEncSearch(string s)
{
return true;
}
if (!Lang.isEN && row.GetName().ToLower().Contains(s))
if (row.GetName().ToLower().Contains(s))
{
return true;
}
@@ -2004,6 +2004,10 @@ public override bool MatchEncSearch(string s)
}
else
{
if (!base.IsIdentified)
{
return false;
}
foreach (Element value in elements.dict.Values)
{
if (value.Value != 0)
@@ -2012,7 +2016,7 @@ public override bool MatchEncSearch(string s)
{
return true;
}
if (!Lang.isEN && value.source.GetName().ToLower().Contains(s))
if (value.source.GetName().ToLower().Contains(s))
{
return true;
}
Trait
@@ -1727,6 +1727,7 @@ public void OnBarter()
{
float num = (float)(3 + Mathf.Min(ShopLv / 5, 10)) + Mathf.Sqrt(ShopLv);
num = num * (float)(100 + EClass.pc.Evalue(1406) * 5) / 100f;
num = Mathf.Min(num, 300f);
for (int i = 0; (float)i < num; i++)
{
Thing thing = CreateStock();
@@ -1838,9 +1839,9 @@ public void OnBarter()
}
}
ShopType shopType = ShopType;
if (shopType == ShopType.General || shopType == ShopType.Food || shopType == ShopType.Festival)
if (shopType == ShopType.General || shopType == ShopType.Food)
{
for (int num9 = 0; num9 < (EClass.debug.enable ? 30 : 3); num9++)
for (int num9 = 0; num9 < (EClass.debug.enable ? 3 : 3); num9++)
{
if (EClass.rnd(3) == 0)
{
@@ -2153,7 +2154,7 @@ public Thing CreateStock()
{
if (IsFestival("olvina"))
{
return Create(new string[2] { "1125", "1126" }.RandomItem());
return Create(new string[4] { "1125", "1126", "pillow_truth", "1230" }.RandomItem());
}
if (IsFestival("yowyn"))
{
@@ -2161,7 +2162,7 @@ public Thing CreateStock()
}
if (IsFestival("noyel"))
{
return Create(new string[2] { "1127", "1128" }.RandomItem());
return Create(new string[9] { "1127", "1128", "xmas_sled", "xmas_bigbag", "xmas_bigbox", "xmas_blackcat", "xmas_blackcat", "xmas_jure", "xmas_crown" }.RandomItem());
}
}
if (EClass.rnd(2) == 0)
TraitAltarChaos
public class TraitAltarChaos : Trait
{
public override bool CanBeHeld => false;
public override bool CanBeDestroyed => false;
public override void TrySetAct(ActPlan p)
{
p.TrySetAct("actWorship", delegate
p.TrySetAct("actOffer", delegate
{
LayerDrama.currentReligion = EClass.game.religions.Earth;
LayerDrama.Activate("_adv", "god", "worship");
LayerDragGrid.CreateChaosOffering(this);
return false;
}, owner);
}
TraitBrewery
@@ -114,16 +114,24 @@ public override bool OnChildDecay(Card c, bool firstDecay)
public virtual string GetProductID(Card c)
{
string id = c.id;
if (id == "crim" || id == "drug_crim")
switch (c.id)
{
case "crim":
case "drug_crim":
return "crimAle";
case "rice_plant":
case "rice":
case "692":
case "719":
case "720":
return "1134";
default:
if (c.category.IsChildOf("mushroom") || c.category.IsChildOf("nuts"))
{
return "54";
}
return "48";
}
if (c.category.IsChildOf("mushroom") || c.category.IsChildOf("nuts"))
{
return "54";
}
return "48";
}
public virtual void OnProduce(Card c)
TraitGiftJure
@@ -4,18 +4,15 @@ public class TraitGiftJure : TraitGiftPack
{
public override bool OnUse(Chara c)
{
if (!EClass.debug.enable)
{
Msg.SayNothingHappen();
return false;
}
if (EClass._zone.IsRegion)
{
Msg.SayCannotUseHere();
return false;
}
EClass.pc.Say("openDoor", EClass.pc, owner);
SE.Play("dropReward");
owner.PlaySound("dropRewardXmas");
owner.PlayEffect("revive");
owner.PlayEffect("smoke");
List<string> list = new List<string> { "hat_santa", "musicbox_jure", "1228", "musicbox_cat", "1229", "holyFeather" };
Add(list[EClass.player.giftJure % list.Count], 1);
foreach (string item in new List<string> { "xmas_wreath", "xmas_garland", "1232", "xmas_socks", "xmas_boot", "xmas_cane" })
UI
@@ -564,6 +564,7 @@ public void FreezeScreen(float duration)
TweenUtil.Tween(duration, null, delegate
{
UnfreezeScreen();
UIButton.TryHihlight();
});
}
}