mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 16:16:33 +00:00
* 特效底层支持直接修改硬直时间;添加驱散类型 * 添加 debuff * 明确了驱散定义;添加助攻窗口期;修改预释放爆发技为不可驱散;预释放爆发技一定是最先行动;修复复活时导致硬直时间变成负数的问题 * 调整驱散描述 * 实现驱散系统;修复角色百分比公式错误;添加非伤害类助攻;添加辅助数据统计;修改一些文本显示 * 添加免疫、吸血、护盾机制 * 继续完善免疫和驱散、护盾和特效钩子等 * 添加新特效类型
161 lines
4.8 KiB
C#
161 lines
4.8 KiB
C#
using Milimoe.FunGame.Core.Library.Constant;
|
|
|
|
namespace Milimoe.FunGame.Core.Entity
|
|
{
|
|
/// <summary>
|
|
/// 角色的护盾,对不同的魔法类型有不同值
|
|
/// </summary>
|
|
public class Shield
|
|
{
|
|
/// <summary>
|
|
/// 物理护盾
|
|
/// </summary>
|
|
public double Physical { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 无属性魔法护盾
|
|
/// </summary>
|
|
public double None { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 星痕魔法护盾
|
|
/// </summary>
|
|
public double Starmark { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 纯粹结晶护盾
|
|
/// </summary>
|
|
public double PurityNatural { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 纯现代结晶护盾
|
|
/// </summary>
|
|
public double PurityContemporary { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 光护盾
|
|
/// </summary>
|
|
public double Bright { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 影护盾
|
|
/// </summary>
|
|
public double Shadow { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 元素护盾
|
|
/// </summary>
|
|
public double Element { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 紫宛护盾
|
|
/// </summary>
|
|
public double Fleabane { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 时空护盾
|
|
/// </summary>
|
|
public double Particle { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 总计物理护盾
|
|
/// </summary>
|
|
public double TotalPhysical => Physical;
|
|
|
|
/// <summary>
|
|
/// 总计魔法护盾
|
|
/// </summary>
|
|
public double TotalMagicial => None + Starmark + PurityNatural + PurityContemporary + Bright + Shadow + Element + Fleabane + Particle;
|
|
|
|
/// <summary>
|
|
/// 获取或设置护盾值
|
|
/// </summary>
|
|
/// <param name="isMagic"></param>
|
|
/// <param name="type"></param>
|
|
/// <returns></returns>
|
|
public double this[bool isMagic = false, MagicType type = MagicType.None]
|
|
{
|
|
get
|
|
{
|
|
if (isMagic)
|
|
{
|
|
return type switch
|
|
{
|
|
MagicType.Starmark => Starmark,
|
|
MagicType.PurityNatural => PurityNatural,
|
|
MagicType.PurityContemporary => PurityContemporary,
|
|
MagicType.Bright => Bright,
|
|
MagicType.Shadow => Shadow,
|
|
MagicType.Element => Element,
|
|
MagicType.Fleabane => Fleabane,
|
|
MagicType.Particle => Particle,
|
|
_ => None
|
|
};
|
|
}
|
|
return Physical;
|
|
}
|
|
set
|
|
{
|
|
if (isMagic)
|
|
{
|
|
switch (type)
|
|
{
|
|
case MagicType.Starmark:
|
|
Starmark = value;
|
|
break;
|
|
case MagicType.PurityNatural:
|
|
PurityNatural = value;
|
|
break;
|
|
case MagicType.PurityContemporary:
|
|
PurityContemporary = value;
|
|
break;
|
|
case MagicType.Bright:
|
|
Bright = value;
|
|
break;
|
|
case MagicType.Shadow:
|
|
Shadow = value;
|
|
break;
|
|
case MagicType.Element:
|
|
Element = value;
|
|
break;
|
|
case MagicType.Fleabane:
|
|
Fleabane = value;
|
|
break;
|
|
case MagicType.Particle:
|
|
Particle = value;
|
|
break;
|
|
default:
|
|
None = value;
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Physical = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 复制一个护盾对象
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Shield Copy()
|
|
{
|
|
return new()
|
|
{
|
|
Physical = Physical,
|
|
None = None,
|
|
Starmark = Starmark,
|
|
PurityNatural = PurityNatural,
|
|
PurityContemporary = PurityContemporary,
|
|
Bright = Bright,
|
|
Shadow = Shadow,
|
|
Element = Element,
|
|
Fleabane = Fleabane,
|
|
Particle = Particle
|
|
};
|
|
}
|
|
}
|
|
}
|