diff --git a/JotunnModStub/Skadi/DrakeFormBehavior.cs b/JotunnModStub/Skadi/DrakeFormBehavior.cs index 331f6b9..c66e735 100644 --- a/JotunnModStub/Skadi/DrakeFormBehavior.cs +++ b/JotunnModStub/Skadi/DrakeFormBehavior.cs @@ -620,6 +620,7 @@ namespace RacesOfValheim hitData.SetAttacker(Player.m_localPlayer); target.Damage(hitData); + FormMelee.GrantAdrenaline(target); } } diff --git a/JotunnModStub/Sverm/SvermRavagerForm.cs b/JotunnModStub/Sverm/SvermRavagerForm.cs index bee58bb..22af4ba 100644 --- a/JotunnModStub/Sverm/SvermRavagerForm.cs +++ b/JotunnModStub/Sverm/SvermRavagerForm.cs @@ -1067,6 +1067,7 @@ namespace RacesOfValheim hitData.SetAttacker(player); target.Damage(hitData); + FormMelee.GrantAdrenaline(target); } } } diff --git a/JotunnModStub/Trenta/TrentaMuspell.cs b/JotunnModStub/Trenta/TrentaMuspell.cs index d3af9ef..67c3e79 100644 --- a/JotunnModStub/Trenta/TrentaMuspell.cs +++ b/JotunnModStub/Trenta/TrentaMuspell.cs @@ -496,6 +496,7 @@ namespace RacesOfValheim hitData.SetAttacker(attacker); target.Damage(hitData); + FormMelee.GrantAdrenaline(target); } } } diff --git a/JotunnModStub/Trol/TrolTrueFormBehavior.cs b/JotunnModStub/Trol/TrolTrueFormBehavior.cs index 710f2b2..f69daae 100644 --- a/JotunnModStub/Trol/TrolTrueFormBehavior.cs +++ b/JotunnModStub/Trol/TrolTrueFormBehavior.cs @@ -337,6 +337,7 @@ namespace RacesOfValheim aoe.m_hitOwner = false; aoe.m_hitProps = true; aoe.m_radius = Mathf.Max(aoe.m_radius, range * 0.6f); + instance.AddComponent(); aoe.Setup(player, player.transform.forward, -1f, hitData, null, null); spawned = true; } @@ -429,6 +430,7 @@ namespace RacesOfValheim if (targetObj != null) done.Add(targetObj); FormMelee.LogHit(FormLabel, target, damage.GetTotalDamage()); target.Damage(hitData); + FormMelee.GrantAdrenaline(target); profile.Shared.m_hitEffect.Create(targetCenter, Quaternion.identity); landed++; } @@ -437,6 +439,25 @@ namespace RacesOfValheim } } + /// Marks the Aoe a True Form slam spawned, so its hits can be told apart from a + /// real troll's. + internal class TrolSlamAoe : MonoBehaviour { } + + /// + /// Adrenaline for each creature the slam's Aoe lands on. Vanilla gives it inside Attack, and + /// an Aoe set up by hand never goes through one (FormMelee.GrantAdrenaline says why the sweeps + /// needed the same). + /// + [HarmonyPatch(typeof(Aoe), "OnHit")] + public static class Trol_SlamAoeAdrenaline_Patch + { + public static void Postfix(Aoe __instance, Collider collider, bool __result) + { + if (!__result || collider == null || __instance.GetComponent() == null) return; + FormMelee.GrantAdrenaline(collider.GetComponentInParent()); + } + } + /// /// The troll every other client sees. RemoteFenrirAnimator in shape: legs from the remote /// player's own Animator, which ZSyncAnimation keeps fed over the network, and attacks replayed