大量技能物品修改,补全高阶主装备

This commit is contained in:
milimoe 2025-06-21 05:16:35 +08:00
parent 1a824a0295
commit 88af0b3ad0
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
26 changed files with 1718 additions and 164 deletions

View File

@ -38,6 +38,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
private void Resolve(Character character, bool remove = false) private void Resolve(Character character, bool remove = false)
{ {
Descriptions.Clear();
foreach (string key in Values.Keys) foreach (string key in Values.Keys)
{ {
string value = Values[key].ToString() ?? ""; string value = Values[key].ToString() ?? "";
@ -146,7 +147,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
} }
} }
RealDynamicsValues["shtr"] = shtr; RealDynamicsValues["shtr"] = shtr;
Descriptions.Add($"减少角色的所有主动技能 {shtr:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。"); Descriptions.Add($"{(shtr < 0 ? "" : "")}角色的所有主动技能 {Math.Abs(shtr):0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
} }
break; break;
case "nahtr": case "nahtr":
@ -154,14 +155,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
if (!remove) if (!remove)
{ {
character.NormalAttack.HardnessTime -= nahtr; character.NormalAttack.ExHardnessTime -= nahtr;
} }
else if (RealDynamicsValues.TryGetValue("nahtr", out double current)) else if (RealDynamicsValues.TryGetValue("nahtr", out double current))
{ {
character.NormalAttack.HardnessTime += current; character.NormalAttack.ExHardnessTime += current;
} }
RealDynamicsValues["nahtr"] = nahtr; RealDynamicsValues["nahtr"] = nahtr;
Descriptions.Add($"减少角色的普通攻击 {nahtr:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。"); Descriptions.Add($"{(nahtr < 0 ? "" : "")}角色的普通攻击 {Math.Abs(nahtr):0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。");
} }
break; break;
case "shtr2": case "shtr2":
@ -192,7 +193,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
} }
} }
RealDynamicsValues["shtr2"] = shtr2; RealDynamicsValues["shtr2"] = shtr2;
Descriptions.Add($"减少角色的所有主动技能 {shtr2 * 100:0.##}% {GameplayEquilibriumConstant.InGameTime}硬直时间。"); Descriptions.Add($"{(shtr2 < 0 ? "" : "")}角色的所有主动技能 {Math.Abs(shtr2 * 100):0.##}% 硬直时间。");
} }
break; break;
case "nahtr2": case "nahtr2":
@ -200,14 +201,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
if (!remove) if (!remove)
{ {
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * nahtr2; character.NormalAttack.ExHardnessTime2 -= nahtr2;
} }
else if (RealDynamicsValues.TryGetValue("nahtr2", out double current)) else if (RealDynamicsValues.TryGetValue("nahtr2", out double current))
{ {
character.NormalAttack.HardnessTime += character.NormalAttack.HardnessTime * current; character.NormalAttack.ExHardnessTime2 += current;
} }
RealDynamicsValues["nahtr2"] = nahtr2; RealDynamicsValues["nahtr2"] = nahtr2;
Descriptions.Add($"减少角色的普通攻击 {nahtr2 * 100:0.##}% {GameplayEquilibriumConstant.InGameTime}硬直时间。"); Descriptions.Add($"{(nahtr2 < 0 ? "" : "")}角色的普通攻击 {Math.Abs(nahtr2 * 100):0.##}% 硬直时间。");
} }
break; break;
case "exacc": case "exacc":
@ -549,37 +550,38 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
magicType = (MagicType)mdftype; magicType = (MagicType)mdftype;
string mdfvalueKey = Values.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string mdfvalueKey = Values.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (mdfvalueKey.Length > 0 && double.TryParse(Values[mdfvalueKey].ToString(), out mdfValue)) if (mdfvalueKey.Length > 0 && double.TryParse(Values[mdfvalueKey].ToString(), out mdfValue))
{
if (magicType == MagicType.None)
{
character.MDF.AddAllValue(mdfValue);
}
else
{ {
character.MDF[magicType] += mdfValue; character.MDF[magicType] += mdfValue;
} }
} }
}
else if (RealDynamicsValues.TryGetValue("mdftype", out double currentType)) else if (RealDynamicsValues.TryGetValue("mdftype", out double currentType))
{ {
magicType = (MagicType)(int)currentType; magicType = (MagicType)(int)currentType;
if (RealDynamicsValues.TryGetValue("mdfvalue", out mdfValue)) if (RealDynamicsValues.TryGetValue("mdfvalue", out mdfValue))
{
if (magicType == MagicType.None)
{
character.MDF.AddAllValue(-mdfValue);
}
else
{ {
character.MDF[magicType] -= mdfValue; character.MDF[magicType] -= mdfValue;
} }
} }
}
RealDynamicsValues["mdftype"] = mdftype; RealDynamicsValues["mdftype"] = mdftype;
RealDynamicsValues["mdfvalue"] = mdfValue; RealDynamicsValues["mdfvalue"] = mdfValue;
Descriptions.Add($"{(mdfValue >= 0 ? "" : "")}角色 {Math.Abs(mdfValue) * 100:0.##}% {CharacterSet.GetMagicResistanceName(magicType)}。"); Descriptions.Add($"{(mdfValue >= 0 ? "" : "")}角色 {Math.Abs(mdfValue) * 100:0.##}% {CharacterSet.GetMagicResistanceName(magicType)}。");
} }
break; break;
case "exls":
if (double.TryParse(value, out double exls))
{
if (!remove)
{
character.Lifesteal += exls;
}
else if (RealDynamicsValues.TryGetValue("exls", out double current))
{
character.Lifesteal -= current;
}
RealDynamicsValues["exls"] = exls;
Descriptions.Add($"{(exls >= 0 ? "" : "")}角色 {Math.Abs(exls) * 100:0.##}% 生命偷取。");
}
break;
} }
} }
} }

