EA 23.78 Nightly
January 18, 2025
39 files modified. 3 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
AttackProcess (1)
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll = false)
public int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
CoreDebug (1)
public static string RemoveDemitas()
Religion (1)
public static void Reforge(string id, Point pos = null, bool first = true)
public static Thing Reforge(string id, Point pos = null, bool first = true)
Task (1)
public void TryLayer(int min = 30)
public void TryLater(int min = 30)
ABILITY
public class ABILITY
{
public const int AI_Drink = 5045;
public const int ActChat = 5044;
public const int ActNoItem = 5037;
@@ -18,7 +18,7 @@ public class ABILITY
public const int AI_TendAnimal = 5043;
public const int ActChat = 5044;
public const int AI_Drink = 5045;
public const int ActInstall = 5046;
@@ -184,10 +184,10 @@ public class ABILITY
public const int ActLulwyTrick = 6902;
public const int Melee = 5002;
public const int ActJureHeal = 6901;
public const int Melee = 5002;
public const int ActGazeMutation = 6622;
public const int ActNTR = 6603;
@@ -234,7 +234,7 @@ public class ABILITY
public static readonly int[] IDS = new int[115]
{
5045, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5044, 5046,
5044, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5045, 5046,
5047, 5048, 5049, 5050, 5051, 5036, 5052, 5054, 5055, 6001,
6003, 6011, 6012, 6013, 6015, 6018, 6019, 6020, 6050, 6400,
6410, 5053, 6420, 5035, 5033, 5003, 5004, 5005, 5006, 5007,
@@ -243,7 +243,7 @@ public class ABILITY
5028, 5029, 5030, 5031, 5032, 5018, 6500, 6450, 50204, 6903,
6904, 7000, 50200, 50201, 50202, 50203, 6600, 50205, 50206, 50207,
50208, 50209, 50210, 50211, 50212, 50213, 50214, 50215, 5001, 5000,
6902, 5002, 6901, 6622, 6603, 6610, 6611, 6612, 6620, 6621,
6902, 6901, 5002, 6622, 6603, 6610, 6611, 6612, 6620, 6621,
6900, 6623, 6602, 6626, 6631, 6640, 6641, 6642, 6650, 6660,
6661, 6700, 6720, 6630, 6601
};
AI_Craft_Snowman
@@ -23,6 +23,10 @@ public override IEnumerable<Status> Run()
owner.PlayAnime(AnimeID.Jump);
pos.TalkWitnesses(EClass.pc, (EClass.rnd(2) == 0) ? "nice_statue" : "ding_other", 5);
EClass.pc.ModExp(258, 50);
if (EClass.rnd(3) != 0)
{
EClass.pc.stamina.Mod(-1);
}
}
}.SetDuration(25, 5);
yield return Do(seq);
ActEffect
@@ -588,7 +588,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
}
case EffectId.Funnel:
{
if (EClass._zone.CountMinions(CC) > CC.MaxSummon || CC.c_uidMaster != 0)
if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
{
CC.Say("summon_ally_fail", CC);
return;
@@ -810,7 +810,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po
case EffectId.Duplicate:
{
Point randomPoint = CC.pos.GetRandomPoint(2, requireLos: false, allowChara: false, allowBlocked: false, 200);
if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || EClass._zone.IsRegion || CC.HasCondition<ConPoison>() || CC.HasCondition<ConConfuse>() || CC.HasCondition<ConDim>() || CC.HasCondition<ConParalyze>() || CC.HasCondition<ConSleep>() || CC.HasCondition<ConBurning>() || CC.HasCondition<ConFreeze>() || CC.HasCondition<ConMiasma>())
if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || EClass._zone.IsRegion || CC.HasCondition<ConPoison>() || CC.HasCondition<ConConfuse>() || CC.HasCondition<ConDim>() || CC.HasCondition<ConParalyze>() || CC.HasCondition<ConSleep>() || CC.HasCondition<ConBurning>() || CC.HasCondition<ConFreeze>() || CC.HasCondition<ConMiasma>() || CC.corruption >= 100)
{
CC.Say("split_fail", CC);
return;
ActMelee
@@ -141,25 +141,26 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
{
ActRanged.TryReload(w);
}
int num2 = ((w != null) ? w.Evalue(606) : 0);
int scatter = ((w != null) ? w.Evalue(607) : 0);
int chaser = ((w != null) ? w.Evalue(620) : 0);
if (Act.CC.IsPCFaction)
{
chaser += EClass.pc.faction.charaElements.Value(620);
}
List<Point> list = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
Attack(Act.TC, Act.TP, 1f);
int num2 = GetWeaponEnc(606);
int scatter = GetWeaponEnc(607);
int splash = GetWeaponEnc(608);
int chaser = GetWeaponEnc(620);
int flurry = GetWeaponEnc(621);
int frustration = GetWeaponEnc(624);
int num3 = GetWeaponEnc(622);
int feint = GetWeaponEnc(623);
List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
if (num2 > 0)
{
foreach (Point item in list)
foreach (Point item in list2)
{
if (!item.Equals(orgPos))
{
Chara firstChara = item.FirstChara;
if (firstChara != null && firstChara.IsHostile(Act.CC))
{
Attack(firstChara, item, 1f);
AttackWithFlurry(firstChara, item, 1f, subAttack: false);
}
}
}
@@ -173,38 +174,74 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)
Chara firstChara2 = p.FirstChara;
if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
{
Attack(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)));
AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
}
}
});
}
int num3 = count;
count = num3 + 1;
void Attack(Card _tc, Point _tp, float mtp)
else if (num3 > 0)
{
List<Point> list = new List<Point>();
Act.TP.ForeachNeighbor(delegate(Point p)
{
list.Add(p.Copy());
});
list.Shuffle();
int num4 = 0;
for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++)
{
num4++;
}
foreach (Point item2 in list)
{
foreach (Card item3 in item2.ListCards())
{
if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone)
{
break;
}
if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC)))
{
Act.CC.Say("attack_cleave");
AttackWithFlurry(item3, item2, 1f, subAttack: true);
num4--;
}
}
}
}
int num5 = count;
count = num5 + 1;
void Attack(Card _tc, Point _tp, float mtp, bool subAttack)
{
Act.TC = _tc;
Act.TP = _tp;
AttackProcess.Current.Prepare(Act.CC, w, Act.TC, Act.TP, count);
int num4 = 1;
int num6 = 1;
if (chaser > 0)
{
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
{
if (chaser > EClass.rnd((int)Mathf.Pow(4f, i + 2)))
if (chaser > EClass.rnd(4 + (int)Mathf.Pow(4f, j + 2)))
{
num4++;
num6++;
}
}
}
bool flag2 = false;
for (int j = 0; j < num4; j++)
for (int k = 0; k < num6; k++)
{
if (j > 0)
if (k > 0)
{
Act.CC.Say("attack_chaser");
}
flag2 = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack);
if (!flag2 && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (float)EClass.rnd(100))
{
Msg.Say("attack_chaser");
AttackProcess.Current.critFury = true;
flag2 = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack);
AttackProcess.Current.critFury = false;
}
flag2 = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll);
if (flag2)
if (flag2 || !Act.CC.IsAliveInCurrentZone || !Act.TC.IsAliveInCurrentZone)
{
break;
}
@@ -250,7 +287,66 @@ void Attack(Card _tc, Point _tp, float mtp)
}
}
Act.TC = _tc;
Act.CC.DoHostileAction(Act.TC);
if (Act.TC.IsAliveInCurrentZone && Act.TC.isChara)
{
Act.CC.DoHostileAction(Act.TC);
if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)EClass.rnd(100))
{
Act.TC.Chara.AddCondition<ConSupress>(100 + 5 * (int)Mathf.Sqrt(feint));
}
}
if (splash > 0)
{
Act.TP.ForeachNeighbor(delegate(Point p)
{
if (p.Equals(Act.TP) || p.Equals(Act.CC.pos))
{
return;
}
p.PlayEffect("smoke_shockwave");
p.Copy().Animate(AnimeID.QuakeMini, animeBlock: true);
foreach (Card item4 in p.ListCards())
{
if (item4.trait.CanBeAttacked || (item4.isChara && item4.Chara.IsHostile(Act.CC)))
{
int rawDamage = AttackProcess.Current.GetRawDamage(0.1f + 0.05f * Mathf.Sqrt(splash), crit: false, maxRoll: false);
rawDamage = item4.ApplyProtection(rawDamage);
item4.DamageHP(rawDamage, 0, 100, AttackSource.Shockwave, Act.CC);
}
}
});
}
}
void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)
{
int num7 = 1;
if (flurry > 0)
{
for (int l = 0; l < 10 && flurry > EClass.rnd(25 + (int)Mathf.Pow(5f, l + 2)); l++)
{
num7++;
}
}
for (int m = 0; m < num7; m++)
{
if (!Act.CC.IsAliveInCurrentZone)
{
break;
}
if (!_tc.IsAliveInCurrentZone)
{
break;
}
if (m > 0)
{
Act.CC.Say("attack_flurry");
}
Attack(_tc, _tp, mtp, subAttack);
}
}
int GetWeaponEnc(int ele)
{
return ((w != null) ? w.Evalue(ele) : 0) + EClass.pc.faction.charaElements.Value(ele);
}
}
if (!flag)
AnimeID
@@ -23,5 +23,6 @@ public enum AnimeID
Hop,
Ride,
Truck,
PlayMusic
PlayMusic,
QuakeMini
}
AttackProcess
@@ -41,6 +41,8 @@ public class AttackProcess : EClass
public bool crit;
public bool critFury;
public bool hit;
public bool evadePlus;
@@ -125,7 +127,7 @@ public void Prepare(Chara _CC, Thing _weapon, Card _TC = null, Point _TP = null,
isThrow = _isThrow;
weapon = _weapon;
ammo = _weapon?.ammoData;
hit = (crit = (evadePlus = false));
hit = (crit = (critFury = (evadePlus = false)));
toolRange = weapon?.trait as TraitToolRange;
attackType = AttackType.Slash;
attackStyle = AttackStyle.Default;
@@ -300,7 +302,7 @@ public void Prepare(Chara _CC, Thing _weapon, Card _TC = null, Point _TP = null,
}
else if (attackStyle == AttackStyle.TwoWield && toHit > 0)
{
toHit = toHit * 100 / (115 + attackIndex * 15 + attackIndex * Mathf.Clamp(2000 / (20 + CC.Evalue(131)), 0, 100));
toHit = toHit * 100 / (115 + attackIndex * 15 + attackIndex * Mathf.Clamp(2000 / (20 + CC.EvalueMax(131, -10)), 0, 100));
}
if (CC.isBlind)
{
@@ -391,10 +393,9 @@ public void PlayRangedAnime(int numFire)
}
}
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll = false)
public int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
{
bool flag = CC.HasCondition<ConReload>();
hit = CalcHit();
int num = Dice.Roll(dNum, dDim, dBonus, CC);
if (ammo != null && !flag)
{
@@ -424,7 +425,14 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
}
num = Mathf.Clamp(num, 0, 9999999);
num = (int)(dMulti * (float)num * dmgMulti);
num = Mathf.Clamp(num, 0, 9999999);
return Mathf.Clamp(num, 0, 9999999);
}
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll = false, bool subAttack = false)
{
bool flag = CC.HasCondition<ConReload>();
hit = CalcHit();
int num = GetRawDamage(dmgMulti, crit, maxRoll);
if (IsRanged && count >= numFireWithoutDamageLoss)
{
num = num * 100 / (100 + (count - numFireWithoutDamageLoss + 1) * 30);
@@ -434,8 +442,8 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
num /= 2;
}
List<Element> list2 = new List<Element>();
int num3 = CC.Evalue(91);
int num4 = 0;
int num2 = CC.Evalue(91);
int num3 = 0;
if (weapon != null)
{
list2 = weapon.elements.dict.Values.ToList();
@@ -445,9 +453,9 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
}
if (IsRanged || isThrow)
{
num3 += weapon.Evalue(91);
num2 += weapon.Evalue(91);
}
num4 += weapon.Evalue(603);
num3 += weapon.Evalue(603);
}
else if (CC.id == "rabbit_vopal")
{
}
}
}
if (hit && num3 > EClass.rnd(100))
if (hit && num2 > EClass.rnd(100))
{
CC.Say("vopal");
penetration = 100;
}
if (crit && CC.IsPC)
if (crit)
{
CC.Say("critical");
CC.PlaySound("critical");
CC.Say((critFury ? "fury_" : "") + (CC.IsHostile() ? "critical_enemy" : "critical"));
if (CC.IsPC)
{
CC.PlaySound("critical");
}
}
if (CC.isSynced || (TC != null && TC.isSynced))
{
@@ -539,9 +550,9 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
CC.Say("attackMelee", CC, TC, GetAttackText(attackType, 0));
}
bool showEffect = true;
int num4 = 0;
int num5 = 0;
int num6 = 0;
int num7 = 0;
ConWeapon conWeapon = null;
if (weapon != null)
{
{
if (value2.source.categorySub == "eleConvert")
{
num5 = EClass.sources.elements.alias[value2.source.aliasRef].id;
num6 = 50 + value2.Value * 2;
num7 = Mathf.Min(value2.Value, 100);
num4 = EClass.sources.elements.alias[value2.source.aliasRef].id;
num5 = 50 + value2.Value * 2;
num6 = Mathf.Min(value2.Value, 100);
break;
}
}
}
if (num5 == 0)
if (num4 == 0)
{
if (CC.HasCondition<ConWeapon>())
{
conWeapon = CC.GetCondition<ConWeapon>();
num5 = conWeapon.sourceElement.id;
num6 = conWeapon.power / 2;
num7 = 40 + (int)Mathf.Min(MathF.Sqrt(conWeapon.power), 80f);
num4 = conWeapon.sourceElement.id;
num5 = conWeapon.power / 2;
num6 = 40 + (int)Mathf.Min(MathF.Sqrt(conWeapon.power), 80f);
}
if (conWeapon == null && weapon == null && (CC.MainElement != Element.Void || CC.HasElement(1565)))
{
num5 = (CC.HasElement(1565) ? 915 : CC.MainElement.id);
num6 = CC.Power / 3 + EClass.rnd(CC.Power / 2);
num4 = (CC.HasElement(1565) ? 915 : CC.MainElement.id);
num5 = CC.Power / 3 + EClass.rnd(CC.Power / 2);
if (CC.MainElement != Element.Void)
{
num6 += CC.MainElement.Value;
num5 += CC.MainElement.Value;
}
showEffect = false;
num7 = 50;
num6 = 50;
}
if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
{
IEnumerable<Element> enumerable = weapon.elements.dict.Values.Where((Element e) => e.source.categorySub == "eleAttack");
if (enumerable.Count() > 0)
{
num5 = enumerable.RandomItem().id;
num6 = num5 switch
num4 = enumerable.RandomItem().id;
num5 = num4 switch
{
920 => 30,
914 => 50,
_ => 100,
};
}
num7 = 50;
num6 = 50;
}
}
int num8 = num;
int num9 = num * num7 / 100;
int num7 = num;
int num8 = num * num6 / 100;
num -= num8;
int num9 = num * penetration / 100;
num -= num9;
int num10 = num * penetration / 100;
num -= num10;
num = TC.ApplyProtection(num) + num10 + num9;
TC.DamageHP(num, num5, num6, (!IsRanged && !isThrow) ? AttackSource.Melee : AttackSource.Range, CC, showEffect);
num = TC.ApplyProtection(num) + num9 + num8;
TC.DamageHP(num, num4, num5, (!IsRanged && !isThrow) ? AttackSource.Melee : AttackSource.Range, CC, showEffect);
conWeapon?.Mod(-1);
bool flag2 = IsCane || (weapon != null && weapon.Evalue(482) > 0);
int attackStyleElement = CC.body.GetAttackStyleElement(attackStyle);
int mod2 = 100 / (count + 1);
if (!IsRanged || count == 0)
{
ModExpAtk(weaponSkill.id, mod2);
ModExpAtk(flag2 ? 304 : (IsRanged ? 133 : 132), mod2);
}
if (crit)
{
ModExpAtk(134, 50);
}
if (count == 0 && attackStyleElement != 0)
if (!subAttack)
{
ModExpAtk(attackStyleElement, 100);
int mod2 = 100 / (count + 1);
if (!IsRanged || count == 0)
{
ModExpAtk(weaponSkill.id, mod2);
ModExpAtk(flag2 ? 304 : (IsRanged ? 133 : 132), mod2);
}
if (crit)
{
ModExpAtk(134, 50);
}
if (count == 0 && attackStyleElement != 0)
{
ModExpAtk(attackStyleElement, 100);
}
}
if (!CC.IsAliveInCurrentZone || !TC.IsAliveInCurrentZone)
{
}
if (item.source.categorySub == "eleAttack")
{
int num11 = 25;
int num10 = 25;
int dmg = EClass.rnd(num * (100 + item.Value * 10) / 500 + 5);
if (conWeapon == null && weapon != null && weapon.trait is TraitToolRangeCane)
{
num11 = 0;
num10 = 0;
}
if (num11 >= EClass.rnd(100))
if (num10 >= EClass.rnd(100))
{
TC.DamageHP(dmg, item.id, isThrow ? (100 + item.Value * 5) : (30 + item.Value), AttackSource.WeaponEnchant, CC);
}
}
if (!IsRanged && attackStyle == AttackStyle.Shield)
{
int num12 = CC.Evalue(123);
if (CC.elements.ValueWithoutLink(123) >= 10 && Mathf.Clamp(Mathf.Sqrt(num12) - 2f, 8f, 12f) > (float)EClass.rnd(100))
int num11 = CC.Evalue(123);
if (CC.elements.ValueWithoutLink(123) >= 10 && Mathf.Clamp(Mathf.Sqrt(num11) - 2f, 8f, 12f) > (float)EClass.rnd(100))
{
num = num8 * Mathf.Min(50 + num12, 200) / 100;
num = num7 * Mathf.Min(50 + num11, 200) / 100;
num = TC.ApplyProtection(num);
Debug.Log("Bash:" + num + "/" + num8);
Debug.Log("Bash:" + num + "/" + num7);
CC.PlaySound("shield_bash");
CC.Say("shield_bash", CC, TC);
TC.DamageHP(num, AttackSource.None, CC);
@@ -670,7 +684,7 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
{
if (EClass.rnd(2) == 0)
{
TC.Chara.AddCondition<ConDim>(50 + (int)Mathf.Sqrt(num12) * 10);
TC.Chara.AddCondition<ConDim>(50 + (int)Mathf.Sqrt(num11) * 10);
}
TC.Chara.AddCondition<ConParalyze>(EClass.rnd(2), force: true);
}
@@ -680,7 +694,7 @@ public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
{
return true;
}
if (TC.isChara && num4 > 0 && num4 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success)
if (TC.isChara && num3 > 0 && num3 * 2 + 15 > EClass.rnd(100) && !TC.isRestrained && TC.Chara.TryMoveFrom(CC.pos) == Card.MoveResult.Success)
{
TC.pos.PlayEffect("vanish");
TC.PlaySound("push", 1.5f);
@@ -786,14 +800,15 @@ void Proc(List<Element> list)
{
if (item2 is Ability)
{
int num13 = 10 + item2.Value / 5;
int num12 = 10 + item2.Value / 5;
int power = EClass.curve((100 + item2.Value * 10) * (100 + weaponSkill.Value) / 100, 400, 100);
if (num13 >= EClass.rnd(100))
if (num12 >= EClass.rnd(100))
{
Act obj = item2 as Act;
Card card = (obj.TargetType.CanSelectSelf ? CC : TC);
string text = ((item2.source.proc.Length >= 2) ? item2.source.proc[1] : "");
switch (obj.source.abilityType.TryGet(0))
string text2 = obj.source.abilityType.TryGet(0);
switch (text2)
{
case "buff":
if (CC.HasCondition(text))
@@ -808,6 +823,21 @@ void Proc(List<Element> list)
card = TC;
break;
}
if (subAttack)
{
if (card == CC)
{
continue;
}
switch (text2)
{
case "attackArea":
case "summon":
case "teleport":
case "suicide":
continue;
}
}
if (card.IsAliveInCurrentZone)
{
Card tC = TC;
@@ -839,6 +869,11 @@ private bool EvadePlus()
public bool CalcHit()
{
if (critFury)
{
crit = true;
return true;
}
if (TC != null)
{
if (TC.HasCondition<ConDim>() && EClass.rnd(4) == 0)
AttackSource
@@ -17,5 +17,6 @@ public enum AttackSource
Hang,
Wrath,
ManaBackfire,
DeathSentense
DeathSentense,
Shockwave
}
BaseGameScreen
@@ -641,7 +641,12 @@ public virtual void RefreshWeather()
EMono.scene.rain.SetActive(enable: true);
EMono.scene.ether.SetActive(enable: true);
EMono.scene.blossom.SetActive(enable: true);
float num = ((EMono._zone.lv <= -2) ? 0f : ((EMono._zone.lv <= -1) ? 0.3f : ((flag && !flag2) ? 0.6f : 1f)));
Zone zone = EMono._zone;
if (EMono._zone is Zone_Tent)
{
zone = (EMono._zone.parent as Zone) ?? EMono._zone;
}
float num = ((zone.lv <= -2) ? 0f : ((zone.lv <= -1) ? 0.3f : ((flag && !flag2) ? 0.6f : 1f)));
EMono.scene.sfxRain.SetVolume(weather.IsRaining ? num : 0f);
EMono.scene.sfxSea.SetVolume(EMono._zone.VolumeSea * num);
EMono.scene.camSupport.grading.profile.fog = EMono.setting.render.fogs[EMono._map.config.fog];
BaseListPeople
@@ -65,25 +65,6 @@ public override void OnInstantiate(Chara a, ItemGeneral b)
SetSubText(a, b);
if (ShowHome)
{
BaseArea roomWork = null;
bool flag = false;
foreach (Hobby item in a.ListWorks())
{
AIWork aI = item.GetAI(a);
flag = aI.SetDestination();
if (flag)
{
if (aI.destArea != null)
{
roomWork = aI.destArea;
}
else if (aI.destThing != null)
{
roomWork = aI.destThing.pos.cell.room;
}
break;
}
}
if (a.IsPCFaction)
{
Sprite icon = a.affinity.GetIcon();
@@ -92,32 +73,7 @@ public override void OnInstantiate(Chara a, ItemGeneral b)
Util.Instantiate<UIItem>("UI/Element/Grid/Attach/affinity", b).image1.sprite = icon;
}
}
b.AddSubButton(EClass.core.refs.icons.work, delegate
{
if (roomWork == null)
{
SE.BeepSmall();
}
else
{
EClass.pc.SetAI(new AI_Goto(roomWork.GetRandomFreePos(), 1));
layer.Close();
}
}, null, delegate(UITooltip t)
{
t.note.Clear();
t.note.AddHeader("infoWork".lang((roomWork != null) ? roomWork.Name : "none".lang()));
foreach (Hobby item2 in a.ListWorks())
{
AddText(item2, "work", a.source.works.Contains(item2.source.alias));
}
foreach (Hobby item3 in a.ListHobbies())
{
AddText(item3, "hobby", a.source.hobbies.Contains(item3.source.alias));
}
t.note.Build();
_ = roomWork;
}).icon.SetAlpha(flag ? 1f : 0.4f);
AddSubButtonWork(b, a);
Room room = a.FindRoom();
TraitBed bed = a.FindBed();
if (a.memberType == FactionMemberType.Default)
@@ -145,7 +101,7 @@ public override void OnInstantiate(Chara a, ItemGeneral b)
{
});
}
}).icon.SetAlpha((room != null) ? 1f : 0.4f);
}).icon.SetAlpha((bed != null) ? 1f : 0.4f);
}
}
if (ShowCharaSheet && EClass.debug.showExtra)
@@ -162,6 +118,71 @@ public override void OnInstantiate(Chara a, ItemGeneral b)
{
b.gameObject.AddComponent<CanvasGroup>().alpha = 0.6f;
}
}
public void AddSubButtonWork(ItemGeneral b, Chara a)
{
BaseArea roomWork = null;
bool flag = true;
foreach (Hobby item in a.ListWorks())
{
AIWork aI = item.GetAI(a);
if (aI.SetDestination())
{
if (aI.destArea != null)
{
roomWork = aI.destArea;
}
else if (aI.destThing != null)
{
roomWork = aI.destThing.pos.cell.room;
}
break;
}
}
foreach (Hobby item2 in a.ListWorks().Concat(a.ListHobbies()))
{
if (item2.GetEfficiency(a) <= 0)
{
flag = false;
break;
}
}
b.AddSubButton(EClass.core.refs.icons.work, delegate
{
if (roomWork == null)
{
SE.BeepSmall();
}
else
{
EClass.pc.SetAI(new AI_Goto(roomWork.GetRandomFreePos(), 1));
layer.Close();
}
}, null, delegate(UITooltip t)
{
WriteHobbies(t, a, roomWork);
}).icon.SetAlpha(flag ? 1f : 0.4f);
}
public void WriteHobbies(UITooltip t, Chara a, BaseArea roomWork)
{
t.note.Clear();
t.note.AddHeader("infoWork".lang((roomWork != null) ? roomWork.Name : "none".lang()));
foreach (Hobby item in a.ListWorks())
{
AddText(item, "work", a.source.works.Contains(item.source.alias));
}
foreach (Hobby item2 in a.ListHobbies())
{
AddText(item2, "hobby", a.source.hobbies.Contains(item2.source.alias));
}
if (a.IsPCParty)
{
t.note.Space(8);
t.note.AddText("workNotActive_party".lang(), FontColor.Warning);
}
t.note.Build();
void AddText(Hobby h, string lang, bool fix)
{
int efficiency = h.GetEfficiency(a);
@@ -173,18 +194,18 @@ void AddText(Hobby h, string lang, bool fix)
text = text.TagColor((efficiency == 0) ? FontColor.Warning : FontColor.Good);
string[] array = Lang.GetList("work_lv");
string text2 = array[Mathf.Clamp(efficiency / 50, (efficiency != 0) ? 1 : 0, array.Length - 1)];
P_3.t.note.AddTopic("TopicLeft", lang.lang(), text + " (" + text2 + ")");
t.note.AddTopic("TopicLeft", lang.lang(), text + " (" + text2 + ")");
if (!h.source.destTrait.IsEmpty())
{
bool flag2 = EClass._map.FindThing(Type.GetType("Trait" + h.source.destTrait + ", Elin"), a) != null;
bool flag = EClass._map.FindThing(Type.GetType("Trait" + h.source.destTrait + ", Elin"), a) != null;
List<CardRow> obj = EClass.sources.cards.rows.Where((CardRow t) => t.trait.Length != 0 && Type.GetType("Trait" + h.source.destTrait).IsAssignableFrom(Type.GetType("Trait" + t.trait[0]))).ToList();
obj.Sort((CardRow a, CardRow b) => a.LV - b.LV);
CardRow cardRow = obj[0];
P_3.t.note.AddText("NoteText_small", "・ " + "workDestTrait".lang(cardRow.GetName().ToTitleCase().TagColor(flag2 ? FontColor.Good : FontColor.Warning)));
t.note.AddText("NoteText_small", "・ " + "workDestTrait".lang(cardRow.GetName().ToTitleCase().TagColor(flag ? FontColor.Good : FontColor.Warning)));
}
if (efficiency == 0)
{
P_3.t.note.AddText("NoteText_small", "・ " + "workNotActive".lang());
t.note.AddText("NoteText_small", "・ " + "workNotActive".lang());
}
else
{
@@ -193,7 +214,7 @@ void AddText(Hobby h, string lang, bool fix)
int num = Mathf.Max(1, h.source.things[i + 1].ToInt() * efficiency * a.homeBranch.GetProductBonus(a) / 100 / 1000);
string text3 = h.source.things[i];
string s = (text3.StartsWith("#") ? EClass.sources.categories.map[text3.Replace("#", "")].GetName() : EClass.sources.cards.map[h.source.things[i]].GetName());
P_3.t.note.AddText("NoteText_small", "・ " + "work_produce".lang(s.ToTitleCase(), num.ToString() ?? ""));
t.note.AddText("NoteText_small", "・ " + "work_produce".lang(s.ToTitleCase(), num.ToString() ?? ""));
}
if (!h.source.elements.IsEmpty())
{
@@ -202,7 +223,7 @@ void AddText(Hobby h, string lang, bool fix)
SourceElement.Row row = EClass.sources.elements.map[h.source.elements[j]];
int num2 = h.source.elements[j + 1];
int num3 = ((num2 < 0 || row.id == 2115 || row.id == 2207) ? (num2 / 10) : Mathf.Max(0, num2 * h.GetEfficiency(a) * a.homeBranch.efficiency / 100 / 1000));
P_3.t.note.AddText("NoteText_small", "・ " + "workBonus_skill".lang(row.GetName().ToTitleCase(), ((num2 > 0) ? "+" : "") + num3) + ((row.id == 2115 || row.id == 2207) ? (" " + "fixedFactionSkill".lang()) : ""), (num2 >= 0) ? FontColor.Default : FontColor.Bad);
t.note.AddText("NoteText_small", "・ " + "workBonus_skill".lang(row.GetName().ToTitleCase(), ((num2 > 0) ? "+" : "") + num3) + ((row.id == 2115 || row.id == 2207) ? (" " + "fixedFactionSkill".lang()) : ""), (num2 >= 0) ? FontColor.Default : FontColor.Bad);
}
}
string[] array2 = h.source.GetDetail().SplitNewline();
@@ -210,11 +231,11 @@ void AddText(Hobby h, string lang, bool fix)
{
if (!text4.IsEmpty())
{
P_3.t.note.AddText("NoteText_small", "・ " + text4);
t.note.AddText("NoteText_small", "・ " + text4);
}
}
}
P_3.t.note.Space(1);
t.note.Space(1);
}
}
Card
}
}
}
if (origin != null && origin.isChara && origin.Chara.HasCondition<ConSupress>())
{
dmg = dmg * 2 / 3;
}
if (attackSource != AttackSource.Finish)
{
if (!IsPCFaction && LV > 50)
if (EClass.player.invlunerable)
{
EvadeDeath();
goto IL_09ad;
goto IL_09fc;
}
}
if (IsPC && Evalue(1220) > 0 && Chara.stamina.value >= Chara.stamina.max / 2)
}
}
}
goto IL_09ad;
IL_09ad:
goto IL_09fc;
IL_09fc:
if (trait.CanBeAttacked)
{
renderer.PlayAnime(AnimeID.HitObj);
if (!isDestroyed)
{
Die(e, origin, attackSource);
ProcAbsorb();
if (EClass.pc.Evalue(1355) > 0 && (IsPCFactionOrMinion || (origin != null && origin.IsPCParty)))
{
ConStrife conStrife = (EClass.pc.AddCondition<ConStrife>() as ConStrife) ?? EClass.pc.GetCondition<ConStrife>();
origin.DamageHP(Mathf.Clamp(dmg / 20, 1, MaxHP / 20), ele3, Power * 2, AttackSource.Condition);
}
}
if (origin.HasElement(662) && attackSource == AttackSource.Melee && origin.isChara && Chara.IsHostile(origin as Chara))
{
int num9 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, origin.Evalue(662) / 10));
origin.Chara.stamina.Mod(num9);
if (IsAliveInCurrentZone)
{
Chara.stamina.Mod(-num9);
}
}
if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
{
int num10 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10));
origin.Chara.mana.Mod(num10);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num10);
}
}
if (origin.HasElement(661) && attackSource == AttackSource.Melee)
{
int num11 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, origin.Evalue(661) + 10));
origin.Chara.mana.Mod(num11);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num11);
}
}
ProcAbsorb();
}
if (hp < 0 || !isChara)
{
elements.ModExp(123, a3);
}
}
int num12 = ((EClass.rnd(2) == 0) ? 1 : 0);
int num9 = ((EClass.rnd(2) == 0) ? 1 : 0);
if (attackSource == AttackSource.Condition)
{
num12 = 1 + EClass.rnd(2);
num9 = 1 + EClass.rnd(2);
}
if (num12 > 0)
if (num9 > 0)
{
bool flag = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
AddBlood(num12, flag ? 6 : (-1));
AddBlood(num9, flag ? 6 : (-1));
}
bool flag2 = true;
switch (e.id)
}
if (IsPC)
{
float num13 = (float)hp / (float)MaxHP;
float num10 = (float)hp / (float)MaxHP;
if (Evalue(1421) > 0)
{
num13 = (float)Chara.mana.value / (float)Chara.mana.max;
num10 = (float)Chara.mana.value / (float)Chara.mana.max;
}
if (num13 < 0.3f)
if (num10 < 0.3f)
{
PlaySound("heartbeat", 1f - num13 * 2f);
PlaySound("heartbeat", 1f - num10 * 2f);
}
}
if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())
@@ -4280,6 +4259,39 @@ void Heal()
member.Cure(CureType.Death);
}
}
void ProcAbsorb()
{
if (origin != null && origin.isChara && isChara)
{
if (origin.HasElement(662) && attackSource == AttackSource.Melee && origin.isChara && Chara.IsHostile(origin as Chara))
{
int num11 = EClass.rnd(3 + Mathf.Clamp(dmg / 100, 0, origin.Evalue(662) / 10));
origin.Chara.stamina.Mod(num11);
if (IsAliveInCurrentZone)
{
Chara.stamina.Mod(-num11);
}
}
if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
{
int num12 = EClass.rndHalf(2 + Mathf.Clamp(dmg / 10, 0, origin.Chara.GetPietyValue() + 10));
origin.Chara.mana.Mod(num12);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num12);
}
}
if (origin.HasElement(661) && attackSource == AttackSource.Melee)
{
int num13 = EClass.rnd(2 + Mathf.Clamp(dmg / 10, 0, origin.Evalue(661) + 10));
origin.Chara.mana.Mod(num13);
if (IsAliveInCurrentZone)
{
Chara.mana.Mod(-num13);
}
}
}
}
}
public virtual void Die(Element e = null, Card origin = null, AttackSource attackSource = AttackSource.None)
@@ -4742,6 +4754,10 @@ public Card MakeFoodFrom(Card c)
}
if (flag2)
{
if (c.IsPCFaction && c.IsUnique)
{
num = -100;
}
elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10);
if (flag)
{
@@ -4797,6 +4813,10 @@ public Card MakeFoodFrom(Card c)
{
num3 += 60;
}
if (flag2 && c.IsPCFaction && c.IsUnique)
{
num3 = 0;
}
if (num3 > 0)
{
elements.ModBase(2, num3);
CardManager
@@ -77,6 +77,13 @@ private void OnDeserialized(StreamingContext context)
public void AssignUID(Card c)
{
if (globalCharas.ContainsKey(uidNext))
{
while (globalCharas.ContainsKey(uidNext))
{
uidNext++;
}
}
c.uid = uidNext;
uidNext++;
}
Chara
@@ -6045,6 +6045,7 @@ public override string GetHoverText2()
text2 = text2 + "Global:" + IsGlobal + " AI:" + ai?.ToString() + " " + source.tactics.IsEmpty(EClass.sources.tactics.map.TryGetValue(id)?.id ?? EClass.sources.tactics.map.TryGetValue(job.id)?.id ?? "predator");
text2 += Environment.NewLine;
text2 = text2 + base.uid + IsMinion + "/" + base.c_uidMaster + "/" + master;
text2 = text2 + " dir:" + base.dir + " skin:" + base.idSkin;
}
string text3 = "";
IEnumerable<BaseStats> enumerable = conditions.Concat((!IsPCFaction) ? new BaseStats[0] : new BaseStats[2] { hunger, stamina });
@@ -6093,6 +6094,15 @@ public override string GetHoverText2()
text3 = text3.TrimEnd(", ".ToCharArray()) + "</size>";
}
}
if (EClass.debug.showExtra)
{
text3 += Environment.NewLine;
foreach (ActList.Item item2 in ability.list.items)
{
text3 = text3 + item2.act.Name + ", ";
}
text3 = text3.TrimEnd(", ".ToCharArray());
}
return text + text2 + text3;
}
CharaAbility
@@ -5,10 +5,66 @@ public class CharaAbility : EClass
{
public static List<SourceElement.Row> randomAbilities = new List<SourceElement.Row>();
public static List<SourceElement.Row> randomAbilitiesAdv = new List<SourceElement.Row>();
public Chara owner;
public ActList list = new ActList();
public static List<SourceElement.Row> BuildRandomAbilityList(bool adv)
{
List<SourceElement.Row> list = new List<SourceElement.Row>();
foreach (SourceElement.Row row in EClass.sources.elements.rows)
{
if (row.abilityType.Length == 0 || row.aliasRef == "mold")
{
continue;
}
switch (row.id)
{
case 5000:
case 5001:
case 5005:
case 5040:
case 5048:
case 6400:
case 6410:
case 8200:
continue;
}
if (row.idMold != 0 && !adv)
{
switch (row.aliasRef)
{
case "eleEther":
case "eleAcid":
case "eleCut":
case "eleImpact":
continue;
}
}
list.Add(row);
}
return list;
}
public List<SourceElement.Row> GetRandomAbilityList()
{
if (randomAbilities.Count == 0)
{
randomAbilities = BuildRandomAbilityList(adv: false);
}
if (randomAbilitiesAdv.Count == 0)
{
randomAbilitiesAdv = BuildRandomAbilityList(adv: true);
}
if (!(owner.trait is TraitAdventurer))
{
return randomAbilities;
}
return randomAbilitiesAdv;
}
public CharaAbility(Chara _owner)
{
owner = _owner;
@@ -34,14 +90,10 @@ public void Refresh()
int num = owner.trait.MaxRandomAbility + EClass.rnd(2) - list.items.Count;
if (num > 1)
{
if (randomAbilities.Count == 0)
{
BuildRandomAbilityList();
}
owner._listAbility = new List<int>();
for (int j = 0; j < num; j++)
{
owner._listAbility.Add(randomAbilities.RandomItemWeighted((SourceElement.Row e) => e.chance).id);
owner._listAbility.Add(GetRandomAbilityList().RandomItemWeighted((SourceElement.Row e) => e.chance).id);
}
}
}
@@ -77,22 +129,34 @@ public void BuildRandomAbilityList()
{
foreach (SourceElement.Row row in EClass.sources.elements.rows)
{
if (row.abilityType.Length != 0 && !(row.aliasRef == "mold"))
if (row.abilityType.Length == 0 || row.aliasRef == "mold")
{
continue;
}
switch (row.id)
{
case 5000:
case 5001:
case 5005:
case 5040:
case 5048:
case 6400:
case 6410:
case 8200:
continue;
}
if (row.idMold != 0 && !(owner.trait is TraitAdventurer))
{
switch (row.id)
switch (row.aliasRef)
{
case 5000:
case 5001:
case 5005:
case 5040:
case 5048:
case 6400:
case 6410:
case 8200:
case "eleEther":
case "eleAcid":
case "eleCut":
case "eleImpact":
continue;
}
randomAbilities.Add(row);
}
randomAbilities.Add(row);
}
}
@@ -112,11 +176,7 @@ public void AddRandom()
{
owner._listAbility = new List<int>();
}
if (randomAbilities.Count == 0)
{
BuildRandomAbilityList();
}
owner._listAbility.Add(randomAbilities.RandomItemWeighted((SourceElement.Row e) => e.chance).id);
owner._listAbility.Add(GetRandomAbilityList().RandomItemWeighted((SourceElement.Row e) => e.chance).id);
Refresh();
}
+ConSupress
File Created
public class ConSupress : BaseDebuff
{
}
CoreDebug
@@ -905,7 +905,14 @@ public void UpdateInput()
}
if (Input.GetKeyDown(KeyCode.F2))
{
EClass.pc.ModCorruption(1);
Chara targetChara = EClass.scene.mouseTarget.TargetChara;
if (targetChara != null)
{
EClass.pc.Pick(targetChara.MakeMilk());
EClass.pc.Pick(targetChara.MakeGene());
EClass.pc.Pick(targetChara.MakeBraineCell());
EClass.pc.Pick(targetChara.MakeEgg(effect: true, 10));
}
return;
}
if (Input.GetKeyDown(KeyCode.F3))
@@ -1803,6 +1810,49 @@ public static string Fix_EtherDisease()
return text + "Fixed!";
}
[ConsoleCommand("")]
public static string Fix_LostCore()
{
if (!EClass._zone.IsPCFaction)
{
return "Not in base.";
}
foreach (Thing thing in EClass._map.things)
{
if (thing.trait is TraitCoreZone)
{
return "Base already has core.";
}
}
if (EClass.pc.things.Find((Thing t) => t.trait is TraitCoreZone) != null)
{
return "Player has core.";
}
EClass._zone.AddCard(ThingGen.Create("core_zone"), EClass._zone.bounds.GetCenterPos().GetNearestPoint());
return "Done.";
}
[ConsoleCommand("")]
public static string Fix_RemoveDemitas()
{
List<Chara> list = new List<Chara>();
foreach (Chara value in EClass.game.cards.globalCharas.Values)
{
if (value.id == "demitas" && value.currentZone == EClass._zone)
{
list.Add(value);
}
}
if (list.Count > 1)
{
Chara chara = list[1];
chara.homeBranch.BanishMember(chara);
chara.Destroy();
return "Demitas Removed!";
}
return "Not enough Demitas!";
}
[ConsoleCommand("")]
public static string ListChara()
{
@@ -1980,27 +2030,6 @@ public static string FlyMode()
return "I can fly!";
}
[ConsoleCommand("")]
public static string RemoveDemitas()
{
List<Chara> list = new List<Chara>();
foreach (Chara value in EClass.game.cards.globalCharas.Values)
{
if (value.id == "demitas" && value.currentZone == EClass._zone)
{
list.Add(value);
}
}
if (list.Count > 1)
{
Chara chara = list[1];
chara.homeBranch.BanishMember(chara);
chara.Destroy();
return "Demitas Removed!";
}
return "Not enough Demitas!";
}
[ConsoleCommand("")]
public static string ChangeRace(string id = "?")
{
ELEMENT
@@ -21,14 +21,14 @@ public class ELEMENT
public const int _void = 0;
public const int socket = 5;
public const int quality = 2;
public const int lv = 1;
public const int quality = 2;
public const int d = 3;
public const int socket = 5;
public const int nutrition = 10;
public const int weight = 11;
@@ -67,8 +67,8 @@ public class ELEMENT
public static readonly int[] IDS = new int[30]
{
753, 755, 751, 750, 756, 754, 752, 0, 5, 1,
2, 3, 10, 11, 12, 13, 14, 16, 17, 18,
753, 755, 751, 750, 756, 754, 752, 0, 2, 1,
3, 5, 10, 11, 12, 13, 14, 16, 17, 18,
15, 21, 22, 23, 24, 25, 26, 29, 85, 20
};
}
@@ -923,9 +923,10 @@ public static int GetResistDamage(int dmg, int v, int power = 0)
3 => dmg / 4,
2 => dmg / 3,
1 => dmg / 2,
0 => dmg,
-1 => dmg * 3 / 2,
-2 => dmg * 2,
_ => dmg,
_ => dmg * 2,
};
}
}
ENC
public class ENC
{
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 mod_scatter = 607;
public const int r_life = 640;
public const int mod_flurry = 621;
public const int mod_chaser = 620;
public const int r_life = 640;
public const int mod_feint = 623;
public const int onlyPet = 655;
public const int mod_cleave = 622;
public const int r_DV = 650;
public const int living = 653;
public const int permaCurse = 656;
public const int mod_frustration = 624;
public const int noDamage = 654;
public const int convertCold = 851;
public const int permaCurse = 656;
public const int absorbHP = 660;
public const int absorbMP = 661;
public const int absorbSP = 662;
@@ -38,19 +44,19 @@ public class ENC
public const int convertFire = 850;
public const int mod_drill = 606;
public const int mod_splash = 608;
public const int convertImpact = 865;
public const int convertLightning = 852;
public const int absorbHP = 660;
public const int onlyPet = 655;
public const int mod_precision = 605;
public const int mod_scatter = 607;
public const int resWeather = 408;
public const int bane_animal = 463;
public const int mod_ammo_knockback = 603;
public const int mod_precision = 605;
public const int breathing = 429;
@@ -62,7 +68,7 @@ public class ENC
public const int negateConfusion = 425;
public const int negateSleep = 424;
public const int mod_drill = 606;
public const int negateFear = 423;
@@ -74,21 +80,23 @@ public class ENC
public const int seeInvisible = 416;
public const int sustain_STR = 440;
public const int invisibility = 415;
public const int slowCorruption = 412;
public const int encSpell = 411;
public const int throwReturn = 410;
public const int corruption = 409;
public const int resWeather = 408;
public const int travelSpeed = 407;
public const int resMutation = 406;
public const int mod_ammo_recover = 604;
public const int slowDecay = 405;
public const int weightMod = 404;
@@ -100,22 +108,26 @@ public class ENC
public const int negateTeleport = 400;
public const int slowCorruption = 412;
public const int sustain_STR = 440;
public const int sustain_END = 441;
public const int slowDecay = 405;
public const int negateSleep = 424;
public const int force_weapon = 482;
public const int mod_ammo = 600;
public const int mod_ammo_recover = 604;
public const int mod_ammo_knockback = 603;
public const int mod_rapid = 602;
public const int mod_reload = 601;
public const int mod_ammo = 600;
public const int optimizeMana = 483;
public const int force_weapon = 482;
public const int revealFaith = 481;
public const int strongStomach = 480;
@@ -124,15 +136,13 @@ public class ENC
public const int bane_fish = 467;
public const int bane_god = 466;
public const int bane_machine = 465;
public const int bane_man = 464;
public const int bane_animal = 463;
public const int bane_fairy = 462;
public const int bane_god = 466;
public const int bane_machine = 465;
public const int bane_undead = 461;
public const int bane_dragon = 460;
@@ -144,21 +154,21 @@ public class ENC
public const int sustain_LER = 444;
public const int bane_undead = 461;
public const int bane_fairy = 462;
public const int sustain_PER = 443;
public const int sustain_DEX = 442;
public static readonly int[] IDS = new int[75]
public static readonly int[] IDS = new int[80]
{
654, 653, 652, 651, 641, 607, 620, 640, 655, 650,
656, 851, 661, 662, 663, 664, 665, 666, 850, 606,
865, 852, 660, 605, 408, 603, 429, 428, 427, 426,
425, 424, 423, 422, 421, 420, 416, 440, 415, 411,
410, 409, 407, 406, 604, 404, 403, 402, 401, 400,
412, 441, 405, 482, 602, 601, 600, 483, 481, 480,
468, 467, 466, 464, 463, 462, 465, 460, 447, 446,
445, 444, 461, 443, 442
652, 651, 650, 641, 640, 621, 620, 623, 622, 653,
624, 654, 851, 656, 660, 661, 662, 663, 664, 665,
666, 850, 608, 865, 852, 655, 607, 463, 605, 429,
428, 427, 426, 425, 606, 423, 422, 421, 420, 416,
415, 412, 411, 410, 409, 408, 407, 406, 405, 404,
403, 402, 401, 400, 440, 441, 424, 600, 604, 603,
602, 601, 483, 482, 481, 480, 468, 467, 465, 464,
466, 461, 460, 447, 446, 445, 444, 462, 443, 442
};
}
FACTION
public class FACTION
{
public const int bfBeach = 3604;
public const int bfCave = 3500;
public const int bfPlain = 3600;
public const int bfForest = 3601;
public const int bfSnow = 3602;
public const int bfRuin = 3702;
public const int bfHill = 3603;
public const int bfGeyser = 3701;
public const int bfFertile = 3700;
public const int bfSea = 3605;
public const int bfBeach = 3604;
public const int bfCave = 3500;
public const int bfGeyser = 3701;
public const int fRation = 2207;
public const int actBuildCollect = 4004;
public const int bfRuin = 3702;
public const int fSafety = 2205;
public const int fAttraction = 2206;
public const int fLoyal = 2117;
public const int fFood = 2204;
@@ -38,37 +38,41 @@ public class FACTION
public const int fElec = 2201;
public const int bfTranquil = 3703;
public const int fSoil = 2200;
public const int fLuck = 2118;
public const int fConstruction = 2003;
public const int fHeirloom = 2120;
public const int fTaxEvasion = 2119;
public const int fLuck = 2118;
public const int fAdmin = 2115;
public const int fLoyal = 2117;
public const int fEducation = 2116;
public const int fAttraction = 2206;
public const int fSafety = 2205;
public const int bfVolcano = 3704;
public const int bfTranquil = 3703;
public const int bfLandmark5 = 3784;
public const int bfHunt = 3705;
public const int bfFish = 3706;
public const int actBuildInspect = 4006;
public const int actBuildRecipe = 4005;
public const int actBuildInspect = 4006;
public const int actBuildCollect = 4004;
public const int actBuildAnywhere = 4003;
public const int actBuildTerrain = 4002;
public const int actBuildMine = 4001;
public const int fEducation = 2116;
public const int actBuildCut = 4000;
public const int bfVolcano = 3704;
public const int bfStart = 3900;
@@ -78,44 +82,40 @@ public class FACTION
public const int bfGum = 3803;
public const int bfHunt = 3705;
public const int bfSilica = 3802;
public const int actBuildCut = 4000;
public const int bfCoal = 3800;
public const int bfMushroom = 3801;
public const int actBuildAnywhere = 4003;
public const int bfSilica = 3802;
public const int bfLandmark4 = 3783;
public const int bfFreshAir = 3708;
public const int bfLandmark3 = 3782;
public const int bfBasin = 3709;
public const int bfLandmark2 = 3781;
public const int bfBreed = 3710;
public const int bfLandmark1 = 3780;
public const int bfBreed = 3710;
public const int bfBasin = 3709;
public const int bfMonster = 3707;
public const int bfFreshAir = 3708;
public const int bfLandmark3 = 3782;
public const int bfMonster = 3707;
public const int bfLandmark4 = 3783;
public const int bfMushroom = 3801;
public const int bfLandmark5 = 3784;
public const int fAdmin = 2115;
public const int bfCoal = 3800;
public const int fConstruction = 2003;
public const int bfLandmark2 = 3781;
public static readonly int[] IDS = new int[52]
{
3600, 3601, 3602, 3702, 3603, 3700, 3605, 3604, 3500, 3701,
2207, 4004, 2205, 2204, 2203, 2202, 2201, 3703, 2200, 2120,
2119, 2118, 2117, 2206, 3704, 3784, 3706, 4005, 4006, 4002,
4001, 2116, 4000, 3900, 3805, 3804, 3803, 3705, 3802, 3800,
4003, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707, 3801,
2115, 2003
3604, 3500, 3600, 3601, 3602, 3603, 3701, 3700, 3605, 2207,
3702, 2206, 2117, 2204, 2203, 2202, 2201, 2200, 2118, 2003,
2120, 2119, 2115, 2116, 2205, 3703, 3705, 3706, 4006, 4005,
4004, 4003, 4002, 4001, 3704, 3900, 3805, 3804, 3803, 4000,
3801, 3802, 3708, 3709, 3710, 3780, 3707, 3782, 3783, 3784,
3800, 3781
};
}
public class Faction : EClass
FEAT
public class FEAT
{
public const int featSnail = 1211;
public const int featFaith = 1636;
public const int featMartial = 1635;
public const int featNegotiate = 1634;
public const int featSpotting = 1633;
public const int featEvade = 1632;
public const int featDefense = 1631;
public const int featHardy = 1630;
public const int featSPD = 1629;
public const int featLuck = 1628;
public const int featCHA = 1627;
public const int featWIL = 1626;
public const int featAnimalLover = 1640;
public const int featMAG = 1625;
public const int featLER = 1624;
public const int featPER = 1623;
public const int featEND = 1622;
@@ -41,7 +23,7 @@ public class FEAT
public const int featStamina = 1612;
public const int featMana = 1611;
public const int featLuckyCat = 1412;
public const int featLife = 1610;
@@ -53,39 +35,31 @@ public class FEAT
public const int featSwordsage = 1418;
public const int featLER = 1624;
public const int featResCurse = 1641;
public const int featSleeper = 1642;
public const int featSorter = 1643;
public const int featUndead = 1210;
public const int featWitch = 1417;
public const int featSlowFood = 1200;
public const int featInquisitor = 1416;
public const int featManaBond = 1201;
public const int featFoxMaid = 1415;
public const int featFastLearner = 1202;
public const int featWhiteVixen = 1414;
public const int featGrowParts = 1203;
public const int featFairysan = 1413;
public const int featFairyWeak = 1204;
public const int featSPD = 1629;
public const int featCannibalism = 1205;
public const int featMana = 1611;
public const int featMelilithCurse = 1206;
public const int featHardy = 1630;
public const int featFoxBless = 1207;
public const int featParty = 1645;
public const int featFoxLearn = 1208;
public const int featEvade = 1632;
public const int featFluffyTail = 1209;
public const int featEarthStrength = 1411;
public const int featChef = 1658;
public const int featScavenger = 1656;
public const int featManaCost = 1657;
public const int featModelBeliever = 1655;
@@ -101,23 +75,57 @@ public class FEAT
public const int featDefender = 1649;
public const int featDefense = 1631;
public const int featRapidMagic = 1648;
public const int featLonelySoul = 1646;
public const int featBodyParts = 1644;
public const int featSorter = 1643;
public const int featSleeper = 1642;
public const int featResCurse = 1641;
public const int featAnimalLover = 1640;
public const int featFaith = 1636;
public const int featMartial = 1635;
public const int featNegotiate = 1634;
public const int featSpotting = 1633;
public const int featSummoner = 1647;
public const int featLonelySoul = 1646;
public const int featReboot = 1410;
public const int featParty = 1645;
public const int featScavenger = 1656;
public const int featBodyParts = 1644;
public const int featPaladin2 = 1408;
public const int featWitch = 1417;
public const int featShiva = 1224;
public const int featInquisitor = 1416;
public const int featLoyal = 1225;
public const int featManaCost = 1657;
public const int featUnderground = 1226;
public const int featWhiteVixen = 1414;
public const int featServant = 1227;
public const int featDemigod = 1228;
public const int featLittleOne = 1229;
public const int featAdam = 1230;
public const int featNirvana = 1231;
public const int featCosmicHorror = 1233;
public const int featHeavyEater = 1234;
public const int featLightEater = 1235;
@@ -131,6 +139,8 @@ public class FEAT
public const int featGod_earth1 = 1305;
public const int featGod_wind1 = 1310;
public const int featGod_machine1 = 1315;
public const int featGod_healing1 = 1320;
@@ -139,33 +149,41 @@ public class FEAT
public const int featGod_luck1 = 1330;
public const int featAcidBody = 1223;
public const int featGod_harmony1 = 1335;
public const int featGod_oblivion1 = 1340;
public const int featSplit = 1222;
public const int featGod_trickery1 = 1345;
public const int featFate = 1220;
public const int featGod_moonshadow1 = 1350;
public const int featBoost = 1409;
public const int featGod_strife1 = 1355;
public const int featSlowFood = 1200;
public const int featWarrior = 1400;
public const int featManaBond = 1201;
public const int featThief = 1401;
public const int featFastLearner = 1202;
public const int featWizard = 1402;
public const int featGrowParts = 1203;
public const int featFarmer = 1403;
public const int featFairyWeak = 1204;
public const int featHeavyEater = 1234;
public const int featCannibalism = 1205;
public const int featCosmicHorror = 1233;
public const int featMelilithCurse = 1206;
public const int featBaby = 1232;
public const int featFoxBless = 1207;
public const int featNirvana = 1231;
public const int featFoxLearn = 1208;
public const int featFoxMaid = 1415;
public const int featFluffyTail = 1209;
public const int featUndead = 1210;
public const int featSnail = 1211;
public const int featFairyResist = 1212;
public const int featElea = 1213;
@@ -181,66 +199,48 @@ public class FEAT
public const int featElderCrab = 1219;
public const int featFate = 1220;
public const int featArcher = 1404;
public const int featSpike = 1221;
public const int featAcidBody = 1223;
public const int featFairyResist = 1212;
public const int featGod_oblivion1 = 1340;
public const int featShiva = 1224;
public const int featBaby = 1232;
public const int featLoyal = 1225;
public const int featGod_moonshadow1 = 1350;
public const int featUnderground = 1226;
public const int featGod_trickery1 = 1345;
public const int featServant = 1227;
public const int featGod_strife1 = 1355;
public const int featDemigod = 1228;
public const int featWarrior = 1400;
public const int featLittleOne = 1229;
public const int featThief = 1401;
public const int featAdam = 1230;
public const int featFarmer = 1403;
public const int featSplit = 1222;
public const int featArcher = 1404;
public const int featPianist = 1405;
public const int featGod_wind1 = 1310;
public const int featPaladin = 1407;
public const int featTourist = 1406;
public const int featEarthStrength = 1411;
public const int featLuckyCat = 1412;
public const int featReboot = 1410;
public const int featFairysan = 1413;
public const int featBoost = 1409;
public const int featWizard = 1402;
public const int featPaladin2 = 1408;
public const int featPaladin = 1407;
public static readonly int[] IDS = new int[112]
{
1211, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628,
1627, 1626, 1640, 1625, 1623, 1622, 1621, 1620, 1612, 1611,
1610, 1421, 1420, 1419, 1418, 1624, 1641, 1642, 1643, 1210,
1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209,
1658, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648,
1647, 1646, 1645, 1644, 1417, 1416, 1657, 1414, 1235, 1236,
1237, 1238, 1300, 1305, 1315, 1320, 1325, 1330, 1335, 1340,
1345, 1350, 1355, 1400, 1401, 1402, 1403, 1234, 1233, 1232,
1231, 1415, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220,
1404, 1221, 1223, 1212, 1224, 1225, 1226, 1227, 1228, 1229,
1230, 1222, 1405, 1310, 1407, 1406, 1411, 1412, 1410, 1413,
1409, 1408
1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1612,
1412, 1610, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414,
1413, 1629, 1611, 1630, 1645, 1632, 1411, 1658, 1657, 1655,
1654, 1653, 1652, 1651, 1650, 1649, 1631, 1648, 1646, 1644,
1643, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1647, 1410,
1656, 1408, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231,
1233, 1234, 1235, 1236, 1237, 1238, 1300, 1305, 1310, 1315,
1320, 1325, 1330, 1223, 1335, 1222, 1220, 1409, 1200, 1201,
1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211,
1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1221, 1340,
1232, 1350, 1345, 1355, 1400, 1401, 1403, 1404, 1405, 1406,
1402, 1407
};
}
public class Feat : Element
FOOD
public class FOOD
{
public const int justcooked = 757;
public const int loseWeight = 706;
public const int food_poison = 702;
public const int gainWeight = 705;
public const int food_love = 703;
public const int food_bug = 704;
public const int food_love = 703;
public const int gainWeight = 705;
public const int food_poison = 702;
public const int loseWeight = 706;
public const int food_cat = 701;
public const int justcooked = 757;
public const int food_god = 758;
public const int food_cat = 701;
public const int food_CHA = 700;
public static readonly int[] IDS = new int[9] { 757, 706, 705, 704, 703, 702, 701, 758, 700 };
public static readonly int[] IDS = new int[9] { 702, 703, 704, 705, 706, 757, 758, 701, 700 };
}
GoalCombat
@@ -461,6 +461,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
bool flag3 = owner.HasCondition<ConFear>();
bool isConfused = owner.isConfused;
bool flag4 = owner.HasCondition<ConDim>();
bool flag5 = owner.HasCondition<ConSupress>();
foreach (ItemAbility ability in abilities)
{
Act act = ability.act;
@@ -478,7 +479,7 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
continue;
}
string text = s.abilityType[0];
if (id == 6602 && (dist <= 1 || tc.HasCondition<ConEntangle>()))
if ((flag5 && !(text == "melee") && !(text == "range") && EClass.rnd(2) == 0) || (id == 6602 && (dist <= 1 || tc.HasCondition<ConEntangle>())))
{
continue;
}
@@ -497,9 +498,9 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
break;
case "taunt":
{
bool flag6 = owner.HasCondition<StanceTaunt>();
bool flag7 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt;
num = ((flag6 && !flag7) ? 100 : ((!flag6 && flag7) ? 100 : 0));
bool flag7 = owner.HasCondition<StanceTaunt>();
bool flag8 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt;
num = ((flag7 && !flag8) ? 100 : ((!flag7 && flag8) ? 100 : 0));
break;
}
case "melee":
@@ -578,13 +579,13 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
{
continue;
}
bool flag8 = text == "dot";
if (flag8 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident)))
bool flag9 = text == "dot";
if (flag9 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident)))
{
continue;
}
num = ((text == "attackMelee") ? tactics.P_Melee : tactics.P_Spell) + GetAttackMod(act);
if (num > 0 && flag8)
if (num > 0 && flag9)
{
num += 10;
}
@@ -596,13 +597,13 @@ public virtual bool TryUseAbility(int dist, bool beforeMove = false)
{
continue;
}
bool flag5 = ability.act is ActBolt;
bool flag6 = ability.act is ActBolt;
if (!flag || (owner.IsPCParty && (EClass._zone.IsTown || EClass._zone.IsPCFaction)) || (act.id == 9150 && EClass._zone.IsPCFaction && owner.IsNeutralOrAbove()))
{
continue;
}
GetNumEnemy(flag5 ? 6 : 5);
if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag5 ? 6 : 5) > 0))
GetNumEnemy(flag6 ? 6 : 5);
if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag6 ? 6 : 5) > 0))
{
continue;
}
GrowSystem
@@ -614,7 +614,7 @@ public void PopHarvest(Chara c, Thing t = null, int num = -1)
{
if (!EClass.player.isAutoFarming)
{
c.Say("cropSpoiled", c, cell.GetObjName());
c?.Say("cropSpoiled", c, cell.GetObjName());
}
return;
}
HitSummary
@@ -59,15 +59,34 @@ public bool CanExecute()
{
if (!recipe.UseStock)
{
Dictionary<Thing, int> dictionary = new Dictionary<Thing, int>();
foreach (Recipe.Ingredient ingredient in recipe.ingredients)
{
if (!ingredient.optional)
if (ingredient.thing != null)
{
if (ingredient.thing == null)
if (!dictionary.ContainsKey(ingredient.thing))
{
dictionary.Add(ingredient.thing, 0);
}
dictionary[ingredient.thing] += ingredient.req * countValid;
}
}
foreach (KeyValuePair<Thing, int> item in dictionary)
{
if (item.Key.Num < item.Value)
{
return false;
}
}
foreach (Recipe.Ingredient ingredient2 in recipe.ingredients)
{
if (!ingredient2.optional)
{
if (ingredient2.thing == null)
{
return false;
}
if (ingredient.thing.Num < ingredient.req * countValid)
if (ingredient2.thing.Num < ingredient2.req * countValid)
{
return false;
}
Hobby
@@ -30,17 +30,18 @@ public int GetLv(Chara c)
public int GetEfficiency(Chara c)
{
int num = 50;
if (c.homeBranch == null || c.currentZone != c.homeBranch.owner)
FactionBranch factionBranch = ((c.currentZone == null) ? EClass._zone.branch : c.homeBranch);
if (factionBranch == null || (c.currentZone != null && c.currentZone != factionBranch.owner))
{
return 0;
}
if (c.currentZone == EClass._zone)
if (c.currentZone == null || c.currentZone == EClass._zone)
{
if ((!source.destTrait.IsEmpty() || !source.workTag.IsEmpty()) && !GetAI(c).SetDestination())
{
return 0;
}
if (c.noMove && c.pos.FindThing<TraitGeneratorWheel>() != null)
if (c.noMove && c.pos != null && c.pos.FindThing<TraitGeneratorWheel>() != null)
{
return 0;
}
@@ -62,7 +63,7 @@ public int GetEfficiency(Chara c)
{
num += c.affinity.value;
}
num = num * (100 + c.homeBranch.Evalue(3708) * 10) / 100;
num = num * (100 + factionBranch.Evalue(3708) * 10) / 100;
if (num >= 0)
{
return num;
ListPeopleCallReserve
@@ -8,40 +8,40 @@ public class ListPeopleCallReserve : BaseListPeople
public override void OnInstantiate(Chara a, ItemGeneral b)
{
b.SetSubText(a.job.GetName().ToTitleCase(), 280);
if (!a.trait.CanBeBanished)
if (a.trait.CanBeBanished)
{
return;
}
b.AddSubButton(EClass.core.refs.icons.trash, delegate
{
Action func = delegate
{
EClass.Home.RemoveReserve(a);
a.OnBanish();
list.List();
SE.Trash();
};
if (skipDialog)
b.AddSubButton(EClass.core.refs.icons.trash, delegate
{
func();
}
else
{
Dialog.Choice("dialogDeleteRecruit", delegate(Dialog d)
Action func = delegate
{
d.AddButton("yes".lang(), delegate
{
func();
});
d.AddButton("yesAndSkip".lang(), delegate
EClass.Home.RemoveReserve(a);
a.OnBanish();
list.List();
SE.Trash();
};
if (skipDialog)
{
func();
}
else
{
Dialog.Choice("dialogDeleteRecruit", delegate(Dialog d)
{
func();
skipDialog = true;
d.AddButton("yes".lang(), delegate
{
func();
});
d.AddButton("yesAndSkip".lang(), delegate
{
func();
skipDialog = true;
});
d.AddButton("no".lang());
});
d.AddButton("no".lang());
});
}
});
}
});
}
AddSubButtonWork(b, a);
}
public override void OnClick(Chara c, ItemGeneral i)
MUTATION
public class MUTATION
{
public const int mutationStr = 1520;
public const int mutationSpeedN = 1519;
public const int mutationSpeed = 1518;
public const int mutationRegenN = 1517;
public const int mutationSkinN = 1511;
public const int mutationRegen = 1516;
public const int mutationDexN = 1515;
public const int mutationEyeN = 1513;
public const int mutationEye = 1512;
public const int mutationDex = 1514;
public const int mutationSkin = 1510;
public const int mutationStrN = 1521;
public const int mutationEye = 1512;
public const int mutationRegen = 1516;
public const int mutationSkinN = 1511;
public const int mutationCha = 1522;
public const int mutationRegenN = 1517;
public const int mutationDex = 1514;
public const int mutationEyeN = 1513;
public const int mutationBrain = 1524;
public const int mutationSpeed = 1518;
public const int etherPoisonHand = 1565;
public const int mutationChaN = 1523;
public const int mutationStr = 1520;
public const int etherManaBattery = 1564;
public const int etherProvoke = 1563;
public const int etherArmor = 1562;
public const int mutationSpeedN = 1519;
public const int etherStupid = 1561;
@@ -52,36 +44,44 @@ public class MUTATION
public const int etherWing = 1554;
public const int etherManaBattery = 1564;
public const int etherEye = 1553;
public const int etherFeet = 1552;
public const int etherUgly = 1551;
public const int etherArmor = 1562;
public const int etherGravity = 1550;
public const int mutationCha = 1522;
public const int mutationBodyN = 1531;
public const int mutationStrN = 1521;
public const int mutationBody = 1530;
public const int mutationChaN = 1523;
public const int mutationLightningN = 1529;
public const int mutationBrain = 1524;
public const int mutationLightning = 1528;
public const int mutationCold = 1526;
public const int mutationColdN = 1527;
public const int mutationCold = 1526;
public const int mutationBrainN = 1525;
public const int mutationLightningN = 1529;
public const int mutationBody = 1530;
public const int mutationBodyN = 1531;
public const int etherGravity = 1550;
public const int mutationLightning = 1528;
public const int etherUgly = 1551;
public static readonly int[] IDS = new int[38]
{
1520, 1519, 1518, 1517, 1511, 1515, 1513, 1512, 1510, 1521,
1516, 1522, 1514, 1524, 1565, 1523, 1563, 1562, 1561, 1560,
1559, 1558, 1557, 1556, 1555, 1554, 1564, 1553, 1552, 1551,
1550, 1531, 1530, 1529, 1528, 1527, 1526, 1525
1516, 1515, 1514, 1510, 1512, 1511, 1517, 1513, 1518, 1565,
1520, 1564, 1563, 1519, 1561, 1560, 1559, 1558, 1557, 1556,
1555, 1554, 1553, 1552, 1562, 1522, 1521, 1523, 1524, 1526,
1527, 1525, 1529, 1530, 1531, 1550, 1528, 1551
};
}
public class Mutation : Feat
POLICY
public class POLICY
{
public const int bed_quality = 2812;
public const int platinum_ticket = 2815;
public const int mass_exhibition = 2814;
public const int suite_room = 2813;
public const int livestock_priv = 2715;
public const int tourist_safety = 2811;
public const int forcePanty = 2712;
public const int open_business = 2810;
public const int home_discount = 2800;
public const int livestock_priv = 2715;
public const int store_ripoff = 2816;
public const int bed_quality = 2812;
public const int tourist_safety = 2811;
public const int store_premium = 2817;
public const int celeb = 2822;
public const int license_stolen = 2824;
public const int license_furniture = 2819;
@@ -31,12 +33,10 @@ public class POLICY
public const int legendary_heirloom = 2821;
public const int forcePanty = 2712;
public const int celeb = 2822;
public const int legendary_exhibition = 2823;
public const int license_stolen = 2824;
public const int milk_fan = 2825;
public const int egg_fan = 2826;
@@ -49,7 +49,7 @@ public class POLICY
public const int incomeTransfer = 2711;
public const int self_sufficient = 2511;
public const int nocturnal_life = 2508;
public const int noAnimal = 2709;
@@ -57,39 +57,37 @@ public class POLICY
public const int wealth_tax = 2500;
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 impressment = 2504;
public const int legal_drug = 2505;
public const int inquisition = 2507;
public const int human_right = 2506;
public const int nocturnal_life = 2508;
public const int faith_tax = 2501;
public const int vaccination = 2509;
public const int ban_radio = 2510;
public const int self_sufficient = 2511;
public const int resident_tax = 2512;
public const int human_right = 2506;
public const int inquisition = 2507;
public const int taxfree = 2514;
public const int auto_farm = 2707;
public const int resident_wanted = 2513;
public const int demon_invocation = 2706;
public const int taxTransfer = 2705;
public const int resident_wanted = 2513;
public const int noDM = 2708;
public const int taxTransfer = 2705;
public const int weed_no = 2703;
@@ -105,14 +103,16 @@ public class POLICY
public const int trash_no = 2702;
public const int noDM = 2708;
public static readonly int[] IDS = new int[51]
{
2815, 2814, 2813, 2715, 2811, 2810, 2800, 2816, 2812, 2817,
2822, 2819, 2820, 2821, 2712, 2823, 2824, 2825, 2826, 2827,
2828, 2818, 2711, 2511, 2709, 2710, 2500, 2503, 2502, 2501,
2504, 2505, 2507, 2508, 2509, 2510, 2512, 2506, 2514, 2707,
2513, 2706, 2705, 2708, 2703, 2704, 2701, 2700, 2516, 2515,
2702
2812, 2815, 2814, 2813, 2712, 2810, 2800, 2715, 2816, 2811,
2817, 2824, 2819, 2820, 2821, 2822, 2823, 2825, 2826, 2827,
2828, 2818, 2711, 2508, 2709, 2710, 2500, 2504, 2503, 2502,
2505, 2506, 2501, 2509, 2510, 2511, 2512, 2507, 2514, 2707,
2706, 2513, 2705, 2703, 2704, 2701, 2700, 2516, 2515, 2702,
2708
};
}
public class Policy : EClass
Religion
@@ -276,7 +276,7 @@ public bool IsValidArtifact(string id)
};
}
public static void Reforge(string id, Point pos = null, bool first = true)
public static Thing Reforge(string id, Point pos = null, bool first = true)
{
if (pos == null)
{
@@ -376,6 +376,7 @@ public static void Reforge(string id, Point pos = null, bool first = true)
{
pos.PlaySound("godbless");
}
return thing;
}
public virtual void OnBecomeBranchFaith()
RenderRow
@@ -273,6 +273,10 @@ public Sprite GetSprite(int dir = 0, int skin = 0, bool snow = false)
{
skin = 0;
}
if (dir < 0)
{
dir *= -1;
}
if (dir >= array.Length)
{
dir = 0;
SKILL
@@ -2,19 +2,19 @@ public class SKILL
{
public const int twowield = 131;
public const int armorHeavy = 122;
public const int twohand = 130;
public const int shield = 123;
public const int armorHeavy = 122;
public const int fireproof = 50;
public const int weaponCrossbow = 109;
public const int weaponBlunt = 111;
public const int weaponScythe = 110;
public const int weaponCrossbow = 109;
public const int fireproof = 50;
public const int acidproof = 51;
@@ -24,7 +24,7 @@ public class SKILL
public const int marksman = 133;
public const int fishing = 245;
public const int riding = 226;
public const int strategy = 135;
@@ -40,7 +40,7 @@ public class SKILL
public const int digging = 230;
public const int riding = 226;
public const int parasite = 227;
public const int lumberjack = 225;
@@ -66,6 +66,8 @@ public class SKILL
public const int evasionPerfect = 57;
public const int fishing = 245;
public const int life = 60;
public const int mana = 61;
@@ -92,11 +94,11 @@ public class SKILL
public const int LER = 74;
public const int WIL = 75;
public const int EDR = 56;
public const int MAG = 76;
public const int WIL = 75;
public const int CHA = 77;
public const int LUC = 78;
@@ -118,19 +120,17 @@ public class SKILL
public const int weaponBow = 104;
public const int weaponGun = 105;
public const int weaponPolearm = 106;
public const int weaponDagger = 107;
public const int throwing = 108;
public const int CHA = 77;
public const int MAG = 76;
public const int gathering = 250;
public const int parasite = 227;
public const int weaponGun = 105;
public const int blacksmith = 256;
@@ -264,13 +264,13 @@ public class SKILL
public static readonly int[] IDS = new int[131]
{
131, 130, 123, 122, 50, 111, 110, 109, 51, 132,
120, 133, 245, 135, 242, 241, 240, 237, 235, 230,
226, 225, 220, 210, 207, 200, 152, 151, 150, 134,
55, 101, 57, 60, 61, 62, 64, 65, 66, 67,
68, 70, 71, 72, 73, 74, 75, 56, 76, 78,
79, 80, 90, 91, 92, 100, 102, 103, 104, 105,
106, 107, 108, 77, 250, 227, 256, 916, 917, 918,
131, 122, 130, 123, 109, 111, 110, 50, 51, 132,
120, 133, 226, 135, 242, 241, 240, 237, 235, 230,
227, 225, 220, 210, 207, 200, 152, 151, 150, 134,
55, 101, 57, 245, 60, 61, 62, 64, 65, 66,
67, 68, 70, 71, 72, 73, 74, 56, 75, 77,
78, 79, 80, 90, 91, 92, 100, 102, 103, 104,
106, 107, 108, 76, 250, 105, 256, 916, 917, 918,
919, 920, 921, 922, 923, 924, 925, 950, 951, 952,
953, 954, 955, 956, 957, 958, 959, 960, 961, 962,
963, 964, 965, 971, 972, 255, 915, 914, 970, 912,
SourceElement
@@ -386,7 +386,7 @@ public void AddRow(Row ele, int id, string idOrg)
row2.alias = row.alias + ele.alias.Remove(0, 3);
row2.aliasRef = ele.alias;
row2.aliasParent = ele.aliasParent;
row2.chance = row.chance;
row2.chance = row.chance * ele.chance / 100;
row2.LV = row.LV;
row2.OnImportData(EClass.sources.elements);
rows.Add(row2);
SourceFood
@@ -105,6 +105,12 @@ public override void SetRow(Row r)
map[r.id] = r;
}
public override void Reset()
{
base.Reset();
EClass.sources.things.Reset();
}
public override void OnImportRow(Row _r, SourceThing.Row c)
{
List<int> list = new List<int>(c.elements);
SourceThingV
@@ -87,6 +87,12 @@ public override void ValidatePref()
}
}
public override void Reset()
{
base.Reset();
EClass.sources.things.Reset();
}
public override void OnAfterImportData()
{
Dictionary<string, SourceThing.Row> dictionary = new Dictionary<string, SourceThing.Row>();
+StanceFury
File Created
public class StanceFury : BaseStance
{
}
+StanceIai
File Created
public class StanceIai : BaseStance
{
}
Task
@@ -23,7 +23,7 @@ public override void OnSuccess()
Destroy();
}
public void TryLayer(int min = 30)
public void TryLater(int min = 30)
{
nextTry = EClass.game.sessionMin + min;
}
@@ -53,7 +53,7 @@ public virtual void OnDestroy()
public override Status Cancel()
{
TryLayer();
TryLater();
return base.Cancel();
}
TaskBuild
@@ -127,7 +127,7 @@ public override bool _CanPerformTask(Chara chara, int radius)
ingredient.thing = EClass._map.Stocked.Find(ingredient.id, ingredient.mat, ingredient.refVal);
if (ingredient.thing == null)
{
TryLayer();
TryLater();
return false;
}
}
Thing
@@ -1514,7 +1514,7 @@ public override void SetRenderParam(RenderParam p)
public override SubPassData GetSubPassData()
{
Chara chara = GetRootCard() as Chara;
if ((!trait.ShowAsTool || (chara == EClass.pc && HotItemHeld.disableTool)) && (chara?.held == this || (placeState != PlaceState.installed && renderer.data.subCrate.enable && parent is Zone)))
if ((!trait.ShowAsTool || (chara == EClass.pc && HotItemHeld.disableTool)) && (chara?.held == this || (!base.isRoofItem && placeState != PlaceState.installed && renderer.data.subCrate.enable && parent is Zone)))
{
if (!renderer.data.subCrate.enable)
{
Trait
@@ -204,6 +204,18 @@ public virtual InvGridSize InvGridSize
public virtual bool IsContainer => false;
public virtual bool CanSearchContent
{
get
{
if (IsContainer)
{
return owner.c_lockLv == 0;
}
return false;
}
}
public virtual bool CanOpenContainer
{
get
TraitAltar
@@ -153,8 +153,10 @@ public void OnOffer(Chara c, Thing t)
{
if (t.HasTag(CTAG.godArtifact) && t.c_idDeity == Deity.id)
{
int encLV = t.encLV;
t.Destroy();
Religion.Reforge(t.id);
t.SetEncLv(encLV);
return;
}
if (EClass.pc.IsEyth)
TraitMannequin
@@ -4,6 +4,8 @@ public class TraitMannequin : TraitItem
{
public override bool CanStack => false;
public override bool CanSearchContent => true;
public override bool UseAltTiles => owner.things.Count > 0;
public override bool CanUseFromInventory => false;
WidgetSearch
@@ -136,7 +136,7 @@ public override void Search(string s)
}
foreach (Card item in EMono._map.props.stocked.all)
{
if (!(item.parent is Thing { c_lockLv: <=0, IsContainer: not false }))
if (!(item.parent is Thing thing) || !thing.trait.CanSearchContent)
{
continue;
}