Merge branch 'main' into race-chains-and-stations
# Conflicts: # JotunnModStub/Aswid/AswidRace.cs # JotunnModStub/Factions/FactionHostilityPatch.cs # JotunnModStub/Factions/FactionMerchantCatalog.cs # JotunnModStub/Furling/FurlingPatches.cs
This commit is contained in:
commit
f60b8d8f7d
48 changed files with 1865 additions and 380 deletions
|
|
@ -145,7 +145,7 @@ namespace RacesOfValheim
|
|||
// StartsWith("Fenring") already covers Fenring_Cultist. "Fuling" was
|
||||
// never a prefab prefix - the family is Goblin* - so that arm of the
|
||||
// test matched nothing until now.
|
||||
if (mobName.StartsWith("Fenring") || mobName.StartsWith("Goblin"))
|
||||
if (mobName == "Cultist" || mobName.StartsWith("Fenring") || mobName.StartsWith("Goblin"))
|
||||
{
|
||||
burnTime = 1200f; // 20 minutes
|
||||
}
|
||||
|
|
@ -193,7 +193,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
DateTime lastTime = new DateTime(ticks);
|
||||
float elapsed = (float)(DateTime.Now - lastTime).TotalSeconds;
|
||||
float cooldown = (15f * 60f) - elapsed;
|
||||
float cooldown = AswidConfig.EnslaveCooldown.Value - elapsed;
|
||||
return Mathf.Max(0f, cooldown);
|
||||
}
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ namespace RacesOfValheim
|
|||
sensesCheckTimer -= Time.deltaTime;
|
||||
if (sensesCheckTimer <= 0f)
|
||||
{
|
||||
sensesCheckTimer = 1.0f; // Refresh every 1 second (TTL is 2s)
|
||||
sensesCheckTimer = AswidConfig.SensesRefreshInterval.Value; // TTL is 2s
|
||||
|
||||
List<Character> allChars = Character.GetAllCharacters();
|
||||
Vector3 myPos = Player.m_localPlayer.transform.position;
|
||||
|
|
@ -247,7 +247,7 @@ namespace RacesOfValheim
|
|||
if (c == null || c == Player.m_localPlayer || c.IsDead() || c.IsTamed()) continue;
|
||||
|
||||
float dist = Vector3.Distance(c.transform.position, myPos);
|
||||
if (dist <= 100f) // 100 meters detection radius
|
||||
if (dist <= AswidConfig.SensesRadius.Value)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -264,8 +264,8 @@ namespace RacesOfValheim
|
|||
Light pLight = lightObj.AddComponent<Light>();
|
||||
pLight.type = LightType.Point;
|
||||
pLight.color = Color.green;
|
||||
pLight.range = 10f;
|
||||
pLight.intensity = 2f;
|
||||
pLight.range = AswidConfig.SensesLightRange.Value;
|
||||
pLight.intensity = AswidConfig.SensesLightIntensity.Value;
|
||||
pLight.shadows = LightShadows.None;
|
||||
|
||||
activeSensesLight[c] = lightObj;
|
||||
|
|
@ -387,14 +387,14 @@ namespace RacesOfValheim
|
|||
|
||||
if (RaceInput.Allowed)
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.G)) { TryTransformWithRules(AswidProgression.GetGKeyRules(state)); return; }
|
||||
if (Input.GetKeyDown(KeyCode.H)) { TryToggleMistForm(); return; }
|
||||
if (Input.GetKeyDown(KeyCode.J))
|
||||
{
|
||||
TryCastEclipse(state);
|
||||
return;
|
||||
if (AswidConfig.BatFormKey.Value.IsDown()) { TryTransformWithRules(AswidProgression.GetGKeyRules(state)); return; }
|
||||
if (AswidConfig.MistFormKey.Value.IsDown()) { TryToggleMistForm(); return; }
|
||||
if (AswidConfig.EclipseKey.Value.IsDown())
|
||||
{
|
||||
TryCastEclipse(state);
|
||||
return;
|
||||
}
|
||||
if (Input.GetKeyDown(KeyCode.U))
|
||||
if (AswidConfig.TameKey.Value.IsDown())
|
||||
{
|
||||
TryTameHoverObject(state);
|
||||
return;
|
||||
|
|
@ -768,7 +768,7 @@ namespace RacesOfValheim
|
|||
|
||||
if (IsEclipseActive) return;
|
||||
|
||||
float cooldown = 900f; // 15 minutes
|
||||
float cooldown = AswidConfig.EclipseCooldown.Value;
|
||||
if (Time.time - lastEclipseTime < cooldown)
|
||||
{
|
||||
int remaining = (int)(cooldown - (Time.time - lastEclipseTime));
|
||||
|
|
@ -795,7 +795,7 @@ namespace RacesOfValheim
|
|||
Player.m_localPlayer.Message(MessageHud.MessageType.Center, "An Eclipse descends...");
|
||||
|
||||
float castTimer = 0f;
|
||||
while(castTimer < 2.0f)
|
||||
while(castTimer < AswidConfig.EclipseCastTime.Value)
|
||||
{
|
||||
// Force root player physically if possible without breaking their animator
|
||||
HarmonyLib.Traverse.Create(Player.m_localPlayer).Method("SetRun", false).GetValue();
|
||||
|
|
@ -810,7 +810,7 @@ namespace RacesOfValheim
|
|||
HarmonyLib.Traverse.Create(EnvMan.instance).Field("m_debugTimeOfDay").SetValue(0.5f); // Midnight
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(60f);
|
||||
yield return new WaitForSeconds(AswidConfig.EclipseDuration.Value);
|
||||
|
||||
// Revert to server time
|
||||
if (EnvMan.instance != null)
|
||||
|
|
@ -831,7 +831,7 @@ namespace RacesOfValheim
|
|||
private void HandleVampiricAura()
|
||||
{
|
||||
damageTickTimer += Time.deltaTime;
|
||||
if (damageTickTimer < 0.25f) return;
|
||||
if (damageTickTimer < AswidConfig.AuraTickInterval.Value) return;
|
||||
|
||||
damageTickTimer = 0f;
|
||||
PerformLifeDrain();
|
||||
|
|
@ -854,8 +854,8 @@ namespace RacesOfValheim
|
|||
try
|
||||
{
|
||||
Vector3 center = Player.m_localPlayer.transform.position;
|
||||
float radius = 3f;
|
||||
if (EnvMan.instance != null && EnvMan.IsNight()) radius = 6f;
|
||||
float radius = AswidConfig.AuraRadiusDay.Value;
|
||||
if (EnvMan.instance != null && EnvMan.IsNight()) radius = AswidConfig.AuraRadiusNight.Value;
|
||||
|
||||
int layerMask = LayerMask.GetMask("character", "character_net", "character_ghost");
|
||||
var colliders = Physics.OverlapSphere(center, radius, layerMask);
|
||||
|
|
@ -873,12 +873,12 @@ namespace RacesOfValheim
|
|||
float maxHp = c.GetMaxHealth();
|
||||
float currentHp = c.GetHealth();
|
||||
|
||||
float baseDamage = 1.0f;
|
||||
float baseDamage = AswidConfig.AuraBaseDamage.Value;
|
||||
float bloodMagicFactor = Player.m_localPlayer.GetSkillFactor(Skills.SkillType.BloodMagic);
|
||||
// Lo scaling aggiunge un massimo di +5.0 danni (al livello 100), indipendentemente dal danno base
|
||||
float totalDamage = (baseDamage + bloodMagicFactor * 5f) * GetAuraFormMultiplier();
|
||||
// Lo scaling aggiunge un massimo di +AuraBloodMagicScaling danni (al livello 100), indipendentemente dal danno base
|
||||
float totalDamage = (baseDamage + bloodMagicFactor * AswidConfig.AuraBloodMagicScaling.Value) * GetAuraFormMultiplier();
|
||||
|
||||
if (currentHp > 0 && currentHp <= maxHp * 0.20f && !c.IsBoss())
|
||||
if (currentHp > 0 && currentHp <= maxHp * AswidConfig.AuraExecuteThreshold.Value && !c.IsBoss())
|
||||
{
|
||||
totalDamage = currentHp * 2f; // Lethal damage for execute
|
||||
TryConsumeMob(c, maxHp, true); // Automatically devour when executed, bypassing cooldown
|
||||
|
|
@ -913,7 +913,7 @@ namespace RacesOfValheim
|
|||
{
|
||||
if (!DevourEnabled) return;
|
||||
|
||||
if (!bypassCooldown && Time.time - lastConsumeTime < 5f)
|
||||
if (!bypassCooldown && Time.time - lastConsumeTime < AswidConfig.DevourCooldown.Value)
|
||||
{
|
||||
return; // Cooldown active
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue