45 lines
989 B
C#
45 lines
989 B
C#
/*
|
|
* @Author: 白哉
|
|
* @Description:
|
|
* @Date: 2025年04月23日 星期三 21:04:18
|
|
* @Modify:
|
|
*/
|
|
|
|
|
|
using RuntimeData;
|
|
using System;
|
|
using MemoryPack;
|
|
|
|
|
|
namespace Logic.Skill
|
|
{
|
|
public partial class PhoenixSkill : SkillBase
|
|
{
|
|
public PhoenixSkill()
|
|
{
|
|
IsPermanent = true;
|
|
TurnsLimit = 0;
|
|
Score = 2;
|
|
}
|
|
|
|
public override SkillType GetSkillType()
|
|
{
|
|
return SkillType.PHOENIX;
|
|
}
|
|
|
|
public override bool IsCanBeKill(UnitData self, MapData mapData)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void OnDamaged(MapData mapData, SettlementInfo info)
|
|
{
|
|
if (info?.DamageTarget == null || info.DamageTarget.Health > 0) return;
|
|
|
|
info.DamageTarget.Health = 1;
|
|
info.DamageTarget.Skills.Add(SkillFactory.GetSkillBySkillType(SkillType.PHOENIXEGG));
|
|
IsPermanent = false;
|
|
TurnsLimit = 0;
|
|
}
|
|
}
|
|
} |