using UnityEngine; using System.Collections.Generic; [CreateAssetMenu(fileName = "NewEnemyData", menuName = "SO_Data/EnemyData")] public class EnemyData_SO : ScriptableObject { [Header("Inspector")] [Tooltip("Documentation text normalized.")] public string enemyName; public Sprite enemy_Image; public Sprite enemy_Profile; [Tooltip("Documentation text normalized.")] public int enemyID; [Header("Inspector")] public EnemyType enemyType = EnemyType.Simple; public enum EnemyType { Simple, Elite, Boss, Legend } [Header("Stats")] [Tooltip("Documentation text normalized.")] public int enemy_maxHP; [Tooltip("Documentation text normalized.")] public float enemy_damageResistance; [Tooltip("Documentation text normalized.")] public int enemy_baseAttack; // Documentation text normalized. [Tooltip("Documentation text normalized.")] public int enemy_maxMana = 0; [Header("Inspector")] public int scoreOnBeingDefeated; // Skills (same idea as AllyHero_SO) [Header("Skills")] public SkillDefinition[] availableSkills; [Tooltip("Indexes into availableSkills for preselected skills; empty means none selected")] public int[] selectedSkillIndices = new int[0]; [Tooltip("Primary selected skill index into availableSkills (-1 = none)")] public int primarySkillIndex = -1; public SkillDefinition GetPrimarySkill() { if (availableSkills == null || primarySkillIndex < 0 || primarySkillIndex >= availableSkills.Length) return null; return availableSkills[primarySkillIndex]; } // New: groups of skills. Each group contains a numeric skillGroupID and a variable-length list of SkillDefinitions. [Tooltip("Skill groups defined on this enemy. Each SkillGroup has a numeric skillGroupID which can be equipped into slots to allow activation of the entire group via that ID.")] public SkillGroup[] skillGroups = new SkillGroup[0]; [Tooltip("Equipped skill group IDs for this enemy. Each int references a skillGroupID defined in skillGroups. Use 0 to indicate empty.")] public int[] equippedSkillGroupIDs = new int[0]; // Helper to query effective max mana based on type public int GetEffectiveMaxMana() { // Treat configured enemy_maxMana as authoritative for runtime; designers can set to 0 if not used. return enemy_maxMana; } [Header("Combat Settings")] [Tooltip("Documentation text normalized.")] [Range(0f, 1f)] public float manaGainOnDamagePercent = 0.2f; // default 20% }