新的技能

This commit is contained in:
milimoe 2026-03-02 01:50:01 +08:00
parent 4bdc3ae80f
commit c5d5241305
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
11 changed files with 135 additions and 11 deletions

View File

@ -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 (),

View File

@ -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 (),

View File

@ -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. -= ;
} }

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;
} }

View 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));
}
}
}
}

View 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++;
}
}
}
}
}

View File

@ -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);