2021-04-08 20:09:59 +08:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 伤害倍数
|
|
|
|
|
/// </summary>
|
|
|
|
|
public float multipleDamageX10000
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
AttackComponent attacker = owner.GetComponent<AttackComponent>();
|
2021-04-08 20:09:59 +08:00
|
|
|
|
if (attacker == null)
|
|
|
|
|
{
|
|
|
|
|
Log.ErrorDetail($"attacker == null");
|
2021-04-11 19:50:39 +08:00
|
|
|
|
return 1;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
}
|
|
|
|
|
return attacker.multipleDamageX10000;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
AttackComponent attacker = owner.GetComponent<AttackComponent>();
|
|
|
|
|
if (attacker == null)
|
|
|
|
|
{
|
|
|
|
|
Log.ErrorDetail($"attacker == null");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (value < 1) value = 1;
|
|
|
|
|
attacker.multipleDamageX10000 = value;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 释放次数
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int playAmount
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
AttackComponent attacker = owner.GetComponent<AttackComponent>();
|
|
|
|
|
if (attacker == null)
|
|
|
|
|
{
|
|
|
|
|
Log.ErrorDetail($"attacker == null");
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
2021-04-08 20:09:59 +08:00
|
|
|
|
return attacker.playAmount;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
2021-04-11 19:50:39 +08:00
|
|
|
|
AttackComponent attacker = owner.GetComponent<AttackComponent>();
|
|
|
|
|
if (attacker == null)
|
|
|
|
|
{
|
|
|
|
|
Log.ErrorDetail($"attacker == null");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (value < 1) value = 1;
|
|
|
|
|
attacker.playAmount = value;
|
2021-04-08 20:09:59 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public List<SkillOptionLogicBase> skillOptionLogics = new List<SkillOptionLogicBase>();
|
|
|
|
|
}
|
|
|
|
|
}
|