执行代码清理

This commit is contained in:
milimoe 2025-03-18 01:39:53 +08:00
parent 0b022fe9c1
commit e77ac767ef
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
38 changed files with 84 additions and 85 deletions

View File

@ -1,5 +1,4 @@
using System; using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;

View File

@ -204,7 +204,7 @@
/// 立即获得能量值参数ep /// 立即获得能量值参数ep
/// </summary> /// </summary>
GetEP = 8705, GetEP = 8705,
/// <summary> /// <summary>
/// 立即获得经验值参数exp /// 立即获得经验值参数exp
/// </summary> /// </summary>

View File

@ -10,7 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override string Name => "立即获得能量值"; public override string Name => "立即获得能量值";
public override string Description => $"角色立即获得 {实际获得:0.##} 点能量值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : ""); public override string Description => $"角色立即获得 {实际获得:0.##} 点能量值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item; public override EffectType EffectType => EffectType.Item;
private readonly double = 0; private readonly double = 0;
public GetEP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public GetEP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)

View File

@ -10,7 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override string Name => "立即回复生命值"; public override string Name => "立即回复生命值";
public override string Description => $"立即回复角色 {实际回复:0.##} 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : ""); public override string Description => $"立即回复角色 {实际回复:0.##} 点生命值(不可用于复活)。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item; public override EffectType EffectType => EffectType.Item;
private readonly double = 0; private readonly double = 0;
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)

View File

@ -10,7 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override string Name => "立即回复魔法值"; public override string Name => "立即回复魔法值";
public override string Description => $"立即回复角色 {实际回复:0.##} 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : ""); public override string Description => $"立即回复角色 {实际回复:0.##} 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item; public override EffectType EffectType => EffectType.Item;
private readonly double = 0; private readonly double = 0;
public RecoverMP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args) public RecoverMP(Skill skill, Dictionary<string, object> args, Character? source = null) : base(skill, args)

View File

@ -10,7 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.ItemEffects
public override string Name => "立即回复魔法值"; public override string Name => "立即回复魔法值";
public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : ""); public override string Description => $"立即回复角色 {回复比例 * 100:0.##}% [ {实际回复:0.##} ] 点魔法值。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item; public override EffectType EffectType => EffectType.Item;
private double => * (Skill.Character?.MaxMP ?? 0); private double => * (Skill.Character?.MaxMP ?? 0);
private readonly double = 0; private readonly double = 0;

View File

@ -10,7 +10,7 @@ namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
public override string Description => $"{(实际加成 >= 0 ? "" : "")}角色 {Math.Abs(实际加成):0.##} 点力量。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : ""); public override string Description => $"{(实际加成 >= 0 ? "" : "")}角色 {Math.Abs(实际加成):0.##} 点力量。" + (Source != null && Skill.Character != Source ? $"来自:[ {Source} ]" + (Skill.Item != null ? $" 的 [ {Skill.Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item; public override EffectType EffectType => EffectType.Item;
public double Value => ; public double Value => ;
private readonly double = 0; private readonly double = 0;
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)

View File

@ -8,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.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(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) : ;
private double Damage => BaseDamage + (ATKCoefficient * Skill.Character?.ATK ?? 0); private double Damage => BaseDamage + (ATKCoefficient * Skill.Character?.ATK ?? 0);

View File

@ -8,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} " : "")}敌人造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(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;

View File

@ -8,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.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {BaseDamage:0.##} + {AttributeCoefficient * 100:0.##}% {CharacterSet.GetPrimaryAttributeName(Skill.Character?.PrimaryAttribute ?? PrimaryAttribute.INT)} [ {Damage:0.##} ] 点{(IsMagic ? CharacterSet.GetMagicDamageName(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 => BaseDamage + (AttributeCoefficient * Skill.Character?.PrimaryAttributeValue ?? 0); private double Damage => BaseDamage + (AttributeCoefficient * Skill.Character?.PrimaryAttributeValue ?? 0);

View File

@ -8,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} " : "")}敌人造成 {Damage:0.##} 点{(IsMagic ? CharacterSet.GetMagicDamageName(MagicType) : "")}。"; public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成 {Damage:0.##} 点{(IsMagic ? CharacterSet.GetMagicDamageName(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;

View File

@ -7,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.##} 点生命值。"; public override string Description => $"为{(Skill.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}目标回复 {Heal:0.##} 点生命值。";
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;
private double { get; set; } = 30; private double { get; set; } = 30;

View File

@ -8,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.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成封技 {封技时间},无法使用技能(魔法、战技和爆发技),并打断当前施法。";
private string => _durative && _duration > 0 ? + " 时间" : (!_durative && _durationTurn > 0 ? + " 回合" : "0 时间"); private string => _durative && _duration > 0 ? + " 时间" : (!_durative && _durationTurn > 0 ? + " 回合" : "0 时间");
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);
private readonly bool _durative; private readonly bool _durative;

