Phase 1: 复合属性修饰器管线与伤害结算系统

This commit is contained in:
2026-09-24 22:37:22 +08:00
parent ba25ec1926
commit 02f4c67464
35 changed files with 334 additions and 141 deletions
@@ -32,32 +32,21 @@ namespace SepCore.Entity
public int Price => Config.Price;
public float Cooldown => Config.Cooldown / 1000f;
public float Cooldown => Config.Cooldown;
public float AttackRange => Config.AttackRange / 1000f;
public float AttackRange => Config.AttackRange;
public int AttackSoundId => Config.AttackSoundId;
public IReadOnlyDictionary<ParamType, int> Parameters => Config.Parameters;
public IReadOnlyDictionary<ParamType, float> Parameters => Config.Parameters;
public IReadOnlyList<StatModifierConfig> Modifiers => Config.StatModifierConfigs;
public int GetParam(ParamType paramType)
{
if (Config.Parameters.TryGetValue(paramType, out int value))
{
return value;
}
Log.Error("Weapon parameter '{0}' not found for weapon '{1}'.", paramType, Config.WeaponType);
return 0;
}
public float GetParamFloat(ParamType paramType)
{
if (Config.Parameters.TryGetValue(paramType, out int val))
if (Config.Parameters.TryGetValue(paramType, out float val))
{
return paramType == ParamType.SectorAngle ? val : val / 1000f;
return val;
}
Log.Error("Weapon parameter '{0}' not found for weapon '{1}'.", paramType, Config.WeaponType);
@@ -65,4 +54,3 @@ namespace SepCore.Entity
}
}
}