View File

@ -23,44 +23,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
RemainDurationTurn = DurationTurn; RemainDurationTurn = DurationTurn;
} }
switch ()
{
case MagicType.Starmark:
case MagicType.PurityNatural:
case MagicType.PurityContemporary:
case MagicType.Bright:
case MagicType.Shadow:
case MagicType.Element:
case MagicType.Aster:
case MagicType.SpatioTemporal:
character.MDF[] += ; character.MDF[] += ;
break;
case MagicType.None:
default:
character.MDF.AddAllValue();
break;
}
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
switch ()
{
case MagicType.Starmark:
case MagicType.PurityNatural:
case MagicType.PurityContemporary:
case MagicType.Bright:
case MagicType.Shadow:
case MagicType.Element:
case MagicType.Aster:
case MagicType.SpatioTemporal:
character.MDF[] -= ; character.MDF[] -= ;
break;
case MagicType.None:
default:
character.MDF.AddAllValue(-);
break;
}
} }
public ExMDF(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public ExMDF(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)

View File

@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
public override long Id => (long)EffectID.NormalAttackHardTimeReduce; public override long Id => (long)EffectID.NormalAttackHardTimeReduce;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (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 => $"{(实际硬直时间减少 < 0 ? "" : "")}角色的普通攻击 {实际硬直时间减少:0.##} {GameplayEquilibriumConstant.InGameTime}硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
private readonly double = 0; private readonly double = 0;
@ -21,12 +21,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
RemainDurationTurn = DurationTurn; RemainDurationTurn = DurationTurn;
} }
character.NormalAttack.HardnessTime -= ; character.NormalAttack.ExHardnessTime -= ;
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.NormalAttack.HardnessTime += ; character.NormalAttack.ExHardnessTime += ;
} }
public NormalAttackHardTimeReduce(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public NormalAttackHardTimeReduce(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)

View File

@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
public override long Id => (long)EffectID.NormalAttackHardTimeReduce2; public override long Id => (long)EffectID.NormalAttackHardTimeReduce2;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"减少角色的普通攻击 {减少比例 * 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 string Description => $"{(减少比例 < 0 ? "" : "")}角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (Source != null && (Skill.Character != Source || Skill is not OpenSkill) ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : (Skill is OpenSkill ? "" : $" 的 [ {Skill.Name} ]")) : "");
private readonly double = 0; private readonly double = 0;
@ -21,12 +21,12 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{ {
RemainDurationTurn = DurationTurn; RemainDurationTurn = DurationTurn;
} }
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * ; character.NormalAttack.ExHardnessTime2 -= ;
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.NormalAttack.HardnessTime += character.NormalAttack.HardnessTime * ; character.NormalAttack.ExHardnessTime2 += ;
} }
public NormalAttackHardTimeReduce2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public NormalAttackHardTimeReduce2(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)

