EA 23.67 Hotfix 8
December 28, 2024
15 files modified.
Important Changes
None.
AI_Fish
@@ -329,7 +329,7 @@ public static Thing Makefish(Chara c)
}
if (text != "")
{
thing = ThingGen.Create(text);
thing = ThingGen.Create(text, -1, EClass._zone.ContentLv);
}
else if (EClass.rnd(5 + num / 3) == 0)
{
AI_Fuck
@@ -233,8 +233,8 @@ public void Finish()
}
if (chara.IsPCParty || chara2.IsPCParty)
{
chara.stamina.Mod(-5 - EClass.rnd(chara.stamina.max / 10 + (succubus ? chara2.LV : 0) + 1));
chara2.stamina.Mod(-5 - EClass.rnd(chara2.stamina.max / 20 + (succubus ? chara.LV : 0) + 1));
chara.stamina.Mod(-5 - EClass.rnd(chara.stamina.max / 10 + (succubus ? StaminaCost(chara2, chara) : 0) + 1));
chara2.stamina.Mod(-5 - EClass.rnd(chara2.stamina.max / 20 + (succubus ? StaminaCost(chara, chara2) : 0) + 1));
}
SuccubusExp(chara, chara2);
SuccubusExp(chara2, chara);
@@ -261,6 +261,10 @@ public void Finish()
break;
}
chara2.ModAffinity(chara, flag ? 10 : (-5));
static int StaminaCost(Chara c1, Chara c2)
{
return (int)Mathf.Max(10f * (float)c1.END / (float)Mathf.Max(c2.END, 1), 0f);
}
static void SuccubusExp(Chara c, Chara tg)
{
if (!c.HasElement(1216))
ActPlan
@@ -515,7 +515,7 @@ public void _Update(PointTarget target)
}
if (flag5 || altAction)
{
if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>())
if (EClass.pc.HasElement(1216) && (c2.HasCondition<ConSleep>() || EClass.debug.enable))
{
TrySetAct(new AI_Fuck
{
ButtonAbility
@@ -44,7 +44,7 @@ public void SetAct(Chara _chara, Element e)
if (EClass.game.altAbility)
{
textStock.SetActive(e is Spell);
textStock.text = e.vPotential.ToString() ?? "";
textStock.text = e.vPotential.ToShortNumber();
onRightClick = delegate
{
if (EClass.ui.IsActive)
Chara
@@ -2920,7 +2920,7 @@ public void MoveZone(Zone z, ZoneTransition transition)
if (currentZone.instance != null)
{
ZoneInstance instance = currentZone.instance;
z = EClass.game.spatials.Find(instance.uidZone);
z = EClass.game.spatials.Find(instance.uidZone) ?? EClass.pc.homeZone;
transition = new ZoneTransition
{
state = instance.ReturnState,
ContentPolicy
@@ -25,7 +25,7 @@ public void RefreshPolicy()
RefreshPolicyList(listPolicyEconomy, "economy", "department_economy");
RefreshPolicyList(listPolicyLife, "life", "department_life");
RefreshPolicyList(listUtility, "utility", "department_utility");
listUtility.SetActive(EClass.Branch.lv >= 2);
listUtility.SetActive(EClass.Branch.lv >= 2 || EClass.debug.enable);
RefreshPolicyIcons();
GetComponentInParent<Layer>().RebuildLayout(recursive: true);
this.RebuildLayout(recursive: true);
ELEMENT
@@ -645,6 +645,13 @@ string Calc()
}
}
public void AddHeaderAbility(UINote n)
{
UIItem uIItem = n.AddHeader("HeaderAbility", FullName.ToTitleCase(wholeText: true), GetSprite());
uIItem.text2.text = ((this is Spell) ? (vPotential.ToString() ?? "") : "-");
(this as Act)?.SetImage(uIItem.image1);
}
public void _WriteNote(UINote n, ElementContainer owner, Action<UINote> onWriteNote, bool isRef, bool addHeader = true)
{
if (addHeader)
UIText.globalSizeMod = -2;
n.AddHeader("prevElement".lang(FullName));
}
else if (this is Act)
{
AddHeaderAbility(n);
n.Space(8);
}
else
{
n.AddHeader(FullName.ToTitleCase(wholeText: true));
FactionBranch
@@ -127,9 +127,9 @@ public class Statistics : EClass
public int MaxSoil => ((int)(Mathf.Sqrt(EClass._map.bounds.Width * EClass._map.bounds.Height) * 3f) + Evalue(2200) * 5) * (100 + Evalue(3700) * 25) / 100;
public int ContentLV => Mathf.Max(1, lv * 4 + EClass.scene.elomap.GetRoadDist(EClass._zone.x, EClass._zone.y) - 4);
public int ContentLV => Mathf.Max(1, lv * 4 + EClass.scene.elomap.GetRoadDist(EClass._zone.x, EClass._zone.y) - 4 + (int)Mathf.Sqrt(Evalue(2706)) * 4);
public int DangerLV => Mathf.Max(1, ContentLV - (int)Mathf.Sqrt(Evalue(2704)) * 2 + (int)Mathf.Sqrt(Evalue(2706)) * 4);
public int DangerLV => Mathf.Max(1, ContentLV - (int)Mathf.Sqrt(Evalue(2704)) * 2);
public bool HasItemProtection => lv >= 3;
LayerAbility
@@ -11,6 +11,10 @@ public class Config
public bool hideDepletedSpell;
public bool fixedSize;
public bool fixedPos;
public int bgAlpha;
}
@@ -77,6 +81,16 @@ public override void OnInit()
config.hideDepletedSpell = a;
list.List();
});
uIContextMenu3.AddToggle("fixedSize", config.fixedSize, delegate(bool a)
{
config.fixedSize = a;
RefreshConfig();
});
uIContextMenu3.AddToggle("fixedPos", config.fixedPos, delegate(bool a)
{
config.fixedPos = a;
RefreshConfig();
});
uIContextMenu.Show();
});
}
@@ -94,6 +108,8 @@ public void RefreshConfig()
window.listCgFloat.Add(window.cgBG);
}
window.cgBG.enabled = config.autoHideBG;
window.setting.allowMove = !config.fixedPos;
window.setting.allowResize = !config.fixedSize;
}
public static void SetDirty(Element a)
Map
@@ -1827,7 +1827,7 @@ public void MineObj(Point point, Task task = null, Chara c = null)
{
Msg.Say("seedSpoiled", cell.GetObjName());
}
else
else if (!EClass._zone.IsUserZone)
{
Thing t2 = TraitSeed.MakeSeed(sourceObj, TryGetPlant(cell)).SetNum(num2);
EClass.pc.PickOrDrop(point, t2);
Spatial
@@ -468,6 +468,8 @@ public int mapY
}
}
public virtual int ContentLv => DangerLv;
public virtual int DangerLv => _dangerLv;
public virtual int DangerLvFix => 0;
Thing
}
if (mode != IInspect.NoteMode.Recipe)
{
UIItem uIItem = n.AddHeaderCard(text);
SetImage(uIItem.image2);
uIItem.image2.Rect().pivot = new Vector2(0.5f, 0.5f);
string text3 = base.Num.ToFormat() ?? "";
string text4 = (Mathf.Ceil(0.01f * (float)base.ChildrenAndSelfWeight) * 0.1f).ToString("F1") + "s";
if (things.Count > 0)
{
text3 = text3 + " (" + things.Count + ")";
}
if (base.ChildrenAndSelfWeight != SelfWeight)
if (trait is TraitAbility)
{
text4 = text4 + " (" + (Mathf.Ceil(0.01f * (float)SelfWeight) * 0.1f).ToString("F1") + "s)";
EClass.pc.elements.GetOrCreateElement((trait as TraitAbility).act.id).AddHeaderAbility(n);
}
text = "_quantity".lang(text3 ?? "", text4);
if (flag && recipe != null && (bool)LayerCraft.Instance)
{
text = text + " " + "_recipe_lv".lang(recipe.RecipeLv.ToString() ?? "");
}
uIItem.text2.SetText(text);
if (showEQStats && flag2)
else
{
if (!flag)
UIItem uIItem = n.AddHeaderCard(text);
SetImage(uIItem.image2);
uIItem.image2.Rect().pivot = new Vector2(0.5f, 0.5f);
string text3 = base.Num.ToFormat() ?? "";
string text4 = (Mathf.Ceil(0.01f * (float)base.ChildrenAndSelfWeight) * 0.1f).ToString("F1") + "s";
if (things.Count > 0)
{
text3 = text3 + " (" + things.Count + ")";
}
if (base.ChildrenAndSelfWeight != SelfWeight)
{
text4 = text4 + " (" + (Mathf.Ceil(0.01f * (float)SelfWeight) * 0.1f).ToString("F1") + "s)";
}
text = "_quantity".lang(text3 ?? "", text4);
if (flag && recipe != null && (bool)LayerCraft.Instance)
{
text = "";
if (DV != 0 || PV != 0 || base.HIT != 0 || base.DMG != 0 || Penetration != 0)
text = text + " " + "_recipe_lv".lang(recipe.RecipeLv.ToString() ?? "");
}
uIItem.text2.SetText(text);
if (showEQStats && flag2)
{
if (!flag)
{
if (base.DMG != 0)
{
text = text + "DMG".lang() + ((base.DMG > 0) ? "+" : "") + base.DMG + ", ";
}
if (base.HIT != 0)
{
text = text + "HIT".lang() + ((base.HIT > 0) ? "+" : "") + base.HIT + ", ";
}
if (DV != 0)
text = "";
if (DV != 0 || PV != 0 || base.HIT != 0 || base.DMG != 0 || Penetration != 0)
{
text = text + "DV".lang() + ((DV > 0) ? "+" : "") + DV + ", ";
if (base.DMG != 0)
{
text = text + "DMG".lang() + ((base.DMG > 0) ? "+" : "") + base.DMG + ", ";
}
if (base.HIT != 0)
{
text = text + "HIT".lang() + ((base.HIT > 0) ? "+" : "") + base.HIT + ", ";
}
if (DV != 0)
{
text = text + "DV".lang() + ((DV > 0) ? "+" : "") + DV + ", ";
}
if (PV != 0)
{
text = text + "PV".lang() + ((PV > 0) ? "+" : "") + PV + ", ";
}
if (Penetration != 0)
{
text = text + "PEN".lang() + ((Penetration > 0) ? "+" : "") + Penetration + "%, ";
}
text = text.TrimEnd(' ').TrimEnd(',');
}
if (PV != 0)
if (!text.IsEmpty())
{
text = text + "PV".lang() + ((PV > 0) ? "+" : "") + PV + ", ";
n.AddText("NoteText_eqstats", text);
}
if (Penetration != 0)
{
text = text + "PEN".lang() + ((Penetration > 0) ? "+" : "") + Penetration + "%, ";
}
text = text.TrimEnd(' ').TrimEnd(',');
}
if (!text.IsEmpty())
if (trait is TraitToolRange traitToolRange)
{
n.AddText("NoteText_eqstats", text);
n.AddText("NoteText_eqstats", "tip_range".lang(traitToolRange.BestDist.ToString() ?? ""));
}
}
if (trait is TraitToolRange traitToolRange)
{
n.AddText("NoteText_eqstats", "tip_range".lang(traitToolRange.BestDist.ToString() ?? ""));
}
}
else
{
string text5 = "";
if (EClass.debug.showExtra)
{
int totalQuality = GetTotalQuality();
int totalQuality2 = GetTotalQuality(applyBonus: false);
text5 = text5 + "Lv. " + base.LV + " TQ. " + GetTotalQuality() + ((totalQuality == totalQuality2) ? "" : (" (" + totalQuality2 + ")"));
}
if (HasElement(10))
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_nutrition".lang(Evalue(10).ToFormat() ?? "");
}
if ((base.category.IsChildOf("resource") || trait.IsTool) && !(trait is TraitAbility))
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_hardness".lang(base.material.hardness.ToString() ?? "");
}
if (flag && recipe != null && (bool)LayerCraft.Instance)
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_max_quality".lang(recipe.GetQualityBonus().ToString() ?? "");
}
if (!text5.IsEmpty())
else
{
n.AddText("NoteText_eqstats", text5);
string text5 = "";
if (EClass.debug.showExtra)
{
int totalQuality = GetTotalQuality();
int totalQuality2 = GetTotalQuality(applyBonus: false);
text5 = text5 + "Lv. " + base.LV + " TQ. " + GetTotalQuality() + ((totalQuality == totalQuality2) ? "" : (" (" + totalQuality2 + ")"));
}
if (HasElement(10))
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_nutrition".lang(Evalue(10).ToFormat() ?? "");
}
if ((base.category.IsChildOf("resource") || trait.IsTool) && !(trait is TraitAbility))
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_hardness".lang(base.material.hardness.ToString() ?? "");
}
if (flag && recipe != null && (bool)LayerCraft.Instance)
{
text5 = text5 + (text5.IsEmpty() ? "" : " ") + "_max_quality".lang(recipe.GetQualityBonus().ToString() ?? "");
}
if (!text5.IsEmpty())
{
n.AddText("NoteText_eqstats", text5);
}
}
}
string detail = GetDetail();
Trait
@@ -1373,8 +1373,7 @@ public virtual void SetMainText(UIText t, bool hotitem)
{
if (owner.isThing && !owner.Thing.source.attackType.IsEmpty() && owner.ammoData != null)
{
string text = owner.c_ammo.ToString() ?? "";
t.SetText(text ?? "", FontColor.Charge);
t.SetText(owner.c_ammo.ToString() ?? "", FontColor.Charge);
t.SetActive(enable: true);
}
else if (owner.Num == 1 && ShowCharges && owner.IsIdentified)
@@ -1384,8 +1383,7 @@ public virtual void SetMainText(UIText t, bool hotitem)
}
else
{
string text2 = ((owner.Num >= 1000000) ? (owner.Num / 1000000 + "M") : ((owner.Num >= 1000) ? (owner.Num / 1000 + "K") : (owner.Num.ToString() ?? "")));
t.SetText(text2 ?? "", FontColor.ButtonGrid);
t.SetText(owner.Num.ToShortNumber(), FontColor.ButtonGrid);
t.SetActive(owner.Num > 1);
}
}
TraitAbility
@@ -33,8 +33,7 @@ public override void SetMainText(UIText t, bool hotitem)
}
else
{
string text = element.vPotential.ToString() ?? "";
t.SetText(text ?? "", FontColor.Charge);
t.SetText(element.vPotential.ToShortNumber(), FontColor.Charge);
t.SetActive(element is Spell);
}
}
Zone
@@ -91,6 +91,18 @@ public Chara Boss
}
}
public override int ContentLv
{
get
{
if (branch == null)
{
return DangerLv;
}
return branch.ContentLV;
}
}
public override int DangerLv
{
get
@@ -1107,9 +1119,9 @@ public void Simulate()
{
Msg.ignoreAll = true;
chara2.Cure(CureType.Boss, 20 + num * 10);
chara2.HealHP(Mathf.Max(1, chara2.MaxHP) * num / 20);
chara2.mana.Mod(Mathf.Max(1, chara2.mana.max) * num / 20);
chara2.stamina.Mod(Mathf.Max(1, chara2.stamina.max) * num / 20);
chara2.HealHP(Mathf.Max(1, chara2.MaxHP) * Mathf.Min(num, 20) / 20);
chara2.mana.Mod(Mathf.Max(1, chara2.mana.max) * Mathf.Min(num, 20) / 20);
chara2.stamina.Mod(Mathf.Max(1, chara2.stamina.max) * Mathf.Min(num, 20) / 20);
Msg.ignoreAll = false;
}
}
@@ -1696,6 +1708,14 @@ public bool CanDestroy()
{
return false;
}
if (EClass.pc.currentZone.IsInstance)
{
Zone zone = EClass.game.spatials.Find(EClass.pc.currentZone.instance.uidZone);
if (zone != null && zone.GetTopZone() == this)
{
return false;
}
}
return true;
}