EA 23.148 Nightly
May 31, 2025
17 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
ActEffect (1)
public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false)
public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false, BlessedState? state = null)
Card (2)
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20)
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20, BlessedState? state = null)
public Thing MakeMilk(bool effect = true, int num = 1, bool addToZone = true)
public Thing MakeMilk(bool effect = true, int num = 1, bool addToZone = true, BlessedState? state = null)
ActEffect
{
break;
}
int hex = 0;
int hex2 = 0;
foreach (Condition condition4 in TC.conditions)
{
if (condition4.Type == ConditionType.Debuff)
{
hex++;
hex2++;
}
}
if (hex == 0)
if (hex2 == 0)
{
CC.SayNothingHappans();
break;
{
if (!item3.IsFriendOrAbove(CC))
{
int num10 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
item3.DamageHP(num10 * hex, 919, power, AttackSource.None, CC);
int num11 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
item3.DamageHP(num11 * hex2, 919, power, AttackSource.None, CC);
}
}
});
break;
}
Thing thing4 = null;
bool flag6 = actRef.n1 == "food";
bool flag7 = actRef.n1 == "food";
if (actRef.n1 == "money")
{
int currency = TC.GetCurrency();
else
{
Func<Thing, bool> func = (Thing t) => true;
if (flag6)
if (flag7)
{
func = (Thing t) => t.IsFood;
}
List<Thing> list3 = TC.things.List(delegate(Thing t)
List<Thing> list4 = TC.things.List(delegate(Thing t)
{
if (t.parentCard?.trait is TraitChestMerchant || t.trait is TraitTool || t.IsThrownWeapon)
{
}
return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
}, onlyAccessible: true);
if (list3.Count > 0)
if (list4.Count > 0)
{
thing4 = list3.RandomItem();
thing4 = list4.RandomItem();
if (thing4.Num > 1)
{
thing4 = thing4.Split(1);
{
break;
}
List<Thing> list5 = TC.things.List(delegate(Thing t)
List<Thing> list6 = TC.things.List(delegate(Thing t)
{
if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
{
}
return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
});
if (list5.Count == 0)
if (list6.Count == 0)
{
CC.SayNothingHappans();
break;
}
Thing thing6 = list5.RandomItem();
Thing thing6 = list6.RandomItem();
TC.Say("curse_hit", TC, thing6);
thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
LayerInventory.SetDirty(thing6);
List<Thing> list = new List<Thing>();
TC.things.Foreach(delegate(Thing t)
{
int num11 = 0;
int num10 = 0;
if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
{
if (t.blessedState == BlessedState.Cursed)
{
num11 = EClass.rnd(200);
num10 = EClass.rnd(200);
}
if (t.blessedState == BlessedState.Doomed)
{
num11 = EClass.rnd(1000);
num10 = EClass.rnd(1000);
}
if (blessed)
{
num11 /= 2;
num10 /= 2;
}
if (id == EffectId.UncurseEQGreater)
{
num11 /= 10;
num10 /= 10;
}
if (power >= num11)
if (power >= num10)
{
TC.Say("uncurseEQ_success", t);
t.SetBlessedState(BlessedState.Normal);
text3 = text4;
}
}
Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
Condition condition = Condition.Create(text3, power, delegate(Condition con)
{
if (!actRef.aliasEle.IsEmpty())
{
con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
}
});
condition2.isPerfume = TC.IsPC && actRef.isPerfume;
Condition condition3 = TC.AddCondition(condition2);
if (condition3 != null && condition3.isPerfume)
condition.isPerfume = TC.IsPC && actRef.isPerfume;
Condition condition2 = TC.AddCondition(condition);
if (condition2 != null && condition2.isPerfume)
{
condition3.value = 3;
condition2.value = 3;
Msg.Say("perfume", TC);
}
if (!text4.IsEmpty())
case EffectId.KizuamiTrick:
{
EClass.game.religions.Trickery.Talk("ability");
bool hex2 = CC.IsHostile(TC);
List<SourceStat.Row> list6 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex2 ? "Debuff" : "Buff")).ToList();
bool hex = CC.IsHostile(TC);
List<SourceStat.Row> list7 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
int power2 = power;
for (int k = 0; k < 4 + EClass.rnd(2); k++)
for (int l = 0; l < 4 + EClass.rnd(2); l++)
{
SourceStat.Row row2 = list6.RandomItem();
list6.Remove(row2);
Proc(hex2 ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
SourceStat.Row row2 = list7.RandomItem();
list7.Remove(row2);
Proc(hex ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
{
n1 = row2.alias
});
}
int a2 = power;
int num7 = TC.WIL * (isPowerful ? 20 : 5);
ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
if (condition != null)
ConHolyVeil condition3 = TC.GetCondition<ConHolyVeil>();
if (condition3 != null)
{
num7 += condition.power * 5;
num7 += condition3.power * 5;
}
if (id != EffectId.DebuffKizuami && EClass.rnd(a2) < num7 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
{
break;
case EffectId.Revive:
{
List<KeyValuePair<int, Chara>> list7 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
List<KeyValuePair<int, Chara>> list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
if (TC.IsPCFaction || TC.IsPCFactionMinion)
{
if (TC.IsPC && list7.Count == 0)
if (TC.IsPC && list3.Count == 0)
{
list7 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
}
if (list7.Count > 0)
if (list3.Count > 0)
{
list7.RandomItem().Value.Chara.GetRevived();
list3.RandomItem().Value.Chara.GetRevived();
break;
}
}
case EffectId.DamageMindGreat:
case EffectId.Weaken:
{
bool flag8 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
int num8 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
bool flag9 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
bool mind2 = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
int num9 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
if (id == EffectId.Weaken)
{
flag8 = EClass.rnd(2) == 0;
mind = !flag8;
num8 = 1;
flag9 = EClass.rnd(2) == 0;
mind2 = !flag9;
num9 = 1;
}
else
{
TC.PlayEffect("debuff");
TC.PlaySound("debuff");
}
TC.Say(flag8 ? "damageBody" : "damageMind", TC);
for (int l = 0; l < num8; l++)
TC.Say(flag9 ? "damageBody" : "damageMind", TC);
for (int m = 0; m < num9; m++)
{
TC.DamageTempElements(power, flag8, mind);
TC.DamageTempElements(power, flag9, mind2);
}
if (TC.IsPC)
{
case EffectId.EnhanceBodyGreat:
case EffectId.EnhanceMindGreat:
{
bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
int num9 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4)));
TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC);
bool flag6 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
bool mind = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
int num6 = ((id == EffectId.EnhanceBody || id == EffectId.EnhanceMind) ? 1 : (4 + EClass.rnd(4)));
TC.Say(flag6 ? "enhanceBody" : "enhanceMind", TC);
TC.PlayEffect("buff");
TC.PlaySound("buff");
for (int m = 0; m < num9; m++)
for (int k = 0; k < num6; k++)
{
TC.EnhanceTempElements(power, flag9, mind2);
TC.EnhanceTempElements(power, flag6, mind);
}
break;
}
case EffectId.RestoreBody:
case EffectId.RestoreMind:
{
bool flag7 = id == EffectId.RestoreBody;
bool flag8 = id == EffectId.RestoreBody;
if (flag)
{
Redirect(flag7 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
Redirect(flag8 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
break;
}
TC.Say(flag7 ? "restoreBody" : "restoreMind", TC);
TC.Say(flag8 ? "restoreBody" : "restoreMind", TC);
TC.PlaySound("heal");
TC.PlayEffect("heal");
TC.CureHost(flag7 ? CureType.CureBody : CureType.CureMind, power, state);
TC.CureHost(flag8 ? CureType.CureBody : CureType.CureMind, power, state);
if (blessed)
{
Redirect(flag7 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
Redirect(flag8 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
}
break;
}
{
Debug.Log(actRef.act.id);
}
int num6 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
int num8 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
if (actRef.refThing != null)
{
num6 = num6 * (100 + actRef.refThing.Evalue(7500)) / 100;
num8 = num8 * (100 + actRef.refThing.Evalue(7500)) / 100;
}
if (flag)
{
TC.DamageHP(num6 / 2, 919, power);
TC.DamageHP(num8 / 2, 919, power);
break;
}
TC.HealHPHost(num6, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item);
TC.HealHPHost(num8, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item);
TC.CureHost(CureType.Heal, power, state);
TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
break;
{
power /= 4;
}
List<Thing> list4 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list4.Count != 0)
List<Thing> list5 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
if (list5.Count != 0)
{
Thing thing5 = list4.RandomItem();
Thing thing5 = list5.RandomItem();
TC.Say("acid_hit", TC);
if (thing5.isAcidproof)
{
}
else
{
LoveMiracle(TC, CC, power, id == EffectId.LovePlus);
LoveMiracle(TC, CC, power, id == EffectId.LovePlus, state);
}
break;
case EffectId.HairGrowth:
if (flag)
{
if (TC.HasElement(1532))
{
TC.SetMutation(1532);
}
else
{
TC.SetMutation(1533, 1);
}
TC.c_fur = 0;
break;
}
if (blessed)
{
if (TC.HasElement(1533))
{
TC.SetMutation(1533);
}
else
{
TC.SetMutation(1532, 1);
}
}
TC.PlayEffect("aura_heaven");
TC.PlaySound("godbless");
if (!TC.HaveFur())
@@ -2228,7 +2252,7 @@ public static void Poison(Chara tc, Chara c, int power)
}
}
public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false)
public static void LoveMiracle(Chara tc, Chara c, int power, bool plus = false, BlessedState? state = null)
{
if (c == tc)
{
{
if (!plus && EClass.rnd(2) == 0)
{
tc.MakeMilk();
tc.MakeMilk(effect: true, 1, addToZone: true, state);
}
else
{
tc.MakeEgg(effect: true, 1, addToZone: true, plus ? 3 : 20);
tc.MakeEgg(effect: true, 1, addToZone: true, plus ? 3 : 20, state);
}
}
}
@@ -2360,6 +2384,7 @@ public static bool Wish(string s, string name, int power, BlessedState state)
}
Thing thing = ThingGen.Create(r.id, -1, wishLv);
int num = 1;
int price = thing.GetPrice(CurrencyType.Money, sell: false, PriceType.Tourism);
bool flag2 = thing.trait is TraitDeed || thing.rarity >= Rarity.Artifact || thing.source._origin == "artifact_summon";
switch (thing.id)
{
@@ -2382,7 +2407,6 @@ public static bool Wish(string s, string name, int power, BlessedState state)
if (!flag2 && thing.trait.CanStack)
{
int num2 = wishValue;
int price = thing.GetPrice();
num2 -= price;
for (int i = 1; i < 1000; i++)
{
@@ -2396,6 +2420,18 @@ public static bool Wish(string s, string name, int power, BlessedState state)
}
break;
}
if (price > 2500 && num > 3)
{
num = 3 + (int)Mathf.Sqrt(num - 3);
}
if (price > 5000 && num > 2)
{
num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
}
if (price > 10000 && num > 1)
{
num = 1 + Mathf.Min((int)Mathf.Sqrt(num - 1) / 3, 2);
}
if (num < 1)
{
num = 1;
CINT
@@ -104,6 +104,8 @@ public class CINT
public const int dateCooked = 66;
public const int daysWithPC = 67;
public const int fiamaPet = 100;
public const int noRestock = 101;
Card
@@ -1441,6 +1441,18 @@ public int c_daysWithGod
}
}
public int c_daysWithPC
{
get
{
return GetInt(67);
}
set
{
SetInt(67, value);
}
}
public string c_idPortrait
{
get
@@ -5360,11 +5372,15 @@ public void MakeRefFrom(Card c1, Card c2 = null)
c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
}
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20)
public Thing MakeEgg(bool effect = true, int num = 1, bool addToZone = true, int fertChance = 20, BlessedState? state = null)
{
Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num);
thing.MakeFoodFrom(this);
thing.c_idMainElement = c_idMainElement;
if (state.HasValue)
{
thing.SetBlessedState(state.Value);
}
if (!addToZone)
{
return thing;
return GiveBirth(thing, effect);
}
public Thing MakeMilk(bool effect = true, int num = 1, bool addToZone = true)
public Thing MakeMilk(bool effect = true, int num = 1, bool addToZone = true, BlessedState? state = null)
{
Thing thing = ThingGen.Create("milk").SetNum(num);
thing.MakeRefFrom(this);
if (state.HasValue)
{
thing.SetBlessedState(state.Value);
}
int num2 = LV - sourceCard.LV;
if (!IsPCFaction && EClass._zone.IsUserZone)
{
Chara
@@ -703,7 +703,7 @@ public override bool isSynced
public override int MaxHP => (int)Mathf.Clamp(((long)(base.END * 2 + base.STR + base.WIL / 2) * (long)Mathf.Min(base.LV, 25) / 25 + base.END + 10) * Evalue(60) / 100 * ((IsPCFaction ? 100 : (100 + (int)base.rarity * 300)) + (IsPC ? (EClass.player.lastEmptyAlly * Evalue(1646)) : 0)) / 100, 1f, 100000000f);
public override int WeightLimit => (base.STR * 500 + base.END * 250 + Evalue(207) * 2000) * ((!HasElement(1411)) ? 1 : 5) + 45000;
public override int WeightLimit => Mathf.Max((base.STR * 500 + base.END * 250 + Evalue(207) * 2000) * ((!HasElement(1411)) ? 1 : 5) + 45000, 1000);
public override int SelfWeight => bio.weight * 1000;
@@ -1786,6 +1786,10 @@ public void RefreshSpeed(Element.BonusInfo info = null)
num -= 30;
info?.AddFix(-30, GetCondition<ConGravity>().Name);
}
if (_Speed < 10)
{
_Speed = 10;
}
_Speed = _Speed * num / 100;
if (_Speed < 10)
{
@@ -3449,18 +3453,6 @@ public void TickConditions()
return;
}
}
if (id == "tsunami")
{
if (elements.Base(79) < 30)
{
Die();
return;
}
if (IsInCombat)
{
elements.SetTo(79, elements.Base(79) * 3 / 4);
}
}
if (EClass.world.weather.IsRaining && !EClass._map.IsIndoor && !pos.cell.HasRoof)
{
AddCondition<ConWet>(20);
@@ -3627,6 +3619,18 @@ public void TickConditions()
}
}
}
if (id == "tsunami")
{
if (elements.Base(79) < 30)
{
Die();
return;
}
if (IsInCombat)
{
elements.SetTo(79, elements.Base(79) * 3 / 4);
}
}
if (!preventRegen)
{
if (EClass.rnd(25) == 0 && base.hp < MaxHP)
@@ -9155,6 +9159,43 @@ public void SetFeat(int id, int value = 1, bool msg = false)
elements.CheckSkillActions();
}
public void SetMutation(int idEle, int a = 0)
{
SourceElement.Row row = EClass.sources.elements.map[idEle];
SourceElement.Row row2 = EClass.sources.elements.alias[row.aliasParent];
Element element = elements.GetElement(idEle);
Element element2 = elements.GetElement(row2.id);
int num = element?.Value ?? 0;
if (a < 0)
{
a = 0;
}
if (a > row.max)
{
a = row.max;
}
bool flag = (row.tag.Contains("neg") ? (a > num) : (a < num));
if (a == 0 && (element == null || element.Value == 0))
{
SayNothingHappans();
return;
}
if (element != null && element.Value == a)
{
SayNothingHappans();
return;
}
if (element2 != null && element2.Value > 0)
{
SetFeat(element2.id, 0);
}
SetFeat(idEle, a);
PlaySound("mutation");
PlayEffect("mutation");
Msg.SetColor(flag ? Msg.colors.MutateBad : Msg.colors.MutateGood);
Say(row.GetText(flag ? "textDec" : "textInc", returnNull: true) ?? row.alias, this);
}
public bool MutateRandom(int vec = 0, int tries = 100, bool ether = false, BlessedState state = BlessedState.Normal)
{
if (!ether && vec >= 0 && HasElement(406) && EClass.rnd(5) != 0)
DramaCustomSequence
@@ -40,41 +40,42 @@ public void Build(Chara c)
string rumor = (c.IsPCParty ? GetTalk("sup") : GetRumor(c));
Layer layer = null;
bool flag3 = c.IsHumanSpeak || EClass.pc.HasElement(1640);
bool num = !c.IsUnique || (c.IsPCFaction && c.trait is TraitOlderYoungerSister);
if (!flag)
{
Step("Resident");
_Talk("tg", () => rumor);
if (flag3)
}
if (num && flag3)
{
DramaChoice choice = Choice2("letsTalk", StepDefault);
choice.SetOnClick(delegate
{
DramaChoice choice = Choice2("letsTalk", StepDefault);
choice.SetOnClick(delegate
sequence.firstTalk.funcText = () => rumor;
List<Hobby> list2 = c.ListHobbies();
Hobby hobby = ((list2.Count > 0) ? list2[0] : null);
if (EClass.rnd(20) == 0 || EClass.debug.showFav)
{
sequence.firstTalk.funcText = () => rumor;
List<Hobby> list2 = c.ListHobbies();
Hobby hobby = ((list2.Count > 0) ? list2[0] : null);
if (EClass.rnd(20) == 0 || EClass.debug.showFav)
if (EClass.rnd(2) == 0 || hobby == null)
{
if (EClass.rnd(2) == 0 || hobby == null)
{
GameLang.refDrama1 = c.GetFavCat().GetName().ToLower();
GameLang.refDrama2 = c.GetFavFood().GetName();
rumor = GetText(c, "general", "talk_fav");
c.knowFav = true;
}
else
{
GameLang.refDrama1 = hobby.Name.ToLower();
rumor = GetText(c, "general", "talk_hobby");
}
GameLang.refDrama1 = c.GetFavCat().GetName().ToLower();
GameLang.refDrama2 = c.GetFavFood().GetName();
rumor = GetText(c, "general", "talk_fav");
c.knowFav = true;
}
else
{
rumor = GetRumor(c);
GameLang.refDrama1 = hobby.Name.ToLower();
rumor = GetText(c, "general", "talk_hobby");
}
c.affinity.OnTalkRumor();
choice.forceHighlight = true;
}).SetCondition(() => c.interest > 0);
}
}
else
{
rumor = GetRumor(c);
}
c.affinity.OnTalkRumor();
choice.forceHighlight = true;
}).SetCondition(() => c.interest > 0);
}
bool flag4 = false;
if (!c.IsPCFaction && c.affinity.CanInvite() && !EClass._zone.IsInstance && c.c_bossType == BossType.none)
@@ -943,11 +944,11 @@ void Invest(bool quick)
Step("_buyLand");
Method(delegate
{
bool num4 = EClass._map.bounds.CanExpand(1);
bool num5 = EClass._map.bounds.CanExpand(1);
int costLand = CalcGold.ExpandLand();
GameLang.refDrama1 = "";
GameLang.refDrama2 = costLand.ToString() ?? "";
if (!num4)
if (!num5)
{
TempTalkTopic("expand3", StepDefault);
}
@@ -1029,12 +1030,12 @@ void Invest(bool quick)
{
onClick = delegate(Element a, ButtonElement b)
{
int num3 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
if (num3 == 0)
int num4 = (EClass.pc.elements.HasBase(a.id) ? CalcPlat.Train(EClass.pc, a) : CalcPlat.Learn(EClass.pc, a));
if (num4 == 0)
{
SE.Beep();
}
else if (EClass.pc.TryPay(num3, "plat"))
else if (EClass.pc.TryPay(num4, "plat"))
{
if (EClass.pc.elements.HasBase(a.id))
{
@@ -1377,9 +1378,9 @@ void Invest(bool quick)
GameLang.refDrama1 = Lang._currency(EClass.player.extraTax, "money");
TempTalkTopic("extraTax", null);
int[] array2 = taxTier;
foreach (int num2 in array2)
foreach (int num3 in array2)
{
int _i2 = num2;
int _i2 = num3;
Choice(Lang._currency(_i2, showUnit: true), delegate
{
EClass.player.extraTax = _i2;
@@ -1396,9 +1397,9 @@ void Invest(bool quick)
GameLang.refDrama1 = bankMoney.ToString() ?? "";
TempTalkTopic("banker2", null);
int[] array = bankTier;
foreach (int num in array)
foreach (int num2 in array)
{
int _i = num;
int _i = num2;
if (EClass.player.bankMoney >= _i)
{
Choice(Lang._currency(_i, showUnit: true), delegate
FACTION
@@ -36,7 +36,7 @@ public class FACTION
public const int fPromo = 2202;
public const int fSoil = 2200;
public const int fElec = 2201;
public const int fHeirloom = 2120;
@@ -108,16 +108,16 @@ public class FACTION
public const int fConstruction = 2003;
public const int fElec = 2201;
public const int fSoil = 2200;
public static readonly int[] IDS = new int[53]
{
3606, 3604, 3700, 2207, 3605, 3701, 3603, 3602, 3601, 3600,
3500, 4005, 2205, 2204, 2203, 2202, 2200, 2120, 3702, 2119,
3500, 4005, 2205, 2204, 2203, 2202, 2201, 2120, 3702, 2119,
2118, 2117, 2116, 2206, 3703, 3802, 3705, 4006, 4004, 4003,
2115, 4002, 4001, 4000, 3900, 3805, 3804, 3803, 3801, 3800,
3784, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707, 3706,
3704, 2003, 2201
3704, 2003, 2200
};
}
public class Faction : EClass
FEAT
@@ -89,7 +89,7 @@ public class FEAT
public const int featMilitant = 1419;
public const int featFisher = 1659;
public const int featSnail = 1211;
public const int featManaCost = 1657;
@@ -119,12 +119,10 @@ public class FEAT
public const int featSwordsage = 1418;
public const int featSnail = 1211;
public const int featFisher = 1659;
public const int featInquisitor = 1416;
public const int featRoran = 1237;
public const int featElder = 1238;
public const int featDemon = 1239;
@@ -137,15 +135,15 @@ public class FEAT
public const int featGod_wind1 = 1310;
public const int featGod_healing1 = 1320;
public const int featGod_machine1 = 1315;
public const int featGod_harvest1 = 1325;
public const int featNorland = 1236;
public const int featGod_luck1 = 1330;
public const int featGod_oblivion1 = 1340;
public const int featRoran = 1237;
public const int featGod_harmony1 = 1335;
public const int featGod_trickery1 = 1345;
@@ -163,13 +161,15 @@ public class FEAT
public const int featArcher = 1404;
public const int featGod_harmony1 = 1335;
public const int featPianist = 1405;
public const int featGod_oblivion1 = 1340;
public const int featNorland = 1236;
public const int featLightEater = 1235;
public const int featCosmicHorror = 1233;
public const int featHeavyEater = 1234;
public const int featWitch = 1417;
@@ -189,16 +189,16 @@ public class FEAT
public const int featSplit = 1222;
public const int featHeavyEater = 1234;
public const int featAcidBody = 1223;
public const int featLoyal = 1225;
public const int featShiva = 1224;
public const int featManaPrecision = 1214;
public const int featLoyal = 1225;
public const int featUnderground = 1226;
public const int featManaPrecision = 1214;
public const int featServant = 1227;
public const int featDemigod = 1228;
@@ -211,13 +211,13 @@ public class FEAT
public const int featBaby = 1232;
public const int featShiva = 1224;
public const int featCosmicHorror = 1233;
public const int featTourist = 1406;
public const int featGod_machine1 = 1315;
public const int featPaladin = 1407;
public const int featPaladin2 = 1408;
public const int featGod_healing1 = 1320;
public const int featBoost = 1409;
@@ -229,7 +229,7 @@ public class FEAT
public const int featFoxMaid = 1415;
public const int featPaladin = 1407;
public const int featPaladin2 = 1408;
public const int featFairysan = 1413;
@@ -241,14 +241,14 @@ public class FEAT
1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620,
1612, 1611, 1610, 1422, 1421, 1420, 1642, 1643, 1644, 1645,
1212, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208,
1209, 1210, 1419, 1659, 1657, 1656, 1655, 1654, 1653, 1652,
1651, 1650, 1649, 1648, 1647, 1646, 1658, 1418, 1211, 1416,
1237, 1238, 1239, 1240, 1300, 1305, 1310, 1320, 1325, 1236,
1330, 1340, 1345, 1350, 1355, 1400, 1401, 1402, 1403, 1404,
1335, 1405, 1235, 1233, 1417, 1215, 1216, 1217, 1218, 1219,
1220, 1221, 1222, 1234, 1223, 1225, 1214, 1226, 1227, 1228,
1229, 1230, 1231, 1232, 1224, 1406, 1315, 1408, 1409, 1410,
1411, 1412, 1415, 1407, 1413, 1414
1209, 1210, 1419, 1211, 1657, 1656, 1655, 1654, 1653, 1652,
1651, 1650, 1649, 1648, 1647, 1646, 1658, 1418, 1659, 1416,
1238, 1239, 1240, 1300, 1305, 1310, 1315, 1325, 1330, 1237,
1335, 1345, 1350, 1355, 1400, 1401, 1402, 1403, 1404, 1405,
1340, 1236, 1235, 1234, 1417, 1215, 1216, 1217, 1218, 1219,
1220, 1221, 1222, 1223, 1224, 1225, 1226, 1214, 1227, 1228,
1229, 1230, 1231, 1232, 1233, 1406, 1407, 1320, 1409, 1410,
1411, 1412, 1415, 1408, 1413, 1414
};
}
public class Feat : Element
@@ -555,6 +555,12 @@ public List<string> Apply(int a, ElementContainer owner, bool hint = false)
ModPotential(120, a * 50);
ModPotential(123, a * 50);
break;
case 1532:
ModBase(73, -a * 5, hide: false);
break;
case 1533:
ModBase(73, a * 5, hide: false);
break;
case 1510:
ModBase(65, a * 3, hide: false);
break;
FOOD
@@ -2,13 +2,13 @@ public class FOOD
{
public const int food_CHA = 700;
public const int food_cat = 701;
public const int food_poison = 702;
public const int food_love = 703;
public const int food_bug = 704;
public const int food_poison = 702;
public const int food_cat = 701;
public const int loseWeight = 706;
@@ -26,7 +26,7 @@ public class FOOD
public static readonly int[] IDS = new int[12]
{
700, 701, 703, 704, 702, 706, 707, 708, 709, 757,
700, 702, 703, 704, 701, 706, 707, 708, 709, 757,
705, 758
};
}
FactionBranch
@@ -579,7 +579,12 @@ public void OnAdvanceDay()
int num = 0;
foreach (Chara member in members)
{
if (!member.IsPC && !member.isDead && member.memberType == FactionMemberType.Default)
if (member.IsPC || member.isDead)
{
continue;
}
member.c_daysWithPC++;
if (member.memberType == FactionMemberType.Default)
{
if (EClass.rnd(3) == 0)
{
@@ -781,7 +786,18 @@ public void DailyOutcome(VirtualDate date)
}
if (i.HaveFur())
{
i.c_fur++;
if (i.HasElement(1533))
{
i.c_fur = 0;
}
else
{
i.c_fur++;
if (EClass.rnd(4) == 0 && i.HasElement(1532))
{
i.c_fur++;
}
}
}
thing.ModNum(-1);
if (thing.isDestroyed || thing.Num == 0)
MUTATION
public class MUTATION
{
public const int mutationStr = 1520;
public const int mutationSpeedN = 1519;
public const int mutationSpeed = 1518;
@@ -8,23 +10,23 @@ public class MUTATION
public const int mutationRegen = 1516;
public const int mutationEye = 1512;
public const int mutationEyeN = 1513;
public const int mutationEye = 1512;
public const int mutationSkinN = 1511;
public const int mutationSkin = 1510;
public const int mutationStr = 1520;
public const int mutationDexN = 1515;
public const int mutationStrN = 1521;
public const int mutationDex = 1514;
public const int mutationChaN = 1523;
public const int mutationCha = 1522;
public const int mutationDexN = 1515;
public const int mutationBrain = 1524;
public const int etherPoisonHand = 1565;
@@ -32,7 +34,7 @@ public class MUTATION
public const int etherProvoke = 1563;
public const int mutationCha = 1522;
public const int mutationChaN = 1523;
public const int etherStupid = 1561;
@@ -54,8 +56,6 @@ public class MUTATION
public const int etherFeet = 1552;
public const int mutationBrain = 1524;
public const int etherEye = 1553;
public const int mutationCold = 1526;
@@ -64,24 +64,28 @@ public class MUTATION
public const int mutationLightning = 1528;
public const int mutationBrainN = 1525;
public const int mutationLightningN = 1529;
public const int mutationBody = 1530;
public const int mutationBodyN = 1531;
public const int mutationBrainN = 1525;
public const int mutationHair = 1532;
public const int mutationHairN = 1533;
public const int etherGravity = 1550;
public const int etherUgly = 1551;
public const int mutationLightningN = 1529;
public const int mutationBodyN = 1531;
public static readonly int[] IDS = new int[38]
public static readonly int[] IDS = new int[40]
{
1519, 1518, 1517, 1516, 1512, 1513, 1511, 1510, 1520, 1515,
1521, 1514, 1523, 1565, 1564, 1563, 1522, 1561, 1560, 1559,
1558, 1557, 1556, 1555, 1554, 1562, 1552, 1524, 1553, 1526,
1527, 1528, 1525, 1530, 1531, 1550, 1551, 1529
1520, 1519, 1518, 1517, 1516, 1513, 1512, 1511, 1510, 1521,
1514, 1522, 1515, 1524, 1565, 1564, 1563, 1523, 1561, 1560,
1559, 1558, 1557, 1556, 1555, 1554, 1562, 1552, 1553, 1526,
1527, 1528, 1529, 1530, 1525, 1532, 1533, 1550, 1551, 1531
};
}
public class Mutation : Feat
POLICY
public class POLICY
{
public const int license_food = 2818;
public const int tourist_safety = 2811;
public const int bed_quality = 2812;
@@ -13,15 +13,13 @@ public class POLICY
public const int platinum_ticket = 2815;
public const int tourist_safety = 2811;
public const int store_ripoff = 2816;
public const int store_premium = 2817;
public const int license_furniture = 2819;
public const int license_food = 2818;
public const int license_stolen = 2824;
public const int license_furniture = 2819;
public const int legendary_heirloom = 2821;
@@ -29,6 +27,10 @@ public class POLICY
public const int legendary_exhibition = 2823;
public const int license_stolen = 2824;
public const int open_business = 2810;
public const int milk_fan = 2825;
public const int egg_fan = 2826;
@@ -37,13 +39,11 @@ public class POLICY
public const int license_slaver = 2828;
public const int open_business = 2810;
public const int license_general = 2820;
public const int home_discount = 2800;
public const int taxfree = 2514;
public const int resident_wanted = 2513;
public const int forcePanty = 2712;
@@ -73,7 +73,7 @@ public class POLICY
public const int resident_tax = 2512;
public const int resident_wanted = 2513;
public const int taxfree = 2514;
public const int food_for_people = 2502;
@@ -107,10 +107,10 @@ public class POLICY
public static readonly int[] IDS = new int[51]
{
2818, 2812, 2813, 2814, 2815, 2811, 2816, 2817, 2819, 2824,
2821, 2822, 2823, 2825, 2826, 2827, 2828, 2810, 2820, 2800,
2514, 2712, 2504, 2505, 2506, 2507, 2508, 2501, 2500, 2715,
2503, 2509, 2510, 2511, 2512, 2513, 2502, 2516, 2703, 2515,
2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2821,
2822, 2823, 2824, 2810, 2825, 2826, 2827, 2828, 2820, 2800,
2513, 2712, 2504, 2505, 2506, 2507, 2508, 2501, 2500, 2715,
2503, 2509, 2510, 2511, 2512, 2514, 2502, 2516, 2703, 2515,
2705, 2706, 2704, 2708, 2707, 2710, 2711, 2702, 2701, 2700,
2709
};
SKILL
@@ -18,7 +18,7 @@ public class SKILL
public const int weaponScythe = 110;
public const int fishing = 245;
public const int twohand = 130;
public const int marksman = 133;
@@ -58,7 +58,7 @@ public class SKILL
public const int eyeofmind = 134;
public const int twowield = 131;
public const int fishing = 245;
public const int spotting = 210;
@@ -132,7 +132,7 @@ public class SKILL
public const int gathering = 250;
public const int twohand = 130;
public const int twowield = 131;
public const int blacksmith = 256;
@@ -268,13 +268,13 @@ public class SKILL
public static readonly int[] IDS = new int[133]
{
123, 122, 120, 111, 55, 109, 50, 51, 110, 245,
123, 122, 120, 111, 55, 109, 50, 51, 110, 130,
133, 132, 242, 241, 240, 237, 235, 230, 227, 226,
225, 220, 207, 200, 152, 151, 150, 135, 134, 131,
225, 220, 207, 200, 152, 151, 150, 135, 134, 245,
210, 102, 107, 56, 57, 60, 61, 62, 64, 65,
66, 67, 68, 70, 71, 72, 73, 74, 75, 76,
106, 105, 104, 103, 101, 100, 108, 93, 91, 90,
80, 79, 78, 77, 92, 250, 130, 256, 916, 917,
80, 79, 78, 77, 92, 250, 131, 256, 916, 917,
918, 919, 920, 921, 922, 923, 924, 925, 926, 950,
951, 952, 915, 953, 956, 957, 958, 959, 960, 961,
962, 963, 964, 965, 970, 971, 972, 255, 954, 914,
TraitPotionAlchemy
public class TraitPotionAlchemy : TraitPotionRandom
{
public override int Power => owner.Power;
public override int Power => owner.Power * (100 + owner.encLV * 100) / 100;
public override void OnCrafted(Recipe recipe)
{
@@ -20,7 +20,6 @@ public override void OnCrafted(Recipe recipe)
case 750:
case 753:
num = ((num2 >= 6) ? 8402 : ((num2 >= 4) ? 8401 : 8400));
Debug.Log(num.ToString() + num2);
break;
case 754:
num = 8471;
@@ -50,5 +49,6 @@ public override void OnCrafted(Recipe recipe)
}
}
owner.refVal = num;
owner.SetEncLv(Mathf.Min(EClass.pc.Evalue(257) / 10, EClass.debug.enable ? 1000 : owner.QualityLv));
}
}
TraitWell
@@ -109,7 +109,7 @@ public override void TrySetAct(ActPlan p)
if (EClass.player.CountKeyItem("well_wish") > 0)
{
EClass.player.ModKeyItem("well_wish", -1);
ActEffect.Proc(EffectId.Wish, EClass.pc, null, 10 + EClass.player.CountKeyItem("well_enhance") * 10);
ActEffect.Proc(EffectId.Wish, EClass.pc, null, 50 + EClass.player.CountKeyItem("well_enhance") * 50);
EClass.player.wellWished = true;
}
else
WindowChara
@@ -915,6 +915,10 @@ public static void RefreshNote(Chara chara, UINote n, bool shortMode = false)
{
AddText("info_criminal".lang());
}
if (!chara.IsPC && chara.c_daysWithPC > 0)
{
AddText("info_daysWithPC".lang(chara.c_daysWithPC.ToString() ?? ""));
}
if (EClass.debug.showExtra)
{
n.AddText("LV:" + chara.LV + " exp:" + chara.exp + " next:" + chara.ExpToNext);
Zone
@@ -2328,14 +2328,17 @@ public void Generate()
int num2 = (EClass.debug.enable ? 3 : EClass.rnd(EClass.rnd(EClass.rnd(EClass.rnd(5) + 1) + 1) + 1));
bool flag = this is Zone_Field;
Thing seed = null;
int num3 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3);
if (num3 > 0)
{
seed = TraitSeed.MakeSeed(EClass.sources.objs.map[137]);
Rand.SetSeed(EClass._zone.uid * 10 + num3);
TraitSeed.LevelSeed(seed, (seed.trait as TraitSeed).row, num3);
Rand.SetSeed();
seed.elements.SetBase(2, EClass.curve(seed.encLV, 50, 10, 80));
if (IsNefia)
{
int num3 = Mathf.Min(EClass._zone.DangerLv, EClass.pc.Evalue(286) * 2 / 3);
if (num3 > 0)
{
seed = TraitSeed.MakeSeed(EClass.sources.objs.map[137]);
Rand.SetSeed(EClass._zone.uid * 10 + num3);
TraitSeed.LevelSeed(seed, (seed.trait as TraitSeed).row, num3);
Rand.SetSeed();
seed.elements.SetBase(2, EClass.curve(seed.encLV, 50, 10, 80));
}
}
crawler.CrawlUntil(EClass._map, () => EClass._map.GetRandomPoint(), num2 + (flag ? 4 : 0), delegate(Crawler.Result r)
{
Zone_Field
@@ -44,7 +44,17 @@ public override bool UseFog
public override int DangerLvFix => base.Tile.source.dangerLv;
public override string IdBiome => map.config.idBiome.IsEmpty(base.Tile.source.idBiome.IsEmpty("Plain"));
public override string IdBiome
{
get
{
if (map != null)
{
return map.config.idBiome.IsEmpty(base.Tile.source.idBiome.IsEmpty("Plain"));
}
return "Plain";
}
}
public override float PrespawnRate => 1.2f;