大幅技能修改和添加物品测试

This commit is contained in:
milimoe 2025-06-19 00:53:19 +08:00
parent 33ada4e9ee
commit 83d810e962
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
71 changed files with 522 additions and 209 deletions

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.GetEP; public override long Id => (long)EffectID.GetEP;
public override string Name => "立即获得能量值"; public override string Name => "立即获得能量值";
public override string Description => $"角色立即获得 {实际获得:0.##} 点能量值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"{Skill.TargetDescription()}立即获得 {实际获得:0.##} 点能量值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private readonly double = 0; private readonly double = 0;
@ -29,7 +30,11 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{ {
caster.EP += ; foreach (Character target in targets)
{
target.EP += ;
WriteLine($"[ {target} ] 获得了 {实际获得:0.##} 点能量值!");
}
} }
public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.GetEXP; public override long Id => (long)EffectID.GetEXP;
public override string Name => "立即获得经验值"; public override string Name => "立即获得经验值";
public override string Description => $"角色立即获得 {实际获得:0.##} 点经验值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"{Skill.TargetDescription()}立即获得 {实际获得:0.##} 点经验值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private readonly double = 0; private readonly double = 0;
@ -29,7 +30,11 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{ {
caster.EXP += ; foreach (Character target in targets)
{
target.EXP += ;
WriteLine($"[ {target} ] 获得了 {实际获得:0.##} 点经验值!");
}
} }
public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,10 +9,11 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.RecoverHP; public override long Id => (long)EffectID.RecoverHP;
public override string Name => "立即回复生命值"; public override string Name => "立即回复生命值";
public override string Description => $"立即回复角色 {实际回复:0.##} 点生命值(不可用于复活)。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"立即回复{Skill.TargetDescription()} {实际回复:0.##} 点生命值({(能复活 ? "" : "")}可用于复活)。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private readonly double = 0; private readonly double = 0;
private readonly bool = false;
public RecoverHP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public RecoverHP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
{ {
@ -24,12 +26,17 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
= hp; = hp;
} }
key = Values.Keys.FirstOrDefault(s => s.Equals("respawn", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && bool.TryParse(Values[key].ToString(), out bool respawn) && respawn)
{
= respawn;
}
} }
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{ {
HealToTarget(caster, caster, , false); HealToTarget(caster, caster, , );
} }
public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,11 +9,11 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.RecoverHP2; public override long Id => (long)EffectID.RecoverHP2;
public override string Name => "立即回复生命值"; public override string Name => "立即回复生命值";
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点生命值(不可用于复活)。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"立即回复{Skill.TargetDescription()} {回复比例 * 100:0.##}% 最大生命值({(能复活 ? "" : "")}可用于复活)。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private double => * (Skill.Character?.MaxHP ?? 0);
private readonly double = 0; private readonly double = 0;
private readonly bool = false;
public RecoverHP2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public RecoverHP2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
{ {
@ -25,19 +26,27 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
= hp; = hp;
} }
key = Values.Keys.FirstOrDefault(s => s.Equals("respawn", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && bool.TryParse(Values[key].ToString(), out bool respawn) && respawn)
{
= respawn;
}
} }
} }
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{ {
HealToTarget(caster, caster, , false); foreach (Character target in targets)
{
HealToTarget(caster, target, * (target?.MaxHP ?? 0), );
}
} }
public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)
{ {
foreach (Character target in targets) foreach (Character target in targets)
{ {
target.HP += ; target.HP += * (target?.MaxHP ?? 0);
} }
} }
} }

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.RecoverMP; public override long Id => (long)EffectID.RecoverMP;
public override string Name => "立即回复魔法值"; public override string Name => "立即回复魔法值";
public override string Description => $"立即回复角色 {实际回复:0.##} 点魔法值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"立即回复{Skill.TargetDescription()} {实际回复:0.##} 点魔法值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private readonly double = 0; private readonly double = 0;

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
@ -8,10 +9,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
{ {
public override long Id => (long)EffectID.RecoverMP2; public override long Id => (long)EffectID.RecoverMP2;
public override string Name => "立即回复魔法值"; public override string Name => "立即回复魔法值";
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点魔法值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : ""); public override string Description => $"立即回复{Skill.TargetDescription()} {回复比例 * 100:0.##}% 最大魔法值。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
public override EffectType EffectType { get; set; } = EffectType.Item; public override EffectType EffectType { get; set; } = EffectType.Item;
private double => * (Skill.Character?.MaxMP ?? 0);
private readonly double = 0; private readonly double = 0;
public RecoverMP2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public RecoverMP2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)
@ -30,14 +30,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
{ {
caster.MP += ; foreach (Character target in targets)
{
double mp = * target.MaxMP;
target.MP += mp;
WriteLine($"[ {target} ] 回复了 {mp:0.##} 点魔法值!");
}
} }
public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others) public override void OnSkillCasted(User user, List<Character> targets, Dictionary<string, object> others)
{ {
foreach (Character target in targets) foreach (Character target in targets)
{ {
target.MP += ; target.MP += * (target?.MaxHP ?? 0);
} }
} }
} }

View File

@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public override long Id => 4109; public override long Id => 4109;
public override string Name => "气绝"; public override string Name => "气绝";
public override string Description => $"此角色处于气绝状态,行动受限并且每{GameplayEquilibriumConstant.InGameTime}持续流失 {(_isPercentage ? $"{_durationDamagePercent * 100:0.##}% [ {Damage:0.##} ]" : Damage.ToString("0.##"))} 点生命值。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于气绝状态,行动受限并且每{GameplayEquilibriumConstant.InGameTime}持续流失 {(_isPercentage ? $"{_durationDamagePercent * 100:0.##}% [ {Damage:0.##} ]" : Damage.ToString("0.##"))} 点当前生命值。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Bleed; public override EffectType EffectType => EffectType.Bleed;
public override DispelledType DispelledType => DispelledType.Strong; public override DispelledType DispelledType => DispelledType.Strong;
public override bool IsDebuff => true; public override bool IsDebuff => true;
@ -44,11 +44,24 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
if (character.HP > 0) if (character.HP > 0)
{ {
double damage = Damage * elapsed; if (elapsed > 1)
character.HP -= damage;
if (character.HP <= 0)
{ {
character.HP = 1; int loop = 0;
for (; loop < elapsed; loop++)
{
OnTimeElapsed(character, 1);
}
elapsed -= loop;
if (elapsed > 0)
{
OnTimeElapsed(character, elapsed);
}
}
else
{
double damage = Damage * elapsed;
WriteLine($"[ {character} ] 因气绝而流失生命值!");
DamageToEnemy(Source, character, DamageType.True, MagicType, damage);
} }
} }
} }

View File