View File

@ -71,14 +71,14 @@ namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
RemainDurationTurn = DurationTurn; RemainDurationTurn = DurationTurn;
} }
character.ExDEFPercentage -= _DEFReductionPercent; character.ExDEFPercentage -= _DEFReductionPercent;
character.MDF.AddAllValue(-_MDFReductionPercent); character.MDF[character.MagicType] -= _MDFReductionPercent;
AddEffectTypeToCharacter(character, [EffectType.Weaken, EffectType.GrievousWound]); AddEffectTypeToCharacter(character, [EffectType.Weaken, EffectType.GrievousWound]);
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.ExDEFPercentage += _DEFReductionPercent; character.ExDEFPercentage += _DEFReductionPercent;
character.MDF.AddAllValue(_MDFReductionPercent); character.MDF[character.MagicType] += _MDFReductionPercent;
RemoveEffectTypesFromCharacter(character); RemoveEffectTypesFromCharacter(character);
} }
} }

View File

@ -59,7 +59,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
} }
else else
{ {
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn); e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
target.Effects.Add(e); target.Effects.Add(e);
e.OnEffectGained(target); e.OnEffectGained(target);
e.IsDebuff = isDebuff; e.IsDebuff = isDebuff;

View File

@ -59,7 +59,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
} }
else else
{ {
e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration, _durationTurn); e = new(Skill, caster, _durativeWithoutDuration, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
target.Effects.Add(e); target.Effects.Add(e);
e.OnEffectGained(target); e.OnEffectGained(target);
e.IsDebuff = isDebuff; e.IsDebuff = isDebuff;

View File

@ -31,7 +31,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, caster, _durative, _duration, _durationTurn); e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
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

@ -34,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{ {
if (enemy.HP <= 0) continue; if (enemy.HP <= 0) continue;
WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}"); WriteLine($"[ {caster} ] 眩晕了 [ {enemy} ] !持续时间:{眩晕时间}");
e = new(Skill, caster, _durative, _duration, _durationTurn); e = new(Skill, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)));
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

@ -58,7 +58,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%" + WriteLine($"[ {caster} ] 对 [ {enemy} ] 造成了虚弱!伤害降低 {ActualDamageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%" + $"物理护甲降低 {ActualDEFReductionPercent * 100:0.##}%,魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%" +
$"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}"); $"治疗效果降低 {ActualHealingReductionPercent * 100:0.##}%!持续时间:{虚弱时间}");
e = new(Skill, enemy, caster, _durative, _duration, _durationTurn, ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent); e = new(Skill, enemy, caster, _durative, _duration + _levelGrowth * (Level - 1), Convert.ToInt32(_durationTurn + _levelGrowth * (Level - 1)), ActualDamageReductionPercent, ActualDEFReductionPercent, ActualMDFReductionPercent, ActualHealingReductionPercent);
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

