TH1/Unity/Assets/Scripts/TH1_Logic/Skill/AllSkill/PatchouliWoodSkill.cs
2025-10-25 02:37:16 +08:00

50 lines
1.1 KiB
C#

/*
* @Author: 白哉
* @Description:
* @Date: 2025年10月12日 星期六 10:10:12
* @Modify:
*/
using System;
using MemoryPack;
using RuntimeData;
namespace Logic.Skill
{
public partial class PatchouliWoodSkill : SkillBase
{
public PatchouliWoodSkill()
{
IsLevelSkill = true;
IsPermanent = true;
TurnsLimit = 0;
Score = 2;
_levelLimit = 1;
}
public override SkillType GetSkillType()
{
return SkillType.PATCHOULIWOOD;
}
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 int GetExtraMoveRange(UnitData self)
{
return _level * 2;
}
public override void OnMove(UnitData self, GridData grid, MapData mapData, MoveType moveType)
{
_level = 0;
}
}
}