60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年04月23日 星期三 21:04:18
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using RuntimeData;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
[Serializable]
|
|
public class PowerUpSkill : SkillBase
|
|
{
|
|
// 攻击增加系数
|
|
[SerializeField]private float _attackIncrease;
|
|
// 本回合攻击标记
|
|
[SerializeField]private bool _attackMark;
|
|
// 上回合攻击标记
|
|
[SerializeField]private bool _lastAttackMark;
|
|
|
|
|
|
public PowerUpSkill()
|
|
{
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
Score = 4;
|
|
_lastAttackMark = true;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.POWERUP;
|
|
}
|
|
|
|
public override void OnTurnStart(UnitData self, MapData mapData)
|
|
{
|
|
if (_attackMark) _lastAttackMark = true;
|
|
_attackMark = false;
|
|
}
|
|
|
|
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (info == null) return;
|
|
if (info.DamageType != DamageType.ActiveAttack) return;
|
|
if (info.DamageOrigin == null || info.DamageTarget == null) return;
|
|
_attackMark = true;
|
|
}
|
|
|
|
public override float GetExtraAttack(UnitData self, MapData mapData)
|
|
{
|
|
if (_lastAttackMark) return 1f;
|
|
return 2f;
|
|
}
|
|
}
|
|
} |