更新测试内容

This commit is contained in:
milimoe 2024-10-30 01:25:41 +08:00
parent 69a6198363
commit 509d65d842
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
61 changed files with 936 additions and 348 deletions

View File

@ -363,27 +363,27 @@ namespace Milimoe.FunGame.Testing.Desktop.Solutions
private void () private void ()
{ {
Character? c = CharacterManager.LoadedCharacters.Values.Where(c => c.ToString() == .Items[.SelectedIndex].ToString()).FirstOrDefault(); //Character? c = CharacterManager.LoadedCharacters.Values.Where(c => c.ToString() == 实际列表.Items[实际列表.SelectedIndex].ToString()).FirstOrDefault();
if (c != null) //if (c != null)
{ //{
if (c.Items.Count != 0 || c.EquipSlot.Any()) // if (c.Items.Count != 0 || c.EquipSlot.Any())
{ // {
ShowList l = new(); // ShowList l = new();
l.AddListItem(c.Items.Select(s => s.GetIdName()).ToArray()); // l.AddListItem(c.Items.Select(s => s.GetIdName()).ToArray());
l.ShowDialog(); // l.ShowDialog();
string selected = l.SelectItem; // string selected = l.SelectItem;
Item? i = c.Items.Where(i => i.GetIdName() == selected).FirstOrDefault(); // Item? i = c.Items.Where(i => i.GetIdName() == selected).FirstOrDefault();
if (i != null) // if (i != null)
{ // {
if (i.Equipable) c.UnEquip(c.EquipSlot.GetEquipItemToSlot(i)); // if (i.Equipable) c.UnEquip(c.EquipSlot.GetEquipItemToSlot(i));
else c.Items.Remove(i); // else c.Items.Remove(i);
} // }
} // }
else // else
{ // {
MessageBox.Show("物品列表为空!"); // MessageBox.Show("物品列表为空!");
} // }
} //}
} }
private void _Click(object sender, EventArgs e) private void _Click(object sender, EventArgs e)

View File

@ -145,30 +145,30 @@ namespace Milimoe.FunGame.Testing.Desktop.Solutions
private void _Click(object sender, EventArgs e) private void _Click(object sender, EventArgs e)
{ {
if (NowClick == 0 && BaseEntity is Character c) //if (NowClick == 0 && BaseEntity is Character c)
{ //{
if (c != null) // if (c != null)
{ // {
if (c.Items.Count != 0 || c.EquipSlot.Any()) // if (c.Items.Count != 0 || c.EquipSlot.Any())
{ // {
ShowList l = new(); // ShowList l = new();
l.AddListItem(c.Items.OrderBy(i => i.Id).Select(i => i.GetIdName()).ToArray()); // l.AddListItem(c.Items.OrderBy(i => i.Id).Select(i => i.GetIdName()).ToArray());
l.ShowDialog(); // l.ShowDialog();
string selected = l.SelectItem; // string selected = l.SelectItem;
Item? i = c.Items.Where(i => i.GetIdName() == selected).FirstOrDefault(); // Item? i = c.Items.Where(i => i.GetIdName() == selected).FirstOrDefault();
if (i != null) // if (i != null)
{ // {
if (i.Equipable) c.UnEquip(c.EquipSlot.GetEquipItemToSlot(i)); // if (i.Equipable) c.UnEquip(c.EquipSlot.GetEquipItemToSlot(i));
else c.Items.Remove(i); // else c.Items.Remove(i);
.Text = c.GetInfo(); // 详细内容.Text = c.GetInfo();
} // }
} // }
else // else
{ // {
MessageBox.Show("物品列表为空!"); // MessageBox.Show("物品列表为空!");
} // }
} // }
} //}
} }
private void _Click(object sender, EventArgs e) private void _Click(object sender, EventArgs e)

View File