@ -42,7 +42,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
_healingReductionPercent = healingReductionPercent; _healingReductionPercent = healingReductionPercent;
} }
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 (character == _targetCharacter) if (character == _targetCharacter)
{ {

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(基于属性)} [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对{Skill.TargetDescription()}造成 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(基于属性)} [ {Damage:0.##} ] 点{CharacterSet.GetDamageTypeName(DamageType, MagicType)}。";
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage private double Damage
@ -33,9 +34,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private double { get; set; } = 50; private double { get; set; } = 50;
private double { get; set; } = 0.4; private double { get; set; } = 0.4;
private double { get; set; } = 0.4; private double { get; set; } = 0.4;
private bool IsMagic { get; set; } = true; private DamageType DamageType { get; set; } = DamageType.Magical;
public (Skill skill, PrimaryAttribute , double , double , double , double , bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) public (Skill skill, PrimaryAttribute , double , double , double , double , DamageType damageType = DamageType.Magical, MagicType magicType = MagicType.None) : base(skill)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
@ -43,7 +44,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
this. = ; this. = ;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; DamageType = damageType;
MagicType = magicType; MagicType = magicType;
} }
@ -51,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
DamageToEnemy(caster, enemy, IsMagic, MagicType, Damage); DamageToEnemy(caster, enemy, DamageType, MagicType, Damage);
} }
} }
} }

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对{Skill.TargetDescription()}造成 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{CharacterSet.GetDamageTypeName(DamageType, MagicType)}。";
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
@ -16,16 +17,16 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private double { get; set; } = 50; private double { get; set; } = 50;
private double { get; set; } = 0.2; private double { get; set; } = 0.2;
private double { get; set; } = 0.2; private double { get; set; } = 0.2;
private bool IsMagic { get; set; } = true; private DamageType DamageType { get; set; } = DamageType.Magical;
public _带基础伤害(Skill skill, double , double , double , double , bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) public _带基础伤害(Skill skill, double , double , double , double , DamageType damageType = DamageType.Magical, MagicType magicType = MagicType.None) : base(skill)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; DamageType = damageType;
MagicType = magicType; MagicType = magicType;
} }
@ -33,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
DamageToEnemy(caster, enemy, IsMagic, MagicType, Damage); DamageToEnemy(caster, enemy, DamageType, MagicType, Damage);
} }
} }
} }

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,20 +8,20 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对{Skill.TargetDescription()}造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{CharacterSet.GetDamageTypeName(DamageType, MagicType)}。";
private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double ATKCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double Damage => ATKCoefficient * Skill.Character?.ATK ?? 0; private double Damage => ATKCoefficient * Skill.Character?.ATK ?? 0;
private double { get; set; } = 1.5; private double { get; set; } = 1.5;
private double { get; set; } = 0.25; private double { get; set; } = 0.25;
private bool IsMagic { get; set; } = true; private DamageType DamageType { get; set; } = DamageType.Magical;
public _无基础伤害(Skill skill, double , double , bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) public _无基础伤害(Skill skill, double , double , DamageType damageType = DamageType.Magical, MagicType magicType = MagicType.None) : base(skill)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; DamageType = damageType;
MagicType = magicType; MagicType = magicType;
} }
@ -28,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
DamageToEnemy(caster, enemy, IsMagic, MagicType, Damage); DamageToEnemy(caster, enemy, DamageType, MagicType, Damage);
} }
} }
} }

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(Skill.Character?.PrimaryAttribute ?? PrimaryAttribute.INT)} [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对{Skill.TargetDescription()}造成 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(Skill.Character?.PrimaryAttribute ?? PrimaryAttribute.INT)} [ {Damage:0.##} ] 点{CharacterSet.GetDamageTypeName(DamageType, MagicType)}。";
private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double BaseDamage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double AttributeCoefficient => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
@ -16,16 +17,16 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
private double { get; set; } = 50; private double { get; set; } = 50;
private double { get; set; } = 0.4; private double { get; set; } = 0.4;
private double { get; set; } = 0.4; private double { get; set; } = 0.4;
private bool IsMagic { get; set; } = true; private DamageType DamageType { get; set; } = DamageType.Magical;
public (Skill skill, double , double , double , double , bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) public (Skill skill, double , double , double , double , DamageType damageType = DamageType.Magical, MagicType magicType = MagicType.None) : base(skill)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; DamageType = damageType;
MagicType = magicType; MagicType = magicType;
} }
@ -33,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
DamageToEnemy(caster, enemy, IsMagic, MagicType, Damage); DamageToEnemy(caster, enemy, DamageType, MagicType, Damage);
} }
} }
} }

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,8 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点混合护盾值。"; public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点混合护盾值。";
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色";
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 200; private double { get; set; } = 200;

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,8 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点物理护盾值。"; public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点物理护盾值。";
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色";
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 200; private double { get; set; } = 200;

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,8 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点物理护盾,持续 {持续时间}。"; public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点物理护盾,持续 {持续时间}。";
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色";
private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,8 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点魔法护盾值。"; public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点魔法护盾值。";
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色";
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 200; private double { get; set; } = 200;

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,8 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{TargetDescription}提供 {护盾值:0.##} 点魔法护盾,持续 {持续时间}。"; public override string Description => $"为{Skill.TargetDescription()}提供 {护盾值:0.##} 点魔法护盾,持续 {持续时间}。";
public string TargetDescription => Skill.SelectAllTeammates ? "友方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色";
private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private string => _durative && _duration > 0 ? _duration + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? _durationTurn + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,22 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"弱驱散{TargetDescription}。"; public override string Description => $"弱驱散{Skill.TargetDescription()}。";
public string TargetDescription
{
get
{
if (Skill.SelectAllTeammates)
{
return "友方全体角色";
}
else if (Skill.SelectAllEnemies)
{
return "敌方全体角色";
}
return $"{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标";
}
}
public override DispelType DispelType => DispelType.Weak; public override DispelType DispelType => DispelType.Weak;
public (Skill skill) : base(skill) public (Skill skill) : base(skill)

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,22 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"强驱散{TargetDescription}。"; public override string Description => $"强驱散{Skill.TargetDescription()}。";
public string TargetDescription
{
get
{
if (Skill.SelectAllTeammates)
{
return "友方全体角色";
}
else if (Skill.SelectAllEnemies)
{
return "敌方全体角色";
}
return $"{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标";
}
}
public override DispelType DispelType => DispelType.Strong; public override DispelType DispelType => DispelType.Strong;
public (Skill skill) : base(skill) public (Skill skill) : base(skill)

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}友方角色 {SPD:0.##} 点行动速度 {持续时间}。并缩短目标 30% 的行动等待时间(当前硬直时间)。"; public override string Description => $"提升{Skill.TargetDescription()} {SPD:0.##} 点行动速度 {持续时间}。并缩短目标 30% 的行动等待时间(当前硬直时间)。";
private double SPD => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs(); private double SPD => Level > 0 ? Math.Abs( + * (Level - 1)) : Math.Abs();
private double { get; set; } = 65; private double { get; set; } = 65;

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"持续弱驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。"; public override string Description => $"持续弱驱散{Skill.TargetDescription()}{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。";
public override DispelType DispelType => DispelType.DurativeWeak; public override DispelType DispelType => DispelType.DurativeWeak;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"持续强驱散{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。"; public override string Description => $"持续强驱散{Skill.TargetDescription()}{(_durativeWithoutDuration ? _durationString : $" {}")}。\r\n持续性驱散是持续性临时驱散它会在持续时间结束之后恢复目标尚未结束的特效。";
public override DispelType DispelType => DispelType.DurativeStrong; public override DispelType DispelType => DispelType.DurativeStrong;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -6,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标回复其最大生命值 {百分比 * 100:0.##}% 生命值。{(CanRespawn ? "" : "")}"; public override string Description => $"为{Skill.TargetDescription()}回复 {百分比 * 100:0.##}% 最大生命值。{(CanRespawn ? "" : "")}";
private double { get; set; } = 0.03; private double { get; set; } = 0.03;
private double { get; set; } = 0.03; private double { get; set; } = 0.03;

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,19 +8,19 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {Damage:0.##} 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对{Skill.TargetDescription()}造成 {Damage:0.##} 点{CharacterSet.GetDamageTypeName(DamageType, MagicType)}。";
private double Damage => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double Damage => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 200; private double { get; set; } = 200;
private double { get; set; } = 100; private double { get; set; } = 100;
private bool IsMagic { get; set; } = true; private DamageType DamageType { get; set; } = DamageType.Magical;
public (Skill skill, double , double , bool isMagic = true, MagicType magicType = MagicType.None) : base(skill) public (Skill skill, double , double , DamageType damageType, MagicType magicType = MagicType.None) : base(skill)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
this. = ; this. = ;
this. = ; this. = ;
IsMagic = isMagic; DamageType = damageType;
MagicType = magicType; MagicType = magicType;
} }
@ -27,7 +28,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
DamageToEnemy(caster, enemy, IsMagic, MagicType, Damage); DamageToEnemy(caster, enemy, DamageType, MagicType, Damage);
} }
} }
} }

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -6,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"为{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。{(CanRespawn ? "" : "")}"; public override string Description => $"为{Skill.TargetDescription()}回复 {Heal:0.##} 点生命值。{(CanRespawn ? "" : "")}";
private double Heal => Skill.Level > 0 ? + * (Skill.Level - 1) : ; private double Heal => Skill.Level > 0 ? + * (Skill.Level - 1) : ;
private double { get; set; } = 100; private double { get; set; } = 100;

