新技能

This commit is contained in:
milimoe 2025-07-10 01:34:43 +08:00
parent 6476578a1b
commit 53fed27111
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
28 changed files with 1212 additions and 57 deletions

View File

@ -0,0 +1,55 @@
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Skills;
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.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% " : $" {Earned:0.##} ")}生命值(每个角色)," +
$"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身生命值。";
private double Earned => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 200;
private double { get; set; } = 100;
private bool { get; set; } = false;
private double { get; set; } = 1;
public (Skill skill, double , double , bool = false, double = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
this. = ;
this. = ;
this. = ;
this. = Calculation.PercentageCheck();
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
double total = 0;
foreach (Character target in targets)
{
double earned = Earned;
if ()
{
earned = target.HP * earned;
}
else if (earned > target.HP)
{
earned = target.HP;
}
if (earned > 0)
{
target.HP -= earned;
total += earned;
GamingQueue?.CalculateCharacterDamageStatistics(caster, target, earned, Milimoe.FunGame.Core.Library.Constant.DamageType.True);
}
}
total *= ;
caster.HP += total;
WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点生命值!");
}
}
}

View File

@ -0,0 +1,54 @@
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Skills;
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.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% " : $" {Earned:0.##} ")}能量值(每个角色)," +
$"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身能量值。";
private double Earned => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 5;
private double { get; set; } = 1;
private bool { get; set; } = false;
private double { get; set; } = 1;
public (Skill skill, double , double , bool = false, double = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
this. = ;
this. = ;
this. = ;
this. = Calculation.PercentageCheck();
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
double total = 0;
foreach (Character target in targets)
{
double earned = Earned;
if ()
{
earned = target.EP * earned;
}
else if (earned > target.EP)
{
earned = target.EP;
}
if (earned > 0)
{
target.EP -= earned;
total += earned;
}
}
total *= ;
caster.EP += total;
WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点能量值!");
}
}
}

View File

@ -0,0 +1,54 @@
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Skills;
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.TargetDescription()}的{(是否是百分比 ? $" {Calculation.PercentageCheck(Earned) * 100:0.##}% " : $" {Earned:0.##} ")}魔法值(每个角色)," +
$"并将吸取总量的 {转化百分比 * 100:0.##}% 转化为自身魔法值。";
private double Earned => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 150;
private double { get; set; } = 75;
private bool { get; set; } = false;
private double { get; set; } = 1;
public (Skill skill, double , double , bool = false, double = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
this. = ;
this. = ;
this. = ;
this. = Calculation.PercentageCheck();
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
double total = 0;
foreach (Character target in targets)
{
double earned = Earned;
if ()
{
earned = target.MP * earned;
}
else if (earned > target.MP)
{
earned = target.MP;
}
if (earned > 0)
{
target.MP -= earned;
total += earned;
}
}
total *= ;
caster.MP += total;
WriteLine($"[ {caster} ] 吸取了 [ {string.Join(" ] / [ ", targets)} ] 的 {total:0.##} 点魔法值!");
}
}
}

View File

