引入属性、伤害管线
This commit is contained in:
@@ -1,37 +1,45 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using SepCore.Definition;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct ImpactData
|
||||
{
|
||||
public ImpactData(CampType camp /*, int health*/, int attackBase, StatProperty attackStat = null,
|
||||
StatProperty defenseStat = null, StatProperty dodgeStat = null)
|
||||
{
|
||||
Camp = camp;
|
||||
//Health = health;
|
||||
AttackBase = attackBase;
|
||||
AttackStat = attackStat;
|
||||
DefenseStat = defenseStat;
|
||||
DodgeStat = dodgeStat;
|
||||
}
|
||||
|
||||
public CampType Camp { get; }
|
||||
|
||||
public int AttackBase { get; }
|
||||
|
||||
public StatProperty AttackStat { get; }
|
||||
public DamageType DamageType { get; }
|
||||
|
||||
public StatProperty DefenseStat { get; }
|
||||
public float ScalingRatio { get; }
|
||||
|
||||
public StatProperty DodgeStat { get; }
|
||||
public float BaseCritChance { get; }
|
||||
|
||||
public float CritMultiplier { get; }
|
||||
|
||||
public IAttributeProvider AttributeProvider { get; }
|
||||
|
||||
public ImpactData(
|
||||
CampType camp,
|
||||
int attackBase,
|
||||
IAttributeProvider attributeProvider = null,
|
||||
DamageType damageType = DamageType.None,
|
||||
float scalingRatio = 1.0f,
|
||||
float baseCritChance = 0f,
|
||||
float critMultiplier = 0f)
|
||||
{
|
||||
Camp = camp;
|
||||
AttackBase = attackBase;
|
||||
AttributeProvider = attributeProvider;
|
||||
DamageType = damageType;
|
||||
ScalingRatio = scalingRatio;
|
||||
BaseCritChance = baseCritChance;
|
||||
CritMultiplier = critMultiplier;
|
||||
}
|
||||
|
||||
public ImpactData(CampType camp, int attackBase)
|
||||
: this(camp, attackBase, null, DamageType.None, 1.0f, 0f, 0f)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user