View File

@ -1,5 +1,6 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -7,7 +8,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成封技 {封技时间},无法使用技能(魔法、战技和爆发技),并打断当前施法。"; public override string Description => $"对{Skill.TargetDescription()}造成封技 {封技时间},无法使用技能(魔法、战技和爆发技),并打断当前施法。";
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); 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 double => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);

View File

@ -41,7 +41,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
foreach (Character enemy in targets) foreach (Character enemy in targets)
{ {
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了气绝!持续时间:{气绝时间}"); WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了气绝!持续时间:{气绝时间}");
e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, _isPercentage, _durationDamage, _durationDamagePercent); e = new(Skill, enemy, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)), _isPercentage, _durationDamage, _durationDamagePercent);
enemy.Effects.Add(e); enemy.Effects.Add(e);
e.OnEffectGained(enemy); e.OnEffectGained(enemy);
GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]); GamingQueue?.LastRound.ApplyEffects.TryAdd(enemy, [e.EffectType]);

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成眩晕 {眩晕时间}。"; public override string Description => $"对{Skill.TargetDescription()}造成眩晕 {眩晕时间}。";
public override DispelledType DispelledType => DispelledType.Strong; public override DispelledType DispelledType => DispelledType.Strong;
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.PassiveEffects; using Oshima.FunGame.OshimaModules.Effects.PassiveEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,10 +9,9 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"对{TargetDescription}造成虚弱 {虚弱时间},伤害降低 {ActualDamageReductionPercent * 100:0.##}%" + public override string Description => $"对{Skill.TargetDescription()}造成虚弱 {虚弱时间},伤害降低 {ActualDamageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%,治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%。"; $"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%,治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%。";
public override DispelledType DispelledType => DispelledType.Weak; public override DispelledType DispelledType => DispelledType.Weak;
public string TargetDescription => Skill.SelectAllEnemies ? "敌方全体角色" : $"目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人";
private string => _durative && _duration > 0 ? + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}"); 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 double => _durative && _duration > 0 ? _duration + _levelGrowth * (Level - 1) : (!_durative && _durationTurn > 0 ? _durationTurn + _levelGrowth * (Level - 1) : 0);

View File

@ -1,6 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects; using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
@ -8,7 +9,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"降低目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人 {Math.Abs(SPD):0.##} 点行动速度 {持续时间}。并延长目标 30% 的行动等待时间(当前硬直时间)。"; public override string Description => $"降低{Skill.TargetDescription()} {Math.Abs(SPD):0.##} 点行动速度 {持续时间}。并延长目标 30% 的行动等待时间(当前硬直时间)。";
private double SPD => Level > 0 ? -Math.Abs( + * (Level - 1)) : -Math.Abs(); private double SPD => Level > 0 ? -Math.Abs( + * (Level - 1)) : -Math.Abs();
private double { get; set; } = 30; private double { get; set; } = 30;

View File

@ -5,16 +5,16 @@ using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Items namespace Oshima.FunGame.OshimaModules.Items
{ {
public class 8 : Item public class 10 : Item
{ {
public override long Id => (long)AccessoryID.8; public override long Id => (long)AccessoryID.10;
public override string Name => "攻击之爪 +8"; public override string Name => "攻击之爪 +10";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : ""; public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.White; public override QualityType QualityType => QualityType.White;
public 8(Character? character = null) : base(ItemType.Accessory) public 10(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 8)); Skills.Passives.Add(new (character, this, 10));
} }
} }
@ -31,29 +31,29 @@ namespace Oshima.FunGame.OshimaModules.Items
} }
} }
public class 35 : Item public class 30 : Item
{ {
public override long Id => (long)AccessoryID.35; public override long Id => (long)AccessoryID.30;
public override string Name => "攻击之爪 +35"; public override string Name => "攻击之爪 +30";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : ""; public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Blue; public override QualityType QualityType => QualityType.Blue;
public 35(Character? character = null) : base(ItemType.Accessory) public 30(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 35)); Skills.Passives.Add(new (character, this, 30));
} }
} }
public class 50 : Item public class 40 : Item
{ {
public override long Id => (long)AccessoryID.50; public override long Id => (long)AccessoryID.40;
public override string Name => "攻击之爪 +50"; public override string Name => "攻击之爪 +40";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : ""; public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Purple; public override QualityType QualityType => QualityType.Purple;
public 50(Character? character = null) : base(ItemType.Accessory) public 40(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 50)); Skills.Passives.Add(new (character, this, 40));
} }
} }

View File

@ -12,11 +12,10 @@ namespace Oshima.FunGame.OshimaModules.Items
public double HP { get; set; } public double HP { get; set; }
} }
public static void Init(Item item, double exp, int remainUseTimes = 1) public static void Init(Item item, double hp, int remainUseTimes = 1, bool isPercentage = false)
{ {
item.Skills.Active = new (item, exp); item.Skills.Active = new (item, hp, isPercentage);
item.RemainUseTimes = remainUseTimes; item.RemainUseTimes = remainUseTimes;
item.IsInGameItem = false;
item.IsReduceTimesAfterUse = true; item.IsReduceTimesAfterUse = true;
item.IsRemoveAfterUse = true; item.IsRemoveAfterUse = true;
} }
@ -130,20 +129,54 @@ namespace Oshima.FunGame.OshimaModules.Items
} }
} }
public class : Item, .HPRecovery
{
public override long Id => (long)ConsumableID.;
public override string Name => "全回复药";
public override string Description => Skills.Active?.Description ?? "";
public override QualityType QualityType => QualityType.Purple;
public double HP { get; set; } = 1;
public (User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
{
User = user;
.Init(this, HP, remainUseTimes, true);
}
protected override bool OnItemUsed(User user, Dictionary<string, object> args)
{
return .OnItemUsed(user, this, args);
}
}
public class : Skill public class : Skill
{ {
public override long Id => (long)ItemActiveID.; public override long Id => (long)ItemActiveID.;
public override string Name => "回复药"; public override string Name => "回复药";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => string.Join("", Effects.Select(e => e.Description));
public override bool CanSelectSelf => true;
public override bool CanSelectTeammate => true;
public override bool CanSelectEnemy => false;
public override int CanSelectTargetCount => 1;
public (Item? item = null, double hp = 0) : base(SkillType.Item) public (Item? item = null, double hp = 0, bool isPercentage = false) : base(SkillType.Item)
{ {
Level = 1; Level = 1;
Item = item; Item = item;
if (!isPercentage)
{
Effects.Add(new RecoverHP(this, new() Effects.Add(new RecoverHP(this, new()
{ {
{ "hp", hp } { "hp", hp }
})); }));
} }
else
{
Effects.Add(new RecoverHP2(this, new()
{
{ "hp", hp }
}));
}
}
} }
} }