View File

@ -8,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.CanSelectTargetCount > 1 ? $" {Skill.CanSelectTargetCount} " : "")}敌人造成眩晕 {眩晕时间}。";
private string => _durative && _duration > 0 ? + " 时间" : (!_durative && _durationTurn > 0 ? + " 回合" : "0 时间"); private string => _durative && _duration > 0 ? + " 时间" : (!_durative && _durationTurn > 0 ? + " 回合" : "0 时间");
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);
private readonly bool _durative; private readonly bool _durative;

View File

@ -56,7 +56,7 @@ namespace Oshima.FunGame.OshimaModules.Items
Skills.Passives.Add(new (character, this, 50)); Skills.Passives.Add(new (character, this, 50));
} }
} }
public class : Skill public class : Skill
{ {
public override long Id => (long)ItemPassiveID.; public override long Id => (long)ItemPassiveID.;

View File

@ -109,7 +109,7 @@ namespace Oshima.FunGame.OshimaModules.Items
return .OnItemUsed(this, args); return .OnItemUsed(this, args);
} }
} }
public class : Item, .HPRecovery public class : Item, .HPRecovery
{ {
public override long Id => (long)ConsumableID.; public override long Id => (long)ConsumableID.;

View File

@ -109,7 +109,7 @@ namespace Oshima.FunGame.OshimaModules.Items
return .OnItemUsed(this, args); return .OnItemUsed(this, args);
} }
} }
public class : Item, .EXPBook public class : Item, .EXPBook
{ {
public override long Id => (long)ConsumableID.; public override long Id => (long)ConsumableID.;

View File

@ -109,7 +109,7 @@ namespace Oshima.FunGame.OshimaModules.Items
return .OnItemUsed(this, args); return .OnItemUsed(this, args);
} }
} }
public class 3 : Item, .EPAdd public class 3 : Item, .EPAdd
{ {
public override long Id => (long)ConsumableID.3; public override long Id => (long)ConsumableID.3;

View File

@ -109,7 +109,7 @@ namespace Oshima.FunGame.OshimaModules.Items
return .OnItemUsed(this, args); return .OnItemUsed(this, args);
} }
} }
public class 3 : Item, .MPRecovery public class 3 : Item, .MPRecovery
{ {
public override long Id => (long)ConsumableID.3; public override long Id => (long)ConsumableID.3;

View File

@ -26,7 +26,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 => $"每次造成伤害都可以叠一层标记,累计 4 层时回收该角色所有标记并造成眩晕 1 回合,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。"; public override string Description => $"每次造成伤害都可以叠一层标记,累计 4 层时回收该角色所有标记并造成眩晕 1 回合,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。";
private readonly double = 0.12; private readonly double = 0.12;
private bool = false; private bool = false;

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 => $"每时间提升 {伤害提升 * 100:0.##}% 所有伤害,无上限,但受到伤害时效果清零。" + ( > 0 ? $"(当前总提升:{累计伤害 * 100:0.##}%" : ""); public override string Description => $"每时间提升 {伤害提升 * 100:0.##}% 所有伤害,无上限,但受到伤害时效果清零。" + ( > 0 ? $"(当前总提升:{累计伤害 * 100:0.##}%" : "");
private readonly double = 0.03; private readonly double = 0.03;
private double = 0; private double = 0;

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 => $"暴击伤害提升 70%。"; public override string Description => $"暴击伤害提升 70%。";
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
character.ExCritDMG += 0.7; character.ExCritDMG += 0.7;

View File

@ -26,7 +26,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Name => "三重叠加"; public override string Name => "三重叠加";
public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" + public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
$"(剩余:{剩余持续次数} 次)"; $"(剩余:{剩余持续次数} 次)";
public int { get; set; } = 0; public int { get; set; } = 0;
private readonly int = 3; private readonly int = 3;
private readonly int = 2; private readonly int = 2;

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 => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值。"; public override string Description => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值。";
public bool { get; set; } = false; public bool { get; set; } = false;
public int { get; set; } = 2; public int { get; set; } = 2;
public int { get; set; } = 0; public int { get; set; } = 0;

View File

@ -25,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override long Id => Skill.Id; public override long Id => Skill.Id;
public override string Name => "变幻之心"; public override string Name => "变幻之心";
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100:0.##}%。"; public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100:0.##}%。";
private double => 0.25 + 0.03 * (Level - 1); private double => 0.25 + 0.03 * (Level - 1);
private double => 0.55 + 0.25 * (Level - 1); private double => 0.55 + 0.25 * (Level - 1);

View File

@ -1,5 +1,4 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
@ -27,7 +26,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"当生命值低于 30% 时,进入力量模式,核心属性转为力量,将所有基础智力转化为额外力量;当生命值高于或等于 30% 时,进入智力模式,核心属性转为智力,还原所有基础智力。力量模式下,造成伤害必定暴击;智力模式下,获得 15% 闪避率和 15% 魔法抗性。" + public override string Description => $"当生命值低于 30% 时,进入力量模式,核心属性转为力量,将所有基础智力转化为额外力量;当生命值高于或等于 30% 时,进入智力模式,核心属性转为智力,还原所有基础智力。力量模式下,造成伤害必定暴击;智力模式下,获得 15% 闪避率和 15% 魔法抗性。" +
(Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : ""); (Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : "");
private double = 0; private double = 0;
private double = 0.15; private double = 0.15;
private double = 0.15; private double = 0.15;

View File

@ -31,7 +31,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"最大生命值减少 20%。破釜沉舟:生命值高于 30% 时,受到额外的 [ {高于30额外伤害下限}~{高于30额外伤害上限}% ] 伤害,但是获得 [ 累计所受伤害的 {高于30的加成下限}~{高于30的加成上限}% ] 伤害加成;生命值低于等于 30% 时,不会受到额外的伤害,仅能获得 [ 累计受到的伤害 {低于30的加成下限}~{低于30的加成上限}% ] 伤害加成。" + public override string Description => $"最大生命值减少 20%。破釜沉舟:生命值高于 30% 时,受到额外的 [ {高于30额外伤害下限}~{高于30额外伤害上限}% ] 伤害,但是获得 [ 累计所受伤害的 {高于30的加成下限}~{高于30的加成上限}% ] 伤害加成;生命值低于等于 30% 时,不会受到额外的伤害,仅能获得 [ 累计受到的伤害 {低于30的加成下限}~{低于30的加成上限}% ] 伤害加成。" +
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + ( > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##}" : ""); $"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + ( > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##}" : "");
private double = 0; private double = 0;
private double = 0; private double = 0;
private double HP = 0; private double HP = 0;

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 => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言能量值大于100且小于150时视为低于一半。"; public override string Description => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于枯竭打击而言能量值大于100且小于150时视为低于一半。";
private bool = false; private bool = false;
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)

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 => $"优先攻击血量更低的角色,对生命值百分比低于自己的角色造成 150% 伤害。"; public override string Description => $"优先攻击血量更低的角色,对生命值百分比低于自己的角色造成 150% 伤害。";
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, bool isMagicDamage, MagicType magicType, Dictionary<Effect, double> totalDamageBonus)
{ {
if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP)) if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP))

