You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
1.2 KiB

using BehaviorDesigner.Runtime.Tasks;
using GAS.Runtime;
using xFrame;
namespace CoreGame.Render
{
/// <summary>
/// 遍历可以释放的主动技能
/// </summary>
public class MonsterSelectCanCastAffixSkill : Conditional
{
public override TaskStatus OnUpdate()
{
var ownerEnt = Owner.GetEntity<CombatEntity>();
var ass = ownerEnt.abilitySystem.AbilityContainer.QueryAbilitySpecArray;
var ac = ownerEnt.aI;
ac.abilitySeq = 0;
// 循环遍历所有的ability 轨道,指导普攻
var assCount = ass.Count;
for (var index = 0; index < assCount; index++)
{
var aga = ass[index];
if (aga.Ability.Tag.AssetTag.HasTag(GTagLib.Skill_Affix))
{
if (aga.CanActivate() == AbilityActivateResult.Success)
{
ac.abilitySeq = aga.ctx.gaSeq;
XLog.LogDebug($"ai select ga {aga.Ability.Name} - {ac.abilitySeq} : {ownerEnt} ");
return TaskStatus.Success;
}
}
}
return TaskStatus.Failure;
}
}
}