2026-04-17 15:01:13 +08:00

60 lines
1.6 KiB
C#

/*
* @Author: 白哉
* @Description:
* @Date: 2025年04月23日 星期三 21:04:18
* @Modify:
*/
using System.Collections.Generic;
using RuntimeData;
using System;
using MemoryPack;
namespace Logic.Skill
{
public partial class LuckSkill : SkillBase
{
public LuckSkill()
{
IsPermanent = true;
TurnsLimit = 0;
Score = 4;
}
public override SkillType GetSkillType()
{
return SkillType.LUCK;
}
/*
public override void OnTurnStart(IdentifierBase identifier, MapData mapData)
{
var self = identifier as UnitData;
if (self == null) return;
if (!mapData.GetGridDataByUnitId(self.Id, out var targetGrid)) return;
_sharedAroundBuf ??= new List<GridData>();
_sharedAroundBuf.Clear();
mapData.GridMap.GetAroundGridData(1, 1, targetGrid, _sharedAroundBuf);
var hasBuffUnit = new HashSet<UnitData>();
foreach (var grid in _sharedAroundBuf)
{
if (!mapData.GetUnitDataByGid(grid.Id, out var unit)) continue;
hasBuffUnit.Add(unit);
unit.AddSkill(SkillType.CRITICAL, mapData);
}
foreach (var unit in mapData.UnitMap.UnitList)
{
if (hasBuffUnit.Contains(unit)) continue;
unit.RemoveSkill(SkillType.CRITICAL,mapData);
}
}
public override bool ReservedOnTransform(UnitData self, UnitFullType fullType)
{
return true;
}*/
}
}