View File

@ -26,7 +26,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"普通攻击硬直时间减少 20%。每次使用普通攻击时,额外再发动一次普通攻击,伤害特效可叠加,冷却 {基础冷却时间:0.##} 时间。" + public override string Description => $"普通攻击硬直时间减少 20%。每次使用普通攻击时,额外再发动一次普通攻击,伤害特效可叠加,冷却 {基础冷却时间:0.##} 时间。" +
( > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} 时间)" : ""); ( > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} 时间)" : "");
public double { get; set; } = 0; public double { get; set; } = 0;
public double { get; set; } = 20; public double { get; set; } = 20;
private bool = false; private bool = false;

View File

@ -26,7 +26,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 => $"造成魔法伤害时有 35% 几率使敌人眩晕 1 回合。"; public override string Description => $"造成魔法伤害时有 35% 几率使敌人眩晕 1 回合。";
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
{ {
if (character == Skill.Character && isMagicDamage && damageResult != DamageResult.Evaded && new Random().NextDouble() < 0.35) if (character == Skill.Character && isMagicDamage && damageResult != DamageResult.Evaded && new Random().NextDouble() < 0.35)

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 => $"每次普通攻击都将附带基于 {敏捷系数 * 100:0.##}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。"; public override string Description => $"每次普通攻击都将附带基于 {敏捷系数 * 100:0.##}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。";
private double => * Skill.Character?.AGI ?? 0; private double => * Skill.Character?.AGI ?? 0;
private readonly double = 2.5; private readonly double = 2.5;
private bool = false; private bool = false;

View File

@ -407,7 +407,7 @@ namespace Oshima.FunGame.OshimaServers
return result.Trim(); return result.Trim();
} }
public string SCRecord(Dictionary<string, object> data) public string SCRecord(Dictionary<string, object> data)
{ {
string result = ""; string result = "";
@ -433,7 +433,7 @@ namespace Oshima.FunGame.OshimaServers
string remark = Convert.ToString(dr["remark"]) ?? ""; string remark = Convert.ToString(dr["remark"]) ?? "";
string record = Convert.ToString(dr["record"]) ?? ""; string record = Convert.ToString(dr["record"]) ?? "";
result += $"用户:{qq},圣人点数:{sc} 分{(remark.Trim() != "" ? $" ({remark})" : "")},排在圣人榜第 {index} / {sql.DataSet.Tables[0].Rows.Count} 名。\r\n" + result += $"用户:{qq},圣人点数:{sc} 分{(remark.Trim() != "" ? $" ({remark})" : "")},排在圣人榜第 {index} / {sql.DataSet.Tables[0].Rows.Count} 名。\r\n" +
$"{(record != "" ? "\r\n" + record + "\r\n": "")}本系统仅供娱乐,不代表任何官方立场或真实情况。"; $"{(record != "" ? "\r\n" + record + "\r\n" : "")}本系统仅供娱乐,不代表任何官方立场或真实情况。";
} }
else else
{ {

View File

@ -527,7 +527,7 @@ namespace Oshima.FunGame.OshimaServers.Service
user.Inventory.Squad.Add(id); user.Inventory.Squad.Add(id);
} }
} }
foreach (long cid in training.Keys) foreach (long cid in training.Keys)
{ {
if (user.Inventory.Characters.FirstOrDefault(c => c.Id == cid) is Character t) if (user.Inventory.Characters.FirstOrDefault(c => c.Id == cid) is Character t)
@ -624,7 +624,7 @@ namespace Oshima.FunGame.OshimaServers.Service
user.Inventory.Items.Add(mfk); user.Inventory.Items.Add(mfk);
msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description; msg += ItemSet.GetQualityTypeName(mfk.QualityType) + ItemSet.GetItemTypeName(mfk.ItemType) + "【" + mfk.Name + "】!\r\n" + mfk.Description;
break; break;
case 7: case 7:
Item = FunGameConstant.DrawCardItems[Random.Shared.Next(FunGameConstant.DrawCardItems.Count)].Copy(); Item = FunGameConstant.DrawCardItems[Random.Shared.Next(FunGameConstant.DrawCardItems.Count)].Copy();
SetSellAndTradeTime(); SetSellAndTradeTime();
@ -650,7 +650,7 @@ namespace Oshima.FunGame.OshimaServers.Service
public static string GetSignInResult(User user, int days) public static string GetSignInResult(User user, int days)
{ {
string msg = $"签到成功,你已连续签到 {days +1} 天!\r\n本次签到获得"; string msg = $"签到成功,你已连续签到 {days + 1} 天!\r\n本次签到获得";
int currency = Random.Shared.Next(1000, 3000) + 10 * days; int currency = Random.Shared.Next(1000, 3000) + 10 * days;
msg += $"{currency} {General.GameplayEquilibriumConstant.InGameCurrency} 和 "; msg += $"{currency} {General.GameplayEquilibriumConstant.InGameCurrency} 和 ";
int material = Random.Shared.Next(5, 15) + days / 7; int material = Random.Shared.Next(5, 15) + days / 7;
@ -1006,7 +1006,7 @@ namespace Oshima.FunGame.OshimaServers.Service
} }
return result; return result;
} }
public static bool UseItems(IEnumerable<Item> items, User user, IEnumerable<Character> targets, List<string> msgs) public static bool UseItems(IEnumerable<Item> items, User user, IEnumerable<Character> targets, List<string> msgs)
{ {
Dictionary<string, object> args = new() Dictionary<string, object> args = new()
@ -1382,7 +1382,7 @@ namespace Oshima.FunGame.OshimaServers.Service
super.Character = boss; super.Character = boss;
super.Level = sLevel; super.Level = sLevel;
boss.Skills.Add(super); boss.Skills.Add(super);
boss.Recovery(); boss.Recovery();
SetCharacterPrimaryAttribute(boss); SetCharacterPrimaryAttribute(boss);

View File

@ -502,7 +502,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
} }
return NetworkUtility.JsonSerialize("创建存档失败!"); return NetworkUtility.JsonSerialize("创建存档失败!");
} }
[HttpPost("restoresaved")] [HttpPost("restoresaved")]
public string RestoreSaved([FromQuery] long? uid = null) public string RestoreSaved([FromQuery] long? uid = null)
{ {
@ -634,7 +634,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("randomcustom")] [HttpPost("randomcustom")]
public string RandomCustomCharacter([FromQuery] long? uid = null, [FromQuery] bool? confirm = null) public string RandomCustomCharacter([FromQuery] long? uid = null, [FromQuery] bool? confirm = null)
{ {
@ -643,7 +643,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
PluginConfig pc = new("saved", userid.ToString()); PluginConfig pc = new("saved", userid.ToString());
pc.LoadConfig(); pc.LoadConfig();
EntityModuleConfig<Character> emc = new("randomcustom", userid.ToString()); EntityModuleConfig<Character> emc = new("randomcustom", userid.ToString());
emc.LoadConfig(); emc.LoadConfig();
@ -799,7 +799,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("inventoryinfo")] [HttpPost("inventoryinfo")]
public string GetInventoryInfo([FromQuery] long? uid = null) public string GetInventoryInfo([FromQuery] long? uid = null)
{ {
@ -1010,7 +1010,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
} }
return list; return list;
} }
[HttpPost("inventoryinfo4")] [HttpPost("inventoryinfo4")]
public List<string> GetInventoryInfo4([FromQuery] long? uid = null, [FromQuery] int? page = null, [FromQuery] int? type = null) public List<string> GetInventoryInfo4([FromQuery] long? uid = null, [FromQuery] int? page = null, [FromQuery] int? type = null)
{ {
@ -1208,7 +1208,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("drawcard")] [HttpPost("drawcard")]
public string DrawCard([FromQuery] long? uid = null) public string DrawCard([FromQuery] long? uid = null)
{ {
@ -1478,7 +1478,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("showcharacterskills")] [HttpPost("showcharacterskills")]
public string GetCharacterSkills([FromQuery] long? uid = null, [FromQuery] int? seq = null) public string GetCharacterSkills([FromQuery] long? uid = null, [FromQuery] int? seq = null)
{ {
@ -1521,7 +1521,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("showcharacteritems")] [HttpPost("showcharacteritems")]
public string GetCharacterItems([FromQuery] long? uid = null, [FromQuery] int? seq = null) public string GetCharacterItems([FromQuery] long? uid = null, [FromQuery] int? seq = null)
{ {
@ -1600,7 +1600,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("showiteminfoname")] [HttpPost("showiteminfoname")]
public string GetItemInfoFromInventory_Name([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] int? page = null) public string GetItemInfoFromInventory_Name([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] int? page = null)
{ {
@ -1711,7 +1711,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("equipitem")] [HttpPost("equipitem")]
public string EquipItem([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] int? i = null) public string EquipItem([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] int? i = null)
{ {
@ -1777,7 +1777,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("unequipitem")] [HttpPost("unequipitem")]
public string UnEquipItem([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] int? i = null) public string UnEquipItem([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] int? i = null)
{ {
@ -1836,7 +1836,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
PluginConfig pc = new("saved", userid.ToString()); PluginConfig pc = new("saved", userid.ToString());
pc.LoadConfig(); pc.LoadConfig();
PluginConfig pc2 = new("saved", enemyid.ToString()); PluginConfig pc2 = new("saved", enemyid.ToString());
pc2.LoadConfig(); pc2.LoadConfig();
@ -1882,7 +1882,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return [e.ToString()]; return [e.ToString()];
} }
} }
[HttpPost("fightcustom2")] [HttpPost("fightcustom2")]
public List<string> FightCustom2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null) public List<string> FightCustom2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] bool? all = null)
{ {
@ -2040,7 +2040,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
targets.Add(character); targets.Add(character);
} }
} }
if (FunGameService.UseItem(item, user, targets, out string msg)) if (FunGameService.UseItem(item, user, targets, out string msg))
{ {
user.LastTime = DateTime.Now; user.LastTime = DateTime.Now;
@ -2069,7 +2069,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("useitem2")] [HttpPost("useitem2")]
public string UseItem2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] int? count = null, [FromBody] int[]? characters = null) public string UseItem2([FromQuery] long? uid = null, [FromQuery] string? name = null, [FromQuery] int? count = null, [FromBody] int[]? characters = null)
{ {
@ -2698,7 +2698,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("decomposeitem3")] [HttpPost("decomposeitem3")]
public string DecomposeItem3([FromQuery] long? uid = null, [FromQuery] int? q = null) public string DecomposeItem3([FromQuery] long? uid = null, [FromQuery] int? q = null)
{ {
@ -2883,7 +2883,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("starttraining")] [HttpPost("starttraining")]
public string StartTraining([FromQuery] long? uid = null, [FromQuery] int? c = null) public string StartTraining([FromQuery] long? uid = null, [FromQuery] int? c = null)
{ {
@ -2930,7 +2930,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("stoptraining")] [HttpPost("stoptraining")]
public string StopTraining([FromQuery] long? uid = null) public string StopTraining([FromQuery] long? uid = null)
{ {
@ -3004,7 +3004,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("gettraininginfo")] [HttpPost("gettraininginfo")]
public string GetTrainingInfo([FromQuery] long? uid = null) public string GetTrainingInfo([FromQuery] long? uid = null)
{ {
@ -3098,7 +3098,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("skilllevelup")] [HttpPost("skilllevelup")]
public string SkillLevelUp([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] string? s = null) public string SkillLevelUp([FromQuery] long? uid = null, [FromQuery] int? c = null, [FromQuery] string? s = null)
{ {
@ -3435,7 +3435,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
} }
return bosses; return bosses;
} }
[HttpPost("fightboss")] [HttpPost("fightboss")]
public List<string> FightBoss([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null) public List<string> FightBoss([FromQuery] long? uid = null, [FromQuery] int? index = null, [FromQuery] bool? all = null)
{ {
@ -3521,7 +3521,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize($"小队人数已满 4 人,无法继续添加角色!当前小队角色如下:\r\n" + return NetworkUtility.JsonSerialize($"小队人数已满 4 人,无法继续添加角色!当前小队角色如下:\r\n" +
string.Join("\r\n", user.Inventory.Characters.Where(c => user.Inventory.Squad.Contains(c.Id)))); string.Join("\r\n", user.Inventory.Characters.Where(c => user.Inventory.Squad.Contains(c.Id))));
} }
if (user.Inventory.Squad.Contains(character.Id)) if (user.Inventory.Squad.Contains(character.Id))
{ {
return NetworkUtility.JsonSerialize($"此角色已经在小队中了!"); return NetworkUtility.JsonSerialize($"此角色已经在小队中了!");
@ -3544,7 +3544,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("removesquad")] [HttpPost("removesquad")]
public string RemoveSquad([FromQuery] long? uid = null, [FromQuery] int? c = null) public string RemoveSquad([FromQuery] long? uid = null, [FromQuery] int? c = null)
{ {
@ -3639,7 +3639,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("clearsquad")] [HttpPost("clearsquad")]
public string ClearSquad([FromQuery] long? uid = null, [FromBody] int[]? c = null) public string ClearSquad([FromQuery] long? uid = null, [FromBody] int[]? c = null)
{ {
@ -3671,7 +3671,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(e.ToString()); return NetworkUtility.JsonSerialize(e.ToString());
} }
} }
[HttpPost("showsquad")] [HttpPost("showsquad")]
public string ShowSquad([FromQuery] long? uid = null) public string ShowSquad([FromQuery] long? uid = null)
{ {
@ -3788,7 +3788,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("checkworkingquest")] [HttpPost("checkworkingquest")]
public string CheckWorkingQuest([FromQuery] long? uid = null) public string CheckWorkingQuest([FromQuery] long? uid = null)
{ {
@ -3825,7 +3825,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("acceptquest")] [HttpPost("acceptquest")]
public List<string> AcceptQuest([FromQuery] long? uid = null, [FromQuery] int? id = null) public List<string> AcceptQuest([FromQuery] long? uid = null, [FromQuery] int? id = null)
{ {
@ -3930,12 +3930,12 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("showmaincharacterorsquadstatus")] [HttpPost("showmaincharacterorsquadstatus")]
public string ShowMainCharacterOrSquadStatus([FromQuery] long? uid = null, [FromQuery] bool? squad = null) public string ShowMainCharacterOrSquadStatus([FromQuery] long? uid = null, [FromQuery] bool? squad = null)
{ {
long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11)); long userid = uid ?? Convert.ToInt64("10" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 11));
bool showSquad = squad ?? false; bool showSquad = squad ?? false;
PluginConfig pc = new("saved", userid.ToString()); PluginConfig pc = new("saved", userid.ToString());
pc.LoadConfig(); pc.LoadConfig();
@ -4016,7 +4016,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("joinclub")] [HttpPost("joinclub")]
public string JoinClub([FromQuery] long? uid = null, [FromQuery] long? id = null) public string JoinClub([FromQuery] long? uid = null, [FromQuery] long? id = null)
{ {
@ -4064,7 +4064,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
} }
emc.Add("club", club); emc.Add("club", club);
emc.SaveConfig(); emc.SaveConfig();
user.LastTime = DateTime.Now; user.LastTime = DateTime.Now;
pc.Add("user", user); pc.Add("user", user);
pc.SaveConfig(); pc.SaveConfig();
@ -4075,7 +4075,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("quitclub")] [HttpPost("quitclub")]
public string QuitClub([FromQuery] long? uid = null) public string QuitClub([FromQuery] long? uid = null)
{ {
@ -4119,7 +4119,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
club.MemberJoinTime.Remove(userid); club.MemberJoinTime.Remove(userid);
emc.Add("club", club); emc.Add("club", club);
emc.SaveConfig(); emc.SaveConfig();
string msg = $"退出社团 [ {club.Name} ] 成功!"; string msg = $"退出社团 [ {club.Name} ] 成功!";
user.LastTime = DateTime.Now; user.LastTime = DateTime.Now;
pc.Add("user", user); pc.Add("user", user);
@ -4132,7 +4132,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("createclub")] [HttpPost("createclub")]
public string CreateClub([FromQuery] long? uid = null, [FromQuery] bool? @public = null, [FromQuery] string? prefix = null) public string CreateClub([FromQuery] long? uid = null, [FromQuery] bool? @public = null, [FromQuery] string? prefix = null)
{ {
@ -4196,7 +4196,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
emc.LoadConfig(); emc.LoadConfig();
emc.Add("club", club); emc.Add("club", club);
emc.SaveConfig(); emc.SaveConfig();
string msg = $"创建社团 [ {club.Name} ] (编号 {clubid})成功!"; string msg = $"创建社团 [ {club.Name} ] (编号 {clubid})成功!";
user.LastTime = DateTime.Now; user.LastTime = DateTime.Now;
pc.Add("user", user); pc.Add("user", user);
@ -4209,7 +4209,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("showclubinfo")] [HttpPost("showclubinfo")]
public string ShowClubInfo([FromQuery] long? uid = null) public string ShowClubInfo([FromQuery] long? uid = null)
{ {
@ -4276,7 +4276,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("showclubmemberlist")] [HttpPost("showclubmemberlist")]
public string ShowClubMemberList([FromQuery] long? uid = null, [FromQuery] int? type = null, [FromQuery] int? page = null) public string ShowClubMemberList([FromQuery] long? uid = null, [FromQuery] int? type = null, [FromQuery] int? page = null)
{ {
@ -4962,7 +4962,7 @@ namespace Oshima.FunGame.WebAPI.Controllers
return NetworkUtility.JsonSerialize(noSaved); return NetworkUtility.JsonSerialize(noSaved);
} }
} }
[HttpPost("dailystoreshowinfo")] [HttpPost("dailystoreshowinfo")]
public string DailyStoreShowInfo([FromQuery] long? uid = null, [FromQuery] long? id = null) public string DailyStoreShowInfo([FromQuery] long? uid = null, [FromQuery] long? id = null)
{ {

View File

@ -83,7 +83,7 @@ namespace Oshima.FunGame.WebAPI.Models
public string OpenId { get; } public string OpenId { get; }
public string AuthorOpenId { get; } public string AuthorOpenId { get; }
} }
public class ThirdPartyMessage : IBotMessage public class ThirdPartyMessage : IBotMessage
{ {
[JsonPropertyName("id")] [JsonPropertyName("id")]

View File

@ -47,7 +47,8 @@ namespace Oshima.FunGame.WebAPI
builder.Services.AddScoped<RainBOTService>(); builder.Services.AddScoped<RainBOTService>();
builder.Services.AddScoped<FunGameController>(); builder.Services.AddScoped<FunGameController>();
builder.Services.AddScoped<QQController>(); builder.Services.AddScoped<QQController>();
builder.Services.AddTransient(provider => { builder.Services.AddTransient(provider =>
{
SQLHelper? sql = Factory.OpenFactory.GetSQLHelper(); SQLHelper? sql = Factory.OpenFactory.GetSQLHelper();
if (sql != null) return sql; if (sql != null) return sql;
throw new Milimoe.FunGame.SQLServiceException(); throw new Milimoe.FunGame.SQLServiceException();
@ -62,7 +63,7 @@ namespace Oshima.FunGame.WebAPI
{ {
if (GeneralSettings.TokenList.Contains(token)) if (GeneralSettings.TokenList.Contains(token))
{ {
return "APIUser"; return "APIUser";
} }
return ""; return "";
} }

View File

@ -187,7 +187,7 @@ namespace Oshima.FunGame.WebAPI.Services
51 51
6 6 "); 6 6 ");
} }
if (e.Detail == "帮助6") if (e.Detail == "帮助6")
{ {
await SendAsync(e, "饭给木", @"《饭给木》游戏指令列表(第 6 / 7 页) await SendAsync(e, "饭给木", @"《饭给木》游戏指令列表(第 6 / 7 页)
@ -205,7 +205,7 @@ namespace Oshima.FunGame.WebAPI.Services
62 <> <{...}> 62 <> <{...}>
7 7 "); 7 7 ");
} }
if (e.Detail == "帮助7") if (e.Detail == "帮助7")
{ {
await SendAsync(e, "饭给木", @"《饭给木》游戏指令列表(第 7 / 7 页) await SendAsync(e, "饭给木", @"《饭给木》游戏指令列表(第 7 / 7 页)
@ -1935,7 +1935,7 @@ namespace Oshima.FunGame.WebAPI.Services
} }
return result; return result;
} }
if (e.Detail.StartsWith("商店查看", StringComparison.CurrentCultureIgnoreCase)) if (e.Detail.StartsWith("商店查看", StringComparison.CurrentCultureIgnoreCase))
{ {
string detail = e.Detail.Replace("商店查看", "").Trim(); string detail = e.Detail.Replace("商店查看", "").Trim();