@ -33,7 +33,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character target in targets) foreach (Character target in targets)
{ {
WriteLine($"[ {target} ] 的行动速度提升了 {SPD:0.##} !持续时间:{持续时间}"); WriteLine($"[ {target} ] 的行动速度提升了 {SPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}");
ExSPD e = new(Skill, new Dictionary<string, object>() ExSPD e = new(Skill, new Dictionary<string, object>()
{ {
{ "exspd", SPD } { "exspd", SPD }

View File

@ -33,7 +33,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character target in targets) foreach (Character target in targets)
{ {
WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} !持续时间:{持续时间}"); WriteLine($"[ {target} ] 的行动速度降低了 {-SPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}");
ExSPD e = new(Skill, new Dictionary<string, object>() ExSPD e = new(Skill, new Dictionary<string, object>()
{ {
{ "exspd", SPD } { "exspd", SPD }

View File

@ -86,7 +86,18 @@ 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)MagicID. => new (),
(long)SkillID. => new (), (long)SkillID. => new (),
(long)SuperSkillID. => new (), (long)SuperSkillID. => new (),
(long)SuperSkillID. => new (), (long)SuperSkillID. => new (),

View File

@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => "力量爆发"; public override string Name => "力量爆发";
public override string Description => $"获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。"; public override string Description => $"获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次普通攻击命中时都会损失自身 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 10 + 1 * (Level - 1); public override double Duration => 10 + 1 * (Level - 1);
public override DispelledType DispelledType => DispelledType.CannotBeDispelled; public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
@ -49,7 +49,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 (character == Skill.Character && isNormalAttack) if (character == Skill.Character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{ {
double = ; double = ;
character.HP -= ; character.HP -= ;

View File

@ -27,24 +27,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
} }
public override double CD => Level > 0 ? 90 - (2 * (Level - 1)) : 75; public override double CD => Level > 0 ? 90 - (2 * (Level - 1)) : 75;
public override double CastTime public override double CastTime => Level > 0 ? 5 + (0.5 * (Level - 1)) : 5;
{ public override double HardnessTime { get; set; } = 5;
get
{
return Level switch
{
8 => 20,
7 => 18,
6 => 14,
5 => 16,
4 => 14,
3 => 12,
2 => 8,
_ => 10
};
}
}
public override double HardnessTime { get; set; } = 10;
public override int CanSelectTargetCount public override int CanSelectTargetCount
{ {
get get

View File

@ -0,0 +1,42 @@
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 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 95 + (105 * (Level - 1)) : 95;
public override double CD => 100;
public override double CastTime => 6;
public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 4,
6 => 4,
7 => 5,
8 => 5,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
Effects.Add(new (this, 0.24, 0.03));
}
}
}

View File

@ -23,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP); SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
Effects.Add(new (this)); Effects.Add(new (this));
Effects.Add(new (this, 0.24, 0.02, true)); Effects.Add(new (this, 0.21, 0.02, true));
} }
public override List<Character> GetSelectableTargets(Character caster, List<Character> enemys, List<Character> teammates) public override List<Character> GetSelectableTargets(Character caster, List<Character> enemys, List<Character> teammates)

View 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 => string.Join("", Effects.Select(e => e.Description));
public override double MPCost => Level > 0 ? 35 + (30 * (Level - 1)) : 35;
public override double CD => 35;
public override double CastTime => 4;
public override double HardnessTime { get; set; } = 5;
public override int CanSelectTargetCount => 3;
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, 25, 20, false, 0.7));
Effects.Add(new (this, 4, 2, false, 0.3));
}
}
}

View File

@ -9,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "强音之力"; public override string Name => "强音之力";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70; public override double MPCost => Level > 0 ? 65 + (70 * (Level - 1)) : 65;
public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65; public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65;
public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6; public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6;
public override double HardnessTime { get; set; } = 3; public override double HardnessTime { get; set; } = 3;

View File

@ -0,0 +1,98 @@
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 + (85 * (Level - 1)) : 85;
public override double CD => Level > 0 ? 65 - (0.5 * (Level - 1)) : 65;
public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6;
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
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3));
}
}
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.045 + 0.045 * (Level - 1) : 0.045;
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]);
}
}
}
}

View File

