fix(hs): make statues immune to friendly (same-team) damage
A player could destroy their own team's Heykel Savasi statue: the win-condition attribution (OnDestructibleDied) trusts geometry alone (attacker = Opponent of defender), and the old friendly-fire guard only covered Player targets, not Destructible statues. Block same-team damage at the NPC damage intake instead so only the enemy team can ever land a hit on a statue.
This commit is contained in:
@@ -109,6 +109,14 @@ public abstract class AttackableNpcBase : NonPlayerCharacter, IAttackable
|
||||
return null;
|
||||
}
|
||||
|
||||
// ADAMU-CUSTOM: Heykel Savasi -> a statue is immune to damage from its own team (only the enemy may break it).
|
||||
if (attacker is Player heykelStatueAttacker
|
||||
&& heykelStatueAttacker.CurrentMiniGame is MiniGames.HeykelSavasiContext heykelStatueGame
|
||||
&& heykelStatueGame.IsFriendlyStatue(this, heykelStatueAttacker))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var hitInfo = await attacker.CalculateDamageAsync(this, skill, isCombo, damageFactor).ConfigureAwait(false);
|
||||
|
||||
if (skill?.Skill is not { } attackSkill || attackSkill.DamageType != DamageType.Fenrir)
|
||||
|
||||
Reference in New Issue
Block a user