56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年10月12日 星期六 10:10:12
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using System;
|
|
using MemoryPack;
|
|
using RuntimeData;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class PatchouliFireSkill : SkillBase
|
|
{
|
|
public PatchouliFireSkill()
|
|
{
|
|
IsLevelSkill = true;
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
Score = 2;
|
|
_levelLimit = 1;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.PATCHOULIFIRE;
|
|
}
|
|
|
|
public override void AddLevel(MapData map, UnitData origin, UnitData self, int add)
|
|
{
|
|
if (self.GetSkill(SkillType.PHILOSTONE, out _)) _levelLimit = 2;
|
|
else _levelLimit = 1;
|
|
base.AddLevel(map, origin, self, add);
|
|
}
|
|
|
|
public override float GetAttackAdditionParam(MapData mapData, UnitData self, UnitData target = null)
|
|
{
|
|
return _level;
|
|
}
|
|
|
|
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (info.DamageType != DamageType.ActiveAttack) return;
|
|
info.DamageOrigin.HeroTask(mapData)?.OnReduceSkillLevels(mapData,GetSkillType(),(uint)_level);
|
|
_level = 0;
|
|
}
|
|
public override bool ReservedOnTransform(UnitData self, UnitFullType fullType)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|