using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
using GameLogic.Combat.CombatTool;
using GameLogic.Combat.Hero;
using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
namespace GameLogic.Combat.Skill
{
///
/// 大蛇第一个技能,对敌人照成伤害,并将敌人击退一段距离
///
public class S110001 : SkillBasic
{
private float _harm;
protected override void ProInitSkill()
{
_harm = SelfSkillConfig.effectValue[0];
}
protected override void ProUseSkill()
{
ActivationTimeLineData("sk1");
}
protected override ILifetCycleHitPoint[] ProGetTineLineTargetEntity(
TimeLineEventLogicBasic timeLineEventLogicBasic)
{
ILifetCycleHitPoint[] lifetCycleHitPoints = new ILifetCycleHitPoint[_enterAlertTarget.Count];
for (int i = 0; i < _enterAlertTarget.Count; i++)
{
CombatHeroHitPoint combatHeroHitPoint = _enterAlertTarget[i].GetMainHotPoin();
lifetCycleHitPoints[i] = combatHeroHitPoint;
}
return lifetCycleHitPoints;
}
protected override void ProDefaultTimeLineTrigger(string groupName, CombatHeroHitPoint targetEntity,
ITimelineFxLogic timelineFxLogic,
TriggerData triggerData)
{
for (int i = 0; i < _enterAlertTarget.Count; i++)
{
long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(
CombatHeroEntity.CurrCombatHeroInfo.attack.Value,
_harm);
CombatHeroHitPoint combatHeroHitPoint = _enterAlertTarget[i].GetMainHotPoin();
HarmReturnInfo harmReturnInfo = Harm(CombatHeroEntity, combatHeroHitPoint,
v, AttType.Skill, triggerData);
}
}
public override bool IsCanUse()
{
int odds = CombatCalculateTool.Instance.GetOdd();
if (odds < 50)
{
return true;
}
SkillCd = SkillMaxCd;
return false;
}
}
}