daixiawu 42f444122b bug
---------[bug修复与优化]-------------
1.修复了东风谷早苗掷签范围伤害击杀单位后图像残留的bug
2.修复了铃仙触发幻影齐射并击杀单位时可能产生图像残留的bug
3.修复了隐脉地块可能不显示的bug
4.修复了隐脉地块可能生成在水域或者山脉的bug
5.修复了星熊勇仪在推人时可能产生单位重叠的bug
6.修复了探索者发现结界塔时城市经验动画播放错误的bug
7.修复了发起主动攻击但未造成伤害的某些情况下和平奇观计数不会清零的bug
8.优化了拖动镜头时可能镜头强制移会起始点的bug
2026-05-31 21:40:16 +08:00

44 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.

using System.Collections.Generic;
using RuntimeData;
using Logic.CrashSight;
using TH1_Logic.Core;
namespace Logic.Skill
{
public partial class DieBonePileSkill : SkillBase
{
public DieBonePileSkill()
{
IsPermanent = true;
TurnsLimit = 0;
Score = 4;
}
public override SkillType GetSkillType()
{
return SkillType.DieBonePile;
}
public override void OnDamaged(MapData mapData, SettlementInfo info)
{
if (info == null || !info.IsKill || info.IsDeathReplaced || info.DamageTargetGrid == null || info.DamageTargetCity == null) return;
info.IsDeathReplaced = true;
var tmpUnitFullType = new UnitFullType(UnitType.BonePile,GiantType.None,0);
var targetUnitFullType = info.DamageTarget.UnitFullType;
//如果要复活的位置上有敌方单位先将对方passiveMove开
if (info.DamageTargetGrid.RealUnit(mapData, out var unit))
Main.UnitLogic.PassiveMoveAway(mapData,unit);
if (!mapData.AddUnitData(info.DamageTargetGrid.Id, info.DamageTargetCity.Id, tmpUnitFullType,out var newUnit)) return;
if(newUnit.GetSkill(SkillType.BonePile,out var bonePile) && bonePile is BonePileSkill)
{
var bonePileSkill = bonePile as BonePileSkill;
bonePileSkill.TargetType = targetUnitFullType;
};
newUnit.Health = UnitData.CeilPositiveToInt(newUnit.GetMaxHealth() * 0.25f);
}
}
}