@ -18,29 +18,16 @@ namespace Oshima.FunGame.OshimaModules.Items
} }
} }
public class 20 : Item public class 25 : Item
{ {
public override long Id => (long)AccessoryID.20; public override long Id => (long)AccessoryID.25;
public override string Name => "攻击之爪 +20"; public override string Name => "攻击之爪 +25";
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.Green; public override QualityType QualityType => QualityType.Green;
public 20(Character? character = null) : base(ItemType.Accessory) public 25(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 20)); Skills.Passives.Add(new (character, this, 25));
}
}
public class 30 : Item
{
public override long Id => (long)AccessoryID.30;
public override string Name => "攻击之爪 +30";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Blue;
public 30(Character? character = null) : base(ItemType.Accessory)
{
Skills.Passives.Add(new (character, this, 30));
} }
} }
@ -49,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Items
public override long Id => (long)AccessoryID.40; public override long Id => (long)AccessoryID.40;
public override string Name => "攻击之爪 +40"; 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.Blue;
public 40(Character? character = null) : base(ItemType.Accessory) public 40(Character? character = null) : base(ItemType.Accessory)
{ {
@ -57,6 +44,58 @@ namespace Oshima.FunGame.OshimaModules.Items
} }
} }
public class 55 : Item
{
public override long Id => (long)AccessoryID.55;
public override string Name => "攻击之爪 +55";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Purple;
public 55(Character? character = null) : base(ItemType.Accessory)
{
Skills.Passives.Add(new (character, this, 55));
}
}
public class 70 : Item
{
public override long Id => (long)AccessoryID.70;
public override string Name => "攻击之爪 +70";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Orange;
public 70(Character? character = null) : base(ItemType.Accessory)
{
Skills.Passives.Add(new (character, this, 70));
}
}
public class 85 : Item
{
public override long Id => (long)AccessoryID.85;
public override string Name => "攻击之爪 +85";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Red;
public 85(Character? character = null) : base(ItemType.Accessory)
{
Skills.Passives.Add(new (character, this, 85));
}
}
public class 100 : Item
{
public override long Id => (long)AccessoryID.100;
public override string Name => "攻击之爪 +100";
public override string Description => Skills.Passives.Count > 0 ? Skills.Passives.First().Description : "";
public override QualityType QualityType => QualityType.Gold;
public 100(Character? character = null) : base(ItemType.Accessory)
{
Skills.Passives.Add(new (character, this, 100));
}
}
public class : Skill public class : Skill
{ {
public override long Id => (long)ItemPassiveID.; public override long Id => (long)ItemPassiveID.;
@ -71,7 +110,7 @@ namespace Oshima.FunGame.OshimaModules.Items
{ {
{ "exatk", exATK } { "exatk", exATK }
}; };
Effects.Add(new ExATK(this, values, character)); Effects.Add(new ExATK(this, values));
} }
public override IEnumerable<Effect> AddPassiveEffectToCharacter() public override IEnumerable<Effect> AddPassiveEffectToCharacter()

View File

