/* * @Author: 白哉 * @Description: * @Date: 2025年04月23日 星期三 21:04:18 * @Modify: */ using RuntimeData; using System; using MemoryPack; namespace Logic.Skill { public partial class ForestDefenseSkill : SkillBase { public ForestDefenseSkill() { IsPermanent = true; TurnsLimit = 0; Score = 2; } public override SkillType GetSkillType() { return SkillType.FORESTDEFENSE; } public override float GetDefenseMultiplicationParam(MapData mapData, UnitData self, UnitData target = null) { if (!mapData.GetGridDataByUnitId(self.Id, out var grid)) return 1f; if (grid.Vegetation == Vegetation.Trees) return 1.5f; return 1f; } } }