mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-12-05 16:16:35 +00:00
添加新技能
This commit is contained in:
parent
5b9ed72ad3
commit
d198718697
@ -264,6 +264,8 @@
|
|||||||
完全免疫 = 4124,
|
完全免疫 = 4124,
|
||||||
持续性弱驱散 = 4125,
|
持续性弱驱散 = 4125,
|
||||||
持续性强驱散 = 4126,
|
持续性强驱散 = 4126,
|
||||||
累积之压标记 = 4127
|
累积之压标记 = 4127,
|
||||||
|
易损 = 4128,
|
||||||
|
电刑标记 = 4129
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
|||||||
{
|
{
|
||||||
public override long Id => (long)PassiveEffectID.战斗不能;
|
public override long Id => (long)PassiveEffectID.战斗不能;
|
||||||
public override string Name => "战斗不能";
|
public override string Name => "战斗不能";
|
||||||
public override string Description => $"此角色处于战斗不能状态,无法普通攻击和使用技能(魔法、战技和爆发技)。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
public override string Description => $"此角色处于战斗不能状态,无法普通攻击和使用技能(魔法、战技和爆发技),无法对敌人或者队友使用物品。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||||
public override EffectType EffectType => EffectType.Cripple;
|
public override EffectType EffectType => EffectType.Cripple;
|
||||||
public override DispelledType DispelledType => DispelledType.Strong;
|
public override DispelledType DispelledType => DispelledType.Strong;
|
||||||
public override bool IsDebuff => true;
|
public override bool IsDebuff => true;
|
||||||
|
|||||||
64
OshimaModules/Effects/PassiveEffects/易损.cs
Normal file
64
OshimaModules/Effects/PassiveEffects/易损.cs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||||
|
{
|
||||||
|
public class 易损 : Effect
|
||||||
|
{
|
||||||
|
public override long Id => (long)PassiveEffectID.易损;
|
||||||
|
public override string Name => "易损";
|
||||||
|
public override string Description => $"此角色处于易损状态,承受伤害提升 {_exDamagePercent * 100:0.##}%。来自:[ {Source} ] 的 [ {Skill.Name} ]";
|
||||||
|
public override EffectType EffectType => EffectType.Vulnerable;
|
||||||
|
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 _exDamagePercent;
|
||||||
|
|
||||||
|
public 易损(Skill skill, Character targetCharacter, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1, double exDamagePercent = 0) : base(skill)
|
||||||
|
{
|
||||||
|
GamingQueue = skill.GamingQueue;
|
||||||
|
_targetCharacter = targetCharacter;
|
||||||
|
_sourceCharacter = sourceCharacter;
|
||||||
|
_durative = durative;
|
||||||
|
_duration = duration;
|
||||||
|
_durationTurn = durationTurn;
|
||||||
|
_exDamagePercent = exDamagePercent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
|
||||||
|
{
|
||||||
|
if (enemy == _targetCharacter)
|
||||||
|
{
|
||||||
|
return damage * _exDamagePercent;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
if (_durative && RemainDuration == 0)
|
||||||
|
{
|
||||||
|
RemainDuration = Duration;
|
||||||
|
}
|
||||||
|
else if (RemainDurationTurn == 0)
|
||||||
|
{
|
||||||
|
RemainDurationTurn = DurationTurn;
|
||||||
|
}
|
||||||
|
AddEffectTypeToCharacter(character, [EffectType.Vulnerable]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectLost(Character character)
|
||||||
|
{
|
||||||
|
RemoveEffectTypesFromCharacter(character);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
25
OshimaModules/Effects/PassiveEffects/电刑标记.cs
Normal file
25
OshimaModules/Effects/PassiveEffects/电刑标记.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
|
||||||
|
{
|
||||||
|
public class 电刑标记 : Effect
|
||||||
|
{
|
||||||
|
public override long Id => (long)PassiveEffectID.电刑标记;
|
||||||
|
public override string Name => "电刑标记";
|
||||||
|
public override string Description => $"此角色持有电刑标记,层数:{层数} 层。来自:[ {Source} ]";
|
||||||
|
public override EffectType EffectType => EffectType.Mark;
|
||||||
|
public override bool IsDebuff => true;
|
||||||
|
public override Character Source => _sourceCharacter;
|
||||||
|
public int 层数 { get; set; } = 1;
|
||||||
|
|
||||||
|
private readonly Character _sourceCharacter;
|
||||||
|
|
||||||
|
public 电刑标记(Skill skill, Character sourceCharacter) : base(skill)
|
||||||
|
{
|
||||||
|
GamingQueue = skill.GamingQueue;
|
||||||
|
_sourceCharacter = sourceCharacter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -126,6 +126,8 @@ namespace Oshima.FunGame.OshimaModules
|
|||||||
(long)PassiveID.弱者猎手 => new 弱者猎手(),
|
(long)PassiveID.弱者猎手 => new 弱者猎手(),
|
||||||
(long)PassiveID.征服者 => new 征服者(),
|
(long)PassiveID.征服者 => new 征服者(),
|
||||||
(long)PassiveID.致命节奏 => new 致命节奏(),
|
(long)PassiveID.致命节奏 => new 致命节奏(),
|
||||||
|
(long)PassiveID.强攻 => new 强攻(),
|
||||||
|
(long)PassiveID.电刑 => new 电刑(),
|
||||||
(long)ItemPassiveID.攻击之爪 => new 攻击之爪技能(),
|
(long)ItemPassiveID.攻击之爪 => new 攻击之爪技能(),
|
||||||
(long)ItemActiveID.经验书 => new 经验书技能(),
|
(long)ItemActiveID.经验书 => new 经验书技能(),
|
||||||
(long)ItemActiveID.礼包 => new 礼包技能(),
|
(long)ItemActiveID.礼包 => new 礼包技能(),
|
||||||
|
|||||||
@ -42,11 +42,11 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
if (character == Skill.Character && actualDamage > 0 && (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 累积之压标记);
|
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记 && e.Source == character);
|
||||||
if (effects.Any() && effects.First() is 累积之压标记 e)
|
if (effects.FirstOrDefault() is 累积之压标记 e)
|
||||||
{
|
{
|
||||||
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血本能特效);
|
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血本能特效);
|
||||||
if (effects2.Any() && effects2.First() is 嗜血本能特效 e2)
|
if (effects2.FirstOrDefault() is 嗜血本能特效 e2)
|
||||||
{
|
{
|
||||||
// 嗜血本能生效状态下,不会移除标记
|
// 嗜血本能生效状态下,不会移除标记
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override string Slogan => "从深渊引爆力量,世界将为之颤抖!!!!";
|
public override string Slogan => "从深渊引爆力量,世界将为之颤抖!!!!";
|
||||||
public override bool CanSelectSelf => false;
|
public override bool CanSelectSelf => false;
|
||||||
public override bool CanSelectEnemy => true;
|
public override bool CanSelectEnemy => true;
|
||||||
|
public override bool CastAnywhere => true;
|
||||||
|
|
||||||
public 能量毁灭(Character? character = null) : base(SkillType.SuperSkill, character)
|
public 能量毁灭(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||||
{
|
{
|
||||||
|
|||||||
71
OshimaModules/Skills/被动/强攻.cs
Normal file
71
OshimaModules/Skills/被动/强攻.cs
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Skills
|
||||||
|
{
|
||||||
|
public class 强攻 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => (long)PassiveID.强攻;
|
||||||
|
public override string Name => "强攻";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||||
|
|
||||||
|
public 强攻(Character? character = null) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 强攻特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 强攻特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"连续3次普通攻击同一目标时,造成额外的 {额外伤害系数 * 100:0.##}% 伤害并使其进入易损状态,后续承受伤害提升 {易损伤害提升百分比 * 100:0.##}%,持续 {易损持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||||
|
|
||||||
|
private double 易损伤害提升百分比 => Skill.Character != null ? 0.15 + Skill.Character.Level * 0.004 : 0.15;
|
||||||
|
private double 额外伤害系数 => Skill.Character != null ? 0.06 + Skill.Character.Level * 0.005 : 0.06;
|
||||||
|
private double 易损持续时间 => Skill.Character != null ? 15 + Skill.Character.Level * 0.1 : 15;
|
||||||
|
|
||||||
|
private int 目标连续攻击次数 = 0;
|
||||||
|
private Character? 当前目标 = null;
|
||||||
|
|
||||||
|
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
|
||||||
|
{
|
||||||
|
if (Skill.Character != null && Skill.Character == character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||||
|
{
|
||||||
|
if (当前目标 != enemy)
|
||||||
|
{
|
||||||
|
目标连续攻击次数 = 0;
|
||||||
|
当前目标 = enemy;
|
||||||
|
}
|
||||||
|
|
||||||
|
目标连续攻击次数++;
|
||||||
|
|
||||||
|
if (目标连续攻击次数 == 3)
|
||||||
|
{
|
||||||
|
double 额外伤害 = damage * 额外伤害系数;
|
||||||
|
WriteLine($"[ {character} ] 发动了强攻!将额外造成 {额外伤害:0.##} 点伤害!");
|
||||||
|
目标连续攻击次数 = 0;
|
||||||
|
WriteLine($"[ {character} ] 对 [ {enemy} ] 施加了易损状态![ {enemy} ] 的承受伤害提升 {易损伤害提升百分比 * 100:0.##}%!");
|
||||||
|
施加易损状态(character, enemy);
|
||||||
|
return 额外伤害;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 施加易损状态(Character character, Character target)
|
||||||
|
{
|
||||||
|
Effect e = new 易损(Skill, target, character, true, 易损持续时间, 0, 易损伤害提升百分比);
|
||||||
|
target.Effects.Add(e);
|
||||||
|
e.OnEffectGained(target);
|
||||||
|
RecordCharacterApplyEffects(target, EffectType.Vulnerable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
62
OshimaModules/Skills/被动/电刑.cs
Normal file
62
OshimaModules/Skills/被动/电刑.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Skills
|
||||||
|
{
|
||||||
|
public class 电刑 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => (long)PassiveID.电刑;
|
||||||
|
public override string Name => "电刑";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||||
|
|
||||||
|
public 电刑(Character? character = null) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 电刑特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 电刑特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"造成伤害时,标记目标 25 {GameplayEquilibriumConstant.InGameTime}并叠加 1 层数,当目标身上的电刑标记达到 3 层时,此次伤害提升 {伤害百分比 * 100:0.##}%。";
|
||||||
|
private double 伤害百分比 => Skill.Character != null ? 0.4 + Skill.Character.Level * 0.01 : 0;
|
||||||
|
|
||||||
|
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
|
||||||
|
{
|
||||||
|
if (Skill.Character != null && Skill.Character == character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||||
|
{
|
||||||
|
if (enemy.Effects.Where(e => e is 电刑标记 && e.Source == character).FirstOrDefault() is 电刑标记 e)
|
||||||
|
{
|
||||||
|
e.层数++;
|
||||||
|
if (e.层数 >= 3)
|
||||||
|
{
|
||||||
|
double 额外伤害 = damage * 伤害百分比;
|
||||||
|
WriteLine($"[ {character} ] 发动了电刑的 3 层效果,伤害提升了 {伤害百分比 * 100:0.##}%!额外造成 {额外伤害:0.##} 点{CharacterSet.GetDamageTypeName(damageType)}!");
|
||||||
|
e.RemainDuration = 0;
|
||||||
|
enemy.Effects.Remove(e);
|
||||||
|
return 额外伤害;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e = new 电刑标记(Skill, character)
|
||||||
|
{
|
||||||
|
Durative = true,
|
||||||
|
Duration = 25,
|
||||||
|
RemainDuration = 25
|
||||||
|
};
|
||||||
|
enemy.Effects.Add(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -52,7 +52,7 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
|
|
||||||
FunGameConstant.PassiveSkills.AddRange([new META马(), new 心灵之火(), new 魔法震荡(), new 灵能反射(), new 智慧与力量(), new 致命打击(), new 毁灭之势(), new 枯竭打击(), new 破釜沉舟(), new 累积之压(), new 敏捷之刃(), new 弱者猎手()]);
|
FunGameConstant.PassiveSkills.AddRange([new META马(), new 心灵之火(), new 魔法震荡(), new 灵能反射(), new 智慧与力量(), new 致命打击(), new 毁灭之势(), new 枯竭打击(), new 破釜沉舟(), new 累积之压(), new 敏捷之刃(), new 弱者猎手()]);
|
||||||
|
|
||||||
FunGameConstant.CommonPassiveSkills.AddRange([new 征服者(), new 致命节奏()]);
|
FunGameConstant.CommonPassiveSkills.AddRange([new 征服者(), new 致命节奏(), new 强攻(), new 电刑()]);
|
||||||
|
|
||||||
FunGameConstant.Magics.AddRange([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 时间减速(), new 反魔法领域(), new 沉默十字(), new 虚弱领域(), new 混沌烙印(), new 凝胶稠絮(),
|
||||||
@ -1739,11 +1739,11 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
baseScore = baseScore * 0.6 + 0.4 * (stats.Kills / (stats.Kills + stats.Deaths + 0.01));
|
baseScore = baseScore * 0.7 + 0.4 * (stats.Kills / (stats.Kills + stats.Deaths + 0.01));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 伤害贡献
|
// 伤害贡献
|
||||||
double damageContribution = Math.Log(1 + Math.Min(2, (stats.TotalDamage / (stats.TotalTakenDamage + 1))));
|
double damageContribution = Math.Log(1 + Math.Min(2, (stats.TotalDamage / (stats.TotalTakenDamage + 1.45))));
|
||||||
if (team != null && teammateStats != null)
|
if (team != null && teammateStats != null)
|
||||||
{
|
{
|
||||||
// 考虑团队伤害排名,优先高伤害的
|
// 考虑团队伤害排名,优先高伤害的
|
||||||
|
|||||||
@ -126,6 +126,13 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
Level = slevel
|
Level = slevel
|
||||||
};
|
};
|
||||||
c.Skills.Add(疾风步);
|
c.Skills.Add(疾风步);
|
||||||
|
foreach (Skill skillLoop in FunGameConstant.CommonPassiveSkills)
|
||||||
|
{
|
||||||
|
Skill passive = skillLoop.Copy();
|
||||||
|
passive.Character = c;
|
||||||
|
passive.Level = 1;
|
||||||
|
c.Skills.Add(passive);
|
||||||
|
}
|
||||||
foreach (Effect e in c.Effects)
|
foreach (Effect e in c.Effects)
|
||||||
{
|
{
|
||||||
e.OnEffectLost(c);
|
e.OnEffectLost(c);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user