private void ApplyCast() { Location loc = currentSelected[0]; bool effectiveCast = false; BaseSkill skill = character.SkillHashes[selectedSkillID].GetBaseSkill(); foreach (var ep in skill.GetFixedEffectPatterns(loc - character.Loc)) { if ((loc + ep).TryGetStayEntity(out Entity entity) && entity != null) { effectiveCast = true; break; } } if (!effectiveCast) { return; } ChangeState(BattleState.PlayerAnim); character.CastSkill(selectedSkillID, loc); StartCoroutine(StartClickCD()); }