EA 23.340.0 Nightly โ
August 30, 2026
41 files modified. 2 new files created.
Important Changes โ
Possible breaking changes. Click the filename to view the chunk.
DNA (2) โ
public void WriteNote(UINote n, Chara tg = null)
public void WriteNote(UINote n, Thing owner = null, Chara tg = null) public void WriteNoteExtra(UINote n, Chara tg)
public void WriteNoteExtra(UINote n, Thing owner, Chara tg) TraitGene (1) โ
public override void WriteNote(UINote n, bool identified) ABILITY โ
public const int AI_Fish = 5039;
public const int TaskTalk = 5017;
public const int TaskPick = 5018;
public const int TaskReadBoard = 5019;public const int ActCancelTask = 5033;
public const int GoalIdle = 5034;
public const int TaskTalk = 5017;
public const int TaskTame = 5016;
public const int TaskAttack = 5015;
public const int TaskPlow = 5014;
public const int ActAttack = 5013;
public const int ActThrow = 5038;
public const int ActNoItem = 5037;public const int TaskBuild = 5035;
public const int GoalIdle = 5034;
public const int ActWait = 5000;
public const int ActMelee = 5001;
public const int Melee = 5002;
public const int Ranged = 5003;
public const int ActRanged = 5040;
public const int Sleep = 5004;
public const int Ranged = 5003;
public const int Wait = 5005;
public const int Shoot = 5006;public const int AI_Goto = 5012;
public const int ActAttack = 5013;
public const int Wait = 5005;
public const int Sleep = 5004;
public const int ActTouchSleep = 6612;5050, 5049, 5048, 5047, 5046, 5045, 5044, 5043, 6011, 6012,
6013, 6015, 6610, 6607, 6606, 6605, 6604, 6603, 6602, 6601,
5042, 6600, 6450, 6420, 6410, 6400, 6050, 6020, 6019, 6018,
6500, 6611, 5041, 5039, 5018, 5019, 5020, 5021, 5022, 5023,
5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033,
5034, 5017, 5016, 5015, 5014, 5038, 5037, 5036, 5035, 5000,
5001, 5002, 5003, 5040, 5004, 5006, 5007, 5008, 5009, 5010,
5011, 5012, 5013, 5005, 6612, 6608, 6620, 6752, 6753, 6754,
6500, 6611, 5041, 5039, 5017, 5018, 5019, 5020, 5021, 5022,
5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032,
5033, 5016, 5015, 5014, 5013, 5038, 5037, 5036, 5035, 5034,
5000, 5001, 5002, 5040, 5003, 5005, 5006, 5007, 5008, 5009,
5010, 5011, 5012, 5004, 6612, 6608, 6620, 6752, 6753, 6754,
6900, 6901, 6902, 6903, 6904, 7000, 8793, 8794, 6613, 8796,
50200, 6751, 50201, 50203, 50204, 50205, 50206, 50207, 50208, 50209,
50210, 50211, 50212, 50213, 50214, 50215, 50216, 50202, 6750, 8795,AIWork โ
}
if (!sourceWork.destTrait.IsEmpty())
{
if (Application.isEditor && Type.GetType("Trait" + sourceWork.destTrait + ", Elin") == null)
Type type = Type.GetType("Trait" + sourceWork.destTrait + ", Elin");
if (type == null)
{
Debug.Log(sourceWork.destTrait + "/" + sourceWork.alias);
if (Application.isEditor)
{
Debug.Log(sourceWork.destTrait + "/" + sourceWork.alias);
}
return false;
}
if (destArea != null)
{
destThing = EClass._map.FindThing(Type.GetType("Trait" + sourceWork.destTrait + ", Elin"), destArea);
destThing = EClass._map.FindThing(type, destArea);
return destThing != null;
}
destThing = EClass._map.FindThing(Type.GetType("Trait" + sourceWork.destTrait + ", Elin"), owner);
destThing = EClass._map.FindThing(type, owner);
return destThing != null;
}
SetDestPos();AI_Haul โ
public override IEnumerable<Status> Run()
public static Thing GetThingToClean(Chara c = null)
{
_list.Clear();
foreach (Thing thing in EClass._map.things)
{
if (thing.placeState == PlaceState.roaming && !thing.isMasked && (thing.id == "731" || thing.id == "_egg" || thing.id == "egg_fertilized" || thing.id == "_milk") && thing.Dist(EClass.pc) > 1)
{
_list.Add(thing);
}
}
ListThingsToClean(_list);
if (_list.Count == 0)
{
return null;public static Thing GetThingToClean(Chara c = null)
return null;
}
public static List<Thing> ListThingsToClean(List<Thing> result)
{
result.Clear();
foreach (Thing thing in EClass._map.things)
{
if (thing.placeState != PlaceState.roaming || thing.isMasked)
{
continue;
}
switch (thing.id)
{
case "731":
case "_egg":
case "egg_fertilized":
case "_milk":
if (thing.Dist(EClass.pc) > 1)
{
result.Add(thing);
}
break;
}
}
return result;
}
public static AI_Haul TryGetAI(Chara c)
{
Thing thingToClean = GetThingToClean(c);AI_Shopping โ
public class AI_Shopping : AIAct
public Card dest;
private static Dictionary<Card, List<Card>> _saleLists = new Dictionary<Card, List<Card>>();
private static Dictionary<Card, int> _salePrices = new Dictionary<Card, int>();
private static int _saleHour = -1;
public static bool TryShop(Chara c, bool realtime)
{
if (c.memberType != FactionMemberType.Guest || !EClass._zone.IsPCFaction || EClass._map.props.sales.Count == 0)public static bool TryShop(Chara c, bool realtime)
return false;
}
bool flag = card.IsContainer && card.things.Count > 0;
List<Card> list = new List<Card>();
if (flag)
bool flag2 = !realtime && VirtualDate.IsActive;
if (flag2)
{
foreach (Thing thing in card.things)
int raw = VirtualDate.current.GetRaw();
if (raw != _saleHour)
{
if (TraitSalesTag.CanTagSale(thing, insideContainer: true))
{
list.Add(thing);
}
_saleHour = raw;
_saleLists.Clear();
_salePrices.Clear();
}
}
else
if (!flag2 || !_saleLists.TryGetValue(card, out var value))
{
list.Add(card);
value = new List<Card>();
if (flag)
{
foreach (Thing thing in card.things)
{
if (TraitSalesTag.CanTagSale(thing, insideContainer: true))
{
value.Add(thing);
}
}
}
else
{
value.Add(card);
}
if (flag2)
{
_saleLists[card] = value;
}
}
foreach (Card item in list)
foreach (Card item in value)
{
if (item.isDestroyed)
{
continue;
}
int num = 25;
int price = item.GetPrice(CurrencyType.Money, sell: true, PriceType.PlayerShop);
if (price >= c_allowance)
if (!flag2 || !_salePrices.TryGetValue(item, out var value2))
{
value2 = item.GetPrice(CurrencyType.Money, sell: true, PriceType.PlayerShop);
if (flag2)
{
_salePrices[item] = value2;
}
}
if (value2 >= c_allowance)
{
num = num * 10 * price / c_allowance;
num = num * 10 * value2 / c_allowance;
}
if (price >= 10000)
if (value2 >= 10000)
{
num *= 15;
}
else if (price >= 5000)
else if (value2 >= 5000)
{
num *= 10;
}
else if (price >= 1000)
else if (value2 >= 1000)
{
num *= 6;
}
else if (price >= 200)
else if (value2 >= 200)
{
num *= 3;
}ActEffect โ
public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Poโฆ)
case EffectId.Arrow:
case EffectId.MoonSpear:
case EffectId.MoonArrow:
case EffectId.Missile:
{
effect = Effect.Get((id == EffectId.MoonSpear || id == EffectId.MoonArrow) ? "spell_moonspear" : "spell_arrow");
if (id == EffectId.Arrow)
object id2;
switch (id)
{
default:
id2 = "spell_arrow";
break;
case EffectId.Missile:
id2 = "spell_missile";
break;
case EffectId.MoonSpear:
case EffectId.MoonArrow:
id2 = "spell_moonspear";
break;
}
effect = Effect.Get((string)id2);
if (id == EffectId.Arrow || id == EffectId.Missile)
{
effect.sr.color = elementRef.colorSprite;
}public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Poโฆ)
}
if (effect != null)
{
if (id == EffectId.Arrow || id == EffectId.MoonSpear || id == EffectId.MoonArrow)
switch (id)
{
case EffectId.Missile:
TryDelay(delegate
{
effect.Play(CC.pos);
effect.GetComponent<MissileHomingEffect>().Launch(CC.pos.PositionCenter(), p.PositionCenter());
});
break;
case EffectId.Arrow:
case EffectId.MoonSpear:
case EffectId.MoonArrow:
TryDelay(delegate
{
effect.Play(CC.pos, 0f, p);
});
}
else
{
break;
default:
TryDelay(delegate
{
effect.Play(p).Flip(p.x > center.x);
});
break;
}
if (id == EffectId.Flare)
{void AddCon<T>(int rate, int p2) where T : Condition
{
case EffectId.Earthquake:
{
List<Point> list = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
if (list.Count == 0)
List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
if (list3.Count == 0)
{
list.Add(CC.pos.Copy());
list3.Add(CC.pos.Copy());
}
CC.Say("spell_earthquake", CC, element.Name.ToLower());
TryDelay(delegatevoid AddCon<T>(int rate, int p2) where T : Condition
Shaker.ShakeCam("ball");
}
EClass.Wait(1f, CC);
DamageEle(CC, id, power, element, list, actRef, "spell_earthquake");
DamageEle(CC, id, power, element, list3, actRef, "spell_earthquake");
break;
}
case EffectId.Meteor:void AddCon<T>(int rate, int p2) where T : Condition
EffectMeteor.Create(cc.pos, 10, 10, delegate
{
});
List<Point> list5 = EClass._map.ListPointsInCircle(CC.pos, 10f);
if (list5.Count == 0)
List<Point> list10 = EClass._map.ListPointsInCircle(CC.pos, 10f);
if (list10.Count == 0)
{
list5.Add(CC.pos.Copy());
list10.Add(CC.pos.Copy());
}
CC.Say("spell_ball", CC, element.Name.ToLower());
TryDelay(delegatevoid AddCon<T>(int rate, int p2) where T : Condition
Shaker.ShakeCam("ball");
}
EClass.Wait(1f, CC);
DamageEle(CC, id, power, element, list5, actRef, "spell_ball");
DamageEle(CC, id, power, element, list10, actRef, "spell_ball");
return;
}
case EffectId.Comet:void AddCon<T>(int rate, int p2) where T : Condition
EffectMeteor.CreateComet(tp, delegate
{
}, matColor * 2f);
List<Point> list6 = EClass._map.ListPointsInCircle(tp, 7f);
if (list6.Count == 0)
List<Point> list2 = EClass._map.ListPointsInCircle(tp, 7f);
if (list2.Count == 0)
{
list6.Add(tp.Copy());
list2.Add(tp.Copy());
}
CC.Say("spell_ball", CC, element.Name.ToLower());
TryDelay(delegatevoid AddCon<T>(int rate, int p2) where T : Condition
Shaker.ShakeCam("ball");
}
EClass.Wait(1f, CC);
DamageEle(CC, id, power, element, list6, actRef, "spell_ball", tp);
DamageEle(CC, id, power, element, list2, actRef, "spell_ball", tp);
return;
}
case EffectId.Hand:void AddCon<T>(int rate, int p2) where T : Condition
case EffectId.DrainMana:
case EffectId.Sword:
{
List<Point> list7 = new List<Point>();
list7.Add(tp.Copy());
List<Point> list4 = new List<Point>();
list4.Add(tp.Copy());
EClass.Wait(0.3f, CC);
TryDelay(delegate
{
CC.PlaySound("spell_hand");
});
if (!DamageEle(CC, id, power, element, list7, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : ((id == EffectId.Sword) ? "spell_sword" : "spell_hand")))
if (!DamageEle(CC, id, power, element, list4, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : ((id == EffectId.Sword) ? "spell_sword" : "spell_hand")))
{
CC.Say("spell_hand_miss", CC, element.Name.ToLower());
}void AddCon<T>(int rate, int p2) where T : Condition
case EffectId.MoonSpear:
case EffectId.MoonArrow:
{
List<Point> list4 = new List<Point>();
list4.Add(tp.Copy());
List<Point> list = new List<Point>();
list.Add(tp.Copy());
CC.Say((id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow", CC, element.Name.ToLower());
EClass.Wait(0.5f, CC);
TryDelay(delegate
{
CC.PlaySound((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
});
DamageEle(CC, id, power, element, list4, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
DamageEle(CC, id, power, element, list, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
return;
}
case EffectId.Missile:
{
List<Point> list7 = new List<Point>();
List<Point> list8 = new List<Point> { tp.Copy() };
foreach (Point item in EClass._map.ListPointsInCircle(tp, 6f, mustBeWalkable: false))
{
if (item.Equals(tp) || !Los.IsVisible(CC.pos, item))
{
continue;
}
foreach (Card item2 in item.ListCards())
{
if ((item2.isChara && CC.IsHostile(item2.Chara)) || item2.trait.CanBeAttacked)
{
list8.Add(item);
break;
}
}
}
CC.Say("spell_missile", CC, element.Name.ToLower());
EClass.Wait(0.5f, CC);
TryDelay(delegate
{
CC.PlaySound("spell_missile");
});
for (int num9 = 0; num9 < 8 + EClass.rnd(5); num9++)
{
list7.Clear();
list7.Add(list8.RandomItem());
DamageEle(CC, id, power, element, list7, actRef, "spell_missile");
}
return;
}
case EffectId.Summon:void AddCon<T>(int rate, int p2) where T : Condition
{
if (EClass._zone.HasField(10000))
{
foreach (Chara item in EClass._map.charas.Where((Chara _c) => _c.id == "cocoon").ToList())
foreach (Chara item3 in EClass._map.charas.Where((Chara _c) => _c.id == "cocoon").ToList())
{
if (!item.pos.IsSunLit)
if (!item3.pos.IsSunLit)
{
item.pos.PlayEffect("darkwomb3");
item.HatchEgg();
item3.pos.PlayEffect("darkwomb3");
item3.HatchEgg();
}
}
}void AddCon<T>(int rate, int p2) where T : Condition
string id3 = actRef.n1;
int num3 = 1;
int num4 = -1;
int radius2 = 3;
bool flag4 = false;
bool flag5 = actRef.n1 == "special";
int radius = 3;
bool flag3 = false;
bool flag4 = actRef.n1 == "special";
int num5 = -1;
string text = "";
switch (actRef.n1)void AddCon<T>(int rate, int p2) where T : Condition
break;
case "tentacle":
num4 = 20 + EClass.rnd(10);
radius2 = 1;
radius = 1;
break;
case "special":
CC.SetInt(70, EClass.world.date.GetRaw() + 1440);void AddCon<T>(int rate, int p2) where T : Condition
break;
}
Point point = null;
point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius2)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
if (point == null || !point.IsValid)
{
continue;void AddCon<T>(int rate, int p2) where T : Condition
{
continue;
}
if (chara2.rarity >= Rarity.Legendary && !flag5)
if (chara2.rarity >= Rarity.Legendary && !flag4)
{
num6--;
continue;void AddCon<T>(int rate, int p2) where T : Condition
{
chara2.SetSummon(num4);
}
flag4 = true;
flag3 = true;
}
if (!flag4)
if (!flag3)
{
CC.Say("summon_ally_fail", CC);
}void AddCon<T>(int rate, int p2) where T : Condition
}
case EffectId.Breathe:
{
List<Point> list8 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
if (list8.Count == 0)
List<Point> list5 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
if (list5.Count == 0)
{
list8.Add(CC.pos.Copy());
list5.Add(CC.pos.Copy());
}
CC.Say("spell_breathe", CC, element.Name.ToLower());
EClass.Wait(0.8f, CC);void AddCon<T>(int rate, int p2) where T : Condition
{
Shaker.ShakeCam("breathe");
}
DamageEle(CC, id, power, element, list8, actRef, "spell_breathe");
DamageEle(CC, id, power, element, list5, actRef, "spell_breathe");
return;
}
case EffectId.Scream:
CC.PlaySound("scream");
CC.PlayEffect("scream");
{
foreach (Point item2 in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
foreach (Point item4 in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
{
foreach (Chara chara4 in item2.Charas)
foreach (Chara chara4 in item4.Charas)
{
if (chara4.ResistLv(957) <= 0)
{void AddCon<T>(int rate, int p2) where T : Condition
case EffectId.Flare:
case EffectId.GravityGun:
{
float radius = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
float radius2 = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
if ((id == EffectId.Explosive || id == EffectId.Rocket) && actRef.refThing != null)
{
radius = 2 + actRef.refThing.Evalue(666);
radius2 = 2 + actRef.refThing.Evalue(666);
}
if (id == EffectId.Suicide)
{void AddCon<T>(int rate, int p2) where T : Condition
}
if (CC.HasTag(CTAG.kamikaze))
{
radius = 1.5f;
radius2 = 1.5f;
}
}
bool flag3 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
List<Point> list2 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius, !flag3, !flag3);
if (list2.Count == 0)
bool flag5 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
List<Point> list9 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius2, !flag5, !flag5);
if (list9.Count == 0)
{
list2.Add(cc.pos.Copy());
list9.Add(cc.pos.Copy());
}
cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
EClass.Wait(0.8f, cc);void AddCon<T>(int rate, int p2) where T : Condition
{
Shaker.ShakeCam("ball");
}
DamageEle(actRef.origin ?? cc, id, power, element, list2, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
DamageEle(actRef.origin ?? cc, id, power, element, list9, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
{
CC.Die();void AddCon<T>(int rate, int p2) where T : Condition
}
case EffectId.Bolt:
{
List<Point> list3 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
if (list3.Count == 0)
List<Point> list6 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
if (list6.Count == 0)
{
list3.Add(CC.pos.Copy());
list6.Add(CC.pos.Copy());
}
CC.Say("spell_bolt", CC, element.Name.ToLower());
EClass.Wait(0.8f, CC);void AddCon<T>(int rate, int p2) where T : Condition
{
Shaker.ShakeCam("bolt");
}
DamageEle(CC, id, power, element, list3, actRef, "spell_bolt");
DamageEle(CC, id, power, element, list6, actRef, "spell_bolt");
return;
}
case EffectId.Bubble:void AddCon<T>(int rate, int p2) where T : Condition
return;
}
}
List<Card> list9 = tp.ListCards().ToList();
list9.Reverse();
if (list9.Contains(CC))
List<Card> list11 = tp.ListCards().ToList();
list11.Reverse();
if (list11.Contains(CC))
{
list9.Remove(CC);
list9.Insert(0, CC);
list11.Remove(CC);
list11.Insert(0, CC);
}
bool flag6 = true;
foreach (Card item3 in list9)
foreach (Card item5 in list11)
{
if (tc == null || item3 == tc)
if (tc == null || item5 == tc)
{
Proc(id, power, state, CC, item3, actRef);
if (flag2 && item3.isChara && item3 != CC)
Proc(id, power, state, CC, item5, actRef);
if (flag2 && item5.isChara && item5 != CC)
{
CC.DoHostileAction(item3);
CC.DoHostileAction(item5);
}
if (actRef.refThing == null || !(actRef.refThing.trait is TraitRod))
{+ActMissile โ
File Created
public class ActMissile : ActArrow
{
}Cell โ
public void RemoveCard(Card c)
{
if (detail != null)
{
detail.charas.Remove(c.Chara);
detail.charas.RemoveFromEnd(c.Chara);
}
}
else
{
if (detail != null)
{
detail.things.Remove(c.Thing);
detail.things.RemoveFromEnd(c.Thing);
}
if (c.trait.ShouldRefreshTile || c.sourceCard.multisize)
{CellDetail โ
public void MoveThingToBottom(Thing t)
{
if (things.Count != 1)
{
things.Remove(t);
things.RemoveFromEnd(t);
things.Insert(0, t);
for (int i = 0; i < things.Count && things[i].IsInstalled; i++)
{Chara โ
public SourceThing.Row GetFavFood()
}
}
string str = GetStr(72);
if (!str.IsEmpty() && EClass.sources.things.map[str] != null)
if (!str.IsEmpty() && EClass.sources.things.map.TryGetValue(str, out var value2))
{
return EClass.sources.things.map[str];
return value2;
}
if (_listFavFood.Count == 0)
{CharaAbility โ
public void Add(int id, int chance, bool pt)
owner._listAbility = new List<int>();
}
owner._listAbility.Add(id * ((!pt) ? 1 : (-1)));
if (owner.IsPC && owner.HasElement(1274))
if (owner.IsPC)
{
Element element = owner.elements.GetElement(id);
if (element == null)public void Remove(int id)
{
owner._listAbility.Remove(id);
if (owner.IsPC && owner.HasElement(1274) && owner.HasElement(id) && owner._listAbility.IndexOf(id) == -1)
if (owner.IsPC && owner.HasElement(id) && owner._listAbility.IndexOf(id) == -1)
{
Element element = EClass.pc.elements.GetElement(id);
if (!(element is Spell))CharaBody โ
public void Unequip(BodySlot slot, bool refresh = true)
thing.trait.OnUnequip(owner);
thing.c_equippedSlot = 0;
slot.thing = null;
if (thing.c_DNA != null)
{
thing.c_DNA.Apply(owner, reverse: true);
owner.feat += thing.c_DNA.cost;
}
if (EClass.core.IsGameStarted)
{
if (slot.elementId == 45 || thing.HasElement(490))
{
owner.RecalculateFOV();
}
if (refresh && owner.isCreated)
{
owner.Refresh();
if (slot.elementId == 37 && owner.HasElement(1209) && !thing.HasElement(419))
{
owner.Say("tail_free", owner);
}
}
}
if (owner.IsPC)
{
if (refresh)public void Unequip(BodySlot slot, bool refresh = true)
WidgetEquip.SetDirty();
}
LayerInventory.SetDirty(thing);
if (!EClass.core.IsGameStarted)
{
return;
}
if (slot.elementId == 45 || thing.HasElement(490))
{
owner.RecalculateFOV();
}
if (refresh && owner.isCreated)
{
owner.Refresh();
if (slot.elementId == 37 && owner.HasElement(1209) && !thing.HasElement(419))
{
owner.Say("tail_free", owner);
}
}
}
public bool IsEquippable(Thing thing, BodySlot slot, bool text = true)public bool IsEquippable(Thing thing, BodySlot slot, bool text = true)
}
return false;
}
if (thing.c_DNA != null && thing.c_DNA.cost > EClass.pc.feat)
{
if (text)
{
Msg.Say("notEnoughFeatPoint");
}
return false;
}
if (IsTooHeavyToEquip(thing))
{
if (EClass.core.IsGameStarted && owner.IsPC && text)public bool Equip(Thing thing, BodySlot slot = null, bool msg = true)
EClass.pc.faction.charaElements.OnEquip(owner, thing);
}
owner.SetTempHand();
if (thing.c_DNA != null)
{
thing.c_DNA.Apply(owner, reverse: false);
Msg.Say("equip_relic");
owner.feat -= thing.c_DNA.cost;
owner.stamina.Mod(-1 - EClass.rnd(5));
}
if (owner.IsPC)
{
if (msg)CoreConfig โ
public int screenExtraHeight;
public int maxSimHour;
public int maxSimHours;
public int maxSleepSimHours = 168;
public int maxSimBases = 3;
public bool showNumbers;CoreDebug โ
finger = 36,
leg = 38,
foot = 39,
lightsource = 45
lightsource = 45,
relic = 46
}
[Serializable]EClass.pc.elements.ModBase(61, lv / 2);
EClass.pc.elements.ModBase(79, lv / 5);
EClass.player.totalFeat = lv;
EClass.pc.feat = 1000;
EClass.pc.feat = 50;
EClass.pc.SetLv(lv - 1);
EClass.player.fame = EClass.pc.LV * 100;
int idx = 0; AddHotbar("pickaxe").ChangeMaterial(0);
break;
}
EClass.pc.body.AddBodyPart(46);
EClass.pc.body.AddBodyPart(46);
EClass.pc.body.AddBodyPart(46);
EClass.player.ModKeyItem("license_adv");
Thing thing = ThingGen.Create("backpack");
thing.AddCard(ThingGen.Create("rp_food", -1, 10).SetNum(30));}
if (Input.GetKeyDown(KeyCode.F2))
{
EClass.pc.body.AddBodyPart(35);
EClass._zone.development += 10;
EClass._zone.development *= EClass._zone.development;
Chara targetChara = EClass.scene.mouseTarget.TargetChara;
if (targetChara != null)
{
EClass.pc.Pick(targetChara.MakeMilk());
EClass.pc.Pick(targetChara.MakeEgg(effect: true, 10));
EClass.pc.Pick(targetChara.MakeGene());
TraitFoodEggFertilized.Incubate(targetChara.MakeEgg(effect: false, 1, addToZone: false, 100), targetChara.pos.GetNearestPoint(allowBlock: false, allowChara: false));
targetChara.ScaleByPrincipal();
EClass.pc.Pick(targetChara.MakeGene(DNA.Type.Superior));
}
if (EClass.game.quests.Get<QuestDebt>() == null)
{}
else
{
Input.GetKeyDown(KeyCode.F9);
if (Input.GetKeyDown(KeyCode.F9))
{
for (int num = 0; num < 8; num++)
{
EClass.world.date.AdvanceHour();
}
}
if (Input.GetKey(KeyCode.F9))
{
EClass.scene.paused = false;
for (int num = 0; num < advanceMin; num++)
for (int num2 = 0; num2 < advanceMin; num2++)
{
EClass.game.updater.FixedUpdate();
}}
else if (hitPoint.detail != null)
{
for (int num2 = hitPoint.detail.charas.Count - 1; num2 >= 0; num2--)
for (int num3 = hitPoint.detail.charas.Count - 1; num3 >= 0; num3--)
{
hitPoint.detail.charas[num2].DamageHP(999999999L, AttackSource.Finish, EClass.pc);
hitPoint.detail.charas[num3].DamageHP(999999999L, AttackSource.Finish, EClass.pc);
}
}
EInput.Consume(); }
else if (hitPoint.detail != null)
{
for (int num3 = hitPoint.detail.things.Count - 1; num3 >= 0; num3--)
for (int num4 = hitPoint.detail.things.Count - 1; num4 >= 0; num4--)
{
hitPoint.detail.things[num3].Destroy();
hitPoint.detail.things[num4].Destroy();
}
if (hitPoint.detail != null)
{
for (int num4 = hitPoint.detail.charas.Count - 1; num4 >= 0; num4--)
for (int num5 = hitPoint.detail.charas.Count - 1; num5 >= 0; num5--)
{
hitPoint.detail.charas[num4].Destroy();
hitPoint.detail.charas[num5].Destroy();
}
}
}
}
if (Input.GetKeyDown(KeyCode.End) && hitPoint.detail != null)
{
for (int num5 = hitPoint.detail.things.Count - 1; num5 >= 0; num5--)
for (int num6 = hitPoint.detail.things.Count - 1; num6 >= 0; num6--)
{
Thing thing2 = hitPoint.detail.things[num5];
Thing thing2 = hitPoint.detail.things[num6];
Debug.Log(thing2.id + "/" + thing2.Pref.height + "/" + thing2.trait?.ToString() + "/" + thing2.source.tileType.CanStack + "/" + thing2.source.tileType?.ToString() + "/" + thing2.isSynced + "/" + RenderObject.syncList.Contains(thing2.renderer));
}
}{
case DebugHotkey.Anime:
{
int num6 = -1;
int num7 = -1;
if (Input.GetKeyDown(KeyCode.Alpha0))
{
num6 = 0;
num7 = 0;
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
num6 = 1;
num7 = 1;
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
num6 = 2;
num7 = 2;
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
num6 = 3;
num7 = 3;
}
if (Input.GetKeyDown(KeyCode.Alpha4))
{
num6 = 4;
num7 = 4;
}
if (Input.GetKeyDown(KeyCode.Alpha5))
{
num6 = 5;
num7 = 5;
}
if (Input.GetKeyDown(KeyCode.Alpha6))
{
num6 = 6;
num7 = 6;
}
if (Input.GetKeyDown(KeyCode.Alpha7))
{
num6 = 7;
num7 = 7;
}
if (Input.GetKeyDown(KeyCode.Alpha8))
{
num6 = 8;
num7 = 8;
}
if (Input.GetKeyDown(KeyCode.Alpha9))
{
num6 = 9;
num7 = 9;
}
if (num6 == -1)
if (num7 == -1)
{
break;
}
foreach (Card item4 in hitPoint.ListCards())
{
item4.renderer.PlayAnime(num6.ToEnum<AnimeID>());
item4.renderer.PlayAnime(num7.ToEnum<AnimeID>());
}
Debug.Log(num6.ToEnum<AnimeID>());
Debug.Log(num7.ToEnum<AnimeID>());
break;
}
case DebugHotkey.Block:CraftUtil โ
public static Card MixIngredients(Card product, List<Thing> ings, MixType type,โฆ)
{
product.elements.ModBase(10, 6);
}
if (product.category.id == "relic")
{
foreach (Thing ing3 in ings)
{
if (ing3 != product && ing3 != null && ing3.c_DNA != null)
{
product.c_DNA = IO.DeepCopy(ing3.c_DNA).Relicize();
}
}
}
if (product.HasElement(762))
{
product.elements.ModBase(10, product.Evalue(762) / 5);DNA โ
return "gene".lang(text.ToTitleCase(), (cost == 0) ? "" : (cost.ToString() ?? ""));
}
public void WriteNote(UINote n, Chara tg = null)
public void WriteNote(UINote n, Thing owner = null, Chara tg = null)
{
if (slot >= 1)
if (slot >= 1 && (owner == null || !(owner.category.id == "relic")))
{
n.AddText("NoteText_enc", "isGeneReqSlots".lang(slot.ToString() ?? ""), FontColor.Warning);
}public void WriteNote(UINote n, Chara tg = null)
{
text2 = text2 + " (" + element.Value + ")";
}
if ((bool)LayerCraft.Instance && (element.source.category == "slot" || element.HasTag("noRelic") || element.HasTag("permaGene")))
{
color2 = FontColor.Bad;
}
n.AddText("NoteText_enc", "gene_info".lang(element.Name.ToTitleCase(wholeText: true), text2), color2);
}
}
public void WriteNoteExtra(UINote n, Chara tg)
public void WriteNoteExtra(UINote n, Thing owner, Chara tg)
{
n.AddHeader("HeaderAdditionalTrait", "gene_hint");
_ = tg.c_genes;public void WriteNoteExtra(UINote n, Chara tg)
int num2 = tg.MaxGeneSlot - tg.CurrentGeneSlot;
int num3 = num2 - num;
int maxGeneSlot = tg.MaxGeneSlot;
n.AddText("gene_hint_slot".lang(num2.ToString() ?? "", num3.ToString() ?? "", maxGeneSlot.ToString() ?? ""), (num3 >= 0) ? FontColor.Good : FontColor.Bad);
if (owner == null || !(owner.category.id == "relic"))
{
n.AddText("gene_hint_slot".lang(num2.ToString() ?? "", num3.ToString() ?? "", maxGeneSlot.ToString() ?? ""), (num3 >= 0) ? FontColor.Good : FontColor.Bad);
}
int num4 = cost * tg.GeneCostMTP / 100;
int num5 = tg.feat - num4;
n.AddText("gene_hint_cost".lang(tg.feat.ToString() ?? "", num4 + ((num4 == cost) ? "" : ("(" + cost + ")")), num5.ToString() ?? ""), (num5 >= 0) ? FontColor.Good : FontColor.Bad);public void MakeSlimeFood(Chara c)
}
cost = 0;
}
public DNA Relicize()
{
for (int i = 0; i < vals.Count; i += 2)
{
Element element = Element.Create(vals[i], vals[i + 1]);
if (element.source.category == "slot" || element.HasTag("noRelic") || element.HasTag("permaGene"))
{
vals.RemoveRange(i, 2);
}
}
cost /= 5;
return this;
}
}ELEMENT โ
public const int _void = 0;
public const int nutrition = 10;
public const int socket = 5;
public const int lv = 1;public const int d = 3;
public const int socket = 5;
public const int nutrition = 10;
public const int weight = 11; public const int fire = 21;
public const int poison = 20;
public const int cut = 22;
public const int race = 29;
public const int old_detox = 23;
public const int cure = 26;
public const int old_heal = 24;
public const int old_antidote = 25;
public const int piety = 85;
public const int cure = 26;
public const int old_detox = 23;
public const int race = 29;
public const int cut = 22;
public const int piety = 85;
public const int old_heal = 24;
public const int poison = 20;
public static readonly int[] IDS = new int[38]
{
750, 751, 752, 753, 755, 756, 759, 760, 761, 762,
763, 765, 766, 754, 770, 0, 10, 1, 2, 3,
5, 11, 12, 13, 14, 15, 17, 18, 16, 21,
20, 29, 26, 25, 85, 23, 22, 24
763, 765, 766, 754, 770, 0, 5, 1, 2, 3,
10, 11, 12, 13, 14, 15, 17, 18, 16, 21,
22, 23, 24, 25, 26, 29, 85, 20
};
}
public class Element : EClassENC โ
public class ENC
{
public const int absorbHP = 660;
public const int onlyPet = 655;
public const int noDamage = 654;
public const int living = 653;
public const int eco = 652;
public const int r_PV = 651;
public const int r_DV = 650;
public const int r_mana = 641;
public const int living = 653;
public const int noDamage = 654;
public const int onlyPet = 655;
public const int r_DV = 650;
public const int permaCurse = 656;
public const int absorbMP = 661;
public const int r_life = 640;
public const int absorbHP = 660;
public const int convertCold = 851;
public const int absorbSP = 662;
public const int eheluck = 663;
public const int boostMachine = 664;public const int convertFire = 850;
public const int r_life = 640;
public const int mod_frustration = 624;
public const int convertHoly = 864;
public const int convertImpact = 865;
public const int convertLightning = 852;
public const int absorbSP = 662;
public const int absorbMP = 661;
public const int mod_frustration = 624;
public const int mod_feint = 623;
public const int convertImpact = 865;
public const int convertHoly = 864;
public const int mod_cleave = 622;
public const int mod_flurry = 621;
public const int negateFear = 423;
public const int negateSleep = 424;public const int sanctified = 432;
public const int defense_range = 435;
public const int negateParalysis = 422;
public const int negateFear = 423;
public const int defense_range = 435;
public const int guts = 436;
public const int parry = 437;
public const int knightly = 438;public const int sustain_MAG = 446;
public const int sustain_CHA = 447;
public const int parry = 437;
public const int guts = 436;
public const int negateParalysis = 422;
public const int sustain_CHA = 447;
public const int negateBlind = 421;
public const int negatePoison = 420;
public const int encTail = 419;
public const int mod_feint = 623;
public const int mod_cleave = 622;
public const int counter = 380;
public const int basher = 381;
public const int rusher = 382;
public const int redirect_blaser = 383;public const int slowDecay = 405;
public const int resMutation = 406;
public const int negatePoison = 420;
public const int travelSpeed = 407;
public const int resMutation = 406;
public const int resWeather = 408;public const int innocence = 418;
public const int encTail = 419;
public const int travelSpeed = 407;
public const int sustain_figure = 450;
public const int bane_dragon = 460;
public const int rusher = 382;
public const int bane_fairy = 462;
public const int basher = 381;
public const int mod_ammo_recover = 604;
public const int bane_undead = 461;
public const int mod_chaser = 620;
public const int mod_ammo_knockback = 603;
public const int mod_talisman = 609;public const int mod_scatter = 607;
public const int bane_undead = 461;
public const int bane_dragon = 460;
public const int mod_drill = 606;
public const int mod_precision = 605;
public const int music_drunk = 489;
public const int farsee = 490;
public const int negateGravity = 491;
public const int shiawaseStep = 492;
public const int freemove = 493;public const int mod_rapid = 602;
public const int mod_ammo_knockback = 603;
public const int negateGravity = 491;
public const int shiawaseStep = 492;
public const int deathagony = 488;
public const int music_drunk = 489;
public const int mod_ammo_recover = 604;
public const int mod_precision = 605;
public const int safetyMeasure = 486;
public const int creativeChef = 487;
public const int bane_fairy = 462;
public const int bane_animal = 463;public const int bane_god = 466;
public const int bane_fish = 467;
public const int mod_chaser = 620;
public const int mod_flurry = 621;
public const int bane_fish = 467;
public const int bane_all = 468;public const int revealFaith = 481;
public const int force_weapon = 482;
public const int creativeChef = 487;
public const int deathagony = 488;
public const int force_weapon = 482;
public const int optimizeMana = 483; public const int nonLethal = 485;
public const int safetyMeasure = 486;
public static readonly int[] IDS = new int[112]
{
660, 652, 651, 650, 641, 653, 654, 655, 656, 661,
851, 663, 664, 665, 666, 667, 850, 640, 864, 852,
662, 624, 865, 622, 424, 425, 426, 427, 428, 429,
430, 431, 432, 435, 423, 436, 438, 439, 440, 441,
442, 443, 444, 445, 446, 447, 437, 422, 421, 420,
623, 380, 381, 383, 400, 401, 402, 403, 404, 405,
406, 407, 408, 409, 410, 411, 412, 414, 415, 416,
417, 418, 419, 450, 460, 382, 462, 604, 620, 609,
608, 607, 461, 606, 490, 491, 493, 494, 495, 600,
601, 602, 603, 492, 489, 605, 487, 463, 464, 465,
466, 467, 621, 468, 480, 481, 482, 488, 483, 484,
485, 486
655, 654, 653, 652, 651, 641, 650, 656, 640, 660,
851, 662, 663, 664, 665, 666, 667, 850, 624, 865,
852, 661, 623, 864, 621, 423, 424, 425, 426, 427,
428, 429, 430, 431, 432, 422, 435, 437, 438, 439,
440, 441, 442, 443, 444, 445, 446, 436, 447, 421,
419, 622, 380, 382, 383, 400, 401, 402, 403, 404,
405, 420, 406, 408, 409, 410, 411, 412, 414, 415,
416, 417, 418, 407, 450, 381, 461, 603, 609, 608,
607, 460, 606, 605, 489, 490, 492, 493, 494, 495,
600, 601, 602, 491, 488, 604, 486, 462, 463, 464,
465, 466, 620, 467, 468, 480, 481, 487, 482, 483,
484, 485
};
}EffectId โ
MassFear = 319,
Fuse = 320,
BlueDrag = 321,
Comet = 322
Comet = 322,
Missile = 323
}Expedition โ
using Newtonsoft.Json;
using UnityEngine;
public class Expedition : EClass
{public void End()
{
branch.expeditions.dict.Remove(uidChara);
Chara chara = this.chara;
if (chara?.homeZone == null)
{
Debug.Log("Expedition.End: chara " + uidChara + " no longer exists, dropping");
return;
}
chara.MoveZone(chara.homeZone);
WidgetPopText.Say("expeditionEnd".lang(chara.Name, strType));
branch.Log("bExpeditionEnd", chara, strType);
if (chara.IsInActiveZone)
WidgetPopText.Say("expeditionEnd".lang(this.chara.Name, strType));
branch.Log("bExpeditionEnd", this.chara, strType);
if (this.chara.IsInActiveZone)
{
Msg.Say("bExpeditionEnd", chara, strType);
Msg.Say("bExpeditionEnd", this.chara, strType);
}
switch (type)
{ WidgetPopText.Say("discoverZone".lang(item.Name), FontColor.Great);
}
}
Zone zone = EClass.world.region.CreateRandomSite(chara.homeZone);
Zone zone = EClass.world.region.CreateRandomSite(this.chara.homeZone);
if (zone != null)
{
zone.isKnown = true; break;
}
case ExpeditionType.Explore:
chara.GetWorkSummary().progress = 100;
this.chara.GetWorkSummary().progress = 100;
break;
}
}FACTION โ
public class FACTION
{
public const int bfGum = 3803;
public const int actBuildAnywhere = 4003;
public const int bfIce = 3804;
public const int bfSilica = 3802;
public const int actBuildTerrain = 4002;
public const int bfGum = 3803;
public const int actBuildMine = 4001;
public const int actBuildCut = 4000;
public const int bfStart = 3900;
public const int bfSilica = 3802;
public const int bfChitin = 3805;
public const int bfMushroom = 3801;
public const int bfIce = 3804;
public const int fFood = 2204;
public const int fSafety = 2205;
public const int fAttraction = 2206;
public const int bfMushroom = 3801;
public const int bfCoal = 3800;
public const int fMoral = 2203;public const int fRation = 2207;
public const int bfCoal = 3800;
public const int bfLandmark5 = 3784;
public const int fAttraction = 2206;
public const int fSafety = 2205;
public const int bfLandmark4 = 3783;
public const int bfLandmark3 = 3782;
public const int bfLandmark5 = 3784;
public const int bfLandmark4 = 3783;
public const int bfFish = 3706; public const int actBuildInspect = 4006;
public const int bfLandmark3 = 3782;
public const int actBuildRecipe = 4005;
public const int actBuildCollect = 4004;
public const int actBuildAnywhere = 4003;
public const int bfFreshAir = 3708;
public const int bfBasin = 3709;
public const int bfBreed = 3710;
public const int bfLandmark1 = 3780;
public const int bfForest = 3601;
public const int bfLandmark2 = 3781;
public const int bfLandmark1 = 3780;
public static readonly int[] IDS = new int[53]
{
3803, 4003, 3804, 4002, 4001, 4000, 3900, 3802, 3805, 2204,
2205, 3801, 2203, 2202, 2201, 2200, 2120, 2119, 2118, 2117,
2116, 2115, 2003, 2207, 3800, 2206, 3783, 3784, 3706, 3705,
3802, 4002, 3803, 4001, 4000, 3900, 3805, 3801, 3804, 2204,
2206, 3800, 2203, 2202, 2201, 2200, 2120, 2119, 2118, 2117,
2116, 2115, 2003, 2207, 3784, 2205, 3782, 3783, 3706, 3705,
3704, 3707, 3703, 3702, 3701, 3606, 3605, 3604, 3603, 3602,
3700, 3600, 3500, 4006, 3782, 4005, 4004, 3708, 3709, 3710,
3780, 3601, 3781
3700, 3600, 3500, 4006, 4005, 4004, 4003, 3708, 3709, 3710,
3601, 3781, 3780
};
}
public class Faction : EClassFEAT โ
public class FEAT
{
public const int featSTR = 1620;
public const int featDEX = 1621;
public const int featEND = 1622;
public const int featPER = 1623;
public const int featLER = 1624;
public const int featLuck = 1628;
public const int featSPD = 1629;
public const int featMAG = 1625;
public const int featWIL = 1626;
public const int featCHA = 1627;
public const int featLuck = 1628;
public const int featSTR = 1620;
public const int featHardy = 1630;
public const int featStamina = 1612;
public const int featMAG = 1625;
public const int featSPD = 1629;
public const int featStamina = 1612;
public const int featLER = 1624;
public const int featManaMeat = 1421;
public const int featMana = 1611;
public const int featLife = 1610;
public const int featExecutioner = 1420;
public const int featDeviant = 1431;public const int featHealer = 1422;
public const int featDefense = 1631;
public const int featManaMeat = 1421;
public const int featExecutioner = 1420;
public const int featHardy = 1630;
public const int featMilitant = 1419;
public const int featMana = 1611;
public const int featSwordsage = 1418;
public const int featEvade = 1632;
public const int featLife = 1610;
public const int featRapidMagic = 1648;
public const int featDefense = 1631;
public const int featNegotiate = 1634;
public const int featSummoner = 1647;
public const int featSwordsage = 1418;
public const int featSpotting = 1633;
public const int featWitch = 1417;
public const int featComat = 1750;public const int featHeavyCasting = 1654;
public const int featSpotting = 1633;
public const int featDreamWaker = 1653;
public const int featRapidArrow = 1652;
public const int featMagicManner = 1651;
public const int featGourmet = 1650;
public const int featDefender = 1649;
public const int featSummoner = 1647;
public const int featRapidMagic = 1648;
public const int featLonelySoul = 1646;public const int featMartial = 1635;
public const int featRapidArrow = 1652;
public const int featNegotiate = 1634;
public const int featWitch = 1417;
public const int featEvade = 1632;
public const int featGod_luck1 = 1330;
public const int featInquisitor = 1416;
public const int featFoxMaid = 1415;
public const int featGod_harvest1 = 1325;
public const int featWhiteVixen = 1414;
public const int featHeavyEater = 1234;
public const int featLightEater = 1235;public const int featLibra = 1247;
public const int featMiscreation = 1248;
public const int featCosmicHorror = 1233;
public const int featHeavyEater = 1234;
public const int featMiscreation = 1248;
public const int featBloodBond = 1249;
public const int featVampire = 1250;
public const int featAshborn = 1251;public const int featSplitWater = 1254;
public const int featInquisitor = 1416;
public const int featFoxMaid = 1415;
public const int featBadKarma = 1271;public const int featGoddess = 1290;
public const int featSadCreature = 1291;
public const int featVampire = 1250;
public const int featBloodBond = 1249;
public const int featCosmicHorror = 1233;
public const int featSadCreature = 1291;
public const int featBaby = 1232;
public const int featNirvana = 1231;
public const int featAdam = 1230;
public const int featSlowFood = 1200;public const int featElea = 1213;
public const int featManaPrecision = 1214;
public const int featNirvana = 1231;
public const int featDwarf = 1215;
public const int featManaPrecision = 1214;
public const int featSuccubus = 1216;
public const int featAdam = 1230;
public const int featGolem = 1217;
public const int featLittleOne = 1229;
public const int featMetal = 1218;
public const int featDemigod = 1228;
public const int featElderCrab = 1219;
public const int featServant = 1227;
public const int featFate = 1220;
public const int featUnderground = 1226;
public const int featSpike = 1221;
public const int featLoyal = 1225;
public const int featSplit = 1222;
public const int featGod = 1292;
public const int featAcidBody = 1223;
public const int featShiva = 1224;
public const int featSplit = 1222;
public const int featSpike = 1221;
public const int featLoyal = 1225;
public const int featFate = 1220;
public const int featUnderground = 1226;
public const int featElderCrab = 1219;
public const int featServant = 1227;
public const int featMetal = 1218;
public const int featDemigod = 1228;
public const int featGolem = 1217;
public const int featLittleOne = 1229;
public const int featAcidBody = 1223;
public const int featDwarf = 1215;
public const int featSevenPillars = 1293;
public const int featGod = 1292;
public const int featGoodKarma = 1270;
public const int featGod_element1 = 1300;
public const int featLuckyCat = 1412;
public const int featDiva = 1294;
public const int featEarthStrength = 1411;public const int featWizard = 1402;
public const int featFairysan = 1413;
public const int featThief = 1401;
public const int featLuckyCat = 1412;
public const int featWarrior = 1400;
public const int featGod_strife1 = 1355;public const int featGod_harmony1 = 1335;
public const int featGod_harvest1 = 1325;
public const int featGod_luck1 = 1330;
public const int featGod_healing1 = 1320; public const int featGod_earth1 = 1305;
public const int featDiva = 1294;
public const int featGod_element1 = 1300;
public const int featWhiteVixen = 1414;
public const int featSevenPillars = 1293;
public const int featFairysan = 1413;
public static readonly int[] IDS = new int[158]
{
1621, 1622, 1623, 1624, 1629, 1626, 1627, 1628, 1620, 1630,
1625, 1612, 1421, 1610, 1431, 1430, 1429, 1428, 1427, 1426,
1425, 1424, 1423, 1422, 1631, 1420, 1419, 1611, 1632, 1648,
1634, 1418, 1750, 1664, 1663, 1662, 1661, 1660, 1659, 1658,
1657, 1656, 1655, 1654, 1633, 1653, 1651, 1650, 1649, 1647,
1646, 1645, 1644, 1643, 1642, 1641, 1640, 1636, 1635, 1652,
1417, 1330, 1415, 1235, 1236, 1237, 1238, 1239, 1240, 1241,
1242, 1243, 1244, 1245, 1246, 1247, 1248, 1234, 1249, 1251,
1252, 1253, 1254, 1416, 1271, 1272, 1273, 1274, 1275, 1276,
1277, 1290, 1291, 1250, 1233, 1232, 1231, 1200, 1201, 1202,
1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212,
1213, 1214, 1215, 1216, 1230, 1229, 1228, 1227, 1226, 1225,
1292, 1224, 1222, 1221, 1220, 1219, 1218, 1217, 1223, 1293,
1270, 1300, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405,
1404, 1403, 1402, 1413, 1401, 1400, 1355, 1350, 1345, 1340,
1335, 1325, 1320, 1315, 1310, 1305, 1294, 1414
1620, 1621, 1622, 1623, 1628, 1625, 1626, 1627, 1612, 1629,
1624, 1611, 1420, 1431, 1430, 1429, 1428, 1427, 1426, 1425,
1424, 1423, 1422, 1421, 1630, 1419, 1418, 1610, 1631, 1647,
1633, 1417, 1750, 1664, 1663, 1662, 1661, 1660, 1659, 1658,
1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648,
1646, 1645, 1644, 1643, 1642, 1641, 1640, 1636, 1635, 1634,
1632, 1416, 1325, 1414, 1234, 1235, 1236, 1237, 1238, 1239,
1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1233, 1248,
1250, 1251, 1252, 1253, 1254, 1415, 1271, 1272, 1273, 1274,
1275, 1276, 1277, 1290, 1249, 1291, 1232, 1230, 1200, 1201,
1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211,
1212, 1213, 1231, 1214, 1216, 1217, 1218, 1219, 1220, 1221,
1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1215, 1292,
1270, 1294, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404,
1403, 1402, 1401, 1412, 1400, 1355, 1350, 1345, 1340, 1335,
1330, 1320, 1315, 1310, 1305, 1300, 1293, 1413
};
}
public class Feat : ElementFactionBranch โ
public void OnSimulateHour(VirtualDate date)
for (int num8 = 0; num8 < num7; num8++)
{
Chara chara = EClass._zone.SpawnMob(null, SpawnSetting.HomeEnemy(DangerLV));
if (chara == null)
{
break;
}
if (chara.IsAnimal && policies.IsActive(2709))
{
chara.Destroy();public void OnSimulateHour(VirtualDate date)
public void AutoClean()
{
List<Thing> list = AI_Haul.ListThingsToClean(new List<Thing>());
if (list.Count == 0)
{
return;
}
Dictionary<string, Thing> dictionary = new Dictionary<string, Thing>();
HashSet<string> hashSet = new HashSet<string>();
List<Thing> list2 = new List<Thing>(1);
bool flag = false;
foreach (Thing container in EClass._map.props.installed.containers)
{
Window.SaveData windowSaveData = container.GetWindowSaveData();
if (windowSaveData != null && windowSaveData.userFilter)
{
flag = true;
break;
}
}
foreach (Chara member in members)
{
if (member.IsPCParty || !member.ExistsOnMap || member.memberType != FactionMemberType.Default) continue;
}
int num = (5 + EClass.rnd(5)) * hobby.GetEfficiency(member) / 100;
for (int i = 0; i < num; i++)
if (num <= 0)
{
Thing thingToClean = AI_Haul.GetThingToClean(member);
if (thingToClean == null)
continue;
}
Point origin = member.pos;
list.Sort((Thing a, Thing b) => origin.Distance(a.pos) - origin.Distance(b.pos));
int num2 = 0;
int num3 = 0;
int num4 = num * 10;
for (; num3 < list.Count; num3++)
{
if (num2 >= num)
{
break;
}
EClass._zone.TryAddThingInSharedContainer(thingToClean);
if (num3 >= num4)
{
break;
}
Thing thing = list[num3];
if (thing.isDestroyed || thing.placeState != PlaceState.roaming)
{
continue;
}
string text = (flag ? (thing.id + "|" + thing.IsDecayed + "|" + thing.GetName(NameStyle.Full, 1)) : (thing.id + "|" + thing.IsDecayed));
if (hashSet.Contains(text))
{
continue;
}
Thing thing2 = null;
if (dictionary.TryGetValue(text, out var value) && !value.isDestroyed)
{
list2.Clear();
list2.Add(value);
thing2 = EClass._zone.FindSharedContainer(thing, list2);
}
if (thing2 == null)
{
thing2 = EClass._zone.FindSharedContainer(thing);
if (thing2 != null)
{
dictionary[text] = thing2;
}
else
{
hashSet.Add(text);
}
}
if (thing2 != null)
{
thing2.AddThing(thing);
num2++;
}
}
list.RemoveRange(0, num3);
if (list.Count == 0)
{
break;
}
}
}public void DailyOutcome(VirtualDate date)
}
continue;
}
foreach (Hobby item in m.ListHobbies())
foreach (Hobby item in m.ListHobbies().ToList())
{
GetOutcome(item);
}
foreach (Hobby item2 in m.ListWorks())
foreach (Hobby item2 in m.ListWorks().ToList())
{
GetOutcome(item2);
}Game โ
}
}
});
if (version.nightly)
{
if (EClass.game.quests.IsCompleted<QuestIntoDarkness>() && !EClass.pc.body.HasElement(46))
{
CoreDebug.AddBodyPart(CoreDebug.BodyCode.relic);
}
}
else if (EClass.pc.body.HasElement(46))
{
CoreDebug.RemoveBodyPart(CoreDebug.BodyCode.relic);
}
if (version.IsBelow(0, 23, 336))
{
AddAdventurer("adv_schwert");GrowSystem โ
public Thing TryPopSeed(Chara c)
{
if (source.HasTag(CTAG.seed))
{
if (EClass._zone.IsUserZone && EClass.game.principal.disableUsermapBenefit)
{
return null;
}
if (EClass.player.isAutoFarming)
{
return TraitSeed.MakeSeed(cell);
}
int num = (cell.IsFarmField ? 400 : 1000);
int soilCost = EClass._zone.GetSoilCost();
int maxSoil = EClass._zone.MaxSoil;public Thing TryPopSeed(Chara c)
{
num /= 5;
}
if (EClass._zone.IsUserZone && EClass.game.principal.disableUsermapBenefit)
{
return null;
}
if (EClass.player.isAutoFarming || EClass.rnd(num) < EClass.rnd(source.chance))
if (EClass.rnd(num) < EClass.rnd(source.chance))
{
Thing thing = TraitSeed.MakeSeed(cell);
if (EClass.player.isAutoFarming)
{
return thing;
}
TryPick(cell, thing, c);
return thing;
}InvOwnerGene โ
public override void OnWriteNote(Thing t, UINote n)
{
if (ShouldShowGuide(t))
{
t.c_DNA.WriteNoteExtra(n, tg);
t.c_DNA.WriteNoteExtra(n, t, tg);
}
}
}Map โ
public void OnCardRemovedFromZone(Card t)
t.parent = null;
if (t.isChara)
{
charas.Remove(t.Chara);
charas.RemoveFromEnd(t.Chara);
}
else
{
things.Remove(t.Thing);
things.RemoveFromEnd(t.Thing);
}
}public T FindThing<T>() where T : Trait
public Thing FindThing(Type type, Chara c = null)
{
if (type == null)
{
return null;
}
_things.Clear();
foreach (Thing thing in EClass._map.props.installed.things)
{public Thing FindThing(Type type, Chara c = null)
public Thing FindThing(Type type, BaseArea area1, BaseArea area2 = null)
{
if (area1 == null && area2 == null)
if (type == null || (area1 == null && area2 == null))
{
return null;
}+MissileHomingEffect โ
File Created
using System;
using UnityEngine;
public class MissileHomingEffect : MonoBehaviour
{
[Header("Orbit")]
[SerializeField]
private float orbitRadiusMin = 2f;
[SerializeField]
private float orbitRadiusMax = 4f;
[SerializeField]
private float orbitAngleMin = 220f;
[SerializeField]
private float orbitAngleMax = 340f;
[Header("Timing")]
[SerializeField]
private float launchDelayMin;
[SerializeField]
private float launchDelayMax = 0.25f;
[SerializeField]
private bool useFixedDuration = true;
[SerializeField]
private float fixedDurationMin = 0.65f;
[SerializeField]
private float fixedDurationMax = 0.95f;
[SerializeField]
private float speed = 10f;
[Header("Rotation")]
[SerializeField]
private bool rotateToDirection = true;
[SerializeField]
private float rotationOffset;
private SpriteRenderer spriteRenderer;
private bool launched;
private bool startedMoving;
private float delayElapsed;
private float launchDelay;
private float elapsed;
private float travelDuration;
private float launchZ;
private Vector2 startPosition;
private Vector2 targetPosition;
private float startRadius;
private float peakRadius;
private float startAngle;
private float totalAngle;
private float turnSign;
public bool IsFlying => launched;
private void Awake()
{
spriteRenderer = GetComponent<SpriteRenderer>();
}
public void Launch(Vector2 from, Vector2 to)
{
launchZ = base.transform.position.z;
base.transform.position = new Vector3(from.x, from.y, launchZ);
startPosition = from;
targetPosition = to;
delayElapsed = 0f;
elapsed = 0f;
startedMoving = false;
launched = true;
launchDelay = UnityEngine.Random.Range(launchDelayMin, launchDelayMax);
if (spriteRenderer != null)
{
spriteRenderer.enabled = launchDelay <= 0f;
}
Vector2 vector = from - to;
startRadius = vector.magnitude;
if (startRadius < 0.001f)
{โฆ File
POLICY โ
public const int legendary_heirloom = 2821;
public const int prohibition = 2503;
public const int self_sufficient = 2511;
public const int license_furniture = 2819;public const int resident_tax = 2512;
public const int self_sufficient = 2511;
public const int license_general = 2820;
public const int trash_no = 2702;public const int impressment = 2504;
public const int prohibition = 2503;
public const int food_for_people = 2502;
public const int faith_tax = 2501;
public const int wealth_tax = 2500;
public const int license_general = 2820;
public const int vaccination = 2509;
public const int weed_no = 2703;public const int store_premium = 2817;
public const int store_ripoff = 2816;
public const int platinum_ticket = 2815;
public const int mass_exhibition = 2814;public const int open_business = 2810;
public const int platinum_ticket = 2815;
public const int store_ripoff = 2816;
public const int livestock_priv = 2715; public static readonly int[] IDS = new int[51]
{
2824, 2823, 2825, 2822, 2827, 2828, 2826, 2821, 2503, 2819,
2701, 2700, 2516, 2515, 2514, 2513, 2512, 2511, 2702, 2510,
2508, 2507, 2506, 2504, 2502, 2501, 2500, 2820, 2509, 2703,
2505, 2705, 2704, 2818, 2817, 2816, 2814, 2813, 2812, 2811,
2810, 2815, 2715, 2712, 2711, 2710, 2709, 2708, 2707, 2800,
2824, 2823, 2825, 2822, 2827, 2828, 2826, 2821, 2511, 2819,
2701, 2700, 2516, 2515, 2514, 2513, 2512, 2820, 2702, 2510,
2508, 2507, 2506, 2504, 2503, 2502, 2501, 2500, 2509, 2703,
2505, 2705, 2704, 2818, 2817, 2815, 2814, 2813, 2812, 2811,
2810, 2816, 2715, 2712, 2711, 2710, 2709, 2708, 2707, 2800,
2706
};
}Player โ
simulatingZone = true;
Zone currentZone = EClass.pc.currentZone;
Point point = EClass.pc.pos.Copy();
List<Zone> list = new List<Zone>();
foreach (FactionBranch child in EClass.pc.faction.GetChildren())
{
if (child.owner != currentZone)
if (child.owner != null && child.owner != currentZone && Backlog(child.owner) > 1)
{
EClass.pc.MoveZone(child.owner);
zone = child.owner;
EClass.scene.Init(Scene.Mode.Zone);
list.Add(child.owner);
}
}
list.Sort((Zone a, Zone b) => Backlog(b).CompareTo(Backlog(a)));
foreach (Zone item in list.Take(EClass.core.config.test.maxSimBases))
{
EClass.pc.MoveZone(item);
zone = item;
EClass.scene.Init(Scene.Mode.Zone);
}
EClass.pc.MoveZone(currentZone, new ZoneTransition
{
state = ZoneTransition.EnterState.Exact, zone = currentZone;
EClass.scene.Init(Scene.Mode.Zone);
simulatingZone = false;
static int Backlog(Zone z)
{
return z.HourSinceLastActive + z.pendingSimHours;
}
}
public void ExitBorder(ActPlan p = null)PolicyManager โ
{
if (item.id == id && item.active)
{
return item.Ele.Value;
return item.Ele?.Value ?? 0;
}
}
return 0;AssemblyInfo โ
using System.Security;
using System.Security.Permissions;
[assembly: AssemblyFileVersion("0.23.339.0")]
[assembly: AssemblyInformationalVersion("0.23.339.0+Nightly")]
[assembly: AssemblyMetadata("GameVersion", "0.23.339.0")]
[assembly: AssemblyMetadata("GameVersionText", "EA 23.339")]
[assembly: AssemblyMetadata("GameVersionInt", "23339")]
[assembly: AssemblyFileVersion("0.23.340.0")]
[assembly: AssemblyInformationalVersion("0.23.340.0+Nightly")]
[assembly: AssemblyMetadata("GameVersion", "0.23.340.0")]
[assembly: AssemblyMetadata("GameVersionText", "EA 23.340")]
[assembly: AssemblyMetadata("GameVersionInt", "23340")]
[assembly: AssemblyMetadata("ReleaseChannel", "Nightly")]
[assembly: AssemblyVersion("0.0.0.0")]Props โ
}
weight -= t.Num;
all.Remove(t);
things.Remove(t.Thing);
things.RemoveFromEnd(t.Thing);
cardMap.TryGetValue(t.id)?.Remove(t);
if (t.sourceCard.origin != null)
{}
if (t.IsContainer)
{
containers.Remove(t.Thing);
containers.RemoveFromEnd(t.Thing);
}
traits.OnRemoveCard(t);
if (t.isDeconstructing)SKILL โ
public const int twowield = 131;
public const int twohand = 130;
public const int shield = 123;
public const int weaponScythe = 110;
public const int armorHeavy = 122;
public const int armorLight = 120;
public const int weaponCrossbow = 109;
public const int weaponBlunt = 111;
public const int weaponCrossbow = 109;
public const int strategy = 135;
public const int weaponScythe = 110;
public const int throwing = 108;
public const int weaponDagger = 107;
public const int armorHeavy = 122;
public const int strategy = 135;
public const int weaponPolearm = 106;
public const int armorLight = 120;
public const int evasion = 150;public const int climbing = 242;
public const int weaponPolearm = 106;
public const int weaponGun = 105;
public const int evasionPlus = 151;
public const int weaponGun = 105;
public const int weaponBow = 104;
public const int STR = 70;
public const int FPV = 68;
public const int weaponStaff = 103;
public const int weaponAxe = 102;
public const int fireproof = 50;public const int life = 60;
public const int mana = 61;
public const int vigor = 62;
public const int DV = 64;public const int DMG = 67;
public const int FPV = 68;
public const int fishing = 245;
public const int STR = 70;
public const int END = 71;
public const int DEX = 72;
public const int PER = 73;
public const int LER = 74;
public const int weaponAxe = 102;
public const int weaponSword = 101;
public const int martial = 100;public const int penetration = 92;
public const int weaponBow = 104;
public const int vopal = 91;
public const int INT = 80;
public const int weaponStaff = 103;
public const int critical = 90;
public const int SPD = 79;public const int WIL = 75;
public const int critical = 90;
public const int LER = 74;
public const int INT = 80;
public const int gathering = 250;
public const int mana = 61;
public const int twohand = 130;
public const int blacksmith = 256;public const int eleHoly = 919;
public const int eleChaos = 920;
public const int eleMagic = 921;
public const int eleEther = 922;public const int resPoison = 955;
public const int resNether = 956;
public const int carpentry = 255;
public const int resImpact = 965;
public const int resDecay = 970;
public const int resDamage = 971;
public const int carpentry = 255;
public const int resCurse = 972;
public const int resCut = 964;
public const int resCat = 973;
public const int resImpact = 965;
public const int eleNether = 916;
public const int resCat = 973;
public const int resCut = 964;
public const int resEther = 962;public const int resHoly = 960;
public const int resChaos = 959;
public const int resNerve = 958;
public const int resSound = 957;
public const int resNether = 956;
public const int resAcid = 963;
public const int elePoison = 915;
public const int eleChaos = 920;
public const int resChaos = 959;
public const int eleDarkness = 913;
public const int negotiation = 291;
public const int handicraft = 261;
public const int anatomy = 290;
public const int sculpture = 258;
public const int eleMind = 914;
public const int building = 288;
public const int cooking = 287;
public const int alchemy = 257;
public const int farming = 286;
public const int lockpicking = 280;
public const int investing = 292;
public const int stealing = 281;
public const int reading = 285;
public const int lockpicking = 280;
public const int farming = 286;
public const int handicraft = 261;
public const int cooking = 287;
public const int weaving = 260;
public const int building = 288;
public const int jewelry = 259;
public const int weaving = 260;
public const int sculpture = 258;
public const int anatomy = 290;
public const int alchemy = 257;
public const int negotiation = 291;
public const int stealing = 281;
public const int investing = 292;
public const int disarmTrap = 293; public const int eleCold = 911;
public const int regeneration = 300;
public const int eleFire = 910;
public const int env = 313;
public const int regeneration = 300;
public const int fun = 312;
public const int bladder = 311;
public const int eleFire = 910;
public const int hygine = 310;
public const int memorization = 307;
public const int jewelry = 259;
public const int faith = 306;
public const int magicDevice = 305;
public const int casting = 304;
public const int controlmana = 302;
public const int manaCapacity = 303;
public const int hygine = 310;
public const int casting = 304;
public const int controlmana = 302;
public const int magicDevice = 305;
public const int memorization = 307;
public static readonly int[] IDS = new int[136]
{
134, 133, 132, 131, 130, 123, 110, 120, 111, 109,
135, 108, 107, 122, 150, 230, 152, 200, 207, 210,
220, 225, 226, 227, 235, 237, 240, 241, 242, 106,
151, 105, 70, 103, 50, 51, 55, 56, 57, 60,
62, 64, 65, 66, 67, 68, 245, 71, 72, 73,
74, 102, 101, 100, 94, 93, 92, 104, 91, 80,
79, 78, 77, 76, 75, 90, 250, 61, 256, 917,
918, 919, 921, 922, 923, 924, 925, 926, 927, 950,
951, 952, 953, 954, 955, 956, 255, 965, 970, 971,
972, 964, 916, 973, 962, 961, 960, 959, 958, 957,
963, 915, 920, 913, 291, 290, 914, 288, 287, 286,
292, 285, 280, 261, 260, 259, 258, 257, 281, 293,
289, 301, 912, 911, 300, 313, 312, 311, 910, 307,
306, 305, 304, 303, 310, 302
134, 133, 132, 131, 123, 122, 109, 111, 110, 108,
107, 135, 106, 120, 150, 230, 152, 200, 207, 210,
220, 225, 226, 227, 235, 237, 240, 241, 242, 105,
151, 104, 68, 102, 50, 51, 55, 56, 57, 60,
61, 62, 64, 65, 66, 67, 245, 70, 71, 72,
73, 101, 100, 94, 93, 92, 91, 103, 90, 79,
78, 77, 76, 75, 74, 80, 250, 130, 256, 917,
918, 919, 920, 921, 922, 923, 924, 925, 926, 927,
950, 951, 952, 953, 954, 955, 970, 971, 255, 972,
973, 965, 916, 964, 962, 961, 960, 958, 957, 956,
963, 915, 959, 913, 261, 258, 914, 257, 280, 281,
285, 286, 287, 288, 260, 290, 291, 292, 293, 289,
301, 912, 911, 910, 313, 300, 312, 311, 310, 259,
306, 302, 303, 304, 305, 307
};
}
public class Skill : ElementSLOT โ
public class SLOT
{
public const int toolbelt = 44;
public const int torso = 32;
public const int token = 43;
public const int foot = 39;
public const int tool = 40;
public const int lightsource = 45;
public const int neck = 31;
public const int arm = 34;
public const int leg = 38;
public const int toolbelt = 44;
public const int waist = 37;
public const int relic = 46;
public const int hand = 35;
public const int leg = 38;
public const int tool = 40;
public const int torso = 32;
public const int back = 33;
public const int lightsource = 45;
public const int neck = 31;
public const int waist = 37;
public const int token = 43;
public const int foot = 39;
public const int hand = 35;
public const int head = 30;
public const int finger = 36;
public const int range = 41;
public const int ammo = 42;
public const int range = 41;
public const int back = 33;
public static readonly int[] IDS = new int[16]
public static readonly int[] IDS = new int[17]
{
44, 32, 39, 45, 34, 38, 37, 35, 40, 33,
31, 43, 30, 36, 42, 41
43, 40, 31, 34, 44, 46, 38, 32, 45, 37,
39, 35, 30, 36, 41, 42, 33
};
}SPELL โ
public class SPELL
{
public const int bit_Holy = 51109;
public const int hand_Chaos = 50410;
public const int bit_Void = 51116;
public const int ball_Nerve = 50108;
public const int bolt_Nerve = 50308;
public const int hand_Nerve = 50408;public const int funnel_Nerve = 50608;
public const int ball_Poison = 50105;
public const int miasma_Nerve = 50708;
public const int weapon_Nerve = 50808;public const int bit_Nerve = 51108;
public const int flare_Nerve = 51208;
public const int bolt_Chaos = 50310;
public const int flare_Mind = 51204;
public const int puddle_Holy = 50909;
public const int sword_Holy = 51009;
public const int bit_Holy = 51109;
public const int flare_Holy = 51209;
public const int comet_Nerve = 51308;
public const int missile_Nerve = 51408;
public const int ball_Holy = 50109;
public const int comet_Mind = 51304;
public const int ball_Chaos = 50110;
public const int bolt_Holy = 50309;
public const int hand_Holy = 50409;
public const int bolt_Nerve = 50308;
public const int flare_Mind = 51204;
public const int arrow_Holy = 50509;
public const int funnel_Holy = 50609;
public const int missile_Holy = 51409;
public const int miasma_Holy = 50709;
public const int weapon_Holy = 50809;
public const int bit_Mind = 51104;
public const int sword_Mind = 51004;
public const int ball_Chaos = 50110;
public const int puddle_Mind = 50904;
public const int weapon_Mind = 50804;
public const int flare_Nerve = 51208;
public const int comet_Holy = 51309;
public const int puddle_Holy = 50909;
public const int sword_Holy = 51009;
public const int flare_Holy = 51209;
public const int bit_Poison = 51105;
public const int arrow_Holy = 50509;
public const int comet_Sound = 51307;
public const int sword_Poison = 51005;
public const int bolt_Nether = 50306;
public const int ball_Nerve = 50108;
public const int ball_Nether = 50106;
public const int sword_Nether = 51006;
public const int missile_Poison = 51405;
public const int puddle_Nether = 50906;
public const int comet_Poison = 51305;
public const int weapon_Nether = 50806;
public const int flare_Poison = 51205;
public const int miasma_Nether = 50706;
public const int sword_Poison = 51005;
public const int funnel_Nether = 50606;
public const int puddle_Poison = 50905;
public const int arrow_Nether = 50506;
public const int weapon_Poison = 50805;
public const int bit_Nether = 51106;
public const int miasma_Poison = 50705;
public const int hand_Nether = 50406;
public const int funnel_Poison = 50605;
public const int miasma_Poison = 50705;
public const int arrow_Poison = 50505;
public const int ball_Nether = 50106;
public const int hand_Poison = 50405;
public const int weapon_Poison = 50805;
public const int bolt_Poison = 50305;
public const int comet_Poison = 51305;
public const int ball_Poison = 50105;
public const int flare_Poison = 51205;
public const int missile_Mind = 51404;
public const int bit_Poison = 51105;
public const int comet_Mind = 51304;
public const int bolt_Nether = 50306;
public const int arrow_Chaos = 50510;
public const int funnel_Poison = 50605;
public const int hand_Nether = 50406;
public const int flare_Nether = 51206;
public const int arrow_Nether = 50506;
public const int comet_Nether = 51306;
public const int funnel_Nether = 50606;
public const int comet_Sound = 51307;
public const int miasma_Nether = 50706;
public const int flare_Sound = 51207;public const int sword_Sound = 51007;
public const int bolt_Poison = 50305;
public const int puddle_Sound = 50907;
public const int weapon_Sound = 50807;public const int arrow_Sound = 50507;
public const int hand_Poison = 50405;
public const int missile_Sound = 51407;
public const int hand_Sound = 50407;
public const int bolt_Sound = 50307;
public const int ball_Sound = 50107;
public const int arrow_Poison = 50505;
public const int missile_Nether = 51406;
public const int ball_Sound = 50107;
public const int comet_Nether = 51306;
public const int puddle_Poison = 50905;
public const int flare_Nether = 51206;
public const int bolt_Chaos = 50310;
public const int bit_Nether = 51106;
public const int puddle_Ether = 50912;
public const int sword_Nether = 51006;
public const int arrow_Chaos = 50510;
public const int puddle_Nether = 50906;
public const int weapon_Nether = 50806;
public const int bolt_Sound = 50307;
public const int funnel_Chaos = 50610;
public const int puddle_Void = 50916;
public const int weapon_Chaos = 50810;
public const int bolt_Impact = 50315;
public const int ball_Impact = 50115;
public const int missile_Cut = 51414;
public const int comet_Cut = 51314;
public const int flare_Cut = 51214;public const int puddle_Cut = 50914;
public const int hand_Impact = 50415;
public const int weapon_Cut = 50814;
public const int miasma_Cut = 50714;
public const int funnel_Cut = 50614;
public const int arrow_Cut = 50514;public const int ball_Cut = 50114;
public const int comet_Acid = 51313;
public const int missile_Acid = 51413;
public const int flare_Acid = 51213;
public const int miasma_Cut = 50714;
public const int comet_Acid = 51313;
public const int bit_Acid = 51113;
public const int hand_Impact = 50415;
public const int arrow_Impact = 50515;
public const int funnel_Impact = 50615;
public const int miasma_Impact = 50715;
public const int miasma_Mind = 50704;
public const int flare_Void = 51216;
public const int bit_Void = 51116;
public const int sword_Void = 51016;
public const int puddle_Void = 50916;
public const int bit_Mind = 51104;
public const int weapon_Void = 50816;public const int arrow_Void = 50516;
public const int funnel_Impact = 50615;
public const int flare_Acid = 51213;
public const int hand_Void = 50416;
public const int ball_Void = 50116;
public const int missile_Impact = 51415;
public const int comet_Impact = 51315;
public const int flare_Impact = 51215;public const int bolt_Void = 50316;
public const int sword_Acid = 51013;
public const int miasma_Chaos = 50710;
public const int bit_Acid = 51113;
public const int puddle_Acid = 50913;
public const int weapon_Acid = 50813;
public const int flare_Magic = 51211;
public const int bit_Magic = 51111;
public const int sword_Magic = 51011;
public const int puddle_Magic = 50911;public const int bolt_Magic = 50311;
public const int sword_Magic = 51011;
public const int ball_Magic = 50111;
public const int missile_Chaos = 51410;
public const int comet_Chaos = 51310;
public const int flare_Chaos = 51210;
public const int bit_Chaos = 51110;public const int puddle_Chaos = 50910;
public const int weapon_Chaos = 50810;
public const int miasma_Chaos = 50710;
public const int funnel_Chaos = 50610;
public const int comet_Magic = 51311;
public const int comet_Chaos = 51310;
public const int missile_Magic = 51411;
public const int bit_Magic = 51111;
public const int ball_Ether = 50112;
public const int flare_Magic = 51211;
public const int bolt_Ether = 50312;
public const int comet_Magic = 51311;
public const int weapon_Acid = 50813;
public const int miasma_Acid = 50713;public const int ball_Acid = 50113;
public const int comet_Ether = 51312;
public const int missile_Ether = 51412;
public const int flare_Ether = 51212;
public const int sword_Acid = 51013;
public const int comet_Ether = 51312;
public const int bit_Ether = 51112;
public const int sword_Ether = 51012;
public const int puddle_Ether = 50912;
public const int weapon_Ether = 50812;
public const int miasma_Ether = 50712;public const int hand_Ether = 50412;
public const int bolt_Ether = 50312;
public const int flare_Ether = 51212;
public const int ball_Ether = 50112;
public const int sword_Mind = 51004;
public const int hand_Chaos = 50410;
public const int SpSummonPawn = 9005;
public const int funnel_Mind = 50604;
public const int weapon_Mind = 50804;
public const int SpDarkness = 8800;
public const int SpRebirth = 8550;
public const int hand_Mind = 50404;
public const int SpSpeedUp = 8510;
public const int SpBreath = 8507;
public const int SpResEle = 8506;public const int SpVanishHex = 8491;
public const int SpBreath = 8507;
public const int SpRemoveHex = 8490;
public const int SpCureMutation = 8480;
public const int SpRestoreMind = 8471;
public const int SpRestoreBody = 8470;public const int SpHealJure = 8406;
public const int SpHealOdina = 8405;
public const int SpBrightnessOfLife = 8555;
public const int SpHealEris = 8404;
public const int SpSilence = 8700;
public const int SpCureMutation = 8480;
public const int SpWeakness = 8702;
public const int SpSpeedUp = 8510;
public const int SpWeakResEle = 8704;
public const int SpRebirth = 8550;
public const int SpSummonUndeadSister = 9001;
public const int SpBrightnessOfLife = 8555;
public const int SpSummon = 9000;
public const int SpWeb = 8801;
public const int SpDarkness = 8800;
public const int SpTransmuteCat = 8792;public const int SpIncognito = 8780;
public const int SpSeeInvisible = 8776;
public const int SpHealOdina = 8405;
public const int SpInvisibility = 8775;
public const int SpSeeInvisible = 8776;
public const int SpTelepathy = 8770;public const int SpNightmare = 8705;
public const int SpWeakResEle = 8704;
public const int SpWeakness = 8702;
public const int SpInvisibility = 8775;
public const int SpSilence = 8700;
public const int SpHealEris = 8404;
public const int SpHeal = 8403;
public const int SpWeb = 8801;
public const int SpHealCritical = 8402;
public const int SpHealLight = 8400;
public const int SpTelekinesis = 8215;
public const int SpGate = 8202;public const int puddle_ = 7800;
public const int missile_ = 7012;
public const int comet_ = 7011;
public const int flare_ = 7010;
public const int bit_ = 7009;
public const int SpReturn = 8220;
public const int SpTelekinesis = 8215;
public const int bit_ = 7009;
public const int sword_ = 7008;
public const int weapon_ = 7007;
public const int miasma_ = 7006;public const int ball_ = 7001;
public const int flare_Void = 51216;
public const int comet_Void = 51316;
public const int weapon_ = 7007;
public const int sword_ = 7008;
public const int SpReturn = 8220;
public const int SpSummonFire = 9002;
public const int SpEvac = 8221;
public const int SpIdentify = 8230;
public const int SpIdentifyG = 8232;
public const int SpHealHeavy = 8401;
public const int SpHealLight = 8400;
public const int SpWish = 8390;public const int SpChangeMaterial = 8285;
public const int SpChangeMaterialLesser = 8284;
public const int SpIdentify = 8230;
public const int SpFaith = 8281;
public const int SpChangeMaterialLesser = 8284;
public const int SpLighten = 8280;public const int SpUncurse = 8240;
public const int SpIdentifyG = 8232;
public const int SpFaith = 8281;
public const int SpHealHeavy = 8401;
public const int puddle_Mind = 50904;
public const int SpSummon = 9000;
public const int SpSummonTentacle = 9003;
public const int SpSummonUndeadSister = 9001;
public const int SpSummonYeek = 9006;
public const int SpSummonFire = 9002;
public const int bit_Lightning = 51102;
public const int sword_Lightning = 51002;
public const int puddle_Lightning = 50902;
public const int weapon_Lightning = 50802;
public const int miasma_Lightning = 50702;
public const int funnel_Lightning = 50602;public const int ball_Lightning = 50102;
public const int missile_Cold = 51401;
public const int comet_Cold = 51301;
public const int flare_Cold = 51201;
public const int miasma_Lightning = 50702;
public const int bit_Cold = 51101;
public const int sword_Cold = 51001;
public const int puddle_Cold = 50901;
public const int weapon_Cold = 50801;
public const int miasma_Cold = 50701;
public const int funnel_Cold = 50601;
public const int flare_Lightning = 51202;
public const int arrow_Cold = 50501;
public const int comet_Lightning = 51302;
public const int hand_Cold = 50401;
public const int missile_Lightning = 51402;
public const int bolt_Cold = 50301;
public const int ball_Darkness = 50103;
public const int sword_Cold = 51001;
public const int miasma_Mind = 50704;
public const int weapon_Lightning = 50802;
public const int funnel_Mind = 50604;
public const int puddle_Lightning = 50902;
public const int arrow_Mind = 50504;
public const int sword_Lightning = 51002;
public const int hand_Mind = 50404;
public const int bolt_Mind = 50304;
public const int ball_Mind = 50104;
public const int missile_Darkness = 51403;
public const int comet_Darkness = 51303;
public const int flare_Darkness = 51203;
public const int miasma_Cold = 50701;
public const int bit_Darkness = 51103;
public const int flare_Darkness = 51203;
public const int sword_Darkness = 51003;public const int bolt_Darkness = 50303;
public const int ball_Darkness = 50103;
public const int bit_Darkness = 51103;
public const int comet_Lightning = 51302;
public const int funnel_Cold = 50601;
public const int flare_Lightning = 51202;
public const int arrow_Cold = 50501;
public const int bit_Lightning = 51102;
public const int hand_Cold = 50401;
public const int ball_Cold = 50101;
public const int SpStripBlessing = 9210;
public const int comet_Fire = 51300;
public const int SpShutterHex = 9200;
public const int flare_Fire = 51200;
public const int SpExterminate = 9160;
public const int bit_Fire = 51100;
public const int SpMoonArrow = 9156;
public const int SpMoonSpear = 9155;
public const int SpEarthquake = 9151;public const int SpSummonImotoroid = 9056;
public const int SpSummonUndead = 9055;
public const int SpWardMonster = 9500;
public const int SpSummonDragon = 9054;
public const int SpSummonUndead = 9055;
public const int SpSummonMachine = 9053;public const int SpSummonOrc = 9007;
public const int SpSummonYeek = 9006;
public const int SpSummonPawn = 9005;
public const int SpSummonDragon = 9054;
public const int SpSummonMonster = 9004;
public const int SpSummonTentacle = 9003;
public const int SpDrawMonster = 9501;
public const int SpMoonSpear = 9155;
public const int SpDrawBacker = 9503;
public const int arrow_Mind = 50504;
public const int bolt_Cold = 50301;
public const int SpMoonArrow = 9156;
public const int ball_Cold = 50101;
public const int SpShutterHex = 9200;
public const int missile_Fire = 51400;
public const int comet_Fire = 51300;
public const int flare_Fire = 51200;
public const int bit_Fire = 51100;
public const int sword_Fire = 51000;
public const int puddle_Fire = 50900;
public const int weapon_Fire = 50800;
public const int SpDrawMetal = 9502;
public const int miasma_Fire = 50700;
public const int weapon_Fire = 50800;
public const int funnel_Fire = 50600; public const int FieldSpider = 10000;
public const int SpDrawBacker = 9503;
public const int SpDrawMetal = 9502;
public const int SpDrawMonster = 9501;
public const int SpWardMonster = 9500;
public const int SpStripBlessing = 9210;
public const int SpExterminate = 9160;
public const int miasma_Fire = 50700;
public const int comet_Void = 51316;
public const int missile_Void = 51416;
public static readonly int[] IDS = new int[315]
public static readonly int[] IDS = new int[333]
{
51109, 51116, 50408, 50508, 50608, 50105, 50708, 50808, 50908, 51008,
51108, 51208, 51308, 50109, 51304, 50309, 50409, 50308, 51204, 50609,
50709, 50809, 51104, 51004, 50110, 50904, 50804, 51309, 50909, 51009,
51209, 50509, 51005, 50108, 51006, 50906, 50806, 50706, 50606, 50506,
51106, 50406, 50705, 50106, 50805, 51305, 51205, 51105, 50306, 50605,
51206, 51306, 51307, 51207, 51107, 51007, 50305, 50907, 50807, 50707,
50607, 50507, 50405, 50407, 50307, 50505, 50107, 50905, 50310, 50912,
50510, 50315, 50115, 51314, 51214, 51114, 51014, 50914, 50415, 50814,
50614, 50514, 50414, 50314, 50114, 51313, 51213, 50714, 51113, 50515,
50715, 50704, 51016, 50916, 50816, 50716, 50616, 50516, 50615, 50416,
50116, 51315, 51215, 51115, 51015, 50915, 50815, 50316, 51013, 50913,
50813, 50911, 50811, 50711, 50611, 50511, 50411, 50311, 51011, 50111,
51210, 51110, 51010, 50910, 50810, 50710, 50610, 51310, 51111, 51211,
51311, 50713, 50613, 50513, 50413, 50313, 50113, 51312, 51212, 51112,
51012, 50812, 50712, 50612, 50512, 50412, 50312, 50112, 50410, 50604,
8800, 50404, 8506, 8504, 8503, 8502, 8501, 8500, 8491, 8507,
8490, 8471, 8470, 8450, 8430, 8406, 8405, 8404, 8480, 8510,
8550, 8555, 8792, 8791, 8790, 8780, 8776, 8775, 8770, 8721,
8720, 8710, 8708, 8707, 8706, 8705, 8704, 8702, 8700, 8403,
8801, 8402, 8400, 8202, 8201, 8200, 7800, 7011, 7010, 7009,
8215, 7008, 7006, 7005, 7004, 7003, 7002, 7001, 51216, 7007,
8220, 8221, 8230, 8390, 8380, 8300, 8288, 8286, 8285, 8284,
8281, 8280, 8260, 8256, 8255, 8251, 8250, 8241, 8240, 8232,
8401, 9000, 9001, 9002, 50602, 50502, 50402, 50302, 50102, 51301,
51201, 50702, 51101, 50901, 50801, 50701, 50601, 50501, 50401, 50301,
51001, 50802, 50902, 51002, 50304, 50104, 51303, 51203, 51103, 51003,
50903, 50803, 50703, 50603, 50503, 50403, 50303, 50103, 51302, 51202,
51102, 50101, 51300, 51200, 51100, 9151, 9150, 9056, 9055, 9054,
9053, 9052, 9051, 9050, 9010, 9009, 9008, 9007, 9006, 9005,
9004, 9003, 9155, 50504, 9156, 9200, 51000, 50900, 50800, 50700,
50600, 50500, 50400, 50300, 50100, 10002, 10001, 10000, 9503, 9502,
9501, 9500, 9210, 9160, 51316
50410, 50108, 50308, 50408, 50508, 50608, 50708, 50808, 50908, 51008,
51108, 50310, 51204, 50909, 51009, 51109, 51209, 51308, 51408, 50109,
50110, 50309, 50409, 50509, 50609, 51409, 50709, 50809, 51208, 51309,
51105, 51307, 50306, 50106, 51405, 51305, 51205, 51005, 50905, 50805,
50705, 50605, 50505, 50405, 50305, 50105, 51404, 51304, 50510, 50406,
50506, 50606, 50706, 51207, 51107, 51007, 50907, 50807, 50707, 50607,
50507, 51407, 50407, 50107, 51406, 51306, 51206, 51106, 51006, 50906,
50806, 50307, 50610, 50916, 50810, 50315, 50115, 51414, 51314, 51214,
51114, 51014, 50914, 50814, 50714, 50614, 50514, 50414, 50314, 50114,
51413, 51313, 50415, 50515, 50615, 50715, 51216, 51116, 51016, 51104,
50816, 50716, 50616, 50516, 51213, 50416, 50116, 51415, 51315, 51215,
51115, 51015, 50915, 50815, 50316, 50710, 51113, 50913, 51211, 51111,
51011, 50911, 50811, 50711, 50611, 50511, 50411, 50311, 50111, 51410,
51310, 51210, 51110, 51010, 50910, 51311, 51411, 50112, 50312, 50813,
50713, 50613, 50513, 50413, 50313, 50113, 51412, 51013, 51312, 51112,
51012, 50912, 50812, 50712, 50612, 50512, 50412, 51212, 51004, 9005,
50804, 8550, 8510, 8507, 8506, 8504, 8503, 8502, 8501, 8500,
8491, 8490, 8480, 8471, 8470, 8450, 8430, 8406, 8555, 8700,
8702, 8704, 9001, 9000, 8801, 8800, 8792, 8791, 8790, 8780,
8405, 8776, 8770, 8721, 8720, 8710, 8708, 8707, 8706, 8705,
8775, 8404, 8403, 8402, 8215, 8202, 8201, 8200, 7800, 7012,
7011, 7010, 8220, 7009, 7007, 7006, 7005, 7004, 7003, 7002,
7001, 51316, 7008, 9002, 8221, 8232, 8401, 8400, 8390, 8380,
8300, 8288, 8286, 8285, 8230, 8284, 8280, 8260, 8256, 8255,
8251, 8250, 8241, 8240, 8281, 50904, 9003, 9006, 51102, 51002,
50902, 50802, 50702, 50602, 50502, 50402, 50302, 50102, 51401, 51301,
51201, 51101, 51001, 50901, 50801, 51202, 51302, 51402, 50103, 50704,
50604, 50504, 50404, 50304, 50104, 51403, 51303, 50701, 51203, 51003,
50903, 50803, 50703, 50603, 50503, 50403, 50303, 51103, 50601, 50501,
50401, 9210, 9200, 9160, 9156, 9155, 9151, 9150, 9056, 9500,
9055, 9053, 9052, 9051, 9050, 9010, 9009, 9008, 9007, 9054,
9004, 9501, 9503, 50301, 50101, 51400, 51300, 51200, 51100, 51000,
50900, 9502, 50800, 50600, 50500, 50400, 50300, 50100, 10002, 10001,
10000, 50700, 51416
};
}
public class Spell : AbilitySourceElement โ
public override string GetName()
if (idMold != 0)
{
int i = 0;
if (idMold == 7011 || idMold == 7010)
if (idMold == 7011 || idMold == 7010 || idMold == 7012)
{
i = 3;
}public override void OnAfterImportData()
AddRow(ele, num + num2 + 1100, "bit_");
AddRow(ele, num + num2 + 1200, "flare_");
AddRow(ele, num + num2 + 1300, "comet_");
AddRow(ele, num + num2 + 1400, "missile_");
num2++;
}
initialized = false;SpawnList โ
if (rows.Count == 0)
{
Debug.Log("no item:" + id);
foreach (CardFilter.FilterItem tag in filter.tags)
if (filter != null)
{
Debug.Log(tag.name + "/" + tag.exclude);
foreach (CardFilter.FilterItem tag in filter.tags)
{
Debug.Log(tag.name + "/" + tag.exclude);
}
}
return null;
}SurvivalManager โ
public void Meteor(Point pos, Action action)
public void MeteorThing(Point pos, string id, bool install = false)
{
if (pos == null)
{
pos = EClass.pc.pos.Copy();
}
Meteor(pos, delegate
{
Card card = EClass._zone.AddCard(ThingGen.Create(id), pos);public void MeteorThing(Point pos, string id, bool install = false)
public void MeteorThing(Point pos, Thing t, bool install = false)
{
if (pos == null)
{
pos = EClass.pc.pos.Copy();
}
Meteor(pos, delegate
{
Card card = EClass._zone.AddCard(t, pos);Thing โ
public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IInsโฆ)
}
if (!e.IsGlobalElement)
{
bool flag3 = base.IsWeapon || base.IsRangedWeapon || base.IsAmmo || base.IsThrownWeapon || trait is TraitToolMusic;
bool flag4 = base.IsWeapon || base.IsRangedWeapon || base.IsAmmo || base.IsThrownWeapon || trait is TraitToolMusic;
if (base.IsEquipment && base.category.slot != 35 && source.elementMap.ContainsKey(e.id))
{
flag3 = true;
flag4 = true;
}
if (e.source.tag.Contains("weaponEnc") && !flag3)
if (e.source.tag.Contains("weaponEnc") && !flag4)
{
return false;
}
if (e.source.IsWeaponEnc && !(base.category.IsChildOf("shield") || flag3))
if (e.source.IsWeaponEnc && !(base.category.IsChildOf("shield") || flag4))
{
return false;
}public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IInsโฆ)
}
}
trait.WriteNote(n, flag2);
if (base.c_DNA != null)
{
bool flag3 = EClass.pc.HasElement(1274) && !LayerDragGrid.Instance;
if (base.c_DNA.cost > 0)
{
n.AddText("NoteText_enc", "isCostFeatPoint".lang((flag3 ? (base.c_DNA.cost * EClass.pc.GeneCostMTP / 100 + " (" + base.c_DNA.cost + ")") : ((object)base.c_DNA.cost))?.ToString() ?? ""));
}
if (EClass.debug.showExtra)
{
n.AddText("NoteText_enc", "duration:" + base.c_DNA.GetDurationHour());
}
base.c_DNA.WriteNote(n, this, flag3 ? EClass.pc : null);
if (flag3)
{
base.c_DNA.WriteNoteExtra(n, this, EClass.pc);
}
}
if (flag2)
{
if (showTraits)TraitFertilizer โ
public override void OnSimulateHour(VirtualDate date)
if (item.trait is TraitSeed && !item.isSale)
{
flag = true;
(item.trait as TraitSeed).TrySprout(force: true, sucker: true);
(item.trait as TraitSeed).TrySprout(force: true, sucker: true, date);
break;
}
}TraitGene โ
public override string GetName()
return ("dna_" + owner.c_DNA.type).lang() + Lang.space + owner.sourceCard.GetText();
}
public override void WriteNote(UINote n, bool identified)
{
if (owner.c_DNA != null)
{
bool flag = EClass.pc.HasElement(1274) && !LayerDragGrid.Instance;
if (owner.c_DNA.cost > 0)
{
n.AddText("NoteText_enc", "isCostFeatPoint".lang((flag ? (owner.c_DNA.cost * EClass.pc.GeneCostMTP / 100 + " (" + owner.c_DNA.cost + ")") : ((object)owner.c_DNA.cost))?.ToString() ?? ""));
}
if (EClass.debug.showExtra)
{
n.AddText("NoteText_enc", "duration:" + owner.c_DNA.GetDurationHour());
}
owner.c_DNA.WriteNote(n, flag ? EClass.pc : null);
if (flag)
{
owner.c_DNA.WriteNoteExtra(n, EClass.pc);
}
}
}
public override void TrySetHeldAct(ActPlan p)
{
if (owner.c_DNA == null || !p.pos.Equals(EClass.pc.pos) || !EClass.pc.HasElement(1274))ZINT โ
public const int weight = 1;
public const int dateClaim = 2;
public const int maxSimHours = 3;
}Zone โ
[JsonProperty]
public FactionBranch branch;
[JsonProperty]
public int pendingSimHours;
[JsonProperty]
public HashSet<int> completedQuests = new HashSet<int>();UpdateQuests();
OnBeforeSimulate();
isSimulating = true;
Simulate();
isSimulating = false;
OnAfterSimulate();
if (EClass.Branch != null)
try
{
Simulate();
}
catch (Exception exception)
{
EClass.Branch.OnAfterSimulate();
Debug.LogException(exception);
}
finally
{
isSimulating = false;
}
OnAfterSimulate();
EClass.Branch?.OnAfterSimulate();
base.lastActive = EClass.world.date.GetRaw();
if (!EClass.game.isLoading)
{ }
}
Debug.Log("Last Active:" + base.lastActive);
if (base.lastActive == 0 || HourSinceLastActive <= 1 || IsRegion)
if (base.lastActive == 0 || IsRegion)
{
return;
}
Debug.Log(Name + " Simulate:" + HourSinceLastActive + " hours");
VirtualDate virtualDate = new VirtualDate(HourSinceLastActive);
List<Chara> list = EClass._map.charas.ToList();
int num2 = HourSinceLastActive / 24;
if (num2 > 0)
{
foreach (Chara item in list)
{
if (!item.IsPCParty)
{
item.OnSleep(200, num2);
if (item.conSleep != null)
{
item.conSleep.Kill();
}
if (EClass.rnd(EClass.world.date.IsNight ? 20 : 200) == 0 && !item.IsPCFaction)
{
item.AddCondition<ConSleep>(1000 + EClass.rnd(1000), force: true);
}
if (item.things.Count > 20)
{
item.ClearInventory(ClearInventoryType.Purge);
}
}
}
}
VirtualDate.current = virtualDate;
int num3 = EClass.core.config.test.maxSimHour;
if (num3 <= 0)
if (pendingSimHours < 0)
{
num3 = 8640;
pendingSimHours = 0;
}
int num4 = HourSinceLastActive - num3;
for (int i = 0; i < HourSinceLastActive; i++)
int num2 = GetInt(3);
if (num2 == 0)
{
if (i >= num4)
{
virtualDate.SimulateHour();
}
num2 = EClass.core.config.test.maxSimHours;
}
EClass._map.things.ForeachReverse(delegate(Thing t)
{
t.DecayNatural(HourSinceLastActive);
});
VirtualDate.current = null;
if (!IsPCFaction)
int maxSleepSimHours = EClass.core.config.test.maxSleepSimHours;
int hourSinceLastActive = HourSinceLastActive;
if (hourSinceLastActive <= 1 && pendingSimHours == 0)
{
return;
}
int num5 = 0;
foreach (Chara item2 in list)
int num3 = hourSinceLastActive + pendingSimHours;
int num4 = ((num2 > 0 && num3 > num2) ? (num3 - num2) : 0);
num3 -= num4;
int num5 = ((EClass.player.simulatingZone && num3 > maxSleepSimHours) ? maxSleepSimHours : num3);
pendingSimHours = num3 - num5;
Debug.Log($"{Name} Simulate/{num5}/{pendingSimHours}/skipped {num4}");
try
{
if (item2.IsPCParty)
VirtualDate virtualDate = new VirtualDate(num3);
List<Chara> list = EClass._map.charas.ToList();
int passed = num5 + num4;
int num6 = passed / 24;
if (num6 > 0)
{
continue;
foreach (Chara item in list)
{
if (!item.IsPCParty)
{
item.OnSleep(200, num6);
if (item.conSleep != null)
{
item.conSleep.Kill();
}
if (EClass.rnd(EClass.world.date.IsNight ? 20 : 200) == 0 && !item.IsPCFaction)
{
item.AddCondition<ConSleep>(1000 + EClass.rnd(1000), force: true);
}
if (item.things.Count > 20)
{
item.ClearInventory(ClearInventoryType.Purge);
}
}
}
}
if (!item2.IsHomeMember())
VirtualDate.current = virtualDate;
int num7 = 0;
for (int i = 0; i < num5; i++)
{
if (item2.id == "bee")
try
{
num5++;
virtualDate.SimulateHour();
}
if (num2 > 0 && item2.IsGuest())
catch (Exception exception)
{
item2.ChooseNewGoal();
item2.ai.SimulateZone(num2);
if (num7++ == 0)
{
Debug.LogException(exception);
}
}
continue;
}
if (num2 > 0)
EClass._map.things.ForeachReverse(delegate(Thing t)
{
t.DecayNatural(passed);
});
VirtualDate.current = null;
if (!IsPCFaction)
{
return;
}
int num8 = 0;
foreach (Chara item2 in list)
{
Goal goalWork = item2.GetGoalWork();
item2.SetAI(goalWork);
if (goalWork is GoalWork)
if (item2.IsPCParty)
{
(goalWork as GoalWork).FindWork(item2);
continue;
}
item2.ai.SimulateZone(num2);
goalWork = item2.GetGoalHobby();
item2.SetAI(goalWork);
if (goalWork is GoalWork)
if (!item2.IsHomeMember())
{
(goalWork as GoalWork).FindWork(item2);
if (item2.id == "bee")
{
num8++;
}
if (num6 > 0 && item2.IsGuest())
{
item2.ChooseNewGoal();
item2.ai.SimulateZone(num6);
}
continue;
}
if (num6 > 0)
{
Goal goalWork = item2.GetGoalWork();
item2.SetAI(goalWork);
if (goalWork is GoalWork)
{
(goalWork as GoalWork).FindWork(item2);
}
item2.ai.SimulateZone(num6);
goalWork = item2.GetGoalHobby();
item2.SetAI(goalWork);
if (goalWork is GoalWork)
{
(goalWork as GoalWork).FindWork(item2);
}
item2.ai.SimulateZone(num6);
}
item2.ChooseNewGoal();
if (item2.conSuspend == null)
{
item2.ai.OnSimulatePosition();
}
item2.ai.SimulateZone(num2);
}
item2.ChooseNewGoal();
if (item2.conSuspend == null)
List<Thing> list2 = new List<Thing>();
foreach (Thing thing in map.things)
{
item2.ai.OnSimulatePosition();
if (thing.IsInstalled && thing.trait is TraitBeekeep)
{
list2.Add(thing);
}
}
}
List<Thing> list2 = new List<Thing>();
foreach (Thing thing in map.things)
{
if (thing.IsInstalled && thing.trait is TraitBeekeep)
if (num8 >= list2.Count)
{
list2.Add(thing);
return;
}
}
if (num5 >= list2.Count)
{
return;
}
for (int num6 = num5; num6 < list2.Count; num6++)
{
if (EClass.rnd(200) <= HourSinceLastActive)
for (int num9 = num8; num9 < list2.Count; num9++)
{
Chara chara = CharaGen.Create("bee");
AddCard(chara, list2.RandomItem().pos);
Hostility c_originalHostility = (chara.hostility = Hostility.Neutral);
chara.c_originalHostility = c_originalHostility;
if (EClass.rnd(200) <= passed)
{
Chara chara = CharaGen.Create("bee");
AddCard(chara, list2.RandomItem().pos);
Hostility c_originalHostility = (chara.hostility = Hostility.Neutral);
chara.c_originalHostility = c_originalHostility;
}
}
}
finally
{
VirtualDate.current = null;
}
}
public Point GetSpawnPos(Chara c, ZoneTransition.EnterState destState = ZoneTransition.EnterState.Auto)public bool TryAddThingInSpot<T>(Thing t, bool useContainer = true) where T : Tr
Thing randomThing = EClass._map.props.installed.traits.GetRandomThing<T>();
if (randomThing == null)
{
AddCard(t, EClass._map.bounds.GetRandomSurface());
if (VirtualDate.IsActive)
{
TryAddThing(t, EClass._map.bounds.GetRandomSurface());
}
else
{
AddCard(t, EClass._map.bounds.GetRandomSurface());
}
return false;
}
if (useContainer && (!t.IsContainer || t.things.Count == 0))public bool TryAddThingInSpot<T>(Thing t, bool useContainer = true) where T : Tr
return true;
}
}
AddCard(t, randomThing.trait.GetRandomPoint());
if (VirtualDate.IsActive)
{
TryAddThing(t, randomThing.trait.GetRandomPoint());
}
else
{
AddCard(t, randomThing.trait.GetRandomPoint());
}
return true;
}}
public bool TryAddThingInSharedContainer(Thing t, List<Thing> containers = null, bool add = true, bool msg = false, Chara chara = null, bool sharedOnly = true)
{
Thing thing = FindSharedContainer(t, containers, sharedOnly);
if (thing == null)
{
return false;
}
if (add)
{
if (msg)
{
chara?.Say("putSharedItem", chara, t, thing.GetName(NameStyle.Full));
}
thing.AddThing(t);
}
return true;
}
public Thing FindSharedContainer(Thing t, List<Thing> containers = null, bool sharedOnly = true)
{
Thing dest = null;
int priority = -1;public bool TryAddThingInSharedContainer(Thing t, List<Thing> containers = null,โฆ)
{
containers = EClass._map.props.installed.containers;
}
if (SearchDest() != null)
{
return true;
}
if (dest == null)
{
return false;
}
if (add)
{
if (msg)
{
chara.Say("putSharedItem", chara, t, dest.GetName(NameStyle.Full));
}
dest.AddThing(t);
}
return true;
SearchDest();
return dest;
Thing SearchDest()
{
foreach (Thing container in containers)public Chara SpawnMob(Point pos = null, SpawnSetting setting = null)
cardRow = EClass.sources.cards.map["santa"];
EClass.player.flags.santa++;
}
if (cardRow == null)
{
Debug.LogError("SpawnMob: no spawn row list/" + spawnList?.id + "/biome/" + biome.name + "/zone/" + Name);
return null;
}
long num3 = ((setting.fixedLv == -1) ? cardRow.LV : setting.fixedLv);
bool flag = setting.fixedLv != -1 || DangerLvBoost > 0;
num3 += setting.addLv;