@ -15,6 +15,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Testing.Desktop", "
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunGame.Core", "..\FunGame.Core\FunGame.Core.csproj", "{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaModules", "..\OshimaGameModule\OshimaModules\OshimaModules.csproj", "{35136317-2FBC-41C1-A3A0-C56B198FA440}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OshimaCore", "..\OshimaGameModule\OshimaCore\OshimaCore.csproj", "{A0EDE123-21D0-4886-8960-0802677FBC04}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -33,6 +37,14 @@ Global
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Debug|Any CPU.Build.0 = Debug|Any CPU {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.ActiveCfg = Release|Any CPU {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.Build.0 = Release|Any CPU {94B564CD-7A1E-4B3C-AF78-23EBCD5D627E}.Release|Any CPU.Build.0 = Release|Any CPU
{35136317-2FBC-41C1-A3A0-C56B198FA440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{35136317-2FBC-41C1-A3A0-C56B198FA440}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35136317-2FBC-41C1-A3A0-C56B198FA440}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35136317-2FBC-41C1-A3A0-C56B198FA440}.Release|Any CPU.Build.0 = Release|Any CPU
{A0EDE123-21D0-4886-8960-0802677FBC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0EDE123-21D0-4886-8960-0802677FBC04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0EDE123-21D0-4886-8960-0802677FBC04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0EDE123-21D0-4886-8960-0802677FBC04}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

163
Library/Effects/EffectID.cs Normal file
View File

@ -0,0 +1,163 @@
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public enum EffectID : long
{
/// <summary>
/// 数值攻击力参数exatk
/// </summary>
ExATK = 8001,
/// <summary>
/// 数值物理护甲参数exdef
/// </summary>
ExDEF = 8002,
/// <summary>
/// 数值力量参数exstr
/// </summary>
ExSTR = 8003,
/// <summary>
/// 数值敏捷参数exagi
/// </summary>
ExAGI = 8004,
/// <summary>
/// 数值智力参数exint
/// </summary>
ExINT = 8005,
/// <summary>
/// 数值技能硬直时间减少参数shtr
/// </summary>
SkillHardTimeReduce = 8006,
/// <summary>
/// 数值普攻硬直时间减少参数nahtr
/// </summary>
NormalAttackHardTimeReduce = 8007,
/// <summary>
/// 加速系数%参数exacc
/// </summary>
AccelerationCoefficient = 8008,
/// <summary>
/// 数值行动速度参数exspd
/// </summary>
ExSPD = 8009,
/// <summary>
/// 行动系数%参考exac
/// </summary>
ExActionCoefficient = 8010,
/// <summary>
/// 冷却缩减%参数excdr
/// </summary>
ExCDR = 8011,
/// <summary>
/// 数值生命值参数exhp
/// </summary>
ExMaxHP = 8012,
/// <summary>
/// 数值魔法值参数exmp
/// </summary>
ExMaxMP = 8013,
/// <summary>
/// 暴击率%参数excr
/// </summary>
ExCritRate = 8014,
/// <summary>
/// 暴击伤害%参数excrd
/// </summary>
ExCritDMG = 8015,
/// <summary>
/// 闪避率%参数exer
/// </summary>
ExEvadeRate = 8016,
/// <summary>
/// 物理穿透%参数exppt
/// </summary>
PhysicalPenetration = 8017,
/// <summary>
/// 魔法穿透%参数exmpt
/// </summary>
MagicalPenetration = 8018,
/// <summary>
/// 物理伤害减免%参数expdr
/// </summary>
ExPDR = 8019,
/// <summary>
/// 魔法抗性%<para/>
/// 参数:<para/>
/// 魔法类型对应MagicType0为所有mdftype<para/>
/// 魔法抗性%mdfvalue
/// </summary>
ExMDF = 8020,
/// <summary>
/// 数值生命回复参数exhr
/// </summary>
ExHR = 8021,
/// <summary>
/// 数值魔法回复参数exmr
/// </summary>
ExMR = 8022,
/// <summary>
/// 攻击力%参数exatk
/// </summary>
ExATK2 = 8023,
/// <summary>
/// 物理护甲%参数exdef
/// </summary>
ExDEF2 = 8024,
/// <summary>
/// 力量%参数exstr
/// </summary>
ExSTR2 = 8025,
/// <summary>
/// 敏捷%参数exagi
/// </summary>
ExAGI2 = 8026,
/// <summary>
/// 智力%参数exint
/// </summary>
ExINT2 = 8027,
/// <summary>
/// 技能硬直时间减少%参数shtr
/// </summary>
SkillHardTimeReduce2 = 8028,
/// <summary>
/// 普攻硬直时间减少%参数nahtr
/// </summary>
NormalAttackHardTimeReduce2 = 8029,
/// <summary>
/// 最大生命值%参数exhp
/// </summary>
ExMaxHP2 = 8030,
/// <summary>
/// 最大魔法值%参数exmp
/// </summary>
ExMaxMP2 = 8031,
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.ItemEffects namespace Milimoe.FunGame.Testing.Effects.ItemEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.ItemEffects namespace Milimoe.FunGame.Testing.Effects.ItemEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.ItemEffects namespace Milimoe.FunGame.Testing.Effects.ItemEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.ItemEffects namespace Milimoe.FunGame.Testing.Effects.ItemEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.ItemEffects namespace Milimoe.FunGame.Testing.Effects.ItemEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class AccelerationCoefficient : Effect public class AccelerationCoefficient : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.AccelerationCoefficient -= ; character.AccelerationCoefficient -= ;
} }
public AccelerationCoefficient(Skill skill, Character? source = null, Item? item = null) : base(skill) public AccelerationCoefficient(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exacc", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exacc", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exACC)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exACC))
{ {
= exACC; = exACC;
} }

View File

