45 lines
1006 B
C#
45 lines
1006 B
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年09月12日 星期四 17:09:18
|
|
* @Modify:
|
|
*/
|
|
|
|
using RuntimeData;
|
|
using System;
|
|
using MemoryPack;
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class AttackAfterKillSkill : SkillBase
|
|
{
|
|
public bool IsKill;
|
|
|
|
public AttackAfterKillSkill()
|
|
{
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
Score = 4;
|
|
IsKill = false;
|
|
}
|
|
|
|
public override void OnTurnStart(UnitData self, MapData mapData)
|
|
{
|
|
IsKill = false;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.ATTACKAFTERKILL;
|
|
}
|
|
|
|
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (IsKill) return;
|
|
if (!info.IsKill || info.DamageOrigin == null || info.DamageType == DamageType.KillSelf) return;
|
|
IsKill = true;
|
|
info.DamageOrigin.AP = 1;
|
|
}
|
|
}
|
|
}
|