View File

@ -0,0 +1,181 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.ItemEffects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Items
{
public class
{
public interface HPRecovery
{
public double HP { get; set; }
}
public static void Init(Item item, double hp, int remainUseTimes = 1, bool isPercentage = false)
{
item.Skills.Active = new (item, hp, isPercentage);
item.RemainUseTimes = remainUseTimes;
item.IsReduceTimesAfterUse = true;
item.IsRemoveAfterUse = true;
}
public static string UseItem(User user, Item item, Character character)
{
if (item.Skills.Active != null)
{
item.Skills.Active.OnSkillCasted(user, [character]);
string msg = $"对角色 [ {character} ] 使用 [ {item.Name} ] 成功!";
if (item is HPRecovery hpBook)
{
msg += $"回复了 {hpBook.HP} 点生命值!";
}
return msg;
}
return "此物品没有主动技能,无法被使用!";
}
public static bool OnItemUsed(User user, Item item, Dictionary<string, object> args)
{
string msg = "";
bool result = false;
Character[] targets = [];
string key = args.Keys.FirstOrDefault(s => s.Equals("targets", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key != "" && args.TryGetValue(key, out object? value) && value is Character[] temp)
{
if (temp.Length > 0)
{
targets = [temp[0]];
msg = UseItem(user, item, temp[0]);
result = true;
}
else
{
msg = $"使用物品失败,没有作用目标!";
}
}
args["msg"] = msg;
key = args.Keys.FirstOrDefault(s => s.Equals("useCount", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key != "" && args.TryGetValue(key, out value) && value is int count && targets.Length > 0)
{
string truemsg = $"对角色 [ {targets[0]} ] 使用 {count} 个 [ {item.Name} ] 成功!";
if (item is HPRecovery expBook)
{
truemsg += $"回复了 {expBook.HP * count} 点生命值!";
}
args["truemsg"] = truemsg;
}
return result;
}
}
public class 1 : Item, .HPRecovery
{
public override long Id => (long)ConsumableID.1;
public override string Name => "复苏药";
public override string Description => Skills.Active?.Description ?? "";
public override QualityType QualityType => QualityType.Green;
public double HP { get; set; } = 500;
public 1(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
{
User = user;
.Init(this, HP, remainUseTimes);
}
protected override bool OnItemUsed(User user, Dictionary<string, object> args)
{
return .OnItemUsed(user, this, args);
}
}
public class 2 : Item, .HPRecovery
{
public override long Id => (long)ConsumableID.2;
public override string Name => "复苏药·改";
public override string Description => Skills.Active?.Description ?? "";
public override QualityType QualityType => QualityType.Blue;
public double HP { get; set; } = 2500;
public 2(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
{
User = user;
.Init(this, HP, remainUseTimes);
}
protected override bool OnItemUsed(User user, Dictionary<string, object> args)
{
return .OnItemUsed(user, this, args);
}
}
public class 3 : Item, .HPRecovery
{
public override long Id => (long)ConsumableID.3;
public override string Name => "复苏药·全";
public override string Description => Skills.Active?.Description ?? "";
public override QualityType QualityType => QualityType.Purple;
public double HP { get; set; } = 1;
public 3(User? user = null, int remainUseTimes = 1) : base(ItemType.Consumable)
{
User = user;
.Init(this, HP, remainUseTimes, true);
}
protected override bool OnItemUsed(User user, Dictionary<string, object> args)
{
return .OnItemUsed(user, this, args);
}
}
public class : Skill
{
public override long Id => (long)ItemActiveID.;
public override string Name => "复苏药";
public override string Description => string.Join("", Effects.Select(e => e.Description));
public override bool SelectAllTeammates => _canSelectAllTeammates;
public override bool SelectAllEnemies => _canSelectAllEnemies;
public override bool CanSelectSelf => _canSelectSelf;
public override bool CanSelectTeammate => _canSelectTeammate;
public override bool CanSelectEnemy => _canSelectEnemy;
public override int CanSelectTargetCount => _canSelectCount;
private readonly bool _canSelectAllTeammates;
private readonly bool _canSelectAllEnemies;
private readonly bool _canSelectSelf;
private readonly bool _canSelectTeammate;
private readonly bool _canSelectEnemy;
private readonly int _canSelectCount;
public (Item? item = null, double hp = 0, bool isPercentage = false, bool canSelectAllTeammates = false, bool canSelectAllEnemies = false, bool canSelectSelf = true, bool canSelectTeammate = true, bool canSelectEnemy = false, int canSelectCount = 1) : base(SkillType.Item)
{
Level = 1;
Item = item;
_canSelectAllTeammates = canSelectAllTeammates;
_canSelectAllEnemies = canSelectAllEnemies;
_canSelectSelf = canSelectSelf;
_canSelectTeammate = canSelectTeammate;
_canSelectEnemy = canSelectEnemy;
_canSelectCount = canSelectCount;
Effects.Add(new (this));
if (!isPercentage)
{
Effects.Add(new RecoverHP(this, new()
{
{ "hp", hp },
{ "respawn", true }
}));
}
else
{
Effects.Add(new RecoverHP2(this, new()
{
{ "hp", hp },
{ "respawn", true }
}));
}
}
}
}

View File

@ -12,11 +12,10 @@ namespace Oshima.FunGame.OshimaModules.Items
public double EP { get; set; } public double EP { get; set; }
} }
public static void Init(Item item, double exp, int remainUseTimes = 1) public static void Init(Item item, double ep, int remainUseTimes = 1)
{ {
item.Skills.Active = new (item, exp); item.Skills.Active = new (item, ep);
item.RemainUseTimes = remainUseTimes; item.RemainUseTimes = remainUseTimes;
item.IsInGameItem = false;
item.IsReduceTimesAfterUse = true; item.IsReduceTimesAfterUse = true;
item.IsRemoveAfterUse = true; item.IsRemoveAfterUse = true;
} }
@ -134,7 +133,11 @@ namespace Oshima.FunGame.OshimaModules.Items
{ {
public override long Id => (long)ItemActiveID.; public override long Id => (long)ItemActiveID.;
public override string Name => "能量饮料"; public override string Name => "能量饮料";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => string.Join("", Effects.Select(e => e.Description));
public override bool CanSelectSelf => true;
public override bool CanSelectTeammate => true;
public override bool CanSelectEnemy => false;
public override int CanSelectTargetCount => 1;
public (Item? item = null, double ep = 0) : base(SkillType.Item) public (Item? item = null, double ep = 0) : base(SkillType.Item)
{ {

View File

@ -12,11 +12,10 @@ namespace Oshima.FunGame.OshimaModules.Items
public double MP { get; set; } public double MP { get; set; }
} }
public static void Init(Item item, double exp, int remainUseTimes = 1) public static void Init(Item item, double mp, int remainUseTimes = 1, bool isPercentage = false)
{ {
item.Skills.Active = new (item, exp); item.Skills.Active = new (item, mp, isPercentage);
item.RemainUseTimes = remainUseTimes; item.RemainUseTimes = remainUseTimes;
item.IsInGameItem = false;
item.IsReduceTimesAfterUse = true; item.IsReduceTimesAfterUse = true;
item.IsRemoveAfterUse = true; item.IsRemoveAfterUse = true;
} }
@ -134,16 +133,30 @@ namespace Oshima.FunGame.OshimaModules.Items
{ {
public override long Id => (long)ItemActiveID.; public override long Id => (long)ItemActiveID.;
public override string Name => "魔力填充剂"; public override string Name => "魔力填充剂";
public override string Description => Effects.Count > 0 ? Effects.First().Description : ""; public override string Description => string.Join("", Effects.Select(e => e.Description));
public override bool CanSelectSelf => true;
public override bool CanSelectTeammate => true;
public override bool CanSelectEnemy => false;
public override int CanSelectTargetCount => 1;
public (Item? item = null, double mp = 0) : base(SkillType.Item) public (Item? item = null, double mp = 0, bool isPercentage = false) : base(SkillType.Item)
{ {
Level = 1; Level = 1;
Item = item; Item = item;
if (!isPercentage)
{
Effects.Add(new RecoverMP(this, new() Effects.Add(new RecoverMP(this, new()
{ {
{ "mp", mp } { "mp", mp }
})); }));
} }
else
{
Effects.Add(new RecoverMP2(this, new()
{
{ "mp", mp }
}));
}
}
} }
} }

View File

@ -2,10 +2,10 @@
{ {
public enum AccessoryID : long public enum AccessoryID : long
{ {
8 = 14001, 10 = 14001,
20 = 14002, 20 = 14002,
35 = 14003, 30 = 14003,
50 = 14004, 40 = 14004,
} }
public enum ConsumableID : long public enum ConsumableID : long
@ -22,6 +22,10 @@
1 = 15010, 1 = 15010,
2 = 15011, 2 = 15011,
3 = 15012, 3 = 15012,
1 = 15013,
2 = 15014,
3 = 15015,
= 15016
} }
public enum SpecialItemID : long public enum SpecialItemID : long

View File

@ -35,10 +35,10 @@ namespace Oshima.FunGame.OshimaModules
{ {
return id switch return id switch
{ {
(long)AccessoryID.8 => new 8(), (long)AccessoryID.10 => new 10(),
(long)AccessoryID.20 => new 20(), (long)AccessoryID.20 => new 20(),
(long)AccessoryID.35 => new 35(), (long)AccessoryID.30 => new 30(),
(long)AccessoryID.50 => new 50(), (long)AccessoryID.40 => new 40(),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),

View File

@ -37,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return !; return !;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && 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)
{ {
@ -70,7 +70,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
e3.OnEffectGained(enemy); e3.OnEffectGained(enemy);
} }
= true; = true;
DamageToEnemy(character, enemy, false, magicType, ); DamageToEnemy(character, enemy, DamageType.Physical, magicType, );
} }
else else
{ {

View File

@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
private double = 0; private double = 0;
private double = 7; private double = 7;
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character == Skill.Character) if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character == Skill.Character)
{ {
@ -43,7 +43,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return 0; return 0;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 ).Any())
{ {

View File

@ -47,7 +47,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
character.ExAGI -= ; character.ExAGI -= ;
} }
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical)) if (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{ {

View File

@ -31,9 +31,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
public int { get; set; } = 0; public int { get; set; } = 0;
public double => 0.15 * Skill.Character?.INT ?? 0; public double => 0.15 * Skill.Character?.INT ?? 0;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 || isMagicDamage) && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.EP < 200) if (character == Skill.Character && ( && isNormalAttack || damageType == DamageType.Magical) && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.EP < 200)
{ {
double = ; double = ;
character.EP += ; character.EP += ;

View File

@ -108,9 +108,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
= 0; = 0;
} }
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && isMagicDamage && > 0) if (character == Skill.Character && damageType == DamageType.Magical && > 0)
{ {
--; --;
double = ; double = ;
@ -126,7 +126,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return 0; return 0;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && damage > 0) if (character == Skill.Character && > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && damage > 0)
{ {

View File

@ -47,7 +47,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
character.ExATK2 -= ; character.ExATK2 -= ;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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)
{ {

View File

@ -67,7 +67,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return * damage; return * damage;
} }
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character) if (character == Skill.Character)
{ {
@ -94,7 +94,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return 0; return 0;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical)) if (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{ {

View File

@ -56,7 +56,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
= 0; = 0;
} }
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && isNormalAttack) if (character == Skill.Character && isNormalAttack)
{ {

View File

@ -28,7 +28,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
private bool = false; private bool = false;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && ! && enemy.HP > 0) if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && ! && enemy.HP > 0)
{ {
@ -42,7 +42,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
double = damage * 0.3; double = damage * 0.3;
WriteLine($"[ {character} ] 发动了枯竭打击!将造成额外伤害!"); WriteLine($"[ {character} ] 发动了枯竭打击!将造成额外伤害!");
= true; = true;
DamageToEnemy(character, enemy, isMagicDamage, magicType, ); DamageToEnemy(character, enemy, damageType, magicType, );
} }
} }

