using Cal;
using Cal.DataTable;
using System;
using System.Collections.Generic;
namespace ET
{
public class SkillLogic : Entity
{
public int skillId => skillLogicConfig.skillId;
public int skillLevel;
public int skillConfigId => skillLogicConfig.skillId * 100 + skillLevel;
public Unit owner;
public SkillLogicConfig skillLogicConfig;
public SkillConfig skillConfig;
public long lastCDTime;
public float dataX10000 = 1;
public float dataOldX10000 = 1;
///
/// 伤害倍数
///
public float multipleDamageX10000
{
get
{
AttackComponent attacker = owner.GetComponent();
if (attacker == null)
{
Log.ErrorDetail($"attacker == null");
return 1;
}
return attacker.multipleDamageX10000;
}
set
{
AttackComponent attacker = owner.GetComponent();
if (attacker == null)
{
Log.ErrorDetail($"attacker == null");
return;
}
if (value < 1) value = 1;
attacker.multipleDamageX10000 = value;
}
}
///
/// 释放次数
///
public int playAmount
{
get
{
AttackComponent attacker = owner.GetComponent();
if (attacker == null)
{
Log.ErrorDetail($"attacker == null");
return 1;
}
return attacker.playAmount;
}
set
{
AttackComponent attacker = owner.GetComponent();
if (attacker == null)
{
Log.ErrorDetail($"attacker == null");
return;
}
if (value < 1) value = 1;
attacker.playAmount = value;
}
}
public List skillOptionLogics = new List();
}
}