mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-03-05 22:20:28 +00:00
新的技能
This commit is contained in:
parent
4bdc3ae80f
commit
c5d5241305
@ -91,6 +91,8 @@ namespace Oshima.FunGame.OshimaModules.Models
|
|||||||
|
|
||||||
CommonPassiveSkills.AddRange([new 征服者(), new 致命节奏(), new 强攻(), new 电刑(), new 黑暗收割(), new 迅捷步法(), new 贪欲猎手()]);
|
CommonPassiveSkills.AddRange([new 征服者(), new 致命节奏(), new 强攻(), new 电刑(), new 黑暗收割(), new 迅捷步法(), new 贪欲猎手()]);
|
||||||
|
|
||||||
|
CommonSuperSkills.AddRange([new 樱花无双击(), new 漆黑之牙()]);
|
||||||
|
|
||||||
Magics.AddRange([new 冰霜攻击(), new 火之矢(), new 水之矢(), new 风之轮(), new 石之锤(), new 心灵之霞(), new 次元上升(), new 暗物质(),
|
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 凝胶稠絮(),
|
||||||
new 大地之墙(), new 盖亚之盾(), new 风之守护(), new 结晶防护(), new 强音之力(), new 神圣祝福(), new 根源屏障(), new 灾难冲击波(), new 银色荆棘(), new 等离子之波(),
|
new 大地之墙(), new 盖亚之盾(), new 风之守护(), new 结晶防护(), new 强音之力(), new 神圣祝福(), new 根源屏障(), new 灾难冲击波(), new 银色荆棘(), new 等离子之波(),
|
||||||
|
|||||||
@ -141,6 +141,8 @@ namespace Oshima.FunGame.OshimaModules
|
|||||||
(long)SuperSkillID.全军出击 => new 全军出击(),
|
(long)SuperSkillID.全军出击 => new 全军出击(),
|
||||||
(long)SuperSkillID.宿命之潮 => new 宿命之潮(),
|
(long)SuperSkillID.宿命之潮 => new 宿命之潮(),
|
||||||
(long)SuperSkillID.神之因果 => new 神之因果(),
|
(long)SuperSkillID.神之因果 => new 神之因果(),
|
||||||
|
(long)SuperSkillID.樱花无双击 => new 樱花无双击(),
|
||||||
|
(long)SuperSkillID.漆黑之牙 => new 漆黑之牙(),
|
||||||
(long)PassiveID.META马 => new META马(),
|
(long)PassiveID.META马 => new META马(),
|
||||||
(long)PassiveID.心灵之弦 => new 心灵之弦(),
|
(long)PassiveID.心灵之弦 => new 心灵之弦(),
|
||||||
(long)PassiveID.蚀魂震击 => new 蚀魂震击(),
|
(long)PassiveID.蚀魂震击 => new 蚀魂震击(),
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
character.Lifesteal += 吸血;
|
character.Lifesteal += 吸血;
|
||||||
if (character.Effects.Where(e => e is 累积之压特效).FirstOrDefault() is 累积之压特效 e)
|
if (character.Effects.Where(e => e is 累积之压特效 && e.Skill.Character == character).FirstOrDefault() is 累积之压特效 e)
|
||||||
{
|
{
|
||||||
e.系数 += 最大生命值伤害;
|
e.系数 += 最大生命值伤害;
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
character.Lifesteal -= 吸血;
|
character.Lifesteal -= 吸血;
|
||||||
if (character.Effects.Where(e => e is 累积之压特效).FirstOrDefault() is 累积之压特效 e)
|
if (character.Effects.Where(e => e is 累积之压特效 && e.Skill.Character == character).FirstOrDefault() is 累积之压特效 e)
|
||||||
{
|
{
|
||||||
e.系数 -= 最大生命值伤害;
|
e.系数 -= 最大生命值伤害;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
|
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult)
|
||||||
{
|
{
|
||||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy == Skill.Character && actualDamage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效).Any())
|
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy == Skill.Character && actualDamage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效 && e.Skill.Character == character).Any())
|
||||||
{
|
{
|
||||||
累计伤害 = 0;
|
累计伤害 = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
实际力量提升 = 力量提升;
|
实际力量提升 = 力量提升;
|
||||||
character.ExSTR += 实际力量提升;
|
character.ExSTR += 实际力量提升;
|
||||||
if (character.Effects.Where(e => e is 深海之戟特效).FirstOrDefault() is 深海之戟特效 e)
|
if (character.Effects.Where(e => e is 深海之戟特效 && e.Skill.Character == character).FirstOrDefault() is 深海之戟特效 e)
|
||||||
{
|
{
|
||||||
e.野望 = this;
|
e.野望 = this;
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
character.ExSTR -= 实际力量提升;
|
character.ExSTR -= 实际力量提升;
|
||||||
if (character.Effects.Where(e => e is 深海之戟特效).FirstOrDefault() is 深海之戟特效 e)
|
if (character.Effects.Where(e => e is 深海之戟特效 && e.Skill.Character == character).FirstOrDefault() is 深海之戟特效 e)
|
||||||
{
|
{
|
||||||
e.野望 = null;
|
e.野望 = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
if (character.Effects.Where(e => e is 八卦阵特效).FirstOrDefault() is 八卦阵特效 e)
|
if (character.Effects.Where(e => e is 八卦阵特效 && e.Skill.Character == character).FirstOrDefault() is 八卦阵特效 e)
|
||||||
{
|
{
|
||||||
e.归元 = true;
|
e.归元 = true;
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
if (character.Effects.Where(e => e is 八卦阵特效).FirstOrDefault() is 八卦阵特效 e)
|
if (character.Effects.Where(e => e is 八卦阵特效 && e.Skill.Character == character).FirstOrDefault() is 八卦阵特效 e)
|
||||||
{
|
{
|
||||||
e.归元 = false;
|
e.归元 = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
character.ExATK2 += 实际的攻击力提升;
|
character.ExATK2 += 实际的攻击力提升;
|
||||||
character.PhysicalPenetration += 实际的物理穿透提升;
|
character.PhysicalPenetration += 实际的物理穿透提升;
|
||||||
character.ExEvadeRate += 实际的闪避率提升;
|
character.ExEvadeRate += 实际的闪避率提升;
|
||||||
if (character.Effects.Where(e => e is 心灵之弦特效).FirstOrDefault() is 心灵之弦特效 e)
|
if (character.Effects.FirstOrDefault(e => e is 心灵之弦特效 && e.Skill.Character == character) is 心灵之弦特效 e)
|
||||||
{
|
{
|
||||||
e.基础冷却时间 = 3;
|
e.基础冷却时间 = 3;
|
||||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||||
@ -64,7 +64,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
character.ExATK2 -= 实际的攻击力提升;
|
character.ExATK2 -= 实际的攻击力提升;
|
||||||
character.PhysicalPenetration -= 实际的物理穿透提升;
|
character.PhysicalPenetration -= 实际的物理穿透提升;
|
||||||
character.ExEvadeRate -= 实际的闪避率提升;
|
character.ExEvadeRate -= 实际的闪避率提升;
|
||||||
if (character.Effects.Where(e => e is 心灵之弦特效).FirstOrDefault() is 心灵之弦特效 e)
|
if (character.Effects.FirstOrDefault(e => e is 心灵之弦特效 && e.Skill.Character == character) is 心灵之弦特效 e)
|
||||||
{
|
{
|
||||||
e.基础冷却时间 = 10;
|
e.基础冷却时间 = 10;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
实际比例 = 减伤比例;
|
实际比例 = 减伤比例;
|
||||||
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
||||||
if (character.Effects.Where(e => e is 蚀魂震击特效).FirstOrDefault() is 蚀魂震击特效 e)
|
if (character.Effects.Where(e => e is 蚀魂震击特效 && e.Skill.Character == character).FirstOrDefault() is 蚀魂震击特效 e)
|
||||||
{
|
{
|
||||||
e.基础冷却时间 = 5;
|
e.基础冷却时间 = 5;
|
||||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||||
@ -55,7 +55,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
实际比例 = 0;
|
实际比例 = 0;
|
||||||
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
||||||
if (character.Effects.Where(e => e is 蚀魂震击特效).FirstOrDefault() is 蚀魂震击特效 e)
|
if (character.Effects.Where(e => e is 蚀魂震击特效 && e.Skill.Character == character).FirstOrDefault() is 蚀魂震击特效 e)
|
||||||
{
|
{
|
||||||
e.基础冷却时间 = 10;
|
e.基础冷却时间 = 10;
|
||||||
}
|
}
|
||||||
|
|||||||
49
OshimaModules/Skills/爆发技/樱花无双击.cs
Normal file
49
OshimaModules/Skills/爆发技/樱花无双击.cs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Milimoe.FunGame.Core.Model;
|
||||||
|
using Milimoe.FunGame.Core.Model.PrefabricatedEntity;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Skills
|
||||||
|
{
|
||||||
|
public class 樱花无双击 : SoulboundSkill
|
||||||
|
{
|
||||||
|
public override long Id => (long)SuperSkillID.樱花无双击;
|
||||||
|
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 override double CD => 60;
|
||||||
|
public override double HardnessTime { get; set; } = 8;
|
||||||
|
|
||||||
|
public 樱花无双击(Character? character = null) : base(character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 樱花无双击特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 樱花无双击特效(SoulboundSkill skill) : SoulboundEffect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"基于{Skill.SkillOwner()}的 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 对{Skill.TargetDescription()}造成{CharacterSet.GetDamageTypeName(DamageType.Physical)}" +
|
||||||
|
(Improvement > 0 ? $",灵魂绑定伤害加成: {Improvement * 100:0.##}% [ {ImprovementDamage:0.##} ] 点,总伤害 {Damage + ImprovementDamage:0.##} 点;" : ";") +
|
||||||
|
$"造成伤害后,基于伤害值的 {HealCoefficient * 100:0.##}% 回复自身 [ {Heal(Damage):0.##} ] 点生命值。";
|
||||||
|
|
||||||
|
public double ATKCoefficient => 0.6 + 0.15 * (Skill.Level - 1);
|
||||||
|
public double Damage => (Skill.Character?.ATK ?? 0) * ATKCoefficient;
|
||||||
|
public double ImprovementDamage => Improvement > 0 ? Damage * Improvement : 0;
|
||||||
|
public double HealCoefficient => 0.1 + 0.05 * (Skill.Level - 1);
|
||||||
|
public double Heal(double damage) => damage * HealCoefficient;
|
||||||
|
|
||||||
|
public override void OnSkillCasted(Character caster, List<Character> targets, List<Grid> grids, Dictionary<string, object> others)
|
||||||
|
{
|
||||||
|
foreach (Character target in targets)
|
||||||
|
{
|
||||||
|
DamageCalculationOptions options = new(caster);
|
||||||
|
DamageRecord record = DamageToEnemy(caster, target, DamageType.Physical, MagicType.None, Damage + ImprovementDamage, options);
|
||||||
|
HealToTarget(caster, caster, Heal(record.ActualDamage));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
64
OshimaModules/Skills/爆发技/漆黑之牙.cs
Normal file
64
OshimaModules/Skills/爆发技/漆黑之牙.cs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Milimoe.FunGame.Core.Model;
|
||||||
|
using Milimoe.FunGame.Core.Model.PrefabricatedEntity;
|
||||||
|
|
||||||
|
namespace Oshima.FunGame.OshimaModules.Skills
|
||||||
|
{
|
||||||
|
public class 漆黑之牙 : SoulboundSkill
|
||||||
|
{
|
||||||
|
public override long Id => (long)SuperSkillID.漆黑之牙;
|
||||||
|
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 override double CD => 80;
|
||||||
|
public override double HardnessTime { get; set; } = 13;
|
||||||
|
public override bool SelectAllEnemies => true;
|
||||||
|
public int SkillKills { get; set; } = 0;
|
||||||
|
|
||||||
|
public 漆黑之牙(Character? character = null) : base(character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 漆黑之牙特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnCharacterRespawn(Skill newSkill)
|
||||||
|
{
|
||||||
|
if (newSkill is 漆黑之牙 s)
|
||||||
|
{
|
||||||
|
s.SkillKills = SkillKills;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 漆黑之牙特效(SoulboundSkill skill) : SoulboundEffect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"基于{Skill.SkillOwner()}的 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 对{Skill.TargetDescription()}造成{CharacterSet.GetDamageTypeName(DamageType.Physical)}。" +
|
||||||
|
$"每当此技能造成一名敌人死亡,永久提升 4% 伤害,当前提升:{SkillKillsCoefficient * 100:0.##}% [ {SkillKillsDamage:0.##} ] 点;" +
|
||||||
|
(Improvement > 0 ? $"灵魂绑定伤害加成: {Improvement * 100:0.##}% [ {ImprovementDamage:0.##} ] 点;" : "") +
|
||||||
|
$"总伤害 {Damage + SkillKillsDamage + ImprovementDamage:0.##} 点。";
|
||||||
|
|
||||||
|
public 漆黑之牙? CSkill => Skill is 漆黑之牙 s ? s : null;
|
||||||
|
public double ATKCoefficient => 0.4 + 0.1 * (Skill.Level - 1);
|
||||||
|
public double Damage => (Skill.Character?.ATK ?? 0) * ATKCoefficient;
|
||||||
|
public double ImprovementDamage => Improvement > 0 ? Damage * Improvement : 0;
|
||||||
|
public double SkillKillsCoefficient => CSkill is null ? 0 : CSkill.SkillKills * 0.04;
|
||||||
|
public double SkillKillsDamage => SkillKillsCoefficient > 0 ? Damage * SkillKillsCoefficient : 0;
|
||||||
|
|
||||||
|
public override void OnSkillCasted(Character caster, List<Character> targets, List<Grid> grids, Dictionary<string, object> others)
|
||||||
|
{
|
||||||
|
foreach (Character target in targets)
|
||||||
|
{
|
||||||
|
DamageCalculationOptions options = new(caster);
|
||||||
|
DamageToEnemy(caster, target, DamageType.Physical, MagicType.None, Damage + SkillKillsDamage + ImprovementDamage, options);
|
||||||
|
if (target.HP <= 0 && CSkill != null)
|
||||||
|
{
|
||||||
|
CSkill.SkillKills++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -122,6 +122,13 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
passive.Level = 1;
|
passive.Level = 1;
|
||||||
c.Skills.Add(passive);
|
c.Skills.Add(passive);
|
||||||
}
|
}
|
||||||
|
foreach (Skill skillLoop in FunGameConstant.CommonSuperSkills.OrderBy(o => Random.Shared.Next()).Take(3))
|
||||||
|
{
|
||||||
|
Skill super = skillLoop.Copy();
|
||||||
|
super.Character = c;
|
||||||
|
super.Level = slevel;
|
||||||
|
c.Skills.Add(super);
|
||||||
|
}
|
||||||
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