feat(factions): merchant catalog entries and hostility rules

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Ferdinando 2026-08-07 17:02:48 +02:00
commit 91eb5ca8e5
3 changed files with 68 additions and 10 deletions

View file

@ -74,8 +74,20 @@ namespace RacesOfValheim
if (p.m_customData.ContainsKey("Race") && p.m_customData["Race"] == TrentaConfig.RaceId)
{
string prefabName = monster.gameObject.name.ToLower();
// "fuling" matched nothing: the Fuling family's prefabs are Goblin,
// GoblinArcher, GoblinBrute and GoblinShaman, so the Trenta's truce with them
// never existed despite this file and TrentaConfig both describing it.
// Unlike the other entries here, the goblin name needs its bosses carved back
// out - Yagluth is GoblinKing, and Hildir's arena pair are GoblinBruteBros /
// *_Hildir - because a substring test would otherwise pacify all three.
bool isGoblinKin = prefabName.Contains("goblin")
&& !prefabName.Contains("goblinking")
&& !prefabName.Contains("hildir")
&& !prefabName.Contains("brutebros");
if (prefabName.Contains("greyling") || prefabName.Contains("greydwarf") ||
prefabName.Contains("fuling") || prefabName.Contains("troll") ||
isGoblinKin || prefabName.Contains("troll") ||
prefabName.Contains("leech") || prefabName.Contains("deathsquito"))
{
__result = false;