@ -135,6 +135,10 @@ 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 => Effects.Count > 0 ? Effects.First().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 exp = 0) : base(SkillType.Item) public (Item? item = null, double exp = 0) : base(SkillType.Item)
{ {

View File

@ -3,9 +3,12 @@
public enum AccessoryID : long public enum AccessoryID : long
{ {
10 = 14001, 10 = 14001,
20 = 14002, 25 = 14002,
30 = 14003, 40 = 14003,
40 = 14004, 55 = 14004,
70 = 14005,
85 = 14006,
100 = 14007,
} }
public enum ConsumableID : long public enum ConsumableID : long

View File

@ -36,9 +36,9 @@ namespace Oshima.FunGame.OshimaModules
return id switch return id switch
{ {
(long)AccessoryID.10 => new 10(), (long)AccessoryID.10 => new 10(),
(long)AccessoryID.20 => new 20(), (long)AccessoryID.25 => new 25(),
(long)AccessoryID.30 => new 30(),
(long)AccessoryID.40 => new 40(), (long)AccessoryID.40 => new 40(),
(long)AccessoryID.55 => new 55(),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),
(long)ConsumableID. => new (), (long)ConsumableID. => new (),

View File

@ -36,6 +36,7 @@ namespace Oshima.FunGame.OshimaModules
protected override void AfterLoad() protected override void AfterLoad()
{ {
General.GameplayEquilibriumConstant.InGameTime = "秒"; General.GameplayEquilibriumConstant.InGameTime = "秒";
General.GameplayEquilibriumConstant.UseMagicType = [MagicType.None];
} }
protected override Factory.EntityFactoryDelegate<Skill> SkillFactory() protected override Factory.EntityFactoryDelegate<Skill> SkillFactory()

View File

@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"{Duration} {GameplayEquilibriumConstant.InGameTime}内,攻击拥有标记的角色将不会回收标记,增强 {最大生命值伤害 * 100:0.##}% 最大生命值伤害,并获得 {吸血 * 100:0.##}% 吸血。"; public override string Description => $"{Duration} {GameplayEquilibriumConstant.InGameTime}内,攻击拥有标记的角色将不会回收标记,增强 [ 累积之压 ] 的最大生命值伤害 {最大生命值伤害 * 100:0.##}%,并获得 {吸血 * 100:0.##}% 吸血。";
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 25; public override double Duration => 25;
public override DispelledType DispelledType => DispelledType.CannotBeDispelled; public override DispelledType DispelledType => DispelledType.CannotBeDispelled;

View File

@ -49,18 +49,24 @@ namespace Oshima.FunGame.OshimaModules.Skills
private void ResetEffect(Character character, bool isAdd) private void ResetEffect(Character character, bool isAdd)
{ {
if (isAdd) if (isAdd)
{
if (!)
{ {
= true; = true;
character.ExEvadeRate += ; character.ExEvadeRate += ;
character.ExCritRate += ; character.ExCritRate += ;
character.MDF.AddAllValue(); character.MDF[character.MagicType] += ;
}
} }
else else
{
if ()
{ {
= false; = false;
character.ExEvadeRate -= ; character.ExEvadeRate -= ;
character.ExCritRate -= ; character.ExCritRate -= ;
character.MDF.AddAllValue(-); character.MDF[character.MagicType] -= ;
}
} }
} }

View File

@ -39,19 +39,19 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
character.NormalAttack.SetMagicType(true, character.MagicType); character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
= ; = ;
= ; = ;
character.ExPDR += ; character.ExPDR += ;
character.MDF.AddAllValue(); character.MDF[character.MagicType] += ;
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!"); WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.NormalAttack.SetMagicType(false, character.MagicType); character.NormalAttack.UnsetMagicType(this, GamingQueue);
character.ExPDR -= ; character.ExPDR -= ;
character.MDF.AddAllValue(-); character.MDF[character.MagicType] -= ;
= 0; = 0;
= 0; = 0;
} }

View File

@ -24,7 +24,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
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 => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言能量值大于100且小于150时视为低于一半。"; public override string Description => $"每次造成伤害都会随机减少对方 [ 715 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言,能量值大于 100 且小于 150 时,视为低于一半。";
private bool = false; private bool = false;

View File

@ -16,7 +16,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
} }
if (skill.CanSelectTeammate && !skill.CanSelectEnemy) if (skill.CanSelectTeammate && !skill.CanSelectEnemy)
{ {
return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}友方角色{(!skill.CanSelectSelf ? "" : "")}"; return $"目标{(skill.CanSelectTargetCount > 1 ? $" {skill.CanSelectTargetCount} " : "")}友方角色{(!skill.CanSelectSelf ? "" : "")}";
} }
else if (!skill.CanSelectTeammate && skill.CanSelectEnemy) else if (!skill.CanSelectTeammate && skill.CanSelectEnemy)
{ {

View File

@ -37,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
character.NormalAttack.CanSelectTargetCount += 2; character.NormalAttack.CanSelectTargetCount += 2;
= ; = ;
character.NormalAttack.SetMagicType(true, character.MagicType); character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
if (character.Effects.Where(e => e is ).FirstOrDefault() is e) if (character.Effects.Where(e => e is ).FirstOrDefault() is e)
{ {
e. = 5; e. = 5;
@ -49,7 +49,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
{ {
= 0; = 0;
character.NormalAttack.CanSelectTargetCount -= 2; character.NormalAttack.CanSelectTargetCount -= 2;
character.NormalAttack.SetMagicType(false, character.MagicType); character.NormalAttack.UnsetMagicType(this, GamingQueue);
if (character.Effects.Where(e => e is ).FirstOrDefault() is e) if (character.Effects.Where(e => e is ).FirstOrDefault() is e)
{ {
e. = 10; e. = 10;

File diff suppressed because it is too large Load Diff

View File

@ -339,7 +339,7 @@ namespace Oshima.FunGame.OshimaServers
{ {
foreach (Character character in queue.Queue) foreach (Character character in queue.Queue)
{ {
= [new 20()]; = [new 25()];
foreach (Item item in ) foreach (Item item in )
{ {
queue.Equip(character, EquipSlotType.Accessory1, item, out _); queue.Equip(character, EquipSlotType.Accessory1, item, out _);

View File

@ -44,7 +44,7 @@ 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 10(), new 20(), new 30(), new 40()]); FunGameConstant.Equipment.AddRange([new 10(), new 25(), new 40(), new 55(), new 70(), new 85()]);
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 (),
@ -111,13 +111,15 @@ namespace Oshima.FunGame.OshimaServers.Service
QualityType.Blue => Random.Shared.Next(13, 19), QualityType.Blue => Random.Shared.Next(13, 19),
QualityType.Purple => Random.Shared.Next(19, 25), QualityType.Purple => Random.Shared.Next(19, 25),
QualityType.Orange => Random.Shared.Next(25, 31), QualityType.Orange => Random.Shared.Next(25, 31),
QualityType.Red => Random.Shared.Next(31, 37),
QualityType.Gold => Random.Shared.Next(37, 43),
_ => Random.Shared.Next(1, 7) _ => Random.Shared.Next(1, 7)
}; };
item.QualityType = (QualityType)qualityType; item.QualityType = (QualityType)qualityType;
} }
else else
{ {
total = Random.Shared.Next(1, 31); total = Random.Shared.Next(1, 43);
if (total > 6 && total <= 12) if (total > 6 && total <= 12)
{ {
item.QualityType = QualityType.Green; item.QualityType = QualityType.Green;
@ -134,6 +136,14 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
item.QualityType = QualityType.Orange; item.QualityType = QualityType.Orange;
} }
else if (total > 30 && total <= 36)
{
item.QualityType = QualityType.Red;
}
else if (total > 36 && total <= 42)
{
item.QualityType = QualityType.Gold;
}
} }
GenerateAndAddSkillToMagicCard(item, total); GenerateAndAddSkillToMagicCard(item, total);
@ -150,8 +160,8 @@ namespace Oshima.FunGame.OshimaServers.Service
2 => 2, 2 => 2,
3 => 2, 3 => 2,
4 => 3, 4 => 3,
5 => 3, 5 => 4,
6 => 4, 6 => 5,
_ => 1 _ => 1
}; };
if (magic.Level > 1) if (magic.Level > 1)
@ -361,6 +371,14 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
item.QualityType = QualityType.Orange; item.QualityType = QualityType.Orange;
} }
else if (total > 90 && total <= 108)
{
item.QualityType = QualityType.Red;
}
else if (total > 108)
{
item.QualityType = QualityType.Gold;
}
return item; return item;
} }
return null; return null;
@ -1305,7 +1323,7 @@ namespace Oshima.FunGame.OshimaServers.Service
int naLevel = General.GameplayEquilibriumConstant.MaxNormalAttackLevel / cutRate; int naLevel = General.GameplayEquilibriumConstant.MaxNormalAttackLevel / cutRate;
boss.Level = cLevel; boss.Level = cLevel;
boss.NormalAttack.Level = naLevel; boss.NormalAttack.Level = naLevel;
boss.NormalAttack.HardnessTime = 6; boss.NormalAttack.ExHardnessTime = -4;
Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == 4)]; Item[] weapons = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("11") && (int)i.QualityType == 4)];
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == 1)]; Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == 1)];
Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == 1)]; Item[] shoes = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("13") && (int)i.QualityType == 1)];

