EA 23.123 Nightly
April 12, 2025
27 files modified.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
CalcMoney (1)
public static int Invest(int a, float mod = 2f)
public static int Invest(long a, float mod = 2f)
GuildMerchant (1)
public int InvestPrice(int a)
public long InvestPrice(long a)
AI_UseCrafter
@@ -264,6 +264,7 @@ public override IEnumerable<Status> Run()
for (int n = 0; n < num; n++)
{
owner.RemoveCondition<ConInvulnerable>();
EClass.player.invlunerable = false;
owner.elements.ModExp(orCreateElement.id, costSP * 12 * (100 + duration * 2) / 100);
owner.stamina.Mod(-costSP);
if (owner == null || owner.isDead)
ActPlan
@@ -501,72 +501,62 @@ public void _Update(PointTarget target)
}
items.ForeachReverse(delegate(Card _c)
{
if (_c.isThing)
Chara c2 = _c.Chara;
if (c2 != null && !c2.IsPC && EClass.pc.CanSee(c2))
{
if (_c.trait.CanBeAttacked && !(_c.trait is TraitTrainingDummy))
int num = c2.Dist(EClass.pc);
if (num <= 1 || !EClass.pc.isBlind)
{
TrySetAct(ACT.Melee, _c);
}
}
else
{
Chara c2 = _c.Chara;
if (c2 != null && !c2.IsPC && EClass.pc.CanSee(c2))
{
int num = c2.Dist(EClass.pc);
if (num <= 1 || !EClass.pc.isBlind)
if (!EClass.pc.isBlind && !c2.IsHostile() && (input == ActInput.AllAction || !(c2.IsPCParty || c2.IsMinion || isKey)) && (input == ActInput.AllAction || !c2.IsNeutral() || c2.quest != null || EClass.game.quests.IsDeliverTarget(c2)) && c2.isSynced && num <= 2)
{
if (!EClass.pc.isBlind && !c2.IsHostile() && (input == ActInput.AllAction || !(c2.IsPCParty || c2.IsMinion || isKey)) && (input == ActInput.AllAction || !c2.IsNeutral() || c2.quest != null || EClass.game.quests.IsDeliverTarget(c2)) && c2.isSynced && num <= 2)
bool flag5 = !c2.HasCondition<ConSuspend>() && (!c2.isRestrained || !c2.IsPCFaction);
if (EClass._zone.instance is ZoneInstanceMusic && !c2.IsPCFactionOrMinion)
{
bool flag5 = !c2.HasCondition<ConSuspend>() && (!c2.isRestrained || !c2.IsPCFaction);
if (EClass._zone.instance is ZoneInstanceMusic && !c2.IsPCFactionOrMinion)
{
flag5 = false;
}
if (flag5 || altAction)
flag5 = false;
}
if (flag5 || altAction)
{
if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>())
{
if (EClass.pc.HasElement(1216) && c2.HasCondition<ConSleep>())
TrySetAct(new AI_Fuck
{
TrySetAct(new AI_Fuck
{
target = c2,
succubus = true
}, c2);
}
TrySetAct(ACT.Chat, c2);
target = c2,
succubus = true
}, c2);
}
TrySetAct(ACT.Chat, c2);
}
if (c2.host != EClass.pc)
}
if (c2.host != EClass.pc)
{
TraitShackle traitShackle = c2.pos.FindThing<TraitShackle>();
if (c2.IsRestrainedResident)
{
TraitShackle traitShackle = c2.pos.FindThing<TraitShackle>();
if (c2.IsRestrainedResident)
if (traitShackle != null && traitShackle.AllowTraining)
{
if (traitShackle != null && traitShackle.AllowTraining)
TrySetAct(new AI_PracticeDummy
{
TrySetAct(new AI_PracticeDummy
{
target = c2
});
}
}
else if ((c2.IsHostile() || altAction || c2.isRestrained) && c2.IsAliveInCurrentZone)
{
TrySetAct(ACT.Melee, c2);
target = c2
});
}
}
if (c2.IsPCPartyMinion && !c2.Chara.IsEscorted() && altAction)
else if ((c2.IsHostile() || altAction || c2.isRestrained) && c2.IsAliveInCurrentZone)
{
TrySetAct("ActBanishSummon", delegate
{
EClass.pc.Say("summon_vanish", c2);
c2.pos.PlayEffect("vanish");
c2.pos.PlaySound("vanish");
c2.pos.PlayEffect("teleport");
c2.Destroy();
return true;
}, c2, null, 99);
TrySetAct(ACT.Melee, c2);
}
}
if (c2.IsPCPartyMinion && !c2.Chara.IsEscorted() && altAction)
{
TrySetAct("ActBanishSummon", delegate
{
EClass.pc.Say("summon_vanish", c2);
c2.pos.PlayEffect("vanish");
c2.pos.PlaySound("vanish");
c2.pos.PlayEffect("teleport");
c2.Destroy();
return true;
}, c2, null, 99);
}
}
}
});
@@ -886,6 +876,17 @@ void func()
pos = pos.Copy()
});
}
if (list.Count != 0 && input != ActInput.AllAction)
{
return;
}
items.ForeachReverse(delegate(Card _c)
{
if (_c.isThing && _c.trait.CanBeAttacked && !(_c.trait is TraitTrainingDummy))
{
TrySetAct(ACT.Melee, _c);
}
});
}
else
{
AttackProcess
@@ -944,7 +944,7 @@ public bool CalcHit()
}
if (CC.Evalue(1420) > 0)
{
int num3 = Mathf.Min(100, 100 - CC.hp * 100 / CC.MaxHP);
int num3 = Mathf.Min(100, 100 - CC.hp * 100 / CC.MaxHP) * (50 + CC.Evalue(1420) * 50) / 100;
if (num3 >= 50 && num3 * num3 * num3 * num3 / 3 > EClass.rnd(100000000))
{
return Crit();
CalcMoney
@@ -4,12 +4,17 @@ public class CalcMoney : EClass
{
public static int Negotiate(int a, float mod = 1.5f)
{
return (int)Mathf.Max((long)a * 100L / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(291)) * mod), 1f);
return Mathf.Max((int)((float)((long)a * 100L) / (100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(291)) * mod)), 1);
}
public static int Invest(int a, float mod = 2f)
public static int Invest(long a, float mod = 2f)
{
return (int)Mathf.Max((long)a * 100L / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(292)) * mod), 1f);
long num = a * 100 / (long)(100f + (float)Mathf.Max(0, EClass.pc.CHA / 2 + EClass.pc.Evalue(292)) * mod);
if (num >= 0 && num < 100000000)
{
return (int)num;
}
return 100000000;
}
public static int Meal(Chara c)
@@ -61,11 +66,13 @@ public static int Whore(Chara seller, Chara buyer)
public static int InvestShop(Chara c, Chara tc)
{
return Invest(Guild.Merchant.InvestPrice(Mathf.Max(tc.c_invest * 700, Mathf.Min(tc.c_invest, 4000) * Mathf.Min(tc.c_invest, 4000) * 80) + 200));
long a = Guild.Merchant.InvestPrice(tc.c_invest * 700);
return Mathf.Max(b: Invest(Guild.Merchant.InvestPrice(tc.c_invest * tc.c_invest * 80 + 200)), a: Invest(a));
}
public static int InvestZone(Chara c)
{
return Invest((int)Mathf.Max((long)EClass._zone.development * 50L, Mathf.Min(EClass._zone.development, 80000) * Mathf.Min(EClass._zone.development, 80000) / 4) + 500);
long a = EClass._zone.development * 50;
return Mathf.Max(b: Invest((long)EClass._zone.development * (long)EClass._zone.development / 4 + 500), a: Invest(a));
}
}
Card
@@ -2054,7 +2054,7 @@ public bool IsInheritFoodTraits
{
get
{
if (!IsFood && !category.IsChildOf("seed") && !(id == "pasture"))
if (!IsFood && !category.IsChildOf("seed") && !category.IsChildOf("drink") && !(id == "pasture"))
{
return id == "grass";
}
@@ -2066,9 +2066,13 @@ public bool ShowFoodEnc
{
get
{
if (!IsInheritFoodTraits && (Evalue(10) <= 0 || IsEquipmentOrRangedOrAmmo))
if (!IsInheritFoodTraits)
{
return category.IsChildOf("drug");
if (Evalue(10) > 0)
{
return !IsEquipmentOrRangedOrAmmo;
}
return false;
}
return true;
}
@@ -2410,7 +2414,7 @@ public bool IsExcludeFromCraft()
{
return true;
}
if (card.isSale)
if (card.isSale || !card.trait.CanUseContent)
{
return true;
}
@@ -3085,7 +3089,6 @@ public void RemoveThing(Thing thing)
EClass.player.RefreshCurrentHotItem();
ActionMode.AdvOrRegion.updatePlans = true;
LayerInventory.SetDirty(thing);
Debug.Log(thing);
}
RecalculateFOV();
}
@@ -3687,11 +3690,16 @@ public virtual void HealHPHost(int a, HealSource origin = HealSource.None)
public virtual void HealHP(int a, HealSource origin = HealSource.None)
{
long num = a;
if (origin == HealSource.Magic)
{
a = (int)Mathf.Min(a * Mathf.Max(100 - Evalue(93), 1) / 100, 100000000f);
num = (long)a * (long)Mathf.Max(100 - Evalue(93), 1) / 100;
}
if (num > 100000000)
{
num = 100000000L;
}
hp += a;
hp += (int)num;
if (hp > MaxHP)
{
hp = MaxHP;
else if (Chara.host != null)
{
EvadeDeath();
if (!Chara.HasCondition<ConFaint>())
{
Chara.AddCondition<ConFaint>(200, force: true);
}
}
else if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
{
if (EClass.player.invlunerable)
{
EvadeDeath();
goto IL_0b2d;
goto IL_0b4f;
}
}
if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)
}
}
}
goto IL_0b2d;
IL_0b2d:
goto IL_0b4f;
IL_0b4f:
if (trait.CanBeAttacked)
{
renderer.PlayAnime(AnimeID.HitObj);
{
Chara.conSleep.Kill();
}
if (Chara.host != null && hp == 0 && !Chara.HasCondition<ConFaint>())
{
Chara.AddCondition<ConFaint>(200, force: true);
}
if (IsPC)
{
float num12 = (float)hp / (float)MaxHP;
Chara
@@ -1989,6 +1989,7 @@ public void ApplyRace(bool remove = false)
}
}
}
body.RefreshBodyParts();
elements.ApplyElementMap(base.uid, SourceValueType.Chara, race.elementMap, base.DefaultLV, remove, applyFeat: true);
}
@@ -2899,7 +2900,7 @@ public void DestroyPath(Point pos)
{
t.Destroy();
}
else
else if (!t.IsUnique && !t.trait.CanBeDestroyed)
{
t.SetPlaceState(PlaceState.roaming);
}
{
return false;
}
int num = 1;
if (a.source.proc.TryGet(0) == "Heal" && HasElement(1422))
{
List<int> list = new List<int> { 8400, 8401, 8402, 8403, 8404, 8405 };
int num = list.IndexOf(a.id);
if (num != -1)
{
int num2 = list.TryGet(num + Evalue(1422));
a = elements.GetElement(num2)?.act ?? ACT.Create(num2);
}
}
int num3 = 1;
Act.Cost cost = a.GetCost(this);
a.GetPower(this);
int i = 1;
int num2 = 0;
int num4 = 0;
bool flag = a.IsTargetHostileParty();
if (IsPC && HasCondition<StanceManaCost>())
{
num2 = Evalue(1657);
num4 = Evalue(1657);
}
_pts.Clear();
if (a.TargetType.ForceParty)
_pts.Add(this);
pt = false;
}
int num3 = 100;
int num5 = 100;
if (!a.TargetType.ForceParty && i > 1)
{
num3 = (IsPC ? (i * 100) : (50 + i * 50));
num5 = (IsPC ? (i * 100) : (50 + i * 50));
}
int num4 = cost.cost * num3 / 100;
int num6 = cost.cost * num5 / 100;
if (cost.type == Act.CostType.MP && Evalue(483) > 0)
{
num4 = num4 * 100 / (100 + (int)Mathf.Sqrt(Evalue(483) * 10) * 3);
num6 = num6 * 100 / (100 + (int)Mathf.Sqrt(Evalue(483) * 10) * 3);
}
if (i == 0)
{
}
if (IsPC)
{
if (!Dialog.warned && cost.type == Act.CostType.MP && cost.cost > 0 && mana.value < num4 && !EClass.debug.godMode)
if (!Dialog.warned && cost.type == Act.CostType.MP && cost.cost > 0 && mana.value < num6 && !EClass.debug.godMode)
{
ActPlan.warning = true;
Dialog.TryWarnMana(delegate
}
if (a.CanRapidFire && HasElement(1648))
{
num = 1 + Evalue(1648);
num3 = 1 + Evalue(1648);
}
if (IsPC && cost.cost > 0 && a.Value == 0)
{
EInput.Consume();
return false;
}
if (num2 > 0 && a.vPotential >= i * 2)
if (num4 > 0 && a.vPotential >= i * 2)
{
a.vPotential -= i * 2;
num4 = num4 * (100 - num2 * 20) / 100;
num6 = num6 * (100 - num4 * 20) / 100;
}
else
{
string text2 = ((a.source.langAct.Length >= 2) ? a.source.langAct[1] : "");
if (text == "spell_hand")
{
string[] list = Lang.GetList("attack" + race.meleeStyle.IsEmpty("Touch"));
string @ref = text2.lang(list[4]);
Say(tc.IsPCParty ? "cast_hand_ally" : "cast_hand", this, tc, @ref, tc.IsPCParty ? list[1] : list[2]);
string[] list2 = Lang.GetList("attack" + race.meleeStyle.IsEmpty("Touch"));
string @ref = text2.lang(list2[4]);
Say(tc.IsPCParty ? "cast_hand_ally" : "cast_hand", this, tc, @ref, tc.IsPCParty ? list2[1] : list2[2]);
}
else
{
case Act.CostType.MP:
if (Evalue(1421) >= 2 && base.hp <= MaxHP / (9 - Evalue(1421) * 2))
{
num4 /= 2;
num6 /= 2;
}
PlayEffect("cast");
mana.Mod(-num4);
mana.Mod(-num6);
if (isDead)
{
return true;
}
elements.ModExp(304, Mathf.Clamp(num4 * 2, 1, 200));
elements.ModExp(304, Mathf.Clamp(num6 * 2, 1, 200));
break;
case Act.CostType.SP:
stamina.Mod(-num4);
stamina.Mod(-num6);
ignoreSPAbsorb = true;
break;
}
{
return true;
}
int spellExp = elements.GetSpellExp(this, a, num3);
int spellExp = elements.GetSpellExp(this, a, num5);
if (EClass.rnd(100) >= CalcCastingChance(a, i) && !EClass.debug.godMode)
{
Say("fizzle", this);
}
else
{
for (int j = 0; j < num; j++)
for (int j = 0; j < num3; j++)
{
if (a.TargetType != TargetType.SelfParty && tc != null && !tc.IsAliveInCurrentZone)
{
@@ -5504,18 +5515,18 @@ void ForeachEnemy(Action<Chara> action)
{
if (_pts.Count == 0)
{
for (int num8 = EClass._map.charas.Count - 1; num8 >= 0; num8--)
for (int num10 = EClass._map.charas.Count - 1; num10 >= 0; num10--)
{
Chara chara3 = EClass._map.charas[num8];
Chara chara3 = EClass._map.charas[num10];
if (chara3 != this && CanSeeLos(chara3) && chara3.IsHostile(this))
{
_pts.Add(chara3);
}
}
}
for (int num9 = _pts.Count - 1; num9 >= 0; num9--)
for (int num11 = _pts.Count - 1; num11 >= 0; num11--)
{
action(_pts[num9]);
action(_pts[num11]);
}
}
void ForeachParty(Action<Chara> action)
@@ -5524,9 +5535,9 @@ void ForeachParty(Action<Chara> action)
{
if (IsPCParty)
{
for (int num5 = EClass.pc.party.members.Count - 1; num5 >= 0; num5--)
for (int num7 = EClass.pc.party.members.Count - 1; num7 >= 0; num7--)
{
Chara chara = EClass.pc.party.members[num5];
Chara chara = EClass.pc.party.members[num7];
if (chara == this || chara.host != null || CanSeeLos(chara))
{
_pts.Add(chara);
@@ -5535,9 +5546,9 @@ void ForeachParty(Action<Chara> action)
}
else
{
for (int num6 = EClass._map.charas.Count - 1; num6 >= 0; num6--)
for (int num8 = EClass._map.charas.Count - 1; num8 >= 0; num8--)
{
Chara chara2 = EClass._map.charas[num6];
Chara chara2 = EClass._map.charas[num8];
if ((chara2 == this || (chara2.IsFriendOrAbove(this) && CanSeeLos(chara2))) && (chara2 == tc || _pts.Count < 3 || EClass.rnd(_pts.Count * _pts.Count) > 6))
{
_pts.Add(chara2);
@@ -5545,9 +5556,9 @@ void ForeachParty(Action<Chara> action)
}
}
}
for (int num7 = _pts.Count - 1; num7 >= 0; num7--)
for (int num9 = _pts.Count - 1; num9 >= 0; num9--)
{
action(_pts[num7]);
action(_pts[num9]);
}
}
}
@@ -8507,7 +8518,7 @@ public Condition AddCondition(Condition c, bool force = false)
Element defenseAttribute = c.GetDefenseAttribute(this);
if (defenseAttribute != null)
{
c.power = 100 * c.power / (100 + defenseAttribute.Value);
c.power = 100 * c.power / Mathf.Max(100 + defenseAttribute.Value, 1);
}
if (c.source.resistance.Length != 0)
{
CharaBody
@@ -286,23 +286,29 @@ public void AddBodyPart(int ele, Thing thing = null)
public void RefreshBodyParts()
{
foreach (BodySlot slot in slots)
for (int i = 0; i < slots.Count; i++)
{
int elementId = slot.elementId;
BodySlot bodySlot = slots[i];
bodySlot.index = i;
int elementId = bodySlot.elementId;
if (elementId == 35)
{
if (slotMainHand == null)
{
slotMainHand = slot;
slotMainHand = bodySlot;
}
else if (slotOffHand == null)
{
slotOffHand = slot;
slotOffHand = bodySlot;
}
}
if (elementId == 41)
{
slotRange = slot;
slotRange = bodySlot;
}
if (bodySlot.thing != null)
{
bodySlot.thing.c_equippedSlot = i + 1;
}
}
}
CoreDebug
@@ -925,6 +925,8 @@ public void UpdateInput()
}
if (Input.GetKeyDown(KeyCode.F2))
{
EClass._zone.development += 10;
EClass._zone.development *= EClass._zone.development;
EClass.pc.Pick(ThingGen.CreateSpellbook(8550));
EClass.pc.Pick(ThingGen.CreatePotion(8550));
EClass.pc.Pick(ThingGen.CreateSpellbook(9004));
DramaCustomSequence
@@ -853,7 +853,7 @@ public void Build(Chara c)
{
int cost5 = CalcMoney.InvestZone(EClass.pc);
GameLang.refDrama1 = cost5.ToString() ?? "";
GameLang.refDrama2 = EClass._zone.investment.ToString() ?? "";
GameLang.refDrama2 = ((EClass._zone.investment < 0) ? int.MaxValue : EClass._zone.investment).ToString() ?? "";
TempTalkTopic("invest1", null);
Choice("yes", delegate
{
ELEMENT
@@ -909,7 +909,7 @@ public void AddEncNote(UINote n, Card Card, ElementContainer.NoteMode mode = Ele
sprite = EClass.core.refs.icons.enc.card;
}
}
if (thing.IsFood && IsFoodTrait)
if (thing.ShowFoodEnc && IsFoodTrait)
{
sprite = EClass.core.refs.icons.enc.traitFood;
}
FACTION
@@ -24,7 +24,7 @@ public class FACTION
public const int bfPlain = 3600;
public const int fTaxEvasion = 2119;
public const int fLuck = 2118;
public const int fPromo = 2202;
@@ -36,17 +36,17 @@ public class FACTION
public const int fMoral = 2203;
public const int fElec = 2201;
public const int fSoil = 2200;
public const int fHeirloom = 2120;
public const int fLoyal = 2117;
public const int fTaxEvasion = 2119;
public const int fEducation = 2116;
public const int bfTranquil = 3703;
public const int fLuck = 2118;
public const int fLoyal = 2117;
public const int fRation = 2207;
@@ -60,7 +60,7 @@ public class FACTION
public const int actBuildRecipe = 4005;
public const int fEducation = 2116;
public const int fAdmin = 2115;
public const int actBuildCollect = 4004;
@@ -104,18 +104,18 @@ public class FACTION
public const int bfHunt = 3705;
public const int fAdmin = 2115;
public const int fConstruction = 2003;
public const int fElec = 2201;
public static readonly int[] IDS = new int[52]
{
3702, 3701, 3700, 3500, 3605, 3604, 3603, 3602, 3601, 3600,
2119, 2202, 2206, 2205, 2204, 2203, 2201, 2200, 2120, 2117,
3703, 2118, 2207, 3704, 3803, 3706, 4006, 4005, 2116, 4004,
2118, 2202, 2206, 2205, 2204, 2203, 2200, 2120, 2119, 2116,
3703, 2117, 2207, 3704, 3803, 3706, 4006, 4005, 2115, 4004,
4003, 4002, 4001, 4000, 3900, 3805, 3804, 3802, 3801, 3800,
3784, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707, 3705,
2115, 2003
2003, 2201
};
}
public class Faction : EClass
FEAT
@@ -27,10 +27,10 @@ public class FEAT
public const int featSPD = 1629;
public const int featSorter = 1643;
public const int featLuck = 1628;
public const int featCHA = 1627;
public const int featWIL = 1626;
public const int featMAG = 1625;
@@ -51,13 +51,15 @@ public class FEAT
public const int featLife = 1610;
public const int featHealer = 1422;
public const int featManaMeat = 1421;
public const int featCHA = 1627;
public const int featSorter = 1643;
public const int featBodyParts = 1644;
public const int featExecutioner = 1420;
public const int featParty = 1645;
public const int featBodyParts = 1644;
public const int featLonelySoul = 1646;
@@ -111,7 +113,7 @@ public class FEAT
public const int featSummoner = 1647;
public const int featExecutioner = 1420;
public const int featParty = 1645;
public const int featMilitant = 1419;
@@ -229,20 +231,20 @@ public class FEAT
public const int featEarthStrength = 1411;
public static readonly int[] IDS = new int[113]
public static readonly int[] IDS = new int[114]
{
1214, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1632, 1631,
1630, 1629, 1643, 1628, 1626, 1625, 1624, 1623, 1622, 1621,
1620, 1612, 1611, 1610, 1421, 1627, 1644, 1645, 1646, 1213,
1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209,
1210, 1211, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651,
1650, 1649, 1648, 1647, 1420, 1419, 1212, 1417, 1238, 1239,
1300, 1305, 1310, 1315, 1320, 1325, 1335, 1237, 1340, 1350,
1355, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1345, 1407,
1236, 1234, 1418, 1216, 1217, 1218, 1219, 1220, 1221, 1222,
1223, 1235, 1224, 1226, 1227, 1215, 1228, 1229, 1230, 1231,
1232, 1233, 1225, 1408, 1330, 1410, 1409, 1416, 1414, 1415,
1412, 1413, 1411
1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621,
1620, 1612, 1611, 1610, 1422, 1421, 1643, 1420, 1644, 1646,
1213, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208,
1209, 1210, 1211, 1658, 1657, 1656, 1655, 1654, 1653, 1652,
1651, 1650, 1649, 1648, 1647, 1645, 1419, 1212, 1417, 1238,
1239, 1300, 1305, 1310, 1315, 1320, 1325, 1335, 1237, 1340,
1350, 1355, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1345,
1407, 1236, 1234, 1418, 1216, 1217, 1218, 1219, 1220, 1221,
1222, 1223, 1235, 1224, 1226, 1227, 1215, 1228, 1229, 1230,
1231, 1232, 1233, 1225, 1408, 1330, 1410, 1409, 1416, 1414,
1415, 1412, 1413, 1411
};
}
public class Feat : Element
FOOD
public class FOOD
{
public const int food_god = 758;
public const int justcooked = 757;
public const int loseWeight = 706;
public const int gainWeight = 705;
@@ -14,9 +10,13 @@ public class FOOD
public const int food_poison = 702;
public const int food_cat = 701;
public const int food_god = 758;
public const int food_CHA = 700;
public static readonly int[] IDS = new int[9] { 758, 757, 706, 705, 704, 703, 702, 701, 700 };
public const int justcooked = 757;
public const int food_cat = 701;
public static readonly int[] IDS = new int[9] { 706, 705, 704, 703, 702, 758, 700, 757, 701 };
}
GuildMerchant
@@ -4,12 +4,12 @@ public class GuildMerchant : Guild
public override bool IsCurrentZone => EClass._zone.id == "guild_merchant";
public int InvestPrice(int a)
public long InvestPrice(long a)
{
if (!base.IsMember)
{
return a;
}
return (int)((long)a * 100L / (110 + relation.rank / 2));
return a * 100 / (110 + relation.rank / 2);
}
}
InvOwnerDeliver
@@ -40,6 +40,10 @@ public override bool ShouldShowGuide(Thing t)
case Mode.Bank:
return t.id == "money";
case Mode.Crop:
if (!t.GetBool(115))
{
return false;
}
if (!(t.category.id == "vegi") && !(t.category.id == "fruit"))
{
return t.category.id == "mushroom";
MUTATION
public class MUTATION
{
public const int mutationRegenN = 1517;
public const int mutationStrN = 1521;
public const int mutationStr = 1520;
@@ -10,8 +12,6 @@ public class MUTATION
public const int mutationEye = 1512;
public const int mutationDexN = 1515;
public const int mutationDex = 1514;
public const int mutationEyeN = 1513;
@@ -22,11 +22,11 @@ public class MUTATION
public const int mutationCha = 1522;
public const int mutationRegen = 1516;
public const int mutationDexN = 1515;
public const int mutationChaN = 1523;
public const int mutationRegenN = 1517;
public const int mutationRegen = 1516;
public const int mutationBrainN = 1525;
@@ -78,8 +78,8 @@ public class MUTATION
public static readonly int[] IDS = new int[38]
{
1521, 1520, 1519, 1518, 1512, 1515, 1514, 1513, 1511, 1510,
1522, 1516, 1523, 1517, 1525, 1565, 1524, 1563, 1562, 1561,
1517, 1521, 1520, 1519, 1518, 1512, 1514, 1513, 1511, 1510,
1522, 1515, 1523, 1516, 1525, 1565, 1524, 1563, 1562, 1561,
1560, 1559, 1558, 1557, 1556, 1555, 1564, 1553, 1526, 1554,
1528, 1529, 1530, 1527, 1550, 1551, 1552, 1531
};
SKILL
@@ -8,7 +8,7 @@ public class SKILL
public const int armorLight = 120;
public const int fishing = 245;
public const int fireproof = 50;
public const int weaponScythe = 110;
@@ -20,7 +20,7 @@ public class SKILL
public const int weaponBlunt = 111;
public const int tactics = 132;
public const int fishing = 245;
public const int evasion = 150;
@@ -46,7 +46,7 @@ public class SKILL
public const int spotting = 210;
public const int fireproof = 50;
public const int weightlifting = 207;
public const int swimming = 200;
@@ -132,7 +132,7 @@ public class SKILL
public const int gathering = 250;
public const int weightlifting = 207;
public const int tactics = 132;
public const int blacksmith = 256;
@@ -142,8 +142,6 @@ public class SKILL
public const int eleNerve = 918;
public const int eleHoly = 919;
public const int eleChaos = 920;
public const int eleMagic = 921;
@@ -164,11 +162,11 @@ public class SKILL
public const int resLightning = 952;
public const int elePoison = 915;
public const int resDarkness = 953;
public const int resPoison = 955;
public const int elePoison = 915;
public const int resMind = 954;
public const int resNether = 956;
@@ -192,19 +190,21 @@ public class SKILL
public const int resDecay = 970;
public const int resDamage = 971;
public const int resCurse = 972;
public const int carpentry = 255;
public const int resMind = 954;
public const int resPoison = 955;
public const int eleMind = 914;
public const int resDamage = 971;
public const int eleHoly = 919;
public const int eleLightning = 912;
public const int eleDarkness = 913;
public const int alchemy = 257;
public const int sculpture = 258;
@@ -224,7 +224,7 @@ public class SKILL
public const int cooking = 287;
public const int building = 288;
public const int eleDarkness = 913;
public const int appraising = 289;
@@ -234,23 +234,25 @@ public class SKILL
public const int investing = 292;
public const int alchemy = 257;
public const int building = 288;
public const int regeneration = 300;
public const int eleCold = 911;
public const int eleFire = 910;
public const int disarmTrap = 293;
public const int env = 313;
public const int fun = 312;
public const int bladder = 311;
public const int hygine = 310;
public const int memorization = 307;
public const int eleFire = 910;
public const int fun = 312;
public const int faith = 306;
public const int magicDevice = 305;
@@ -260,28 +262,26 @@ public class SKILL
public const int controlmana = 302;
public const int meditation = 301;
public const int faith = 306;
public const int memorization = 307;
public const int disarmTrap = 293;
public const int meditation = 301;
public static readonly int[] IDS = new int[133]
{
130, 123, 122, 120, 245, 110, 109, 131, 51, 111,
132, 150, 134, 242, 241, 240, 237, 235, 230, 227,
226, 220, 210, 50, 200, 152, 151, 135, 133, 225,
130, 123, 122, 120, 50, 110, 109, 131, 51, 111,
245, 150, 134, 242, 241, 240, 237, 235, 230, 227,
226, 220, 210, 207, 200, 152, 151, 135, 133, 225,
100, 107, 72, 71, 70, 68, 67, 66, 73, 65,
62, 61, 60, 57, 56, 55, 64, 108, 74, 76,
106, 105, 104, 103, 102, 101, 75, 93, 91, 90,
80, 79, 78, 77, 92, 250, 207, 256, 916, 917,
918, 919, 920, 921, 922, 923, 924, 925, 926, 950,
951, 952, 915, 953, 955, 956, 957, 958, 959, 960,
961, 962, 963, 964, 965, 970, 972, 255, 954, 914,
971, 912, 913, 258, 259, 260, 261, 280, 281, 285,
286, 287, 288, 289, 290, 291, 292, 257, 300, 911,
910, 313, 311, 310, 307, 312, 305, 304, 303, 302,
301, 306, 293
80, 79, 78, 77, 92, 250, 132, 256, 916, 917,
918, 920, 921, 922, 923, 924, 925, 926, 950, 951,
952, 953, 915, 954, 956, 957, 958, 959, 960, 961,
962, 963, 964, 965, 970, 971, 972, 255, 955, 914,
919, 912, 257, 258, 259, 260, 261, 280, 281, 285,
286, 287, 913, 289, 290, 291, 292, 288, 300, 911,
293, 313, 312, 311, 310, 910, 306, 305, 304, 303,
302, 307, 301
};
}
public class Skill : Element
SLOT
public class SLOT
{
public const int range = 41;
public const int toolbelt = 44;
public const int torso = 32;
public const int ammo = 42;
public const int foot = 39;
public const int lightsource = 45;
@@ -8,33 +14,27 @@ public class SLOT
public const int arm = 34;
public const int neck = 31;
public const int toolbelt = 44;
public const int hand = 35;
public const int back = 33;
public const int waist = 37;
public const int head = 30;
public const int tool = 40;
public const int token = 43;
public const int foot = 39;
public const int back = 33;
public const int ammo = 42;
public const int neck = 31;
public const int finger = 36;
public const int torso = 32;
public const int head = 30;
public const int token = 43;
public const int range = 41;
public static readonly int[] IDS = new int[16]
{
41, 45, 38, 34, 31, 44, 35, 33, 37, 30,
40, 43, 39, 42, 36, 32
44, 32, 42, 39, 45, 38, 34, 35, 37, 40,
33, 31, 36, 30, 43, 41
};
}
SPELL
public class SPELL
{
public const int funnel_Sound = 50607;
public const int hand_Sound = 50407;
public const int miasma_Sound = 50707;
public const int bolt_Sound = 50307;
public const int weapon_Sound = 50807;
public const int weapon_Poison = 50805;
public const int puddle_Sound = 50907;
public const int ball_Nerve = 50108;
public const int arrow_Sound = 50507;
public const int puddle_Mind = 50904;
public const int miasma_Nerve = 50708;
public const int weapon_Mind = 50804;
public const int bolt_Nerve = 50308;
@@ -24,56 +16,52 @@ public class SPELL
public const int funnel_Nerve = 50608;
public const int miasma_Nerve = 50708;
public const int weapon_Nerve = 50808;
public const int puddle_Nerve = 50908;
public const int sword_Nerve = 51008;
public const int ball_Holy = 50109;
public const int bolt_Holy = 50309;
public const int miasma_Mind = 50704;
public const int arrow_Holy = 50509;
public const int sword_Holy = 51009;
public const int ball_Nerve = 50108;
public const int bolt_Holy = 50309;
public const int hand_Holy = 50409;
public const int hand_Poison = 50405;
public const int puddle_Nether = 50906;
public const int arrow_Holy = 50509;
public const int funnel_Holy = 50609;
public const int bolt_Mind = 50304;
public const int hand_Mind = 50404;
public const int arrow_Mind = 50504;
public const int funnel_Mind = 50604;
public const int miasma_Mind = 50704;
public const int weapon_Mind = 50804;
public const int miasma_Holy = 50709;
public const int puddle_Mind = 50904;
public const int weapon_Holy = 50809;
public const int ball_Poison = 50105;
public const int puddle_Holy = 50909;
public const int bolt_Poison = 50305;
public const int sword_Sound = 51007;
public const int ball_Sound = 50107;
public const int puddle_Sound = 50907;
public const int arrow_Poison = 50505;
public const int miasma_Sound = 50707;
public const int miasma_Poison = 50705;
public const int weapon_Poison = 50805;
public const int puddle_Poison = 50905;
public const int funnel_Poison = 50605;
public const int sword_Poison = 51005;
public const int ball_Nether = 50106;
public const int arrow_Poison = 50505;
public const int bolt_Nether = 50306;
public const int hand_Nether = 50406;
@@ -84,22 +72,42 @@ public class SPELL
public const int miasma_Nether = 50706;
public const int weapon_Nether = 50806;
public const int weapon_Sound = 50807;
public const int funnel_Poison = 50605;
public const int hand_Poison = 50405;
public const int miasma_Holy = 50709;
public const int puddle_Nether = 50906;
public const int miasma_Acid = 50713;
public const int sword_Nether = 51006;
public const int puddle_Holy = 50909;
public const int ball_Sound = 50107;
public const int ball_Mind = 50104;
public const int bolt_Poison = 50305;
public const int weapon_Acid = 50813;
public const int bolt_Sound = 50307;
public const int ball_Poison = 50105;
public const int sword_Mind = 51004;
public const int hand_Sound = 50407;
public const int arrow_Sound = 50507;
public const int funnel_Sound = 50607;
public const int weapon_Nether = 50806;
public const int funnel_Mind = 50604;
public const int miasma_Acid = 50713;
public const int bolt_Chaos = 50310;
public const int puddle_Acid = 50913;
public const int sword_Acid = 51013;
public const int ball_Cut = 50114;
public const int bolt_Cut = 50314;
@@ -116,6 +124,8 @@ public class SPELL
public const int puddle_Cut = 50914;
public const int sword_Cut = 51014;
public const int ball_Impact = 50115;
public const int bolt_Impact = 50315;
@@ -132,6 +142,8 @@ public class SPELL
public const int puddle_Impact = 50915;
public const int sword_Impact = 51015;
public const int ball_Void = 50116;
public const int bolt_Void = 50316;
@@ -144,17 +156,15 @@ public class SPELL
public const int miasma_Void = 50716;
public const int funnel_Acid = 50613;
public const int weapon_Holy = 50809;
public const int arrow_Acid = 50513;
public const int weapon_Void = 50816;
public const int bolt_Acid = 50313;
public const int weapon_Acid = 50813;
public const int ball_Chaos = 50110;
public const int bolt_Chaos = 50310;
public const int funnel_Acid = 50613;
public const int hand_Acid = 50413;
public const int hand_Chaos = 50410;
@@ -168,6 +178,8 @@ public class SPELL
public const int puddle_Chaos = 50910;
public const int sword_Chaos = 51010;
public const int ball_Magic = 50111;
public const int bolt_Magic = 50311;
@@ -184,6 +196,8 @@ public class SPELL
public const int puddle_Magic = 50911;
public const int sword_Magic = 51011;
public const int ball_Ether = 50112;
public const int bolt_Ether = 50312;
@@ -200,19 +214,19 @@ public class SPELL
public const int puddle_Ether = 50912;
public const int ball_Acid = 50113;
public const int sword_Ether = 51012;
public const int hand_Acid = 50413;
public const int ball_Acid = 50113;
public const int puddle_Darkness = 50903;
public const int bolt_Acid = 50313;
public const int ball_Fire = 50100;
public const int arrow_Acid = 50513;
public const int miasma_Darkness = 50703;
public const int arrow_Mind = 50504;
public const int SpMutation = 8380;
public const int sword_Fire = 51000;
public const int SpWish = 8390;
public const int bolt_Mind = 50304;
public const int SpHealLight = 8400;
@@ -260,13 +274,21 @@ public class SPELL
public const int SpSilence = 8700;
public const int SpLevitate = 8300;
public const int SpWeakness = 8702;
public const int SpReconstruction = 8288;
public const int SpWeakResEle = 8704;
public const int SpChangeMaterialG = 8286;
public const int SpNightmare = 8705;
public const int SpChangeMaterial = 8285;
public const int SpBane = 8706;
public const int SpWish = 8390;
public const int SpMutation = 8380;
public const int SpLevitate = 8300;
public const int SpReconstruction = 8288;
public const int ball_ = 7001;
@@ -292,11 +314,11 @@ public class SPELL
public const int SpGate = 8202;
public const int SpWeakness = 8702;
public const int SpReturn = 8220;
public const int SpIdentify = 8230;
public const int SpGravity = 8708;
public const int SpEvac = 8221;
public const int SpIdentifyG = 8232;
@@ -320,23 +342,17 @@ public class SPELL
public const int SpChangeMaterialLesser = 8284;
public const int SpEvac = 8221;
public const int SpWeakResEle = 8704;
public const int SpNightmare = 8705;
public const int SpBane = 8706;
public const int SpChangeMaterial = 8285;
public const int arrow_Fire = 50500;
public const int SpChangeMaterialG = 8286;
public const int funnel_Fire = 50600;
public const int SpIdentify = 8230;
public const int miasma_Fire = 50700;
public const int SpSpeedDown = 8710;
public const int weapon_Fire = 50800;
public const int SpTelepathy = 8770;
public const int puddle_Fire = 50900;
public const int SpInvisibility = 8775;
public const int ball_Cold = 50101;
@@ -352,24 +368,28 @@ public class SPELL
public const int weapon_Cold = 50801;
public const int hand_Fire = 50400;
public const int puddle_Cold = 50901;
public const int sword_Cold = 51001;
public const int ball_Lightning = 50102;
public const int bolt_Lightning = 50302;
public const int hand_Lightning = 50402;
public const int arrow_Lightning = 50502;
public const int funnel_Lightning = 50602;
public const int puddle_Fire = 50900;
public const int miasma_Lightning = 50702;
public const int funnel_Lightning = 50602;
public const int weapon_Lightning = 50802;
public const int puddle_Lightning = 50902;
public const int sword_Lightning = 51002;
public const int ball_Darkness = 50103;
public const int bolt_Darkness = 50303;
@@ -380,21 +400,23 @@ public class SPELL
public const int funnel_Darkness = 50603;
public const int ball_Lightning = 50102;
public const int miasma_Darkness = 50703;
public const int weapon_Darkness = 50803;
public const int bolt_Fire = 50300;
public const int puddle_Darkness = 50903;
public const int SpDrawBacker = 9503;
public const int sword_Darkness = 51003;
public const int SpGravity = 8708;
public const int ball_Mind = 50104;
public const int SpSpeedDown = 8710;
public const int miasma_Lightning = 50702;
public const int SpTelepathy = 8770;
public const int hand_Mind = 50404;
public const int SpInvisibility = 8775;
public const int weapon_Fire = 50800;
public const int funnel_Fire = 50600;
public const int SpSeeInvisible = 8776;
@@ -412,19 +434,19 @@ public class SPELL
public const int SpSummonUndeadSister = 9001;
public const int weapon_Void = 50816;
public const int SpSummonFire = 9002;
public const int SpSummonTentacle = 9003;
public const int SpSummonMonster = 9004;
public const int SpSummonPawn = 9005;
public const int SpSummonYeek = 9006;
public const int SpSummonOrc = 9007;
public const int miasma_Fire = 50700;
public const int SpSummonShadow = 9050;
public const int SpSummonOrc = 9007;
public const int SpMeteor = 9150;
@@ -440,35 +462,48 @@ public class SPELL
public const int SpDrawMetal = 9502;
public const int SpSummonTentacle = 9003;
public const int SpDrawBacker = 9503;
public const int ball_Fire = 50100;
public const int puddle_Void = 50916;
public static readonly int[] IDS = new int[222]
public const int bolt_Fire = 50300;
public const int hand_Fire = 50400;
public const int arrow_Fire = 50500;
public const int SpSummonShadow = 9050;
public const int sword_Void = 51016;
public static readonly int[] IDS = new int[239]
{
50607, 50407, 50707, 50307, 50807, 50907, 50507, 50708, 50308, 50408,
50508, 50608, 50808, 50908, 50109, 50309, 50509, 50108, 50409, 50405,
50906, 50609, 50304, 50404, 50504, 50604, 50704, 50804, 50904, 50105,
50305, 50107, 50505, 50705, 50805, 50905, 50106, 50306, 50406, 50506,
50606, 50706, 50806, 50605, 50709, 50713, 50909, 50104, 50813, 50913,
50114, 50314, 50414, 50514, 50614, 50714, 50814, 50914, 50115, 50315,
50415, 50515, 50615, 50715, 50815, 50915, 50116, 50316, 50416, 50516,
50616, 50716, 50613, 50809, 50513, 50313, 50110, 50310, 50410, 50510,
50610, 50710, 50810, 50910, 50111, 50311, 50411, 50511, 50611, 50711,
50811, 50911, 50112, 50312, 50412, 50512, 50612, 50712, 50812, 50912,
50113, 50413, 50903, 50100, 50703, 8380, 8390, 8400, 8401, 8402,
8403, 8404, 8405, 8406, 8430, 8450, 8470, 8471, 8480, 8490,
8491, 8500, 8501, 8502, 8503, 8504, 8506, 8510, 8550, 8700,
8300, 8288, 8286, 8285, 7001, 7002, 7003, 7004, 7005, 7006,
7007, 7008, 7800, 8200, 8201, 8202, 8702, 8220, 8230, 8232,
8240, 8241, 8250, 8251, 8255, 8256, 8260, 8280, 8281, 8284,
8221, 8704, 8705, 8706, 50500, 50600, 50700, 50800, 50900, 50101,
50301, 50401, 50501, 50601, 50701, 50801, 50400, 50901, 50302, 50402,
50502, 50602, 50702, 50802, 50902, 50103, 50303, 50403, 50503, 50603,
50102, 50803, 50300, 9503, 8708, 8710, 8770, 8775, 8776, 8780,
8790, 8791, 8800, 8801, 9000, 9001, 50816, 9002, 9004, 9005,
9006, 9007, 9050, 9150, 9151, 9160, 9200, 9500, 9501, 9502,
9003, 50916
50805, 50108, 50904, 50804, 50308, 50408, 50508, 50608, 50708, 50808,
50908, 51008, 50109, 50704, 51009, 50309, 50409, 50509, 50609, 50709,
50809, 50909, 51007, 50907, 50707, 50705, 50905, 50605, 51005, 50106,
50505, 50306, 50406, 50506, 50606, 50706, 50807, 50405, 50906, 51006,
50107, 50305, 50307, 50105, 51004, 50407, 50507, 50607, 50806, 50604,
50713, 50310, 50913, 51013, 50114, 50314, 50414, 50514, 50614, 50714,
50814, 50914, 51014, 50115, 50315, 50415, 50515, 50615, 50715, 50815,
50915, 51015, 50116, 50316, 50416, 50516, 50616, 50716, 50816, 50813,
50110, 50613, 50413, 50410, 50510, 50610, 50710, 50810, 50910, 51010,
50111, 50311, 50411, 50511, 50611, 50711, 50811, 50911, 51011, 50112,
50312, 50412, 50512, 50612, 50712, 50812, 50912, 51012, 50113, 50313,
50513, 50504, 51000, 50304, 8400, 8401, 8402, 8403, 8404, 8405,
8406, 8430, 8450, 8470, 8471, 8480, 8490, 8491, 8500, 8501,
8502, 8503, 8504, 8506, 8510, 8550, 8700, 8702, 8704, 8705,
8706, 8390, 8380, 8300, 8288, 7001, 7002, 7003, 7004, 7005,
7006, 7007, 7008, 7800, 8200, 8201, 8202, 8220, 8708, 8221,
8232, 8240, 8241, 8250, 8251, 8255, 8256, 8260, 8280, 8281,
8284, 8285, 8286, 8230, 8710, 8770, 8775, 50101, 50301, 50401,
50501, 50601, 50701, 50801, 50901, 51001, 50102, 50302, 50402, 50502,
50900, 50602, 50802, 50902, 51002, 50103, 50303, 50403, 50503, 50603,
50703, 50803, 50903, 51003, 50104, 50702, 50404, 50800, 50600, 8776,
8780, 8790, 8791, 8800, 8801, 9000, 9001, 9002, 9003, 9004,
9005, 9006, 50700, 9007, 9150, 9151, 9160, 9200, 9500, 9501,
9502, 9503, 50100, 50916, 50300, 50400, 50500, 9050, 51016
};
}
public class Spell : Ability
Thing
@@ -1609,6 +1609,10 @@ public override bool CanStackTo(Thing to)
{
return false;
}
if (base.Num + to.Num <= 0)
{
return false;
}
bool flag = false;
if (to.parent is Card)
{
Trait
@@ -1768,6 +1768,7 @@ public void OnBarter()
Add("container_magic", 1, 0);
Add("container_magic", 1, 0).ChangeMaterial("iron").idSkin = 1;
Add("container_magic", 1, 0).ChangeMaterial("bamboo").idSkin = 2;
Add("container_magic", 1, 0).ChangeMaterial("feywood").idSkin = 3;
Add("wrench_tent_elec", 1, 0);
Add("wrench_tent_soil", 1, 0);
Add("wrench_bed", 1, 0).SetNum(20);
TraitBrewery
@@ -45,7 +45,7 @@ public override bool OnChildDecay(Card c, bool firstDecay)
{
return true;
}
if (!c.IsFood && !(c.trait is TraitDrinkMilk))
if (!c.IsFood && !(c.id == "508") && !(c.id == "778") && !(c.id == "milk"))
{
return true;
}
TraitTent
@@ -34,4 +34,12 @@ public override void OnChangePlaceState(PlaceState state)
}
owner.ChangeWeight(num);
}
public override void SetName(ref string s)
{
if (base.zone != null && !base.zone.name.IsEmpty())
{
s = s + "(" + base.zone.name + ")";
}
}
}
TraitTicketFurniture
@@ -24,7 +24,7 @@ public override void TrySetHeldAct(ActPlan p)
}
p.pos.Things.ForEach(delegate(Thing t)
{
if (t.IsInstalled && t.isNPCProperty && t.trait.CanBeHeld && !t.trait.IsDoor && !t.isMasked && t.source.value != 0 && (EClass._zone is Zone_LittleGarden || t.trait.CanBeDestroyed))
if (t.IsInstalled && t.isNPCProperty && t.trait.CanBeHeld && !t.trait.IsDoor && !t.isMasked && t.source.value != 0 && (EClass._zone is Zone_LittleGarden || !(t.trait is TraitNewZone)))
{
int price = GetPrice(t) * t.Num;
p.TrySetAct("actCollectFurniture".lang(price.ToString() ?? "", t.Name) + ((t.category.ticket >= 10) ? "ticketNotIntended".lang() : ""), delegate
UIDragGridIngredients
@@ -43,7 +43,6 @@ public void Update()
public void Refresh()
{
Debug.Log("Refreshing uiDragGridIngredients");
List<Thing> list = new List<Thing>();
if (layer.owner.AllowStockIngredients && !layer.owner.owner.c_isDisableStockUse)
{
UIInventory
@@ -692,7 +692,7 @@ public void RefreshMenu()
SE.ClickOk();
});
}
if (!con2.isChara && !con2.trait.IsSpecialContainer)
if (!con2.isChara && (IsMagicChest || !con2.trait.IsSpecialContainer))
{
uIContextMenu5.AddButton("changeName", delegate
{
Zone
@@ -2310,6 +2310,15 @@ public void Generate()
EClass._zone.AddCard(t2, randomSurface2).Install();
}
}
num2 = 4 + EClass.rnd(5);
for (int k = 0; k < num2; k++)
{
Point randomSurface3 = EClass._map.bounds.GetRandomSurface(centered: false, walkable: true, allowWater: true);
if (!randomSurface3.HasObj && (randomSurface3.cell.IsTopWaterAndNoSnow || EClass.rnd(6) == 0))
{
EClass._zone.AddCard(ThingGen.Create("70"), randomSurface3);
}
}
}
if (EClass.rnd(8) == 0)
{
@@ -2596,8 +2605,6 @@ public Chara SpawnMob(Point pos = null, SpawnSetting setting = null)
num = ((dangerLv - 1) % 50 + 5) * 150 / 100;
}
CardRow cardRow = (setting.id.IsEmpty() ? spawnList.Select(num, setting.levelRange) : EClass.sources.cards.map[setting.id]);
Debug.Log(cardRow);
Debug.Log(cardRow.id);
int num2 = ((setting.fixedLv == -1) ? cardRow.LV : setting.fixedLv);
if (ScaleMonsterLevel)
{