2026-02-14 22:57:12 +08:00

63 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Author: 白哉
* @Description:
* @Date: 2025年11月15日 星期五
* @Modify:
*/
using System;
using MemoryPack;
using RuntimeData;
using UnityEngine;
namespace Logic.Skill
{
public partial class SanaeWindXSkill : SkillBase
{
public int X;
public SanaeWindXSkill()
{
IsPermanent = false;
TurnsLimit = 0;
Score = 2;
X = 5;
}
public override SkillType GetSkillType()
{
return SkillType.SANAEWINDX;
}
// 根据 SANAEWIND 技能的 X 计算规律,推导 X 对应的方向向量, X 为 1 返回 -1 -1
public Vector2Int GetOffset()
{
// 使用小键盘方向约定:
// 7 8 9 => (-1,1) (0,1) (1,1)
// 4 5 6 => (-1,0) (0,0) (1,0)
// 1 2 3 => (-1,-1) (0,-1) (1,-1)
switch (X)
{
case 1: return new Vector2Int(-1, -1);
case 2: return new Vector2Int(0, -1);
case 3: return new Vector2Int(1, -1);
case 4: return new Vector2Int(-1, 0);
case 5: return Vector2Int.zero;
case 6: return new Vector2Int(1, 0);
case 7: return new Vector2Int(-1, 1);
case 8: return new Vector2Int(0, 1);
case 9: return new Vector2Int(1, 1);
default: return Vector2Int.zero;
}
}
public override bool ReservedOnTransform(UnitData self, UnitFullType fullType)
{
return true;
}
}
}