|
发表于 2025-3-11 13:35:41
|
显示全部楼层
function CommandEnable(obj, skillIndex, skillState)
{
if(obj.sq_GetState() == skillState) return false;
local currentMp = obj.getMp();
local skill = sq_GetSkill(obj, skillIndex);
local consumeMp = skill.getSpendMp(obj, -1);
if(!skill.isInCoolTime() && currentMp > consumeMp)
{
obj.setSkillCommandEnable(skillIndex, true);
return true;
}
} |
|