@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "时间减速"; public override string Name => "时间减速";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 75 + (85 * (Level - 1)) : 75; public override double MPCost => Level > 0 ? 65 + (75 * (Level - 1)) : 65;
public override double CD => Level > 0 ? 60 - (1 * (Level - 1)) : 60; public override double CD => Level > 0 ? 60 - (1 * (Level - 1)) : 60;
public override double CastTime => Level > 0 ? 7 + (1.5 * (Level - 1)) : 7; public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3;
public override double HardnessTime { get; set; } = 8; public override double HardnessTime { get; set; } = 5;
public (Character? character = null) : base(SkillType.Magic, character) public (Character? character = null) : base(SkillType.Magic, character)
{ {

View File

@ -0,0 +1,113 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
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 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 85 + (95 * (Level - 1)) : 85;
public override double CD => Level > 0 ? 80 - (1 * (Level - 1)) : 80;
public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6;
public override double HardnessTime { get; set; } = 6;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3, 0, 40, 20, 0.08, 0.01));
}
}
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "" : "")}目标 30% 的行动等待时间(当前硬直时间);" +
$"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
public override EffectType EffectType => EffectType.Slow;
public override DispelledType DispelledType => DispelledType.Weak;
public override bool IsDebuff => true;
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 _baseSpd;
private readonly double _baseAcc;
private readonly double _spdLevelGrowth;
private readonly double _accLevelGrowth;
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
_baseSpd = baseSpd;
_spdLevelGrowth = spdLevelGrowth;
_baseAcc = baseAcc;
_accLevelGrowth = accLevelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}");
WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}");
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
{
{ "exspd", -ExSPD }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e1);
e1.OnEffectGained(target);
e1.IsDebuff = true;
GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false);
Effect e2 = new AccelerationCoefficient(Skill, new()
{
{ "exacc", -ExACC }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e2);
e2.OnEffectGained(target);
e2.IsDebuff = true;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Slow]);
}
}
}
}

View File

@ -0,0 +1,97 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
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 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 75 + (85 * (Level - 1)) : 75;
public override double CD => Level > 0 ? 68 - (1 * (Level - 1)) : 60;
public override double CastTime => Level > 0 ? 7 + (1 * (Level - 1)) : 7;
public override double HardnessTime { get; set; } = 4;
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 4, 0, 40, 25, 0.1, 0.02));
}
}
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "" : "")}目标 30% 的行动等待时间(当前硬直时间);" +
$"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
public override EffectType EffectType => EffectType.Slow;
public override DispelledType DispelledType => DispelledType.Weak;
public override bool IsDebuff => true;
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 _baseSpd;
private readonly double _baseAcc;
private readonly double _spdLevelGrowth;
private readonly double _accLevelGrowth;
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
_baseSpd = baseSpd;
_spdLevelGrowth = spdLevelGrowth;
_baseAcc = baseAcc;
_accLevelGrowth = accLevelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}");
WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}");
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
{
{ "exspd", -ExSPD }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e1);
e1.OnEffectGained(target);
e1.IsDebuff = true;
GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false);
Effect e2 = new AccelerationCoefficient(Skill, new()
{
{ "exacc", -ExACC }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e2);
e2.OnEffectGained(target);
e2.IsDebuff = true;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Slow]);
}
}
}
}

View File

@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "时间加速"; public override string Name => "时间加速";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 95 + (105 * (Level - 1)) : 95; public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70;
public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65; public override double CD => Level > 0 ? 65 - (1 * (Level - 1)) : 65;
public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2; public override double CastTime => Level > 0 ? 2 + (1.5 * (Level - 1)) : 2;
public override double HardnessTime { get; set; } = 6; public override double HardnessTime { get; set; } = 4;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false; public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true; public override bool CanSelectTeammate => true;

View File