@ -1,115 +0,0 @@
namespace Milimoe.FunGame.Testing.OpenEffects
{
public enum EffectID : long
{
/// <summary>
/// exatk
/// </summary>
ExATK = 8001,
/// <summary>
/// exdef
/// </summary>
ExDEF = 8002,
/// <summary>
/// exstr
/// </summary>
ExSTR = 8003,
/// <summary>
/// exagi
/// </summary>
ExAGI = 8004,
/// <summary>
/// exint
/// </summary>
ExINT = 8005,
/// <summary>
/// shtr
/// </summary>
SkillHardTimeReduce = 8006,
/// <summary>
/// nahtr
/// </summary>
NormalAttackHardTimeReduce = 8007,
/// <summary>
/// exacc
/// </summary>
AccelerationCoefficient = 8008,
/// <summary>
/// exspd
/// </summary>
ExSPD = 8009,
/// <summary>
/// exac
/// </summary>
ExActionCoefficient = 8010,
/// <summary>
/// excdr
/// </summary>
ExCDR = 8011,
/// <summary>
/// exhp
/// </summary>
ExMaxHP = 8012,
/// <summary>
/// exmp
/// </summary>
ExMaxMP = 8013,
/// <summary>
/// excr
/// </summary>
ExCritRate = 8014,
/// <summary>
/// excrd
/// </summary>
ExCritDMG = 8015,
/// <summary>
/// exer
/// </summary>
ExEvadeRate = 8016,
/// <summary>
/// expp
/// </summary>
PhysicalPenetration = 8017,
/// <summary>
/// exmp
/// </summary>
MagicalPenetration = 8018,
/// <summary>
/// expdr
/// </summary>
ExPDR = 8019,
/// <summary>
/// mdftype, mdfvalue
/// </summary>
ExMDF = 8020,
/// <summary>
/// exhr
/// </summary>
ExHR = 8021,
/// <summary>
/// exmr
/// </summary>
ExMR = 8022
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExAGI : Effect public class ExAGI : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExAGI -= ; character.ExAGI -= ;
} }
public ExAGI(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExAGI(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exagi", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exagi", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exAGI)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exAGI))
{ {
= exAGI; = exAGI;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExAGI2 : Effect
{
public override long Id => (long)EffectID.ExAGI2;
public override string Name => "敏捷加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点敏捷。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseAGI * ;
character.ExAGI += ;
}
public override void OnEffectLost(Character character)
{
character.ExAGI -= ;
= 0;
}
public ExAGI2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exagi", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exAGI))
{
= exAGI;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExATK : Effect public class ExATK : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExATK2 -= ; character.ExATK2 -= ;
} }
public ExATK(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExATK(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exATK)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exATK))
{ {
= exATK; = exATK;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExATK2 : Effect
{
public override long Id => (long)EffectID.ExATK2;
public override string Name => "攻击力加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseATK * ;
character.ExATK2 += ;
}
public override void OnEffectLost(Character character)
{
character.ExATK2 -= ;
= 0;
}
public ExATK2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exATK))
{
= exATK;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExActionCoefficient : Effect public class ExActionCoefficient : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExActionCoefficient -= ; character.ExActionCoefficient -= ;
} }
public ExActionCoefficient(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExActionCoefficient(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exac", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exac", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exAC)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exAC))
{ {
= exAC; = exAC;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExCDR : Effect public class ExCDR : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExCDR -= ; character.ExCDR -= ;
} }
public ExCDR(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExCDR(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excdr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("excdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCDR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCDR))
{ {
= exCDR; = exCDR;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExCritDMG : Effect public class ExCritDMG : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExCritDMG -= ; character.ExCritDMG -= ;
} }
public ExCritDMG(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExCritDMG(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excrd", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("excrd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCRD)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCRD))
{ {
= exCRD; = exCRD;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExCritRate : Effect public class ExCritRate : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExCritRate -= ; character.ExCritRate -= ;
} }
public ExCritRate(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExCritRate(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("excr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCR))
{ {
= exCR; = exCR;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExDEF : Effect public class ExDEF : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExDEF2 -= ; character.ExDEF2 -= ;
} }
public ExDEF(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExDEF(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exDEF)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exDEF))
{ {
= exDEF; = exDEF;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExDEF2 : Effect
{
public override long Id => (long)EffectID.ExDEF2;
public override string Name => "物理护甲加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点物理护甲。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseDEF * ;
character.ExDEF2 += ;
}
public override void OnEffectLost(Character character)
{
character.ExDEF2 -= ;
= 0;
}
public ExDEF2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exDEF))
{
= exDEF;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExEvadeRate : Effect public class ExEvadeRate : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExEvadeRate -= ; character.ExEvadeRate -= ;
} }
public ExEvadeRate(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExEvadeRate(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exer", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exer", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exER)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exER))
{ {
= exER; = exER;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExHR : Effect public class ExHR : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExHR -= ; character.ExHR -= ;
} }
public ExHR(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExHR(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exhr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exhr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exHR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exHR))
{ {
= exHR; = exHR;
} }

View File

@ -1,7 +1,7 @@
 using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExINT : Effect public class ExINT : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExINT -= ; character.ExINT -= ;
} }
public ExINT(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExINT(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exint", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exint", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exINT)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exINT))
{ {
= exINT; = exINT;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExINT2 : Effect
{
public override long Id => (long)EffectID.ExINT2;
public override string Name => "智力加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点智力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseINT * ;
character.ExINT += ;
}
public override void OnEffectLost(Character character)
{
character.ExINT -= ;
= 0;
}
public ExINT2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exint", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exINT))
{
= exINT;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExMDF : Effect public class ExMDF : Effect
{ {
@ -45,15 +45,7 @@ namespace Milimoe.FunGame.Testing.OpenEffects
break; break;
case MagicType.None: case MagicType.None:
default: default:
character.MDF.None += ; character.MDF.SetAllValue(, false);
character.MDF.Starmark += ;
character.MDF.PurityNatural += ;
character.MDF.PurityContemporary += ;
character.MDF.Bright += ;
character.MDF.Shadow += ;
character.MDF.Element += ;
character.MDF.Fleabane += ;
character.MDF.Particle += ;
break; break;
} }
} }
@ -88,20 +80,20 @@ namespace Milimoe.FunGame.Testing.OpenEffects
break; break;
case MagicType.None: case MagicType.None:
default: default:
character.MDF.None -= ; character.MDF.SetAllValue(-, false);
break; break;
} }
} }
public ExMDF(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExMDF(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("mdfType", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("mdfType", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && int.TryParse(skill.OtherArgs[key].ToString(), out int mdfType)) if (key.Length > 0 && int.TryParse(Values[key].ToString(), out int mdfType))
{ {
if (Enum.IsDefined(typeof(MagicType), mdfType)) if (Enum.IsDefined(typeof(MagicType), mdfType))
{ {
@ -112,8 +104,8 @@ namespace Milimoe.FunGame.Testing.OpenEffects
= MagicType.None; = MagicType.None;
} }
} }
key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? ""; key = Values.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double mdfValue)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double mdfValue))
{ {
= mdfValue; = mdfValue;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExMR : Effect public class ExMR : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExMR -= ; character.ExMR -= ;
} }
public ExMR(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExMR(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exmr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exMR))
{ {
= exMR; = exMR;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExMaxHP : Effect public class ExMaxHP : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExHP2 -= ; character.ExHP2 -= ;
} }
public ExMaxHP(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExMaxHP(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exhp", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exhp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exHP)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exHP))
{ {
= exHP; = exHP;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExMaxHP2 : Effect
{
public override long Id => (long)EffectID.ExMaxHP2;
public override string Name => "最大生命值加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点最大生命值。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseHP * ;
character.ExHP2 += ;
}
public override void OnEffectLost(Character character)
{
character.ExHP2 -= ;
= 0;
}
public ExMaxHP2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exhp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exHP))
{
= exHP;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExMaxMP : Effect public class ExMaxMP : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExMP2 -= ; character.ExMP2 -= ;
} }
public ExMaxMP(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExMaxMP(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMP)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exMP))
{ {
= exMP; = exMP;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExMaxMP2 : Effect
{
public override long Id => (long)EffectID.ExMaxMP2;
public override string Name => "最大魔法值加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点最大魔法值。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseMP * ;
character.ExMP2 += ;
}
public override void OnEffectLost(Character character)
{
character.ExMP2 -= ;
= 0;
}
public ExMaxMP2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exMP))
{
= exMP;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExPDR : Effect public class ExPDR : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExPDR -= ; character.ExPDR -= ;
} }
public ExPDR(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExPDR(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("expdr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("expdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exPDR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exPDR))
{ {
= exPDR; = exPDR;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExSPD : Effect public class ExSPD : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.ExSPD -= ; character.ExSPD -= ;
} }
public ExSPD(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExSPD(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exspd", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exspd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exSPD)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exSPD))
{ {
= exSPD; = exSPD;
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class ExSTR : Effect public class ExSTR : Effect
{ {
@ -16,23 +16,23 @@ namespace Milimoe.FunGame.Testing.OpenEffects
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
character.ExDEF2 += ; character.ExSTR += ;
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.ExDEF2 -= ; character.ExSTR -= ;
} }
public ExSTR(Skill skill, Character? source = null, Item? item = null) : base(skill) public ExSTR(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exSTR)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exSTR))
{ {
= exSTR; = exSTR;
} }

View File

@ -0,0 +1,45 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class ExSTR2 : Effect
{
public override long Id => (long)EffectID.ExSTR2;
public override string Name => "力量加成";
public override string Description => $"增加角色 {加成比例 * 100:0.##}% [ {实际加成:0.##} ] 点力量。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
private double = 0;
public override void OnEffectGained(Character character)
{
= character.BaseSTR * ;
character.ExSTR += ;
}
public override void OnEffectLost(Character character)
{
character.ExSTR -= ;
= 0;
}
public ExSTR2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exSTR))
{
= exSTR;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class MagicalPenetration : Effect public class MagicalPenetration : Effect
{ {
@ -24,17 +24,17 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.MagicalPenetration -= ; character.MagicalPenetration -= ;
} }
public MagicalPenetration(Skill skill, Character? source = null, Item? item = null) : base(skill) public MagicalPenetration(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exmpt", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMP)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exMPT))
{ {
= exMP; = exMPT;
} }
} }
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class NormalAttackHardTimeReduce : Effect public class NormalAttackHardTimeReduce : Effect
{ {
@ -24,15 +24,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.NormalAttack.HardnessTime += ; character.NormalAttack.HardnessTime += ;
} }
public NormalAttackHardTimeReduce(Skill skill, Character? source = null, Item? item = null) : base(skill) public NormalAttackHardTimeReduce(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("nahtr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("nahtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double nahtr)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double nahtr))
{ {
= nahtr; = nahtr;
} }

View File

@ -0,0 +1,42 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class NormalAttackHardTimeReduce2 : Effect
{
public override long Id => (long)EffectID.NormalAttackHardTimeReduce2;
public override string Name => Skill.Name;
public override string Description => $"减少角色的普通攻击 {减少比例 * 100:0.##}% 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
public override void OnEffectGained(Character character)
{
character.NormalAttack.HardnessTime -= character.NormalAttack.HardnessTime * ;
}
public override void OnEffectLost(Character character)
{
character.NormalAttack.HardnessTime += character.NormalAttack.HardnessTime * ;
}
public NormalAttackHardTimeReduce2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("nahtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double nahtr))
{
= nahtr;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class PhysicalPenetration : Effect public class PhysicalPenetration : Effect
{ {
@ -24,17 +24,17 @@ namespace Milimoe.FunGame.Testing.OpenEffects
character.PhysicalPenetration -= ; character.PhysicalPenetration -= ;
} }
public PhysicalPenetration(Skill skill, Character? source = null, Item? item = null) : base(skill) public PhysicalPenetration(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("expp", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("exppt", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exPP)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exPPT))
{ {
= exPP; = exPPT;
} }
} }
} }

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.OpenEffects namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{ {
public class SkillHardTimeReduce : Effect public class SkillHardTimeReduce : Effect
{ {
@ -40,15 +40,15 @@ namespace Milimoe.FunGame.Testing.OpenEffects
} }
} }
public SkillHardTimeReduce(Skill skill, Character? source = null, Item? item = null) : base(skill) public SkillHardTimeReduce(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{ {
GamingQueue = skill.GamingQueue; GamingQueue = skill.GamingQueue;
Source = source; Source = source;
Item = item; Item = item;
if (skill.OtherArgs.Count > 0) if (Values.Count > 0)
{ {
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("shtr", StringComparison.CurrentCultureIgnoreCase)) ?? ""; string key = Values.Keys.FirstOrDefault(s => s.Equals("shtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double shtr)) if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double shtr))
{ {
= shtr; = shtr;
} }

View File

@ -0,0 +1,58 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects.OpenEffects
{
public class SkillHardTimeReduce2 : Effect
{
public override long Id => (long)EffectID.SkillHardTimeReduce2;
public override string Name => Skill.Name;
public override string Description => $"减少角色的所有主动技能 {减少比例 * 100:0.##}% 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
public override EffectType EffectType => EffectType.Item;
public override bool TargetSelf => true;
public Item? Item { get; }
private readonly double = 0;
public override void OnEffectGained(Character character)
{
foreach (Skill s in character.Skills)
{
s.HardnessTime -= s.HardnessTime * ;
}
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
{
if (s != null)
s.HardnessTime -= s.HardnessTime * ;
}
}
public override void OnEffectLost(Character character)
{
foreach (Skill s in character.Skills)
{
s.HardnessTime += s.HardnessTime * ;
}
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
{
if (s != null)
s.HardnessTime += s.HardnessTime * ;
}
}
public SkillHardTimeReduce2(Skill skill, Dictionary<string, object> args, Character? source = null, Item? item = null) : base(skill, args)
{
GamingQueue = skill.GamingQueue;
Source = source;
Item = item;
if (Values.Count > 0)
{
string key = Values.Keys.FirstOrDefault(s => s.Equals("shtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double shtr))
{
= shtr;
}
}
}
}
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects namespace Milimoe.FunGame.Testing.Effects.SkillEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
namespace Milimoe.FunGame.Testing.Effects namespace Milimoe.FunGame.Testing.Effects.SkillEffects
{ {
public class : Effect public class : Effect
{ {

View File

@ -30,4 +30,9 @@
<Folder Include="Items\Shoes\" /> <Folder Include="Items\Shoes\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\OshimaGameModule\OshimaCore\OshimaCore.csproj" />
<ProjectReference Include="..\..\OshimaGameModule\OshimaModules\OshimaModules.csproj" />
</ItemGroup>
</Project> </Project>

View File

@ -1,7 +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 Milimoe.FunGame.Testing.Skills; using Milimoe.FunGame.Testing.Skills;
using Milimoe.FunGame.Testing.ItemEffects; using Milimoe.FunGame.Testing.Effects.ItemEffects;
namespace Milimoe.FunGame.Testing.Items namespace Milimoe.FunGame.Testing.Items
{ {
@ -11,7 +11,7 @@ namespace Milimoe.FunGame.Testing.Items
public override string Name => "攻击之爪 +10"; 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 10(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory) public 10(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 10)); Skills.Passives.Add(new (character, this, 10));
} }
@ -23,7 +23,7 @@ namespace Milimoe.FunGame.Testing.Items
public override string Name => "攻击之爪 +30"; 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 30(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory) public 30(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 30)); Skills.Passives.Add(new (character, this, 30));
} }
@ -35,7 +35,7 @@ namespace Milimoe.FunGame.Testing.Items
public override string Name => "攻击之爪 +50"; public override string Name => "攻击之爪 +50";
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 50(Character? character = null) : base(ItemType.Accessory, slot: EquipSlotType.Accessory) public 50(Character? character = null) : base(ItemType.Accessory)
{ {
Skills.Passives.Add(new (character, this, 50)); Skills.Passives.Add(new (character, this, 50));
} }
@ -46,7 +46,6 @@ namespace Milimoe.FunGame.Testing.Items
public override long Id => (long)ItemPassiveID.; public override long Id => (long)ItemPassiveID.;
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 Item? Item { get; }
public (Character? character = null, Item? item = null, double exATK = 0) : base(SkillType.Passive, character) public (Character? character = null, Item? item = null, double exATK = 0) : base(SkillType.Passive, character)
{ {

View File

@ -1,6 +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 Milimoe.FunGame.Testing.ItemEffects; using Milimoe.FunGame.Testing.Effects.ItemEffects;
namespace FunGame.Testing.Items namespace FunGame.Testing.Items
{ {
@ -10,7 +10,7 @@ namespace FunGame.Testing.Items
public override string Name => "独奏弓"; public override string Name => "独奏弓";
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 (Character? character = null) : base(ItemType.Weapon, slot: EquipSlotType.Weapon) public (Character? character = null) : base(ItemType.Weapon)
{ {
WeaponType = WeaponType.Bow; WeaponType = WeaponType.Bow;
Skills.Passives.Add(new (character, this)); Skills.Passives.Add(new (character, this));

View File

@ -1,3 +1,12 @@
using Milimoe.FunGame.Testing.Tests; using Oshima.Core.Utils;
using Oshima.FunGame.OshimaModules;
_ = new SkillJSONTest(); CharacterModule cm = new();
cm.Load();
SkillModule sm = new();
sm.Load();
ItemModule im = new();
im.Load();
FunGameSimulation.InitCharacter();
FunGameSimulation.StartGame(true, true);

View File

@ -1,6 +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 Milimoe.FunGame.Testing.Effects; using Milimoe.FunGame.Testing.Effects.SkillEffects;
namespace Milimoe.FunGame.Testing.Skills namespace Milimoe.FunGame.Testing.Skills
{ {

View File

@ -1,6 +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 Milimoe.FunGame.Testing.Effects; using Milimoe.FunGame.Testing.Effects.SkillEffects;
namespace Milimoe.FunGame.Testing.Skills namespace Milimoe.FunGame.Testing.Skills
{ {

View File

@ -24,10 +24,10 @@ namespace Milimoe.FunGame.Testing.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 => $"每时间提升 5.5% 所有伤害,无上限,但受到伤害时效果清零。" + ( > 0 ? $"(当前总提升:{累计伤害 * 100:0.##}%" : ""); public override string Description => $"每时间提升 {伤害提升 * 100:0.##}% 所有伤害,无上限,但受到伤害时效果清零。" + ( > 0 ? $"(当前总提升:{累计伤害 * 100:0.##}%" : "");
public override bool TargetSelf => true; public override bool TargetSelf => true;
private readonly double = 0.055; private readonly double = 0.04;
private double = 0; private double = 0;
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult) public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)

View File

@ -27,7 +27,7 @@ namespace Milimoe.FunGame.Testing.Skills
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 16 + * 0.03; public override double Duration => 16 + * 0.03;
private double => 0.3 + 0.03 * (Level - 1); private double => 0.2 + 0.015 * (Level - 1);
private double => * Skill.Character?.BaseAGI ?? 0; private double => * Skill.Character?.BaseAGI ?? 0;
private double = 0; private double = 0;
private double = 0; private double = 0;

View File

@ -22,30 +22,34 @@ namespace Milimoe.FunGame.Testing.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 => $"30 时间内暴击率提升 {暴击率提升 * 100:0.##}%,暴击伤害提升 {暴击伤害提升 * 100:0.##}%。"; public override string Description => $"30 时间内暴击率提升 {暴击率提升 * 100:0.##}%,暴击伤害提升 {暴击伤害提升 * 100:0.##}%,物理穿透提升 {物理穿透提升 * 100:0.##}%。";
public override bool TargetSelf => true; public override bool TargetSelf => true;
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 30; public override double Duration => 30;
private double => 0.2 + 0.03 * (Level - 1); private double => 0.2 + 0.03 * (Level - 1);
private double => 0.8 + 0.04 * (Level - 1); private double => 0.8 + 0.04 * (Level - 1);
private double 穿 => 0.3;
private double = 0; private double = 0;
private double = 0; private double = 0;
private double 穿 = 0;
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
= ; = ;
= ; = ;
穿 = 穿;
character.ExCritRate += ; character.ExCritRate += ;
WriteLine($"[ {character} ] 的暴击率提升了 [ {实际暴击率提升 * 100:0.##}% ] ");
character.ExCritDMG += ; character.ExCritDMG += ;
WriteLine($"[ {character} ] 的暴击伤害提升了 [ {实际暴击伤害提升 * 100:0.##}% ] "); character.PhysicalPenetration += 穿;
WriteLine($"[ {character} ] 的暴击率提升了 [ {实际暴击率提升 * 100:0.##}% ],暴击伤害提升了 [ {实际暴击伤害提升 * 100:0.##}% ],物理穿透提升了 [ {实际物理穿透提升 * 100:0.##}% ] ");
} }
public override void OnEffectLost(Character character) public override void OnEffectLost(Character character)
{ {
character.ExCritRate -= ; character.ExCritRate -= ;
character.ExCritDMG -= ; character.ExCritDMG -= ;
character.PhysicalPenetration -= 穿;
} }
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
@ -55,6 +59,7 @@ namespace Milimoe.FunGame.Testing.Skills
{ {
= 0; = 0;
= 0; = 0;
穿 = 0;
caster.Effects.Add(this); caster.Effects.Add(this);
OnEffectGained(caster); OnEffectGained(caster);
} }

View File

@ -1,4 +1,5 @@
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 Milimoe.FunGame.Testing.Skills namespace Milimoe.FunGame.Testing.Skills
@ -24,12 +25,60 @@ namespace Milimoe.FunGame.Testing.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 => $"当生命值低于 30% 时,智力转化为力量;当生命值高于或等于 30% 时,力量转化为智力。" + public override string Description => $"当生命值低于 30% 时,智力转化为力量;当生命值高于或等于 30% 时,力量转化为智力。力量模式下,造成伤害必定暴击;智力模式下,获得 30% 闪避率和 25% 魔法抗性。" +
(Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : ""); (Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + "" : "");
public override bool TargetSelf => true; public override bool TargetSelf => true;
private double = 0; private double = 0;
private double = 0; private double = 0;
private double = 0.3;
private double = 0.25;
private bool = false;
public override void OnEffectGained(Character character)
{
ResetEffect(character, true);
}
public override void OnEffectLost(Character character)
{
if (character.PrimaryAttribute == PrimaryAttribute.INT)
{
ResetEffect(character, false);
}
}
private void ResetEffect(Character character, bool isAdd)
{
if (isAdd)
{
= true;
character.ExEvadeRate += ;
character.MDF.None += ;
character.MDF.Particle += ;
character.MDF.Fleabane += ;
character.MDF.Element += ;
character.MDF.Shadow += ;
character.MDF.Bright += ;
character.MDF.PurityContemporary += ;
character.MDF.PurityNatural += ;
character.MDF.Starmark += ;
}
else
{
= false;
character.ExEvadeRate -= ;
character.MDF.None -= ;
character.MDF.Particle -= ;
character.MDF.Fleabane -= ;
character.MDF.Element -= ;
character.MDF.Shadow -= ;
character.MDF.Bright -= ;
character.MDF.PurityContemporary -= ;
character.MDF.PurityNatural -= ;
character.MDF.Starmark -= ;
}
}
public override void OnAttributeChanged(Character character) public override void OnAttributeChanged(Character character)
{ {
@ -48,6 +97,12 @@ namespace Milimoe.FunGame.Testing.Skills
} }
} }
public override bool BeforeCriticalCheck(Character character, ref double throwingBonus)
{
throwingBonus += 100;
return false;
}
public override void OnTimeElapsed(Character character, double elapsed) public override void OnTimeElapsed(Character character, double elapsed)
{ {
if (Skill.Character != null) if (Skill.Character != null)
@ -67,6 +122,10 @@ namespace Milimoe.FunGame.Testing.Skills
c.ExINT = -c.BaseINT; c.ExINT = -c.BaseINT;
c.ExSTR = + c.BaseINT + ; c.ExSTR = + c.BaseINT + ;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if ()
{
ResetEffect(character, false);
}
} }
} }
else else
@ -83,6 +142,10 @@ namespace Milimoe.FunGame.Testing.Skills
c.ExINT = + c.BaseSTR + ; c.ExINT = + c.BaseSTR + ;
c.ExSTR = -c.BaseSTR; c.ExSTR = -c.BaseSTR;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP); c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if (!)
{
ResetEffect(character, true);
}
} }
} }
} }

View File

@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Skills
public override string Name => Skill.Name; public override string Name => Skill.Name;
public override string Description => $"META马专属被动力量+5力量成长+0.5在受到伤害时获得的能量提升50%,每回合开始还能获得额外的 [ {EP:0.##} ] 能量值。"; public override string Description => $"META马专属被动力量+5力量成长+0.5在受到伤害时获得的能量提升50%,每回合开始还能获得额外的 [ {EP:0.##} ] 能量值。";
public override bool TargetSelf => true; public override bool TargetSelf => true;
public static double EP => 10; public static double EP => 7;
public override void AlterEPAfterGetDamage(Character character, ref double baseEP) public override void AlterEPAfterGetDamage(Character character, ref double baseEP)
{ {

View File

@ -22,12 +22,12 @@ namespace Milimoe.FunGame.Testing.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 => $"获得 150% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} 时间。"; public override string Description => $"获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} 时间。";
public override bool TargetSelf => true; public override bool TargetSelf => true;
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 10 + 1 * (Level - 1); public override double Duration => 10 + 1 * (Level - 1);
private double => Skill.Character?.STR * 1.5 ?? 0; private double => Skill.Character?.STR * 1.35 ?? 0;
private double => Skill.Character?.HP * 0.09 ?? 0; private double => Skill.Character?.HP * 0.09 ?? 0;
private double = 0; private double = 0;

View File

@ -22,22 +22,35 @@ namespace Milimoe.FunGame.Testing.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:0.##} 时间内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [ {智力加成:0.##} ] 强化普通攻击伤害。"; public override string Description => $"{Duration:0.##} 时间内,提升自身 35% 物理伤害减免和魔法抗性,普通攻击转为魔法伤害,且硬直时间减少 30%,并基于 {智力系数 * 100:0.##}% 智力 [ {智力加成:0.##} ] 强化普通攻击伤害。";
public override bool TargetSelf => true; public override bool TargetSelf => true;
public override bool Durative => true; public override bool Durative => true;
public override double Duration => 40; public override double Duration => 40;
private double => 1.4 + 0.4 * (Level - 1); private double => 1.4 + 0.4 * (Level - 1);
private double => * Skill.Character?.INT ?? 0; private double => * Skill.Character?.INT ?? 0;
private double => 0.35;
private double => 0.35;
private double = 0;
private double = 0;
public override void OnEffectGained(Character character) public override void OnEffectGained(Character character)
{ {
character.NormalAttack.SetMagicType(true, character.MagicType); character.NormalAttack.SetMagicType(true, character.MagicType);
= ;
= ;
character.ExPDR += ;
character.MDF.SetAllValue(, false);
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.SetMagicType(false, character.MagicType);
= 0;
= 0;
character.ExPDR -= ;
character.MDF.SetAllValue(-, false);
} }
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType) public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
@ -50,7 +63,7 @@ namespace Milimoe.FunGame.Testing.Skills
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected) public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
{ {
baseHardnessTime *= 0.5; baseHardnessTime *= 0.3;
} }
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)

View File

@ -11,6 +11,7 @@ namespace Milimoe.FunGame.Testing.Skills
public override double EPCost => 100; public override double EPCost => 100;
public override double CD => 55 - 3 * (Level - 1); public override double CD => 55 - 3 * (Level - 1);
public override double HardnessTime { get; set; } = 25; public override double HardnessTime { get; set; } = 25;
public override string Slogan => "灭!!!!";
public (Character? character = null) : base(SkillType.SuperSkill, character) public (Character? character = null) : base(SkillType.SuperSkill, character)
{ {
@ -27,9 +28,9 @@ namespace Milimoe.FunGame.Testing.Skills
public override bool TargetSelf => false; public override bool TargetSelf => false;
public override double TargetRange => 999; public override double TargetRange => 999;
private double => 0.55 * Level; private double => 0.25 * Level;
private double => * Skill.Character?.INT ?? 0; private double => * Skill.Character?.INT ?? 0;
private double => 0.75 * Level; private double => 1.05 * Level;
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others) public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
{ {

View File

@ -3,6 +3,32 @@
public enum MagicID : long public enum MagicID : long
{ {
= 1001, = 1001,
= 1002,
= 1003,
= 1004,
= 1005,
= 1006,
= 1007,
= 1008,
= 1009,
= 1010,
= 1011,
= 1012,
= 1013,
= 1014,
= 1015,
= 1016,
= 1017,
= 1018,
= 1019,
= 1020,
= 1021,
= 1022,
= 1023,
= 1024,
= 1025
} }
public enum SkillID : long public enum SkillID : long

View File

@ -1,6 +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 Milimoe.FunGame.Testing.Effects; using Milimoe.FunGame.Testing.Effects.SkillEffects;
namespace Milimoe.FunGame.Testing.Skills namespace Milimoe.FunGame.Testing.Skills
{ {

View File

@ -1,9 +1,9 @@
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.Common.Addon; using Milimoe.FunGame.Core.Library.Common.Addon;
using Milimoe.FunGame.Testing.OpenEffects;
using Milimoe.FunGame.Testing.Items; using Milimoe.FunGame.Testing.Items;
using Milimoe.FunGame.Testing.Skills; using Milimoe.FunGame.Testing.Skills;
using Milimoe.FunGame.Testing.Effects.OpenEffects;
namespace Addons namespace Addons
{ {
@ -87,14 +87,14 @@ namespace Addons
(long)PassiveID. => new (), (long)PassiveID. => new (),
(long)PassiveID. => new (), (long)PassiveID. => new (),
(long)ItemPassiveID. => new (), (long)ItemPassiveID. => new (),
_ => new OpenSkill(id, name) _ => new OpenSkill(id, name, args)
}; };
if (skill is OpenSkill && args.TryGetValue("others", out object? value) && value is Dictionary<string, object> dict) if (skill is OpenSkill && args.TryGetValue("values", out object? value) && value is Dictionary<string, object> dict)
{ {
foreach (string key in dict.Keys) foreach (string key in dict.Keys)
{ {
skill.OtherArgs[key] = dict[key]; skill.Values[key] = dict[key];
} }
} }
@ -106,32 +106,32 @@ namespace Addons
{ {
return (id, name, args) => return (id, name, args) =>
{ {
if (args.TryGetValue("skill", out object? value) && value is Skill skill) if (args.TryGetValue("skill", out object? value) && value is Skill skill && args.TryGetValue("values", out value) && value is Dictionary<string, object> dict)
{ {
return (EffectID)id switch return (EffectID)id switch
{ {
EffectID.ExATK => new ExATK(skill), EffectID.ExATK => new ExATK(skill, dict),
EffectID.ExDEF => new ExDEF(skill), EffectID.ExDEF => new ExDEF(skill, dict),
EffectID.ExSTR => new ExSTR(skill), EffectID.ExSTR => new ExSTR(skill, dict),
EffectID.ExAGI => new ExAGI(skill), EffectID.ExAGI => new ExAGI(skill, dict),
EffectID.ExINT => new ExINT(skill), EffectID.ExINT => new ExINT(skill, dict),
EffectID.SkillHardTimeReduce => new SkillHardTimeReduce(skill), EffectID.SkillHardTimeReduce => new SkillHardTimeReduce(skill, dict),
EffectID.NormalAttackHardTimeReduce => new NormalAttackHardTimeReduce(skill), EffectID.NormalAttackHardTimeReduce => new NormalAttackHardTimeReduce(skill, dict),
EffectID.AccelerationCoefficient => new AccelerationCoefficient(skill), EffectID.AccelerationCoefficient => new AccelerationCoefficient(skill, dict),
EffectID.ExSPD => new ExSPD(skill), EffectID.ExSPD => new ExSPD(skill, dict),
EffectID.ExActionCoefficient => new ExActionCoefficient(skill), EffectID.ExActionCoefficient => new ExActionCoefficient(skill, dict),
EffectID.ExCDR => new ExCDR(skill), EffectID.ExCDR => new ExCDR(skill, dict),
EffectID.ExMaxHP => new ExMaxHP(skill), EffectID.ExMaxHP => new ExMaxHP(skill, dict),
EffectID.ExMaxMP => new ExMaxMP(skill), EffectID.ExMaxMP => new ExMaxMP(skill, dict),
EffectID.ExCritRate => new ExCritRate(skill), EffectID.ExCritRate => new ExCritRate(skill, dict),
EffectID.ExCritDMG => new ExCritDMG(skill), EffectID.ExCritDMG => new ExCritDMG(skill, dict),
EffectID.ExEvadeRate => new ExEvadeRate(skill), EffectID.ExEvadeRate => new ExEvadeRate(skill, dict),
EffectID.PhysicalPenetration => new PhysicalPenetration(skill), EffectID.PhysicalPenetration => new PhysicalPenetration(skill, dict),
EffectID.MagicalPenetration => new MagicalPenetration(skill), EffectID.MagicalPenetration => new MagicalPenetration(skill, dict),
EffectID.ExPDR => new ExPDR(skill), EffectID.ExPDR => new ExPDR(skill, dict),
EffectID.ExMDF => new ExMDF(skill), EffectID.ExMDF => new ExMDF(skill, dict),
EffectID.ExHR => new ExHR(skill), EffectID.ExHR => new ExHR(skill, dict),
EffectID.ExMR => new ExMR(skill), EffectID.ExMR => new ExMR(skill, dict),
_ => null _ => null
}; };
} }

View File

@ -295,7 +295,7 @@ namespace Milimoe.FunGame.Testing.Tests
if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo())); if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo()));
// 创建顺序表并排序 // 创建顺序表并排序
ActionQueue actionQueue = new(characters, WriteLine); ActionQueue actionQueue = new(characters, false, WriteLine);
if (PrintOut) Console.WriteLine(); if (PrintOut) Console.WriteLine();
// 显示初始顺序表 // 显示初始顺序表