| using System.Collections.Generic; | 
| using UnityEngine; | 
|   | 
|   | 
| public class SkillBase | 
| { | 
|     protected SkillConfig skillConfig; | 
|   | 
|     protected bool isFinished = false; | 
|   | 
|     public SkillBase(SkillConfig _skillCfg) | 
|     { | 
|         skillConfig = _skillCfg; | 
|     } | 
|   | 
|     public virtual void Run() | 
|     { | 
|          | 
|     } | 
|   | 
|     public virtual void Cast(BattleObject _caster, BattleField battleField, List<Dictionary<int, List<int>>> damageList) | 
|     { | 
|         Debug.LogError("SkillBase Cast should be overridden by derived class"); | 
|     } | 
|   | 
|     public virtual bool IsFinished() | 
|     { | 
|         return isFinished; | 
|     } | 
|   | 
|     public virtual void ForceFinished() | 
|     { | 
|         isFinished = true; | 
|     } | 
|   | 
| #if UNITY_EDITOR | 
|     public virtual List<BattleObject> GetTargetList(BattleObject _caster, BattleField battleField) | 
|     { | 
|         SkillTargetType targetType = SkillTargetType.Enemy; | 
|         SkillTargetRangeType rangeType = SkillTargetRangeType.LowestHP; | 
|   | 
|         List<BattleObject> affectList = battleField.battleObjMgr.GetTargetList(_caster, targetType, rangeType); | 
|         return affectList; | 
|     } | 
|      | 
|     public virtual List<Dictionary<int, List<int>>> GetDamageList(BattleObject _caster, BattleField battleField) | 
|     { | 
|         Debug.LogError("SkillBase GetDamageList should be overridden by derived class"); | 
|         return null; | 
|     } | 
| #endif | 
| } |