View File

@ -47,7 +47,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
WriteLine($"[ {caster} ] 正在毁灭 [ {c} ] 的能量!!"); WriteLine($"[ {caster} ] 正在毁灭 [ {c} ] 的能量!!");
double ep = c.EP; double ep = c.EP;
DamageToEnemy(caster, c, true, MagicType, ep * + ); DamageToEnemy(caster, c, DamageType.Magical, MagicType, ep * + );
} }
} }
} }

View File

@ -28,7 +28,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public HashSet<Character> { get; set; } = []; public HashSet<Character> { get; set; } = [];
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && .Contains(enemy)) if (character == Skill.Character && .Contains(enemy))
{ {

View File

@ -30,7 +30,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override double Duration => 30; public override double Duration => 30;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled; public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.HP < character.MaxHP) if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.HP < character.MaxHP)
{ {

View File

@ -0,0 +1,31 @@
using Milimoe.FunGame.Core.Entity;
namespace Oshima.FunGame.OshimaModules.Skills
{
public static class SkillExtension
{
public static string TargetDescription(this Skill skill)
{
if (skill.SelectAllTeammates)
{
return "友方全体角色";
}
else if (skill.SelectAllEnemies)
{
return "敌方全体角色";
}
if (skill.CanSelectTeammate && !skill.CanSelectEnemy)
{
return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}友方角色";
}
else if (!skill.CanSelectTeammate && skill.CanSelectEnemy)
{
return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}敌方角色";
}
else
{
return $"{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}目标";
}
}
}
}

View File

@ -108,6 +108,7 @@
= 6002, = 6002,
= 6003, = 6003,
= 6004, = 6004,
= 6005 = 6005,
= 6006
} }
} }

View File

@ -65,7 +65,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return CharacterActionType.None; return CharacterActionType.None;
} }
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && isNormalAttack) if (character == Skill.Character && isNormalAttack)
{ {

View File

@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public double { get; set; } = 12; public double { get; set; } = 12;
private bool = false; private bool = false;
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 (character == Skill.Character && && isNormalAttack && damage > 0) if (character == Skill.Character && && isNormalAttack && damage > 0)
{ {
@ -40,7 +40,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
return 0; return 0;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && == 0 && ! && GamingQueue != null && enemy.HP > 0) if (character == Skill.Character && isNormalAttack && == 0 && ! && GamingQueue != null && enemy.HP > 0)
{ {

View File

@ -56,7 +56,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
} }
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 == Skill.Character) if (enemy == Skill.Character)
{ {

View File

@ -34,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
private static double => 4; private static double => 4;
private double => * Skill.Character?.STR ?? 0; private double => * Skill.Character?.STR ?? 0;
public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus) public override double AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && ( if (character == Skill.Character && (
enemy.CharacterState == CharacterState.NotActionable || enemy.CharacterState == CharacterState.NotActionable ||
@ -48,9 +48,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
return 0; return 0;
} }
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && isMagicDamage && actualDamage > 0 && == 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical)) if (character == Skill.Character && damageType == DamageType.Magical && actualDamage > 0 && == 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
{ {
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is && e.Skill == Skill); IEnumerable<Effect> effects = enemy.Effects.Where(e => e is && e.Skill == Skill);
if (effects.Any()) if (effects.Any())

View File

@ -30,13 +30,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
private readonly double = 2.5; private readonly double = 2.5;
private bool = false; private bool = false;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, double actualDamage, bool isNormalAttack, bool isMagicDamage, 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 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && ! && enemy.HP > 0) if (character == Skill.Character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && ! && enemy.HP > 0)
{ {
WriteLine($"[ {character} ] 发动了敏捷之刃!将造成额外伤害!"); WriteLine($"[ {character} ] 发动了敏捷之刃!将造成额外伤害!");
= true; = true;
DamageToEnemy(character, enemy, true, magicType, ); DamageToEnemy(character, enemy, DamageType.Magical, magicType, );
} }
if (character == Skill.Character && ) if (character == Skill.Character && )

View File

@ -59,7 +59,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
character.ExCritRate -= 0.08; character.ExCritRate -= 0.08;
} }
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus) 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 (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && ) if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && )
{ {

View File

@ -16,7 +16,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public (Character? character = null) : base(SkillType.Magic, character) public (Character? character = null) : base(SkillType.Magic, character)
{ {
Effects.Add(new _无基础伤害(this, 1.3, 0.28, true)); Effects.Add(new _无基础伤害(this, 1.3, 0.28));
} }
} }
} }

