45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年10月12日 星期六 10:10:12
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using System.Collections.Generic;
|
|
using RuntimeData;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class RemiliaBuff2Skill : SkillBase
|
|
{
|
|
public RemiliaBuff2Skill()
|
|
{
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.REMILIABUFF2;
|
|
}
|
|
|
|
public override float GetAttackAdditionParam(MapData mapData, UnitData self, UnitData target = null)
|
|
{
|
|
var grid = self.Grid(mapData);
|
|
if (grid == null) return 0;
|
|
var aroundBuf = RentAroundBuf();
|
|
mapData.GridMap.GetAroundGridData(1, 1, grid, aroundBuf);
|
|
var count = 0;
|
|
foreach (var around in aroundBuf)
|
|
{
|
|
if (!around.HasSpType(GridSpType.RemiliaGrid)) continue;
|
|
count++;
|
|
}
|
|
ReturnAroundBuf();
|
|
return Mathf.Min(count * 0.5f, 3f);
|
|
}
|
|
}
|
|
} |