引入属性、伤害管线
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using SepCore.Battle;
|
||||
using SepCore.CustomUtility;
|
||||
using SepCore.Definition;
|
||||
using UnityEngine;
|
||||
@@ -145,9 +146,19 @@ namespace SepCore.Entity
|
||||
return;
|
||||
}
|
||||
|
||||
int damage = AIUtility.CalcDamageHP(AttackDamage, null, targetImpactData.DefenseStat,
|
||||
targetImpactData.DodgeStat);
|
||||
_targetableTarget.ApplyDamage(this, damage);
|
||||
DamageContext context = new DamageContext
|
||||
{
|
||||
BaseDamage = AttackDamage,
|
||||
DamageScalingStat = StatType.None,
|
||||
ScalingRatio = 1.0f,
|
||||
BaseCritChance = 0f,
|
||||
CritMultiplier = 0f,
|
||||
AttackerPipeline = selfImpactData.AttributeProvider,
|
||||
DefenderPipeline = targetImpactData.AttributeProvider
|
||||
};
|
||||
|
||||
DamageResult result = DamagePipeline.Calculate(in context);
|
||||
_targetableTarget.ApplyDamage(this, in result, _targetableTarget.CachedTransform.position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user