View File

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

View File

@ -1326,7 +1326,7 @@
"YukiのCalfSocks": { "YukiのCalfSocks": {
"Id": 14510, "Id": 14510,
"Name": "YukiのCalfSocks", "Name": "YukiのCalfSocks",
"Description": "增加角色 15% 暴击率和 30% 暴击伤害。", "Description": "增加角色 10% 暴击率和 25% 暴击伤害。",
"BackgroundStory": "小雪的小腿袜,拥有神秘的力量,令人神往。", "BackgroundStory": "小雪的小腿袜,拥有神秘的力量,令人神往。",
"ItemType": 4, "ItemType": 4,
"WeaponType": 0, "WeaponType": 0,
@ -1341,11 +1341,11 @@
"Effects": [ "Effects": [
{ {
"Id": 8014, "Id": 8014,
"excr": 0.15 "excr": 0.1
}, },
{ {
"Id": 8015, "Id": 8015,
"excrd": 0.3 "excrd": 0.25
} }
] ]
} }
@ -1477,7 +1477,7 @@
"YukiのCalfSocks-圣诞限定": { "YukiのCalfSocks-圣诞限定": {
"Id": 14515, "Id": 14515,
"Name": "YukiのCalfSocks-圣诞限定", "Name": "YukiのCalfSocks-圣诞限定",
"Description": "增加角色 50% 暴击伤害。", "Description": "增加角色 40% 暴击伤害。",
"BackgroundStory": "小雪的圣诞限定小腿袜,结合了圣诞树的红绿色,还有铃铛和鹿角的装饰。", "BackgroundStory": "小雪的圣诞限定小腿袜,结合了圣诞树的红绿色,还有铃铛和鹿角的装饰。",
"ItemType": 4, "ItemType": 4,
"WeaponType": 0, "WeaponType": 0,
@ -1492,7 +1492,7 @@
"Effects": [ "Effects": [
{ {
"Id": 8015, "Id": 8015,
"excrd": 0.5 "excrd": 0.4
} }
] ]
} }

View File

@ -263,11 +263,11 @@ namespace Oshima.FunGame.OshimaServers
totalStats.TotalDamage = Calculation.Round2Digits(totalStats.TotalDamage + stats.TotalDamage); totalStats.TotalDamage = Calculation.Round2Digits(totalStats.TotalDamage + stats.TotalDamage);
totalStats.TotalPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage + stats.TotalPhysicalDamage); totalStats.TotalPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage + stats.TotalPhysicalDamage);
totalStats.TotalMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage + stats.TotalMagicDamage); totalStats.TotalMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage + stats.TotalMagicDamage);
totalStats.TotalRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage + stats.TotalRealDamage); totalStats.TotalTrueDamage = Calculation.Round2Digits(totalStats.TotalTrueDamage + stats.TotalTrueDamage);
totalStats.TotalTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage + stats.TotalTakenDamage); totalStats.TotalTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage + stats.TotalTakenDamage);
totalStats.TotalTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage + stats.TotalTakenPhysicalDamage); totalStats.TotalTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage + stats.TotalTakenPhysicalDamage);
totalStats.TotalTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage + stats.TotalTakenMagicDamage); totalStats.TotalTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage + stats.TotalTakenMagicDamage);
totalStats.TotalTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage + stats.TotalTakenRealDamage); totalStats.TotalTakenTrueDamage = Calculation.Round2Digits(totalStats.TotalTakenTrueDamage + stats.TotalTakenTrueDamage);
totalStats.LiveRound += stats.LiveRound; totalStats.LiveRound += stats.LiveRound;
totalStats.ActionTurn += stats.ActionTurn; totalStats.ActionTurn += stats.ActionTurn;
totalStats.LiveTime = Calculation.Round2Digits(totalStats.LiveTime + stats.LiveTime); totalStats.LiveTime = Calculation.Round2Digits(totalStats.LiveTime + stats.LiveTime);
@ -287,11 +287,11 @@ namespace Oshima.FunGame.OshimaServers
totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays); totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays);
totalStats.AvgPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage / totalStats.Plays); totalStats.AvgPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage / totalStats.Plays);
totalStats.AvgMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage / totalStats.Plays); totalStats.AvgMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage / totalStats.Plays);
totalStats.AvgRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage / totalStats.Plays); totalStats.AvgTrueDamage = Calculation.Round2Digits(totalStats.TotalTrueDamage / totalStats.Plays);
totalStats.AvgTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage / totalStats.Plays); totalStats.AvgTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage / totalStats.Plays);
totalStats.AvgTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage / totalStats.Plays); totalStats.AvgTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage / totalStats.Plays);
totalStats.AvgTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage / totalStats.Plays); totalStats.AvgTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage / totalStats.Plays);
totalStats.AvgTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage / totalStats.Plays); totalStats.AvgTakenTrueDamage = Calculation.Round2Digits(totalStats.TotalTakenTrueDamage / totalStats.Plays);
totalStats.AvgLiveRound = totalStats.LiveRound / totalStats.Plays; totalStats.AvgLiveRound = totalStats.LiveRound / totalStats.Plays;
totalStats.AvgActionTurn = totalStats.ActionTurn / totalStats.Plays; totalStats.AvgActionTurn = totalStats.ActionTurn / totalStats.Plays;
totalStats.AvgLiveTime = Calculation.Round2Digits(totalStats.LiveTime / totalStats.Plays); totalStats.AvgLiveTime = Calculation.Round2Digits(totalStats.LiveTime / totalStats.Plays);
@ -339,7 +339,7 @@ namespace Oshima.FunGame.OshimaServers
{ {
foreach (Character character in queue.Queue) foreach (Character character in queue.Queue)
{ {
= [new 35()]; = [new 20()];
foreach (Item item in ) foreach (Item item in )
{ {
queue.Equip(character, EquipSlotType.Accessory1, item, out _); queue.Equip(character, EquipSlotType.Accessory1, item, out _);

View File

@ -175,6 +175,7 @@ namespace Oshima.FunGame.OshimaServers.Service
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) mvpBuilder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
} }
@ -192,6 +193,7 @@ namespace Oshima.FunGame.OshimaServers.Service
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) builder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
builder.AppendLine($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); builder.AppendLine($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
builder.Append($"生命值:{character.HP:0.##}/{character.MaxHP:0.##} / 魔法值:{character.MP:0.##}/{character.MaxMP:0.##}"); builder.Append($"生命值:{character.HP:0.##}/{character.MaxHP:0.##} / 魔法值:{character.MP:0.##}/{character.MaxMP:0.##}");
if (count++ <= top) if (count++ <= top)
@ -386,6 +388,7 @@ namespace Oshima.FunGame.OshimaServers.Service
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) mvpBuilder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
} }