@ -0,0 +1,116 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
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 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90;
public override double CD => Level > 0 ? 75 - (0.8 * (Level - 1)) : 75;
public override double CastTime => Level > 0 ? 6 + (1.5 * (Level - 1)) : 6;
public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true;
public override bool CanSelectTeammate => true;
public override bool CanSelectEnemy => false;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3, 0, 40, 20, 0.08, 0.01));
}
}
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "" : "")}目标 30% 的行动等待时间(当前硬直时间);" +
$"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
public override EffectType EffectType => EffectType.Haste;
public override DispelledType DispelledType => DispelledType.Weak;
public override bool IsDebuff => false;
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 _baseSpd;
private readonly double _baseAcc;
private readonly double _spdLevelGrowth;
private readonly double _accLevelGrowth;
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
_baseSpd = baseSpd;
_spdLevelGrowth = spdLevelGrowth;
_baseAcc = baseAcc;
_accLevelGrowth = accLevelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 的行动速度提升了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}");
WriteLine($"[ {target} ] 的加速系数提升了 {ExACC * 100:0.##}%!持续时间:{持续时间}");
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
{
{ "exspd", ExSPD }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e1);
e1.OnEffectGained(target);
e1.IsDebuff = false;
GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false);
Effect e2 = new AccelerationCoefficient(Skill, new()
{
{ "exacc", ExACC }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e2);
e2.OnEffectGained(target);
e2.IsDebuff = false;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Haste]);
}
}
}
}

View File

@ -0,0 +1,100 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
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 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 80 + (85 * (Level - 1)) : 80;
public override double CD => Level > 0 ? 65 - (0.5 * (Level - 1)) : 65;
public override double CastTime => Level > 0 ? 6 + (1 * (Level - 1)) : 6;
public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true;
public override bool CanSelectTeammate => true;
public override bool CanSelectEnemy => false;
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 4, 0, 45, 25, 0.1, 0.02));
}
}
public class : Effect
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "" : "")}目标 30% 的行动等待时间(当前硬直时间);" +
$"{(!IsDebuff ? "" : "")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
public override EffectType EffectType => EffectType.Haste;
public override DispelledType DispelledType => DispelledType.Weak;
public override bool IsDebuff => false;
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 _baseSpd;
private readonly double _baseAcc;
private readonly double _spdLevelGrowth;
private readonly double _accLevelGrowth;
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_levelGrowth = levelGrowth;
_baseSpd = baseSpd;
_spdLevelGrowth = spdLevelGrowth;
_baseAcc = baseAcc;
_accLevelGrowth = accLevelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character target in targets)
{
WriteLine($"[ {target} ] 的行动速度提升了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}");
WriteLine($"[ {target} ] 的加速系数提升了 {ExACC * 100:0.##}%!持续时间:{持续时间}");
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
{
{ "exspd", ExSPD }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e1);
e1.OnEffectGained(target);
e1.IsDebuff = false;
GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false);
Effect e2 = new AccelerationCoefficient(Skill, new()
{
{ "exacc", ExACC }
}, caster)
{
Durative = _durative,
Duration = ,
DurationTurn = (int)
};
target.Effects.Add(e2);
e2.OnEffectGained(target);
e2.IsDebuff = false;
GamingQueue?.LastRound.ApplyEffects.TryAdd(target, [EffectType.Haste]);
}
}
}
}

View File

@ -27,24 +27,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
} }
public override double CD => Level > 0 ? 85 - (3 * (Level - 1)) : 85; public override double CD => Level > 0 ? 85 - (3 * (Level - 1)) : 85;
public override double CastTime public override double CastTime => Level > 0 ? 10 - (0.5 * (Level - 1)) : 10;
{ public override double HardnessTime { get; set; } = 6;
get
{
return Level switch
{
8 => 8,
7 => 8,
6 => 9,
5 => 10,
4 => 11,
3 => 12,
2 => 13,
_ => 14
};
}
}
public override double HardnessTime { get; set; } = 10;
public override int CanSelectTargetCount public override int CanSelectTargetCount
{ {
get get

View File

@ -0,0 +1,43 @@
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 ? 85 + (90 * (Level - 1)) : 85;
public override double CD => Level > 0 ? 92 - (1 * (Level - 1)) : 92;
public override double CastTime => Level > 0 ? 6 + (0.25 * (Level - 1)) : 6;
public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
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, 420, 340));
}
}
}

View File

