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:
Acentech Dev
2026-07-21 00:57:15 +03:00
parent e0fafe7e03
commit e6e93450b7
2 changed files with 16 additions and 0 deletions

View File

@@ -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)