Files
Main/Assets/Code/Logic/_Required/Entity/Character/Skill/SkillSystem.cs
2025-01-25 04:38:09 +08:00

81 lines
2.0 KiB
C#

using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using Thousandto.Cfg.Data;
using Thousandto.Core.Base;
using Thousandto.Code.Logic;
#pragma warning disable 0219
#pragma warning disable 0168
#pragma warning disable 0162
public class SkillSystem
{
//技能每一阶的等级数量
private static int _skillDegreeLevel = -1;
public static int SkillDegreeLevel
{
get
{
if (_skillDegreeLevel < 0)
{
int.TryParse(DeclareGlobal.Get(27).Params, out _skillDegreeLevel);
}
return _skillDegreeLevel;
}
}
//获取技能描述
public static String GetLevelDesc(DeclareSkill cfg, int level)
{
if (level <= 0)
level = 1;
int degree = level / SkillDegreeLevel;
int realLevel = level % SkillDegreeLevel;
/*DeclareSkillLevel levelCfg = DeclareSkillLevel.Get(cfg.Id * 100 + degree);
int attack = 0;
if (levelCfg != null)
{
attack = levelCfg.DamageBase + realLevel * levelCfg.DamageUp;
}
return StringUtils.SafeFormat(cfg.Desc, attack);*/
return null;
}
//是否是自身需要位移的技能
public static bool IsTransformSelfSkill(int skillID)
{
return IsTransformSelfSkill(DeclareSkill.Get(skillID));
}
public static bool IsTransformSelfSkill(DeclareSkill cfg)
{
if (cfg == null)
return false;
return false;
}
//是否是目标需要位移的技能
public static bool IsTransformTargetSkill(int skillID)
{
return IsTransformTargetSkill(DeclareSkill.Get(skillID));
}
public static bool IsTransformTargetSkill(DeclareSkill cfg)
{
if (cfg == null)
return false;
return false;
}
//是否可以移动施法
public static bool CanMove(SkillVisualInfo cfg)
{
if (cfg == null)
return false;
return cfg.FindEvent(SkillEventDefine.DisableMove).Count <= 0;
}
}