编队系统重置 选角页面基本完成 等待存入playerprefs

This commit is contained in:
FloatGaming
2025-12-07 12:04:21 +08:00
parent 941b294fce
commit c0a822b958
134 changed files with 14796 additions and 198 deletions
+50
View File
@@ -1,4 +1,5 @@
using UnityEngine;
using System.Collections.Generic;
[CreateAssetMenu(fileName = "NewEnemyData", menuName = "SO_Data/EnemyData")]
public class EnemyData_SO : ScriptableObject
@@ -12,6 +13,17 @@ public class EnemyData_SO : ScriptableObject
[Tooltip("敌人ID")]
public int enemyID;
[Header("类型")]
public EnemyType enemyType = EnemyType.Simple;
public enum EnemyType
{
Simple,
Elite,
Boss,
Legend
}
[Header("Stats")]
[Tooltip("最大生命值")]
public int enemy_maxHP;
@@ -21,4 +33,42 @@ public class EnemyData_SO : ScriptableObject
[Tooltip("基础攻击力")]
public int enemy_baseAttack;
// 最大法力值(仅当 enemyType == Boss 或 Legend 时才生效)
[Tooltip("最大法力值(仅当类型为 Boss 或 Legend 时生效)")]
public int enemy_maxMana = 0;
// 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("受到伤害回复法力的比例(0-1),例如 0.2 表示根据所受伤害的 20% 回复法力,向上取整)")]
[Range(0f, 1f)]
public float manaGainOnDamagePercent = 0.2f; // default 20%
}