mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-12-05 08:09:04 +00:00
补全魔法技能,其他优化
This commit is contained in:
parent
ea3ede5d44
commit
56833bee9a
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.GetEP;
|
||||
public override string Name => "立即获得能量值";
|
||||
public override string Description => $"角色立即获得 {实际获得:0.##} 点能量值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"角色立即获得 {实际获得:0.##} 点能量值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private readonly double 实际获得 = 0;
|
||||
|
||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.GetEXP;
|
||||
public override string Name => "立即获得经验值";
|
||||
public override string Description => $"角色立即获得 {实际获得:0.##} 点经验值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"角色立即获得 {实际获得:0.##} 点经验值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private readonly double 实际获得 = 0;
|
||||
|
||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.RecoverHP;
|
||||
public override string Name => "立即回复生命值";
|
||||
public override string Description => $"立即回复角色 {实际回复:0.##} 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"立即回复角色 {实际回复:0.##} 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private readonly double 实际回复 = 0;
|
||||
|
||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.RecoverHP2;
|
||||
public override string Name => "立即回复生命值";
|
||||
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private double 实际回复 => 回复比例 * (Skill.Character?.MaxHP ?? 0);
|
||||
|
||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.RecoverMP;
|
||||
public override string Name => "立即回复魔法值";
|
||||
public override string Description => $"立即回复角色 {实际回复:0.##} 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"立即回复角色 {实际回复:0.##} 点魔法值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private readonly double 实际回复 = 0;
|
||||
|
||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.RecoverMP2;
|
||||
public override string Name => "立即回复魔法值";
|
||||
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点魔法值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public override EffectType EffectType { get; set; } = EffectType.Item;
|
||||
|
||||
private double 实际回复 => 回复比例 * (Skill.Character?.MaxMP ?? 0);
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.AccelerationCoefficient;
|
||||
public override string Name => "加速系数加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 加速系数。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 加速系数。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExAccelerationCoefficient += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -10,12 +10,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.DynamicsEffect;
|
||||
public override string Name { get; set; } = "动态扩展特效";
|
||||
public override string Description => string.Join("", Descriptions) + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => string.Join("", Descriptions) + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public HashSet<string> Descriptions { get; } = [];
|
||||
public Dictionary<string, double> RealDynamicsValues { get; } = [];
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
Resolve(character);
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExAGI;
|
||||
public override string Name => "敏捷加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点敏捷。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点敏捷。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExAGI += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExAGI2;
|
||||
public override string Name => "敏捷加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点敏捷。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点敏捷。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseAGI * 加成比例;
|
||||
character.ExAGIPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExATK;
|
||||
public override string Name => "攻击力加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点攻击力。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点攻击力。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExATK2 += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExATK2;
|
||||
public override string Name => "攻击力加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点攻击力。" + (Source != null && Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点攻击力。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseATK * 加成比例;
|
||||
character.ExATKPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExActionCoefficient;
|
||||
public override string Name => "行动系数加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 行动系数。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 行动系数。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExActionCoefficient += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCDR;
|
||||
public override string Name => "冷却缩减加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 冷却缩减。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 冷却缩减。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExCDR += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCritDMG;
|
||||
public override string Name => "暴击伤害加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 暴击伤害。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 暴击伤害。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExCritDMG += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCritRate;
|
||||
public override string Name => "暴击率加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 暴击率。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 暴击率。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExCritRate += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExDEF;
|
||||
public override string Name => "物理护甲加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点物理护甲。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点物理护甲。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExDEF2 += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExDEF2;
|
||||
public override string Name => "物理护甲加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {实际加成:0.##} ] 点物理护甲。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {实际加成:0.##} ] 点物理护甲。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseDEF * 加成比例;
|
||||
character.ExDEFPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExEvadeRate;
|
||||
public override string Name => "闪避率加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 闪避率。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 闪避率。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExEvadeRate += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExHR;
|
||||
public override string Name => "生命回复加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点生命回复。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点生命回复。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExHR += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExINT;
|
||||
public override string Name => "智力加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点智力。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点智力。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExINT += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExINT2;
|
||||
public override string Name => "智力加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点智力。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点智力。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseINT * 加成比例;
|
||||
character.ExINTPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMDF;
|
||||
public override string Name => "魔法抗性加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% {CharacterSet.GetMagicResistanceName(魔法类型)}。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% {CharacterSet.GetMagicResistanceName(魔法类型)}。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
switch (魔法类型)
|
||||
{
|
||||
case MagicType.Starmark:
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMR;
|
||||
public override string Name => "魔法回复加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点魔法回复。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点魔法回复。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExMR += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxHP;
|
||||
public override string Name => "最大生命值加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点最大生命值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点最大生命值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExHP2 += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxHP2;
|
||||
public override string Name => "最大生命值加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点最大生命值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点最大生命值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseHP * 加成比例;
|
||||
character.ExHPPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxMP;
|
||||
public override string Name => "最大魔法值加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点最大魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点最大魔法值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExMP2 += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxMP2;
|
||||
public override string Name => "最大魔法值加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点最大魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点最大魔法值。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseMP * 加成比例;
|
||||
character.ExMP2 += 实际加成;
|
||||
}
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExPDR;
|
||||
public override string Name => "物理伤害减免加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 物理伤害减免。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 物理伤害减免。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExPDR += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExSPD;
|
||||
public override string Name => "行动速度加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点行动速度。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点行动速度。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExSPD += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExSTR;
|
||||
public override string Name => "力量加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点力量。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成):0.##} 点力量。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExSTR += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.ExSTR2;
|
||||
public override string Name => "力量加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点力量。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(加成比例) * 100:0.##}% [ {Math.Abs(实际加成):0.##} ] 点力量。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 加成比例 = 0;
|
||||
@ -15,6 +15,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
实际加成 = character.BaseSTR * 加成比例;
|
||||
character.ExSTRPercentage += 加成比例;
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.IgnoreEvade;
|
||||
public override string Name => "无视闪避";
|
||||
public override string Description => $"普通攻击有 {概率 * 100:0.##}% 概率无视闪避。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"普通攻击有 {概率 * 100:0.##}% 概率无视闪避。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 概率;
|
||||
|
||||
private readonly double 概率 = 0;
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.MagicalPenetration;
|
||||
public override string Name => "魔法穿透加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 魔法穿透。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 魔法穿透。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.MagicalPenetration += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,12 +7,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.NormalAttackHardTimeReduce;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 实际硬直时间减少 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.NormalAttack.HardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
|
||||
|
||||
@ -7,12 +7,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.NormalAttackHardTimeReduce2;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 减少比例 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * 减少比例;
|
||||
}
|
||||
|
||||
|
||||
@ -7,13 +7,21 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.PhysicalPenetration;
|
||||
public override string Name => "物理穿透加成";
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 物理穿透。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"{(实际加成 >= 0 ? "增加" : "减少")}角色 {Math.Abs(实际加成) * 100:0.##}% 物理穿透。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
public double Value => 实际加成;
|
||||
|
||||
private readonly double 实际加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.PhysicalPenetration += 实际加成;
|
||||
}
|
||||
|
||||
|
||||
@ -7,12 +7,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.SkillHardTimeReduce;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 实际硬直时间减少 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime -= 实际硬直时间减少;
|
||||
|
||||
@ -7,12 +7,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
|
||||
{
|
||||
public override long Id => (long)EffectID.SkillHardTimeReduce2;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的所有主动技能 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的所有主动技能 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && Skill.Character != Source || Skill is not OpenSkill ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
|
||||
|
||||
private readonly double 减少比例 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (Durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime -= s.HardnessTime * 减少比例;
|
||||
|
||||
77
OshimaModules/Effects/PassiveEffects/气绝.cs
Normal file
77
OshimaModules/Effects/PassiveEffects/气绝.cs
Normal file
@ -0,0 +1,77 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
{
|
||||
public class 气绝 : Effect
|
||||
{
|
||||
public override long Id => 4109;
|
||||
public override string Name => "气绝";
|
||||
public override string Description => $"此角色处于气绝状态,行动受限并且每{GameplayEquilibriumConstant.InGameTime}持续流失 {(_isPercentage ? $"{_durationDamagePercent * 100:0.##}% [ {Damage:0.##} ]" : Damage.ToString("0.##"))} 点生命值。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||
public override EffectType EffectType => EffectType.Bleed;
|
||||
public override DispelledType DispelledType => DispelledType.Strong;
|
||||
public override bool IsDebuff => true;
|
||||
public override Character Source => _sourceCharacter;
|
||||
public override bool Durative => _durative;
|
||||
public override double Duration => _duration;
|
||||
public override int DurationTurn => _durationTurn;
|
||||
|
||||
private readonly Character _targetCharacter;
|
||||
private readonly Character _sourceCharacter;
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly bool _isPercentage;
|
||||
private readonly double _durationDamage;
|
||||
private readonly double _durationDamagePercent;
|
||||
private double Damage => _isPercentage ? _targetCharacter.HP * _durationDamagePercent : _durationDamage;
|
||||
|
||||
public 气绝(Skill skill, Character targetCharacter, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1,
|
||||
bool isPercentage = true, double durationDamage = 100, double durationDamagePercent = 0.02) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_targetCharacter = targetCharacter;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_isPercentage = isPercentage;
|
||||
_durationDamage = durationDamage;
|
||||
_durationDamagePercent = durationDamagePercent;
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(Character character, double elapsed)
|
||||
{
|
||||
if (character.HP > 0)
|
||||
{
|
||||
double damage = Damage * elapsed;
|
||||
character.HP -= damage;
|
||||
if (character.HP <= 0)
|
||||
{
|
||||
character.HP = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (_durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
AddEffectTypeToCharacter(character, [EffectType.Bleed]);
|
||||
AddEffectStatesToCharacter(character, [CharacterState.ActionRestricted]);
|
||||
InterruptCasting(character, Source);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
RemoveEffectTypesFromCharacter(character);
|
||||
RemoveEffectStatesFromCharacter(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,38 +10,22 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
public override string Description => $"此角色拥有物理护盾。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||
public override EffectType EffectType => EffectType.Shield;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override bool DurativeWithoutDuration => true;
|
||||
public override bool IsDebuff => false;
|
||||
public override Character Source => _sourceCharacter;
|
||||
public override bool Durative => _durative;
|
||||
public override double Duration => _duration;
|
||||
public override int DurationTurn => _durationTurn;
|
||||
|
||||
private readonly Character _sourceCharacter;
|
||||
private readonly double _shield;
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
|
||||
public 物理护盾(Skill skill, Character sourceCharacter, double shield, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
|
||||
public 物理护盾(Skill skill, Character sourceCharacter, double shield) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_shield = shield;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (_durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.Shield.Physical += _shield;
|
||||
}
|
||||
|
||||
|
||||
85
OshimaModules/Effects/PassiveEffects/虚弱.cs
Normal file
85
OshimaModules/Effects/PassiveEffects/虚弱.cs
Normal file
@ -0,0 +1,85 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
{
|
||||
public class 虚弱 : Effect
|
||||
{
|
||||
public override long Id => 4108;
|
||||
public override string Name => "虚弱";
|
||||
public override string Description => $"此角色处于虚弱状态,伤害降低 {_damageReductionPercent * 100:0.##}%," +
|
||||
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%,治疗效果降低 {_healingReductionPercent * 100:0.##}%。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||
public override EffectType EffectType => EffectType.Weaken;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool IsDebuff => true;
|
||||
public override Character Source => _sourceCharacter;
|
||||
public override bool Durative => _durative;
|
||||
public override double Duration => _duration;
|
||||
public override int DurationTurn => _durationTurn;
|
||||
|
||||
private readonly Character _targetCharacter;
|
||||
private readonly Character _sourceCharacter;
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _damageReductionPercent;
|
||||
private readonly double _DEFReductionPercent;
|
||||
private readonly double _MDFReductionPercent;
|
||||
private readonly double _healingReductionPercent;
|
||||
|
||||
public 虚弱(Skill skill, Character targetCharacter, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1,
|
||||
double damageReductionPercent = 0, double DEFReductionPercent = 0, double MDFReductionPercent = 0, double healingReductionPercent = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_targetCharacter = targetCharacter;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_damageReductionPercent = damageReductionPercent;
|
||||
_DEFReductionPercent = DEFReductionPercent;
|
||||
_MDFReductionPercent = MDFReductionPercent;
|
||||
_healingReductionPercent = healingReductionPercent;
|
||||
}
|
||||
|
||||
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
|
||||
{
|
||||
if (character == _targetCharacter)
|
||||
{
|
||||
return -(damage * _damageReductionPercent);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override double AlterHealValueBeforeHealToTarget(Character actor, Character target, double heal, ref bool canRespawn, Dictionary<Effect, double> totalHealBonus)
|
||||
{
|
||||
if (target == _targetCharacter)
|
||||
{
|
||||
return -(heal * _healingReductionPercent);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
if (_durative && RemainDuration == 0)
|
||||
{
|
||||
RemainDuration = Duration;
|
||||
}
|
||||
else if (RemainDurationTurn == 0)
|
||||
{
|
||||
RemainDurationTurn = DurationTurn;
|
||||
}
|
||||
character.ExDEFPercentage -= _DEFReductionPercent;
|
||||
character.MDF.AddAllValue(-_MDFReductionPercent);
|
||||
AddEffectTypeToCharacter(character, [EffectType.Weaken, EffectType.GrievousWound]);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExDEFPercentage += _DEFReductionPercent;
|
||||
character.MDF.AddAllValue(_MDFReductionPercent);
|
||||
RemoveEffectTypesFromCharacter(character);
|
||||
}
|
||||
}
|
||||
}
|
||||
42
OshimaModules/Effects/PassiveEffects/魔法护盾.cs
Normal file
42
OshimaModules/Effects/PassiveEffects/魔法护盾.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||
{
|
||||
public class 魔法护盾 : Effect
|
||||
{
|
||||
public override long Id => 4107;
|
||||
public override string Name => "魔法护盾";
|
||||
public override string Description => $"此角色拥有魔法护盾。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||
public override EffectType EffectType => EffectType.Shield;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override bool DurativeWithoutDuration => true;
|
||||
public override bool IsDebuff => false;
|
||||
public override Character Source => _sourceCharacter;
|
||||
|
||||
private readonly Character _sourceCharacter;
|
||||
private readonly double _shield;
|
||||
|
||||
public 魔法护盾(Skill skill, Character sourceCharacter, double shield) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_shield = shield;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.Shield.None += _shield;
|
||||
}
|
||||
|
||||
public override bool OnShieldBroken(Character character, Character attacker, bool isMagic, MagicType magicType, double damage, double shield, double overFlowing)
|
||||
{
|
||||
Effect[] effects = [.. character.Effects.Where(e => e is 魔法护盾)];
|
||||
foreach (Effect effect in effects)
|
||||
{
|
||||
character.Effects.Remove(effect);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,32 +8,26 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"为目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色提供 {护盾值:0.##} 点物理护盾 {持续时间}。";
|
||||
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点物理护盾。";
|
||||
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色";
|
||||
|
||||
private double 护盾值 => Level > 0 ? Math.Abs(基础数值护盾 + 基础护盾等级成长 * (Level - 1)) : Math.Abs(基础数值护盾);
|
||||
private double 基础数值护盾 { get; set; } = 200;
|
||||
private double 基础护盾等级成长 { get; set; } = 100;
|
||||
private string 持续时间 => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
|
||||
public 增加物理护盾(Skill skill, double 基础数值护盾, double 基础护盾等级成长, bool durative = true, double duration = 40, int durationTurn = 0) : base(skill)
|
||||
public 增加物理护盾(Skill skill, double 基础数值护盾, double 基础护盾等级成长) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
this.基础数值护盾 = 基础数值护盾;
|
||||
this.基础护盾等级成长 = 基础护盾等级成长;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 获得了 {护盾值:0.##} 点物理护盾!持续时间:{持续时间}!");
|
||||
物理护盾 e = new(Skill, caster, 护盾值, _durative, _duration, _durationTurn);
|
||||
WriteLine($"[ {target} ] 获得了 {护盾值:0.##} 点物理护盾!");
|
||||
物理护盾 e = new(Skill, caster, 护盾值);
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(target);
|
||||
e.DispelledType = DispelledType;
|
||||
|
||||
38
OshimaModules/Effects/SkillEffects/增加魔法护盾.cs
Normal file
38
OshimaModules/Effects/SkillEffects/增加魔法护盾.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public class 增加魔法护盾 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点魔法护盾。";
|
||||
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色";
|
||||
|
||||
private double 护盾值 => Level > 0 ? Math.Abs(基础数值护盾 + 基础护盾等级成长 * (Level - 1)) : Math.Abs(基础数值护盾);
|
||||
private double 基础数值护盾 { get; set; } = 200;
|
||||
private double 基础护盾等级成长 { get; set; } = 100;
|
||||
|
||||
public 增加魔法护盾(Skill skill, double 基础数值护盾, double 基础护盾等级成长) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
this.基础数值护盾 = 基础数值护盾;
|
||||
this.基础护盾等级成长 = 基础护盾等级成长;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 获得了 {护盾值:0.##} 点魔法护盾!");
|
||||
魔法护盾 e = new(Skill, caster, 护盾值);
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(target);
|
||||
e.DispelledType = DispelledType;
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Shield]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,22 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"弱驱散{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}目标。";
|
||||
public override string Description => $"弱驱散{TargetDescription}。";
|
||||
public string TargetDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Skill.SelectAllTeammates)
|
||||
{
|
||||
return "友方全体角色";
|
||||
}
|
||||
else if (Skill.SelectAllEnemies)
|
||||
{
|
||||
return "敌方全体角色";
|
||||
}
|
||||
return $"{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}目标";
|
||||
}
|
||||
}
|
||||
public override DispelType DispelType => DispelType.Weak;
|
||||
|
||||
public 弱驱散特效(Skill skill) : base(skill)
|
||||
|
||||
@ -7,7 +7,22 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"强驱散{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}目标。";
|
||||
public override string Description => $"强驱散{TargetDescription}。";
|
||||
public string TargetDescription
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Skill.SelectAllTeammates)
|
||||
{
|
||||
return "友方全体角色";
|
||||
}
|
||||
else if (Skill.SelectAllEnemies)
|
||||
{
|
||||
return "敌方全体角色";
|
||||
}
|
||||
return $"{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}目标";
|
||||
}
|
||||
}
|
||||
public override DispelType DispelType => DispelType.Strong;
|
||||
|
||||
public 强驱散特效(Skill skill) : base(skill)
|
||||
|
||||
@ -30,7 +30,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
foreach (Character enemy in targets)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了封技和施法解除!持续时间:{封技时间}!");
|
||||
封技 e = new(Skill, caster, false, 0, 1);
|
||||
封技 e = new(Skill, caster, _durative, _duration, _durationTurn);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
|
||||
49
OshimaModules/Effects/SkillEffects/造成气绝.cs
Normal file
49
OshimaModules/Effects/SkillEffects/造成气绝.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public class 造成气绝 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}敌人造成气绝 {气绝时间}。气绝期间,目标行动受限且持续流失生命值。";
|
||||
public override DispelledType DispelledType => DispelledType.Strong;
|
||||
|
||||
private string 气绝时间 => _durative && _duration > 0 ? 实际气绝时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际气绝时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际气绝时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly bool _isPercentage;
|
||||
private readonly double _durationDamage;
|
||||
private readonly double _durationDamagePercent;
|
||||
|
||||
public 造成气绝(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0,
|
||||
bool isPercentage = true, double durationDamage = 100, double durationDamagePercent = 0.02) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_isPercentage = isPercentage;
|
||||
_durationDamage = durationDamage;
|
||||
_durationDamagePercent = durationDamagePercent;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character enemy in targets)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了气绝!持续时间:{气绝时间}!");
|
||||
气绝 e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, _isPercentage, _durationDamage, _durationDamagePercent);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -31,6 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
foreach (Character enemy in targets)
|
||||
{
|
||||
if (enemy.HP <= 0) continue;
|
||||
WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}!");
|
||||
眩晕 e = new(Skill, caster, _durative, _duration, _durationTurn);
|
||||
enemy.Effects.Add(e);
|
||||
|
||||
55
OshimaModules/Effects/SkillEffects/造成虚弱.cs
Normal file
55
OshimaModules/Effects/SkillEffects/造成虚弱.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
|
||||
{
|
||||
public class 造成虚弱 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对{TargetDescription}造成虚弱 {虚弱时间},伤害降低 {_damageReductionPercent * 100:0.##}%," +
|
||||
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%,治疗效果降低 {_healingReductionPercent * 100:0.##}%。";
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public string TargetDescription => Skill.SelectAllEnemies ? "敌方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}敌人";
|
||||
|
||||
private string 虚弱时间 => _durative && _duration > 0 ? 实际虚弱时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际虚弱时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际虚弱时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _damageReductionPercent;
|
||||
private readonly double _DEFReductionPercent;
|
||||
private readonly double _MDFReductionPercent;
|
||||
private readonly double _healingReductionPercent;
|
||||
|
||||
public 造成虚弱(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0,
|
||||
double damageReductionPercent = 0, double DEFReductionPercent = 0, double MDFReductionPercent = 0, double healingReductionPercent = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_damageReductionPercent = damageReductionPercent;
|
||||
_DEFReductionPercent = DEFReductionPercent;
|
||||
_MDFReductionPercent = MDFReductionPercent;
|
||||
_healingReductionPercent = healingReductionPercent;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character enemy in targets)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {_damageReductionPercent * 100:0.##}%," +
|
||||
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%," +
|
||||
$"治疗效果降低 {_healingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}!");
|
||||
虚弱 e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, _damageReductionPercent, _DEFReductionPercent, _MDFReductionPercent, _healingReductionPercent);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(enemy);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,20 @@ namespace Oshima.FunGame.OshimaModules
|
||||
(long)MagicID.回复术 => new 回复术(),
|
||||
(long)MagicID.治愈术 => new 治愈术(),
|
||||
(long)MagicID.复苏术 => new 复苏术(),
|
||||
(long)MagicID.圣灵术 => new 圣灵术(),
|
||||
(long)MagicID.时间加速 => new 时间加速(),
|
||||
(long)MagicID.时间减速 => new 时间减速(),
|
||||
(long)MagicID.沉默十字 => new 沉默十字(),
|
||||
(long)MagicID.反魔法领域 => new 反魔法领域(),
|
||||
(long)MagicID.沉默十字 => new 沉默十字(),
|
||||
(long)MagicID.虚弱领域 => new 虚弱领域(),
|
||||
(long)MagicID.混沌烙印 => new 混沌烙印(),
|
||||
(long)MagicID.凝胶稠絮 => new 凝胶稠絮(),
|
||||
(long)MagicID.大地之墙 => new 大地之墙(),
|
||||
(long)MagicID.盖亚之盾 => new 盖亚之盾(),
|
||||
(long)MagicID.风之守护 => new 风之守护(),
|
||||
(long)MagicID.结晶防护 => new 结晶防护(),
|
||||
(long)MagicID.强音之力 => new 强音之力(),
|
||||
(long)MagicID.神圣祝福 => new 神圣祝福(),
|
||||
(long)SkillID.疾风步 => new 疾风步(),
|
||||
(long)SuperSkillID.力量爆发 => new 力量爆发(),
|
||||
(long)SuperSkillID.天赐之力 => new 天赐之力(),
|
||||
|
||||
@ -39,7 +39,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !是否是嵌套伤害 && enemy.HP > 0)
|
||||
if (character == Skill.Character && actualDamage > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !是否是嵌套伤害 && enemy.HP > 0)
|
||||
{
|
||||
// 叠标记
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记);
|
||||
|
||||
@ -33,24 +33,24 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
|
||||
{
|
||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character == Skill.Character)
|
||||
{
|
||||
if (enemy == Skill.Character && damage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效).Any())
|
||||
{
|
||||
累计伤害 = 0;
|
||||
}
|
||||
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
double 实际伤害提升 = damage * 累计伤害;
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {累计伤害 * 100:0.##}% [ {实际伤害提升:0.##} ] 点!");
|
||||
累计伤害 *= 0.7;
|
||||
return 实际伤害提升;
|
||||
}
|
||||
double 实际伤害提升 = damage * 累计伤害;
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {累计伤害 * 100:0.##}% [ {实际伤害提升:0.##} ] 点!");
|
||||
累计伤害 *= 0.7;
|
||||
return 实际伤害提升;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy == Skill.Character && actualDamage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效).Any())
|
||||
{
|
||||
累计伤害 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(Character character, double eapsed)
|
||||
{
|
||||
if (GamingQueue != null)
|
||||
|
||||
@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "三重叠加";
|
||||
public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
||||
public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 3 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
||||
$"(剩余:{剩余持续次数} 次)";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
|
||||
@ -24,12 +24,12 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法伤害命中时基于 25% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值,并减少所有技能 2 {GameplayEquilibriumConstant.InGameTime} 冷却时间。";
|
||||
public override string Description => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法伤害命中时基于 15% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值,并减少所有技能 2 {GameplayEquilibriumConstant.InGameTime} 冷却时间。";
|
||||
|
||||
public bool 是否支持普攻 { get; set; } = false;
|
||||
public int 触发硬直次数 { get; set; } = 2;
|
||||
public int 释放次数 { get; set; } = 0;
|
||||
public double 获得额外能量值 => 0.25 * Skill.Character?.INT ?? 0;
|
||||
public double 获得额外能量值 => 0.15 * Skill.Character?.INT ?? 0;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
@ -50,7 +50,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三重叠加特效);
|
||||
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
||||
{
|
||||
double 获得的魔法值 = 实际获得能量值 * 10;
|
||||
double 获得的魔法值 = 实际获得能量值 * 3;
|
||||
character.MP += 获得的魔法值;
|
||||
WriteLine($"[ {character} ] 发动了三重叠加!回复了 {获得的魔法值:0.##} 魔法值!");
|
||||
}
|
||||
|
||||
@ -3,31 +3,31 @@
|
||||
/**
|
||||
* 冰霜攻击 = 单体伤害
|
||||
* 火之矢 = 单体伤害
|
||||
* 水之矢 =单体伤害
|
||||
* 石之锤 =单体伤害
|
||||
* 风之轮 =单体伤害
|
||||
* 心灵之霞 =单体伤害
|
||||
* 次元上升 = 单体伤害
|
||||
* 水之矢 = 单体伤害
|
||||
* 石之锤 = 单体伤害
|
||||
* 风之轮 = 单体伤害
|
||||
* 心灵之霞 = 单体伤害
|
||||
* 次元上升 = 单体伤害+眩晕(时间型)
|
||||
* 暗物质 = 单体伤害
|
||||
*
|
||||
* 回复术 = 我方·单体回复,
|
||||
* 治愈术 = 我方·单体回复,
|
||||
* 复苏术 = 我方·单体负面解除+回复,
|
||||
* 圣灵术 = 我方·全体负面解除+回复,
|
||||
* 时间加速 = 我方·单体速度提升,
|
||||
* 时间减速 = 单体速度减少,
|
||||
* 反魔法领域 = 全体封技+施法解除,
|
||||
* 沉默十字 = 单体封技+施法解除,
|
||||
* 虚弱领域 = 全体虚弱,
|
||||
* 混沌烙印 = 单体混乱,
|
||||
* 凝胶稠絮 = 单体虚弱,
|
||||
* 复苏术 = 我方·单体弱驱散+回复+复苏,
|
||||
* 圣灵术 = 我方·全体弱驱散+回复+复苏,
|
||||
* 时间加速 = 我方·单体速度提升(时间型),
|
||||
* 时间减速 = 单体速度减少(时间型),
|
||||
* 反魔法领域 = 多目标封技(技能受限,时间型)+施法解除,
|
||||
* 沉默十字 = 多目标封技(技能受限,回合型)+施法解除,
|
||||
* 虚弱领域 = 全体虚弱(伤害降低+护甲魔抗降低+重伤,回合型),
|
||||
* 混沌烙印 = 单体气绝(行动受限+持续伤害,时间型),
|
||||
* 凝胶稠絮 = 单体虚弱(伤害降低+护甲魔抗降低+重伤,回合型),
|
||||
*
|
||||
* 大地之墙 = 我方·多目标护盾,
|
||||
* 盖亚之盾 = 我方·全体护盾,
|
||||
* 风之守护 = 我方·敏捷/闪避提升,
|
||||
* 结晶防护 = 我方·护甲/魔抗提升,
|
||||
* 强音之力 = 我方·攻击提升,
|
||||
* 神圣祝福 = 我方·攻击/护甲/魔抗提升
|
||||
* 大地之墙 = 我方·多目标护盾+持续性弱驱散(时间型),
|
||||
* 盖亚之盾 = 我方·全体物理+魔法护盾,
|
||||
* 风之守护 = 我方·暴击率+闪避提升(回合型),
|
||||
* 结晶防护 = 我方·护甲+魔抗提升(回合型),
|
||||
* 强音之力 = 我方·攻击提升(回合型),
|
||||
* 神圣祝福 = 我方·攻击+护甲+魔抗提升(回合型)
|
||||
*/
|
||||
public enum MagicID : long
|
||||
{
|
||||
|
||||
@ -50,7 +50,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && isMagicDamage && 冷却时间 == 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
if (character == Skill.Character && isMagicDamage && actualDamage > 0 && 冷却时间 == 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||
if (effects.Any())
|
||||
|
||||
24
OshimaModules/Skills/魔法/凝胶稠絮.cs
Normal file
24
OshimaModules/Skills/魔法/凝胶稠絮.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 凝胶稠絮 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.凝胶稠絮;
|
||||
public override string Name => "凝胶稠絮";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).DispelDescription : "";
|
||||
public override double MPCost => Level > 0 ? 100 + (100 * (Level - 1)) : 100;
|
||||
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75;
|
||||
public override double CastTime => 11;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 凝胶稠絮(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成虚弱(this, false, 0, 3, 0, 0.25, 1.2, 0.15, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public 回复术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 纯数值回复生命(this, 70, 120));
|
||||
Effects.Add(new 纯数值回复生命(this, 200, 280));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
OshimaModules/Skills/魔法/圣灵术.cs
Normal file
41
OshimaModules/Skills/魔法/圣灵术.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 圣灵术 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.圣灵术;
|
||||
public override string Name => "圣灵术";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.FirstOrDefault(e => e is 弱驱散特效)?.DispelDescription ?? "";
|
||||
public override double MPCost => Level > 0 ? 120 + (95 * (Level - 1)) : 120;
|
||||
public override double CD => Level > 0 ? 120 - (2 * (Level - 1)) : 120;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 2;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool SelectAllTeammates => true;
|
||||
|
||||
public 圣灵术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
Effects.Add(new 纯数值回复生命(this, 145, 120, true));
|
||||
}
|
||||
|
||||
public override List<Character> GetSelectableTargets(Character caster, List<Character> enemys, List<Character> teammates)
|
||||
{
|
||||
List<Character> targets = base.GetSelectableTargets(caster, enemys, teammates);
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
// 从死亡队列中获取队友,加入目标列表。
|
||||
Dictionary<Character, bool> deaths = GamingQueue.GetIsTeammateDictionary(caster, GamingQueue.Eliminated);
|
||||
targets = [.. targets.Union(deaths.Where(kv => kv.Value).Select(kv => kv.Key)).Distinct()];
|
||||
}
|
||||
return targets;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
Effects.Add(new 纯数值回复生命(this, 40, 65, true));
|
||||
Effects.Add(new 纯数值回复生命(this, 160, 135, true));
|
||||
}
|
||||
|
||||
public override List<Character> GetSelectableTargets(Character caster, List<Character> enemys, List<Character> teammates)
|
||||
|
||||
@ -70,12 +70,12 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public 大地之墙(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effect shield = new 增加物理护盾(this, 120, 160, true, 60)
|
||||
Effect shield = new 增加物理护盾(this, 120, 160)
|
||||
{
|
||||
DispelledType = DispelledType.CannotBeDispelled
|
||||
};
|
||||
Effects.Add(shield);
|
||||
Effect dispel = new 施加持续性弱驱散(this, durative: true, duration: 30)
|
||||
Effect dispel = new 施加持续性弱驱散(this, durative: true, duration: 12)
|
||||
{
|
||||
DispelledType = DispelledType.Strong
|
||||
};
|
||||
@ -84,7 +84,6 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class 大地之墙特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
|
||||
83
OshimaModules/Skills/魔法/强音之力.cs
Normal file
83
OshimaModules/Skills/魔法/强音之力.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 强音之力 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.强音之力;
|
||||
public override string Name => "强音之力";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 90 + (85 * (Level - 1)) : 90;
|
||||
public override double CD => Level > 0 ? 80 - (1* (Level - 1)) : 80;
|
||||
public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 强音之力(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 强音之力特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 强音之力特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DamageBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.06 + 0.06 * (Level - 1) : 0.06;
|
||||
|
||||
public 强音之力特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(target);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DamageBoost]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,14 +11,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成眩晕).DispelDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
|
||||
public override double CD => 100;
|
||||
public override double CD => Level > 0 ? 100 - (1.5 * (Level - 1)) : 100;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
|
||||
public 次元上升(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成眩晕(this, true, 15, 0));
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 40, 40, 0.3, 0.25));
|
||||
Effects.Add(new 造成眩晕(this, true, 10, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 80 + (105 * (Level - 1)) : 80;
|
||||
public override double CD => Level > 0 ? 90 - (1 * (Level - 1)) : 90;
|
||||
public override double CastTime => Level > 0 ? 5 + (1.5 * (Level - 1)) : 5;
|
||||
public override double CastTime => Level > 0 ? 5 + (0.5 * (Level - 1)) : 5;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
@ -21,7 +21,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public 治愈术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 百分比回复生命值(this, 0.3, 0.02));
|
||||
Effects.Add(new 百分比回复生命值(this, 0.3, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
24
OshimaModules/Skills/魔法/混沌烙印.cs
Normal file
24
OshimaModules/Skills/魔法/混沌烙印.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 混沌烙印 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.混沌烙印;
|
||||
public override string Name => "混沌烙印";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成气绝).DispelDescription : "";
|
||||
public override double MPCost => Level > 0 ? 65 + (70 * (Level - 1)) : 65;
|
||||
public override double CD => Level > 0 ? 65 - (1.5 * (Level - 1)) : 65;
|
||||
public override double CastTime => 9;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 混沌烙印(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成气绝(this, true, 15, 0, 0, true, 0, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
29
OshimaModules/Skills/魔法/盖亚之盾.cs
Normal file
29
OshimaModules/Skills/魔法/盖亚之盾.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 盖亚之盾 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.盖亚之盾;
|
||||
public override string Name => "盖亚之盾";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double MPCost => Level > 0 ? 魔法消耗基础 + (魔法消耗等级成长 * (Level - 1)) : 魔法消耗基础;
|
||||
public override double CD => Level > 0 ? 120 - (3 * (Level - 1)) : 120;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
private double 魔法消耗基础 { get; set; } = 100;
|
||||
private double 魔法消耗等级成长 { get; set; } = 100;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool SelectAllTeammates => true;
|
||||
|
||||
public 盖亚之盾(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 增加物理护盾(this, 160, 80));
|
||||
Effects.Add(new 增加魔法护盾(this, 160, 80));
|
||||
}
|
||||
}
|
||||
}
|
||||
126
OshimaModules/Skills/魔法/神圣祝福.cs
Normal file
126
OshimaModules/Skills/魔法/神圣祝福.cs
Normal file
@ -0,0 +1,126 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 神圣祝福 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.神圣祝福;
|
||||
public override string Name => "神圣祝福";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 105 + (105 * (Level - 1)) : 105;
|
||||
public override double CD => Level > 0 ? 95 - (1.5* (Level - 1)) : 95;
|
||||
public override double CastTime => Level > 0 ? 5 + (1 * (Level - 1)) : 5;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 神圣祝福(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 神圣祝福特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 神圣祝福特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力、{ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.05 + 0.05 * (Level - 1) : 0.05;
|
||||
private double ExDEF => Level > 0 ? 0.15 + 0.2 * (Level - 1) : 0.15;
|
||||
private double ExMDF => Level > 0 ? 0.01 + 0.015 * (Level - 1) : 0.01;
|
||||
|
||||
public 神圣祝福特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%,物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(target);
|
||||
ExDEF2 e2 = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster);
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(target);
|
||||
ExMDF e3 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster);
|
||||
target.Effects.Add(e3);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e3.Durative = true;
|
||||
e3.Duration = 实际持续时间;
|
||||
e3.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e3.Durative = false;
|
||||
e3.DurationTurn = (int)实际持续时间;
|
||||
e3.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e3.EffectType = EffectType.DefenseBoost;
|
||||
e3.Source = caster;
|
||||
e3.OnEffectGained(target);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DamageBoost, EffectType.DefenseBoost]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
105
OshimaModules/Skills/魔法/结晶防护.cs
Normal file
105
OshimaModules/Skills/魔法/结晶防护.cs
Normal file
@ -0,0 +1,105 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 结晶防护 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.结晶防护;
|
||||
public override string Name => "结晶防护";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85;
|
||||
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75;
|
||||
public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 结晶防护(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 结晶防护特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 结晶防护特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExDEF => Level > 0 ? 0.2 + 0.2 * (Level - 1) : 0.2;
|
||||
private double ExMDF => Level > 0 ? 0.03 + 0.03 * (Level - 1) : 0.03;
|
||||
|
||||
public 结晶防护特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExDEF2 e = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DefenseBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(target);
|
||||
ExMDF e2 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster);
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(target);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.DefenseBoost]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
24
OshimaModules/Skills/魔法/虚弱领域.cs
Normal file
24
OshimaModules/Skills/魔法/虚弱领域.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 虚弱领域 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.虚弱领域;
|
||||
public override string Name => "虚弱领域";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).DispelDescription : "";
|
||||
public override double MPCost => Level > 0 ? 95 + (95 * (Level - 1)) : 90;
|
||||
public override double CD => Level > 0 ? 85 - (1 * (Level - 1)) : 85;
|
||||
public override double CastTime => 8;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool SelectAllEnemies => true;
|
||||
|
||||
public 虚弱领域(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成虚弱(this, false, 0, 3, 0, 0.1, 1, 0.1, 0.25));
|
||||
}
|
||||
}
|
||||
}
|
||||
104
OshimaModules/Skills/魔法/风之守护.cs
Normal file
104
OshimaModules/Skills/魔法/风之守护.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public class 风之守护 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.风之守护;
|
||||
public override string Name => "风之守护";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 100 + (100 * (Level - 1)) : 100;
|
||||
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75;
|
||||
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 风之守护(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 风之守护特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 风之守护特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {CritRate * 100:0.##}% 暴击率和 {EvadeRate * 100:0.##}% 闪避率,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.CritBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double CritRate => Level > 0 ? 0.03 + 0.03 * (Level - 1) : 0.03;
|
||||
private double EvadeRate => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02;
|
||||
|
||||
public 风之守护特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||
{
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的暴击率提升了 {CritRate * 100:0.##}%,闪避率提升了 {EvadeRate * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExCritRate e = new(Skill, new()
|
||||
{
|
||||
{ "excr", CritRate }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.CritBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(target);
|
||||
ExEvadeRate e2 = new(Skill, new()
|
||||
{
|
||||
{ "exer", EvadeRate }
|
||||
}, caster);
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.EvadeBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(target);
|
||||
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.CritBoost, EffectType.EvadeBoost]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -39,8 +39,8 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
|
||||
FunGameConstant.PassiveSkills.AddRange([new META马(), new 心灵之火(), new 魔法震荡(), new 灵能反射(), new 智慧与力量(), new 致命打击(), new 毁灭之势(), new 枯竭打击(), new 破釜沉舟(), new 累积之压(), new 敏捷之刃(), new 弱者猎手()]);
|
||||
|
||||
FunGameConstant.Magics.AddRange([new 冰霜攻击(), new 火之矢(), new 水之矢(), new 风之轮(), new 石之锤(), new 心灵之霞(), new 次元上升(), new 暗物质(), new 回复术(), new 治愈术(), new 复苏术(),
|
||||
new 时间加速(), new 时间减速(), new 沉默十字(), new 反魔法领域(), new 大地之墙()]);
|
||||
FunGameConstant.Magics.AddRange([new 冰霜攻击(), new 火之矢(), new 水之矢(), new 风之轮(), new 石之锤(), new 心灵之霞(), new 次元上升(), new 暗物质(), new 回复术(), new 治愈术(), new 复苏术(), new 圣灵术(),
|
||||
new 时间加速(), new 时间减速(), new 反魔法领域(), new 沉默十字(), new 虚弱领域(), new 混沌烙印(), new 凝胶稠絮(), new 大地之墙(), new 盖亚之盾(), new 风之守护(), new 结晶防护(), new 强音之力(), new 神圣祝福()]);
|
||||
|
||||
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
|
||||
FunGameConstant.Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
using System.Text;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Interface.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Core.Model;
|
||||
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||
@ -618,6 +619,9 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
LastRecordConfig.SaveConfig();
|
||||
}
|
||||
|
||||
//string zipFileName = "rounds_archive.zip";
|
||||
//WriteRoundsToZip(actionQueue.Rounds.ToDictionary(kv => kv.Round, kv => kv), zipFileName);
|
||||
|
||||
IsRuning = false;
|
||||
}
|
||||
|
||||
@ -631,6 +635,82 @@ namespace Oshima.FunGame.OshimaServers.Service
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将回合记录字典序列化为 JSON,然后压缩并写入 ZIP 文件
|
||||
/// </summary>
|
||||
/// <param name="roundsData">要写入的字典数据</param>
|
||||
/// <param name="zipFilePath">输出的 ZIP 文件路径</param>
|
||||
public static void WriteRoundsToZip(Dictionary<int, RoundRecord> roundsData, string zipFilePath)
|
||||
{
|
||||
// 确保目标目录存在
|
||||
string? directory = Path.GetDirectoryName(zipFilePath);
|
||||
if (!string.IsNullOrEmpty(directory) && !Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
|
||||
// 创建 ZIP 文件
|
||||
using FileStream? zipFileStream = new(zipFilePath, FileMode.Create);
|
||||
using ZipArchive? zipArchive = new(zipFileStream, ZipArchiveMode.Create);
|
||||
// 在 ZIP 档案中创建一个条目来存放 JSON 数据
|
||||
// 你可以给这个条目起个名字,比如 "rounds_data.json"
|
||||
ZipArchiveEntry jsonEntry = zipArchive.CreateEntry("rounds_data.json", CompressionLevel.Optimal); // 使用 Optimal 级别压缩
|
||||
|
||||
// 获取条目的流,将 JSON 数据写入这个流
|
||||
using Stream? entryStream = jsonEntry.Open();
|
||||
// 使用 System.Text.Json 直接序列化到流
|
||||
JsonSerializer.Serialize(entryStream, roundsData, JsonTool.JsonSerializerOptions);
|
||||
|
||||
Console.WriteLine($"回合记录已成功序列化、压缩并写入到: {zipFilePath}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从 ZIP 文件中读取并解压 JSON 数据,然后反序列化为回合记录字典
|
||||
/// </summary>
|
||||
/// <param name="zipFilePath">输入的 ZIP 文件路径</param>
|
||||
/// <returns>反序列化后的字典数据</returns>
|
||||
public static Dictionary<int, RoundRecord>? ReadRoundsFromZip(string zipFilePath)
|
||||
{
|
||||
if (!File.Exists(zipFilePath))
|
||||
{
|
||||
Console.WriteLine($"错误: 文件不存在 {zipFilePath}");
|
||||
return null;
|
||||
}
|
||||
|
||||
Dictionary<int, RoundRecord>? roundsData;
|
||||
|
||||
// 打开 ZIP 文件
|
||||
using FileStream? zipFileStream = new(zipFilePath, FileMode.Open);
|
||||
using ZipArchive? zipArchive = new(zipFileStream, ZipArchiveMode.Read);
|
||||
ZipArchiveEntry? jsonEntry = zipArchive.GetEntry("rounds_data.json");
|
||||
|
||||
if (jsonEntry == null)
|
||||
{
|
||||
Console.WriteLine($"错误: ZIP 档案中找不到 'rounds_data.json' 条目。");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 获取条目的流,从这个流中读取 JSON 数据
|
||||
using Stream? entryStream = jsonEntry.Open();
|
||||
try
|
||||
{
|
||||
roundsData = JsonSerializer.Deserialize<Dictionary<int, RoundRecord>>(entryStream, JsonTool.JsonSerializerOptions);
|
||||
}
|
||||
catch (JsonException ex)
|
||||
{
|
||||
Console.WriteLine($"JSON 反序列化错误: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"读取或反序列化过程中发生未知错误: {ex.Message}");
|
||||
return null;
|
||||
}
|
||||
|
||||
Console.WriteLine($"回合记录已成功从 {zipFilePath} 读取、解压并反序列化。");
|
||||
return roundsData;
|
||||
}
|
||||
|
||||
public static void WriteLine(string str)
|
||||
{
|
||||
Msg += str + "\r\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user