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

47 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 PatchouliWaterSkill : SkillBase
{
public PatchouliWaterSkill()
{
IsLevelSkill = true;
IsPermanent = true;
TurnsLimit = 0;
Score = 2;
_levelLimit = 1;
}
public override SkillType GetSkillType()
{
return SkillType.PATCHOULIWATER;
}
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 void BeforeDamaged(MapData mapData, SettlementInfo info)
{
if (_level == 0 || info.DamageValue <= 0) return;
_level--;
info.DamageValue = 0;
}
}
}