S7-03 + S7-04 + S7-05
This commit is contained in:
@@ -115,14 +115,23 @@ namespace GeometryTD.Entity
|
||||
return;
|
||||
}
|
||||
|
||||
HitContext hitContext = TagEffectResolver.ResolveBeforeHit(
|
||||
attackPayload,
|
||||
_currentHealth,
|
||||
_maxHealth,
|
||||
HasSlowStatus);
|
||||
HitContext hitContext = TagEffectResolver.ResolveBeforeHit(new HitContext
|
||||
{
|
||||
AttackPayload = attackPayload,
|
||||
TargetEntityId = Id,
|
||||
TargetPosition = CachedTransform.position,
|
||||
TargetCurrentHealthBeforeHit = _currentHealth,
|
||||
TargetCurrentHealthAfterHit = _currentHealth,
|
||||
TargetMaxHealth = _maxHealth,
|
||||
TargetMoveSpeedMultiplierBeforeHit = _tagStatusRuntime.GetMoveSpeedMultiplier(),
|
||||
TargetStatusTagsBeforeHit = _tagStatusRuntime.GetActiveTagSnapshot(),
|
||||
TargetStatusRuntime = _tagStatusRuntime
|
||||
});
|
||||
ApplyDirectDamage(hitContext.FinalDamage);
|
||||
hitContext.TargetCurrentHealthAfterHit = _currentHealth;
|
||||
hitContext.IsKilled = _currentHealth <= 0;
|
||||
TagEffectResolver.ApplyOnHit(hitContext);
|
||||
TagEffectResolver.ApplyAfterHit(hitContext.AttackPayload, _tagStatusRuntime);
|
||||
TagEffectResolver.ApplyAfterHit(hitContext);
|
||||
if (hitContext.IsKilled)
|
||||
{
|
||||
TagEffectResolver.ApplyOnKill(hitContext);
|
||||
|
||||
@@ -15,6 +15,16 @@ namespace GeometryTD.Entity
|
||||
return _statesByTag.ContainsKey(tagType);
|
||||
}
|
||||
|
||||
public TagType[] GetActiveTagSnapshot()
|
||||
{
|
||||
if (_activeTags.Count <= 0)
|
||||
{
|
||||
return Array.Empty<TagType>();
|
||||
}
|
||||
|
||||
return _activeTags.ToArray();
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_statesByTag.Clear();
|
||||
|
||||
Reference in New Issue
Block a user