技能优化

This commit is contained in:
milimoe 2025-05-20 00:43:37 +08:00
parent 56833bee9a
commit 98e92e0611
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
8 changed files with 33 additions and 17 deletions

View File

@ -13,7 +13,7 @@ namespace Oshima.FunGame.OshimaModules.Characters
NickName = "LUOLI66";
PrimaryAttribute = PrimaryAttribute.INT;
InitialATK = 18;
InitialHP = 95;
InitialHP = 100;
InitialMP = 45;
InitialSTR = 0;
STRGrowth = 0;

View File

@ -8,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成气绝 {气绝时间}。气绝期间,目标行动受限且持续流失生命值。";
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成气绝 {气绝时间}。气绝期间,目标行动受限且持续{DamageString}。";
public override DispelledType DispelledType => DispelledType.Strong;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
@ -20,6 +20,8 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private readonly bool _isPercentage;
private readonly double _durationDamage;
private readonly double _durationDamagePercent;
private double Damage => _isPercentage ? _durationDamagePercent : _durationDamage;
private string DamageString => _isPercentage ? $"流失 {Damage * 100:0.##}% 当前生命值" : $"流失 {Damage:0.##} 点生命值";
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0,
bool isPercentage = true, double durationDamage = 100, double durationDamagePercent = 0.02) : base(skill)

View File

@ -8,8 +8,8 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{
public override long Id => Skill.Id;
public override string Name => Skill.Name;
public override string Description => $"对{TargetDescription}造成虚弱 {虚弱时间},伤害降低 {_damageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%,治疗效果降低 {_healingReductionPercent * 100:0.##}%。";
public override string Description => $"对{TargetDescription}造成虚弱 {虚弱时间},伤害降低 {ActualDamageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%,治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%。";
public override DispelledType DispelledType => DispelledType.Weak;
public string TargetDescription => Skill.SelectAllEnemies ? "敌方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人";
@ -23,9 +23,18 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private readonly double _DEFReductionPercent;
private readonly double _MDFReductionPercent;
private readonly double _healingReductionPercent;
private readonly double _damageReductionPercentLevelGrowth;
private readonly double _DEFReductionPercentLevelGrowth;
private readonly double _MDFReductionPercentLevelGrowth;
private readonly double _healingReductionPercentLevelGrowth;
private double ActualDamageReductionPercent => Level > 0 ? _damageReductionPercent + _damageReductionPercentLevelGrowth * (Level - 1) : _damageReductionPercent;
private double ActualDEFReductionPercent => Level > 0 ? _DEFReductionPercent + _DEFReductionPercentLevelGrowth * (Level - 1) : _DEFReductionPercent;
private double ActualMDFReductionPercent => Level > 0 ? _MDFReductionPercent + _MDFReductionPercentLevelGrowth * (Level - 1) : _MDFReductionPercent;
private double ActualHealingReductionPercent => Level > 0 ? _healingReductionPercent + _healingReductionPercentLevelGrowth * (Level - 1) : _healingReductionPercent;
public (Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0,
double damageReductionPercent = 0, double DEFReductionPercent = 0, double MDFReductionPercent = 0, double healingReductionPercent = 0) : base(skill)
double damageReductionPercent = 0, double DEFReductionPercent = 0, double MDFReductionPercent = 0, double healingReductionPercent = 0,
double damageReductionPercentLevelGrowth = 0, double DEFReductionPercentLevelGrowth = 0, double MDFReductionPercentLevelGrowth = 0, double healingReductionPercentLevelGrowth = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_durative = durative;
@ -36,16 +45,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
_DEFReductionPercent = DEFReductionPercent;
_MDFReductionPercent = MDFReductionPercent;
_healingReductionPercent = healingReductionPercent;
_damageReductionPercentLevelGrowth = damageReductionPercentLevelGrowth;
_DEFReductionPercentLevelGrowth = DEFReductionPercentLevelGrowth;
_MDFReductionPercentLevelGrowth = MDFReductionPercentLevelGrowth;
_healingReductionPercentLevelGrowth = healingReductionPercentLevelGrowth;
}
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{
foreach (Character enemy in targets)
{
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {_damageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%" +
$"治疗效果降低 {_healingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}");
e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, _damageReductionPercent, _DEFReductionPercent, _MDFReductionPercent, _healingReductionPercent);
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%" +
$"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}");
e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent);
enemy.Effects.Add(e);
e.OnEffectGained(enemy);
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);

View File

@ -55,11 +55,11 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
if (character.HP > character.MaxHP * 0.3)
{
= 1.0 + ((Random.Shared.Next(30, 30) + 0.0) / 100);
= (Random.Shared.Next(30, 30) + 0.0) / 100;
}
else
{
= 1.0 + ((Random.Shared.Next(30, 30) + 0.0) / 100);
= (Random.Shared.Next(30, 30) + 0.0) / 100;
}
return * ;
}

View File

@ -18,7 +18,7 @@
* = (),
* = ()+
* = ()+
* = (++),
* = (++),
* = (+),
* = (++),
*

View File

@ -11,14 +11,15 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is ).DispelDescription : "";
public override double MPCost => Level > 0 ? 100 + (100 * (Level - 1)) : 100;
public override double CD => Level > 0 ? 75 - (1 * (Level - 1)) : 75;
public override double CD => Level > 0 ? 75 - (1.5 * (Level - 1)) : 75;
public override double CastTime => 11;
public override double HardnessTime { get; set; } = 4;
public override int CanSelectTargetCount => 1;
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3, 0, 0.25, 1.2, 0.15, 0.3));
Effects.Add(new (this, false, 0, 3, 0, 0.08, 0.5, 0.05, 0.1,
0.025, 0.1, 0.015, 0.03));
}
}
}

View File

@ -18,7 +18,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, true, 15, 0, 0, true, 0, 0.3));
Effects.Add(new (this, true, 6, 0, 1.5, true, 0, 0.3));
}
}
}

View File

@ -11,14 +11,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is ).DispelDescription : "";
public override double MPCost => Level > 0 ? 95 + (95 * (Level - 1)) : 90;
public override double CD => Level > 0 ? 85 - (1 * (Level - 1)) : 85;
public override double CD => Level > 0 ? 85 - (2 * (Level - 1)) : 85;
public override double CastTime => 8;
public override double HardnessTime { get; set; } = 3;
public override bool SelectAllEnemies => true;
public (Character? character = null) : base(SkillType.Magic, character)
{
Effects.Add(new (this, false, 0, 3, 0, 0.1, 1, 0.1, 0.25));
Effects.Add(new (this, true, 7, 0, 2, 0.1, 1, 0.1, 0.25));
}
}
}