View File

@ -176,7 +176,7 @@ namespace Oshima.FunGame.OshimaServers.Service
WriteLine(""); WriteLine("");
if (isWeb) result.Add("=== 空投 ===\r\n" + Msg); if (isWeb) result.Add("=== 空投 ===\r\n" + Msg);
nextDropTime = isTeam ? 90 : 60; nextDropTime = isTeam ? 90 : 60;
if (mQuality < 4) if (mQuality < 5)
{ {
mQuality++; mQuality++;
} }
@ -184,11 +184,11 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
wQuality++; wQuality++;
} }
if (aQuality < 1) if (aQuality < 5)
{ {
aQuality++; aQuality++;
} }
if (sQuality < 1) if (sQuality < 5)
{ {
sQuality++; sQuality++;
} }
@ -253,6 +253,12 @@ namespace Oshima.FunGame.OshimaServers.Service
actionQueue.DisplayQueue(); actionQueue.DisplayQueue();
if (PrintOut) Console.WriteLine(); if (PrintOut) Console.WriteLine();
actionQueue.CharacterDeath += ActionQueue_CharacterDeath;
if (actionQueue is TeamGamingQueue teamQueue)
{
//teamQueue.GameEndTeam += TeamQueue_GameEndTeam;
}
// 总回合数 // 总回合数
int maxRound = 9999; int maxRound = 9999;
@ -375,7 +381,7 @@ namespace Oshima.FunGame.OshimaServers.Service
WriteLine(""); WriteLine("");
if (isWeb) result.Add("=== 空投 ===\r\n" + Msg); if (isWeb) result.Add("=== 空投 ===\r\n" + Msg);
nextDropTime = isTeam ? 100 : 40; nextDropTime = isTeam ? 100 : 40;
if (mQuality < 4) if (mQuality < 5)
{ {
mQuality++; mQuality++;
} }
@ -383,11 +389,11 @@ namespace Oshima.FunGame.OshimaServers.Service
{ {
wQuality++; wQuality++;
} }
if (aQuality < 1) if (aQuality < 5)
{ {
aQuality++; aQuality++;
} }
if (sQuality < 1) if (sQuality < 5)
{ {
sQuality++; sQuality++;
} }
@ -638,6 +644,32 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
} }
private static async Task<bool> TeamQueue_GameEndTeam(TeamGamingQueue queue, Team winner)
{
foreach (Character character in winner.Members)
{
Item? i1 = character.UnEquip(EquipSlotType.MagicCardPack);
Item? i2 = character.UnEquip(EquipSlotType.Weapon);
Item? i3 = character.UnEquip(EquipSlotType.Armor);
Item? i4 = character.UnEquip(EquipSlotType.Shoes);
Item? i5 = character.UnEquip(EquipSlotType.Accessory1);
Item? i6 = character.UnEquip(EquipSlotType.Accessory2);
queue.WriteLine(character.GetInfo());
}
return await Task.FromResult(true);
}
private static async Task<bool> ActionQueue_GameEnd(GamingQueue queue, Character winner)
{
return await Task.FromResult(true);
}
private static async Task<bool> ActionQueue_CharacterDeath(GamingQueue queue, Character current, Character death)
{
death.Items.Clear();
return await Task.FromResult(true);
}
/// <summary> /// <summary>
/// 将回合记录字典序列化为 JSON然后压缩并写入 ZIP 文件 /// 将回合记录字典序列化为 JSON然后压缩并写入 ZIP 文件
/// </summary> /// </summary>
@ -971,7 +1003,7 @@ namespace Oshima.FunGame.OshimaServers.Service
Item[] armors = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("12") && (int)i.QualityType == aQuality)]; 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[] 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[] accessories = [.. FunGameConstant.Equipment.Where(i => i.Id.ToString().StartsWith("14") && (int)i.QualityType == acQuality)];
Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable)]; Item[] consumables = [.. FunGameConstant.AllItems.Where(i => i.ItemType == ItemType.Consumable && i.IsInGameItem)];
foreach (Character character in queue.HardnessTime.Keys) foreach (Character character in queue.HardnessTime.Keys)
{ {
if (addLevel) if (addLevel)

View File

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