56 lines
1.3 KiB
C#
56 lines
1.3 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年11月15日 星期五
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using MemoryPack;
|
|
using RuntimeData;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class AyaMoveAgainBuffSkill : SkillBase
|
|
{
|
|
public int MoveGridCount;
|
|
|
|
public AyaMoveAgainBuffSkill()
|
|
{
|
|
IsPermanent = true;
|
|
Score = 2;
|
|
IsLevelSkill = true;
|
|
_autoDisappear = false;
|
|
_levelLimit = 999;
|
|
_level = 0;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.AYAMOVEAGAINBUFF;
|
|
}
|
|
|
|
public override void OnMove(UnitData self, GridData grid, MapData mapData, MoveType moveType, List<Vector2Int> path = null)
|
|
{
|
|
if (path == null) return;
|
|
AddLevel(mapData,self,self,path.Count - 1);
|
|
if (_level < 10) return;
|
|
if (self.GetSkill(SkillType.AYAMOVEAGAIN, out var skill))
|
|
{
|
|
ReduceLevel(mapData,self,10);
|
|
skill.AddLevel(mapData,self,self,1);
|
|
}
|
|
}
|
|
|
|
public override bool ReservedOnTransform(UnitData self, UnitFullType fullType)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|