View File

@ -44,11 +44,13 @@ namespace Oshima.FunGame.OshimaServers.Service
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));
FunGameConstant.Equipment.AddRange([new 8(), new 20(), new 35(), new 50()]); FunGameConstant.Equipment.AddRange([new 10(), new 20(), new 30(), new 40()]);
FunGameConstant.Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4)); FunGameConstant.Items.AddRange(exItems.Values.Where(i => (int)i.ItemType > 4));
FunGameConstant.Items.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (), FunGameConstant.Items.AddRange([new (), new (), new (), new (), new (), new (), new (), new (), new (), new (),
new (), new (), new (), new 1(), new 2(), new 3(), new 1(), new 2(), new 3(), new (), new (), new (), new ()]); new (), new (), new (), new 1(), new 2(), new 3(), new 1(), new 2(), new 3(), new (), new (), new (), new (),
new 1(), new 2(), new 3(), new ()
]);
FunGameConstant.AllItems.AddRange(FunGameConstant.Equipment); FunGameConstant.AllItems.AddRange(FunGameConstant.Equipment);
FunGameConstant.AllItems.AddRange(FunGameConstant.Items); FunGameConstant.AllItems.AddRange(FunGameConstant.Items);

View File

@ -421,6 +421,7 @@ namespace Oshima.FunGame.OshimaServers.Service
mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); mvpBuilder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); mvpBuilder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); mvpBuilder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) mvpBuilder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); mvpBuilder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
} }
@ -483,6 +484,7 @@ namespace Oshima.FunGame.OshimaServers.Service
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) builder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
if (count++ <= top) if (count++ <= top)
{ {
@ -515,6 +517,7 @@ namespace Oshima.FunGame.OshimaServers.Service
builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}"); builder.AppendLine($"控制时长:{stats.ControlTime:0.##} / 总计治疗:{stats.TotalHeal:0.##} / 护盾抵消:{stats.TotalShield:0.##}");
builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}"); builder.AppendLine($"总计伤害:{stats.TotalDamage:0.##} / 总计物理伤害:{stats.TotalPhysicalDamage:0.##} / 总计魔法伤害:{stats.TotalMagicDamage:0.##}");
builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}"); builder.AppendLine($"总承受伤害:{stats.TotalTakenDamage:0.##} / 总承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 总承受魔法伤害:{stats.TotalTakenMagicDamage:0.##}");
if (stats.TotalTrueDamage > 0 || stats.TotalTakenTrueDamage > 0) builder.AppendLine($"总计真实伤害:{stats.TotalTrueDamage:0.##} / 总承受真实伤害:{stats.TotalTakenTrueDamage:0.##}");
builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}"); builder.Append($"每秒伤害:{stats.DamagePerSecond:0.##} / 每回合伤害:{stats.DamagePerTurn:0.##}");
if (count++ <= top) if (count++ <= top)
{ {
@ -849,7 +852,7 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
character.User.Inventory.Credits -= costLevel; character.User.Inventory.Credits -= costLevel;
operation["升级角色"] = true; operation["升级角色"] = true;
character.Level += 10; character.SetLevel(character.Level + 10, false);
character.NormalAttack.Level += 2; character.NormalAttack.Level += 2;
foreach (Skill skill in character.Skills) foreach (Skill skill in character.Skills)
{ {
@ -964,11 +967,16 @@ namespace Oshima.FunGame.OshimaServers.Service
public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality, bool addLevel = true) public static void DropItems(GamingQueue queue, int mQuality, int wQuality, int aQuality, int sQuality, int acQuality, bool addLevel = true)
{ {
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)];
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
Item[] accessories = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable)];
foreach (Character character in queue.HardnessTime.Keys) foreach (Character character in queue.HardnessTime.Keys)
{ {
if (addLevel) if (addLevel)
{ {
character.Level += 10; character.SetLevel(character.Level + 10, false);
character.NormalAttack.Level += 2; character.NormalAttack.Level += 2;
foreach (Skill skill in character.Skills) foreach (Skill skill in character.Skills)
{ {
@ -1001,10 +1009,6 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
continue; continue;
} }
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == wQuality)];
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)];
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == sQuality)];
Item[] accessories = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
Item? weapon = null, armor = null, shoe = null, accessory1 = null, accessory2 = null; Item? weapon = null, armor = null, shoe = null, accessory1 = null, accessory2 = null;
if (weapons.Length > 0) if (weapons.Length > 0)
{ {
@ -1038,6 +1042,14 @@ namespace Oshima.FunGame.OshimaServers.Service
realItem.SetGamingQueue(queue); realItem.SetGamingQueue(queue);
queue.Equip(character, realItem); queue.Equip(character, realItem);
} }
if (consumables.Length > 0 && character.Items.Count < 5)
{
for (int i = 0; i < 2; i++)
{
Item consumable = consumables[Random.Shared.Next(consumables.Length)].Copy();
character.Items.Add(consumable);
}
}
} }
} }
@ -1047,11 +1059,11 @@ namespace Oshima.FunGame.OshimaServers.Service
totalStats.TotalDamage = Calculation.Round2Digits(totalStats.TotalDamage + stats.TotalDamage); totalStats.TotalDamage = Calculation.Round2Digits(totalStats.TotalDamage + stats.TotalDamage);
totalStats.TotalPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage + stats.TotalPhysicalDamage); totalStats.TotalPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage + stats.TotalPhysicalDamage);
totalStats.TotalMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage + stats.TotalMagicDamage); totalStats.TotalMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage + stats.TotalMagicDamage);
totalStats.TotalRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage + stats.TotalRealDamage); totalStats.TotalTrueDamage = Calculation.Round2Digits(totalStats.TotalTrueDamage + stats.TotalTrueDamage);
totalStats.TotalTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage + stats.TotalTakenDamage); totalStats.TotalTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage + stats.TotalTakenDamage);
totalStats.TotalTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage + stats.TotalTakenPhysicalDamage); totalStats.TotalTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage + stats.TotalTakenPhysicalDamage);
totalStats.TotalTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage + stats.TotalTakenMagicDamage); totalStats.TotalTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage + stats.TotalTakenMagicDamage);
totalStats.TotalTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage + stats.TotalTakenRealDamage); totalStats.TotalTakenTrueDamage = Calculation.Round2Digits(totalStats.TotalTakenTrueDamage + stats.TotalTakenTrueDamage);
totalStats.TotalHeal = Calculation.Round2Digits(totalStats.TotalHeal + stats.TotalHeal); totalStats.TotalHeal = Calculation.Round2Digits(totalStats.TotalHeal + stats.TotalHeal);
totalStats.LiveRound += stats.LiveRound; totalStats.LiveRound += stats.LiveRound;
totalStats.ActionTurn += stats.ActionTurn; totalStats.ActionTurn += stats.ActionTurn;
@ -1080,11 +1092,11 @@ namespace Oshima.FunGame.OshimaServers.Service
totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays); totalStats.AvgDamage = Calculation.Round2Digits(totalStats.TotalDamage / totalStats.Plays);
totalStats.AvgPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage / totalStats.Plays); totalStats.AvgPhysicalDamage = Calculation.Round2Digits(totalStats.TotalPhysicalDamage / totalStats.Plays);
totalStats.AvgMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage / totalStats.Plays); totalStats.AvgMagicDamage = Calculation.Round2Digits(totalStats.TotalMagicDamage / totalStats.Plays);
totalStats.AvgRealDamage = Calculation.Round2Digits(totalStats.TotalRealDamage / totalStats.Plays); totalStats.AvgTrueDamage = Calculation.Round2Digits(totalStats.TotalTrueDamage / totalStats.Plays);
totalStats.AvgTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage / totalStats.Plays); totalStats.AvgTakenDamage = Calculation.Round2Digits(totalStats.TotalTakenDamage / totalStats.Plays);
totalStats.AvgTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage / totalStats.Plays); totalStats.AvgTakenPhysicalDamage = Calculation.Round2Digits(totalStats.TotalTakenPhysicalDamage / totalStats.Plays);
totalStats.AvgTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage / totalStats.Plays); totalStats.AvgTakenMagicDamage = Calculation.Round2Digits(totalStats.TotalTakenMagicDamage / totalStats.Plays);
totalStats.AvgTakenRealDamage = Calculation.Round2Digits(totalStats.TotalTakenRealDamage / totalStats.Plays); totalStats.AvgTakenTrueDamage = Calculation.Round2Digits(totalStats.TotalTakenTrueDamage / totalStats.Plays);
totalStats.AvgHeal = Calculation.Round2Digits(totalStats.TotalHeal / totalStats.Plays); totalStats.AvgHeal = Calculation.Round2Digits(totalStats.TotalHeal / totalStats.Plays);
totalStats.AvgLiveRound = totalStats.LiveRound / totalStats.Plays; totalStats.AvgLiveRound = totalStats.LiveRound / totalStats.Plays;
totalStats.AvgActionTurn = totalStats.ActionTurn / totalStats.Plays; totalStats.AvgActionTurn = totalStats.ActionTurn / totalStats.Plays;