@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "神圣祝福"; public override string Name => "神圣祝福";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 105 + (105 * (Level - 1)) : 105; public override double MPCost => Level > 0 ? 95 + (100 * (Level - 1)) : 95;
public override double CD => Level > 0 ? 95 - (1.5 * (Level - 1)) : 95; public override double CD => Level > 0 ? 90 - (1.5 * (Level - 1)) : 90;
public override double CastTime => Level > 0 ? 5 + (1 * (Level - 1)) : 5; public override double CastTime => Level > 0 ? 5 + (1 * (Level - 1)) : 5;
public override double HardnessTime { get; set; } = 6; public override double HardnessTime { get; set; } = 3;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false; public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true; public override bool CanSelectTeammate => true;

View File

@ -0,0 +1,141 @@
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 ? 110 + (110 * (Level - 1)) : 110;
public override double CD => Level > 0 ? 100 - (1.5 * (Level - 1)) : 100;
public override double CastTime => Level > 0 ? 6 + (1 * (Level - 1)) : 5;
public override double HardnessTime { get; set; } = 7;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3));
}
}
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.04 + 0.035 * (Level - 1) : 0.04;
private double ExDEF => Level > 0 ? 0.12 + 0.15 * (Level - 1) : 0.12;
private double ExMDF => Level > 0 ? 0.008 + 0.012 * (Level - 1) : 0.008;
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]);
}
}
}
}

View File

@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "结晶防护"; public override string Name => "结晶防护";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 80 + (80 * (Level - 1)) : 80; public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75;
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75; public override double CD => Level > 0 ? 70 - (1 * (Level - 1)) : 70;
public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3; public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3;
public override double HardnessTime { get; set; } = 4; public override double HardnessTime { get; set; } = 3;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false; public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true; public override bool CanSelectTeammate => true;

View File

@ -0,0 +1,120 @@
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 + (95 * (Level - 1)) : 90;
public override double CD => Level > 0 ? 80 - (0.5 * (Level - 1)) : 75;
public override double CastTime => Level > 0 ? 4 + (1.5 * (Level - 1)) : 4;
public override double HardnessTime { get; set; } = 5;
public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true;
public override int CanSelectTargetCount
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3));
}
}
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.15 + 0.15 * (Level - 1) : 0.15;
private double ExMDF => 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} ] 的物理护甲提升了 {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]);
}
}
}
}

View File

@ -9,10 +9,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => (long)MagicID.; public override long Id => (long)MagicID.;
public override string Name => "风之守护"; public override string Name => "风之守护";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
public override double MPCost => Level > 0 ? 100 + (100 * (Level - 1)) : 100; public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75;
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75; public override double CD => Level > 0 ? 60 - (0.5 * (Level - 1)) : 60;
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4; public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
public override double HardnessTime { get; set; } = 6; public override double HardnessTime { get; set; } = 3;
public override bool CanSelectSelf => true; public override bool CanSelectSelf => true;
public override bool CanSelectEnemy => false; public override bool CanSelectEnemy => false;
public override bool CanSelectTeammate => true; public override bool CanSelectTeammate => true;

View File

@ -0,0 +1,119 @@
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 - (0.5 * (Level - 1)) : 75;
public override double CastTime => Level > 0 ? 4 + (1.5 * (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
{
get
{
return Level switch
{
3 => 3,
4 => 3,
5 => 3,
6 => 4,
7 => 4,
8 => 4,
_ => 2
};
}
}
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3));
}
}
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.02 + 0.02 * (Level - 1) : 0.02;
private double EvadeRate => Level > 0 ? 0.015 + 0.012 * (Level - 1) : 0.015;
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]);
}
}
}
}

View File

@ -54,7 +54,7 @@ namespace Oshima.FunGame.OshimaServers.Service
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 (), 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 ()]);
Dictionary<string, Item> exItems = Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item); 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)); FunGameConstant.Equipment.AddRange(exItems.Values.Where(i => (int)i.ItemType >= 0 && (int)i.ItemType < 5));