using UnityEngine;

[CreateAssetMenu(fileName = "DefensiveStrategy", menuName = "Hockey/Strategies/Defensive")]
public class DefensiveStrategy : AIStrategy
{
    public override Vector3 GetTargetPosition(PlayerController player, Transform puck)
    {
        // Stay between puck and net
        Vector3 netPosition = new Vector3(0, 0, -25f); // Adjust based on your rink
        return Vector3.Lerp(puck.position, netPosition, 0.5f);
    }

    public override PlayerAction DecideAction(PlayerController player, bool hasPuck)
    {
        if (hasPuck)
        {
            return PlayerAction.Pass;
        }

        float checkChance = player.mentality.checkingTendency / 100f;
        return Random.value < checkChance ? PlayerAction.Check : PlayerAction.DefendNet;
    }
}