View File

@ -61,11 +61,11 @@ namespace Oshima.FunGame.WebAPI.Controllers
builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}"); builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}");
builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}"); builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}");
builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}"); builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}");
builder.AppendLine($"总计造成真实伤害:{stats.TotalRealDamage:0.##} / 场均:{stats.AvgRealDamage:0.##}"); builder.AppendLine($"总计造成真实伤害:{stats.TotalTrueDamage:0.##} / 场均:{stats.AvgTrueDamage:0.##}");
builder.AppendLine($"总计承受伤害:{stats.TotalTakenDamage:0.##} / 场均:{stats.AvgTakenDamage:0.##}"); builder.AppendLine($"总计承受伤害:{stats.TotalTakenDamage:0.##} / 场均:{stats.AvgTakenDamage:0.##}");
builder.AppendLine($"总计承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 场均:{stats.AvgTakenPhysicalDamage:0.##}"); builder.AppendLine($"总计承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 场均:{stats.AvgTakenPhysicalDamage:0.##}");
builder.AppendLine($"总计承受魔法伤害:{stats.TotalTakenMagicDamage:0.##} / 场均:{stats.AvgTakenMagicDamage:0.##}"); builder.AppendLine($"总计承受魔法伤害:{stats.TotalTakenMagicDamage:0.##} / 场均:{stats.AvgTakenMagicDamage:0.##}");
builder.AppendLine($"总计承受真实伤害:{stats.TotalTakenRealDamage:0.##} / 场均:{stats.AvgTakenRealDamage:0.##}"); builder.AppendLine($"总计承受真实伤害:{stats.TotalTakenTrueDamage:0.##} / 场均:{stats.AvgTakenTrueDamage:0.##}");
builder.AppendLine($"总计治疗:{stats.TotalHeal:0.##} / 场均:{stats.AvgHeal:0.##}"); builder.AppendLine($"总计治疗:{stats.TotalHeal:0.##} / 场均:{stats.AvgHeal:0.##}");
builder.AppendLine($"总计存活回合数:{stats.LiveRound} / 场均:{stats.AvgLiveRound}"); builder.AppendLine($"总计存活回合数:{stats.LiveRound} / 场均:{stats.AvgLiveRound}");
builder.AppendLine($"总计行动回合数:{stats.ActionTurn} / 场均:{stats.AvgActionTurn}"); builder.AppendLine($"总计行动回合数:{stats.ActionTurn} / 场均:{stats.AvgActionTurn}");
@ -119,11 +119,11 @@ namespace Oshima.FunGame.WebAPI.Controllers
builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}"); builder.AppendLine($"总计造成伤害:{stats.TotalDamage:0.##} / 场均:{stats.AvgDamage:0.##}");
builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}"); builder.AppendLine($"总计造成物理伤害:{stats.TotalPhysicalDamage:0.##} / 场均:{stats.AvgPhysicalDamage:0.##}");
builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}"); builder.AppendLine($"总计造成魔法伤害:{stats.TotalMagicDamage:0.##} / 场均:{stats.AvgMagicDamage:0.##}");
builder.AppendLine($"总计造成真实伤害:{stats.TotalRealDamage:0.##} / 场均:{stats.AvgRealDamage:0.##}"); builder.AppendLine($"总计造成真实伤害:{stats.TotalTrueDamage:0.##} / 场均:{stats.AvgTrueDamage:0.##}");
builder.AppendLine($"总计承受伤害:{stats.TotalTakenDamage:0.##} / 场均:{stats.AvgTakenDamage:0.##}"); builder.AppendLine($"总计承受伤害:{stats.TotalTakenDamage:0.##} / 场均:{stats.AvgTakenDamage:0.##}");
builder.AppendLine($"总计承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 场均:{stats.AvgTakenPhysicalDamage:0.##}"); builder.AppendLine($"总计承受物理伤害:{stats.TotalTakenPhysicalDamage:0.##} / 场均:{stats.AvgTakenPhysicalDamage:0.##}");
builder.AppendLine($"总计承受魔法伤害:{stats.TotalTakenMagicDamage:0.##} / 场均:{stats.AvgTakenMagicDamage:0.##}"); builder.AppendLine($"总计承受魔法伤害:{stats.TotalTakenMagicDamage:0.##} / 场均:{stats.AvgTakenMagicDamage:0.##}");
builder.AppendLine($"总计承受真实伤害:{stats.TotalTakenRealDamage:0.##} / 场均:{stats.AvgTakenRealDamage:0.##}"); builder.AppendLine($"总计承受真实伤害:{stats.TotalTakenTrueDamage:0.##} / 场均:{stats.AvgTakenTrueDamage:0.##}");
builder.AppendLine($"总计治疗:{stats.TotalHeal:0.##} / 场均:{stats.AvgHeal:0.##}"); builder.AppendLine($"总计治疗:{stats.TotalHeal:0.##} / 场均:{stats.AvgHeal:0.##}");
builder.AppendLine($"总计存活回合数:{stats.LiveRound} / 场均:{stats.AvgLiveRound}"); builder.AppendLine($"总计存活回合数:{stats.LiveRound} / 场均:{stats.AvgLiveRound}");
builder.AppendLine($"总计行动回合数:{stats.ActionTurn} / 场均:{stats.AvgActionTurn}"); builder.AppendLine($"总计行动回合数:{stats.ActionTurn} / 场均:{stats.AvgActionTurn}");

View File

@ -121,7 +121,7 @@ namespace Oshima.FunGame.WebAPI
user.Inventory.Characters.Add(character); user.Inventory.Characters.Add(character);
// 测试物品 // 测试物品
Item item = new 50(); Item item = new 20();
user.Inventory.Items.Add(item); user.Inventory.Items.Add(item);
sql.UpdateInventory(user.Inventory); // 更新库存 sql.UpdateInventory(user.Inventory); // 更新库存