48 lines
1.0 KiB
C#
48 lines
1.0 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年04月23日 星期三 21:04:18
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using RuntimeData;
|
|
using System;
|
|
using MemoryPack;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class DashSkill : SkillBase
|
|
{
|
|
public bool IsTrigger = false;
|
|
public override void OnTurnStart(UnitData self, MapData mapData)
|
|
{
|
|
IsTrigger = false;
|
|
}
|
|
|
|
public DashSkill()
|
|
{
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
Score = 4;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.DASH;
|
|
}
|
|
|
|
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (info.DamageType != DamageType.ActiveAttack) return;
|
|
IsTrigger = true;
|
|
}
|
|
|
|
public override void OnMove(UnitData self, GridData grid, MapData mapData, MoveType moveType)
|
|
{
|
|
if (IsTrigger) return;
|
|
if (moveType == MoveType.ActiveMove) self.AP = 1;
|
|
}
|
|
}
|
|
} |