Add extra debug logs for Aura execute and consume
This commit is contained in:
parent
e31ed458bd
commit
152a2f21ad
1 changed files with 8 additions and 3 deletions
|
|
@ -1005,8 +1005,13 @@ namespace RacesOfValheim
|
|||
|
||||
if (currentHp > 0 && currentHp <= maxHp * 0.20f && !c.IsBoss())
|
||||
{
|
||||
Jotunn.Logger.LogInfo($"[AswidDebug] Aura Execution TRIGGERED on {c.name}! HP: {currentHp}/{maxHp}");
|
||||
totalDamage = currentHp * 2f; // Lethal damage for execute
|
||||
TryConsumeMob(c, maxHp); // Automatically devour when executed
|
||||
TryConsumeMob(c, maxHp, true); // Automatically devour when executed, bypassing cooldown
|
||||
}
|
||||
else
|
||||
{
|
||||
Jotunn.Logger.LogInfo($"[AswidDebug] Aura normal tick on {c.name}. HP: {currentHp}/{maxHp}");
|
||||
}
|
||||
|
||||
HitData hd = new HitData();
|
||||
|
|
@ -1028,12 +1033,12 @@ namespace RacesOfValheim
|
|||
public static bool DevourEnabled = true;
|
||||
private static float lastConsumeTime = 0f;
|
||||
|
||||
public static void TryConsumeMob(Character c, float maxHp)
|
||||
public static void TryConsumeMob(Character c, float maxHp, bool bypassCooldown = false)
|
||||
{
|
||||
if (!DevourEnabled) return;
|
||||
|
||||
Jotunn.Logger.LogInfo($"[AswidDebug] TryConsumeMob called for {c.name}");
|
||||
if (Time.time - lastConsumeTime < 5f)
|
||||
if (!bypassCooldown && Time.time - lastConsumeTime < 5f)
|
||||
{
|
||||
Jotunn.Logger.LogInfo($"[AswidDebug] TryConsumeMob aborted: Cooldown active. Time.time={Time.time}, lastConsumeTime={lastConsumeTime}");
|
||||
return; // Cooldown active
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue