45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using RuntimeData;
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class KomeijiRiderAddSkill : SkillBase
|
|
{
|
|
public KomeijiRiderAddSkill()
|
|
{
|
|
IsPermanent = true;
|
|
Score = 2;
|
|
IsLevelSkill = true;
|
|
_autoDisappear = false;
|
|
_levelLimit = 999;
|
|
_level = 0;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.KomeijiRiderAdd;
|
|
}
|
|
|
|
public override float GetAttackAdditionParam(MapData mapData, UnitData self, UnitData target = null)
|
|
{
|
|
return _level * 0.5f;
|
|
}
|
|
|
|
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (!info.IsKill || info.DamageOrigin == null) return;
|
|
if (_level > 0) ReduceLevel(mapData, info.DamageOrigin, 1);
|
|
}
|
|
|
|
public override bool IsCanAttackAlly()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override bool IsCanAttackTargetAlly(MapData map, UnitData self, UnitData target)
|
|
{
|
|
if (!target.GetSkill(SkillType.KomeijiKnightAdd, out _)) return false;
|
|
return true;
|
|
}
|
|
}
|
|
}
|