一些技能的变化

This commit is contained in:
milimoe 2024-10-28 01:17:37 +08:00
parent 129ccccf67
commit d794655862
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E
42 changed files with 266 additions and 166 deletions

View File

@ -18,6 +18,10 @@ namespace Oshima.Core.WebAPI
public override void ProcessInput(string input)
{
if (input.StartsWith("fungametest"))
{
FunGameSimulation.StartGame(true, true);
}
// OSM指令
if (input.Length >= 4 && input[..4].Equals(".osm", StringComparison.CurrentCultureIgnoreCase))
{

View File

@ -1,4 +1,4 @@
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public enum EffectID : long
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class AccelerationCoefficient : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exacc", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exACC))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exacc", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exACC))
{
= exACC;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExAGI : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exagi", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exAGI))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExATK : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exATK))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExActionCoefficient : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exac", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exAC))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exac", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exAC))
{
= exAC;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExCDR : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCDR))
string key = Values.Keys.FirstOrDefault(s => s.Equals("excdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCDR))
{
= exCDR;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExCritDMG : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excrd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCRD))
string key = Values.Keys.FirstOrDefault(s => s.Equals("excrd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCRD))
{
= exCRD;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExCritRate : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("excr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exCR))
string key = Values.Keys.FirstOrDefault(s => s.Equals("excr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exCR))
{
= exCR;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExDEF : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exDEF))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExEvadeRate : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exer", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exER))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exer", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exER))
{
= exER;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExHR : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exhr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exHR))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exhr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exHR))
{
= exHR;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExINT : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exint", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exINT))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExMDF : Effect
{
@ -46,6 +46,14 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
case MagicType.None:
default:
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 += ;
break;
}
}
@ -81,19 +89,27 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
case MagicType.None:
default:
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 -= ;
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("mdfType", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && int.TryParse(skill.OtherArgs[key].ToString(), out int mdfType))
string key = Values.Keys.FirstOrDefault(s => s.Equals("mdfType", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && int.TryParse(Values[key].ToString(), out int mdfType))
{
if (Enum.IsDefined(typeof(MagicType), mdfType))
{
@ -104,8 +120,8 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
= MagicType.None;
}
}
key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double mdfValue))
key = Values.Keys.FirstOrDefault(s => s.Equals("mdfvalue", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double mdfValue))
{
= mdfValue;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExMR : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMR))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exmr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exMR))
{
= exMR;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExMaxHP : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exhp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exHP))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExMaxMP : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMP))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExPDR : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("expdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exPDR))
string key = Values.Keys.FirstOrDefault(s => s.Equals("expdr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exPDR))
{
= exPDR;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExSPD : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exspd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exSPD))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exspd", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(Values[key].ToString(), out double exSPD))
{
= exSPD;
}

View File

@ -1,7 +1,7 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class ExSTR : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
character.ExDEF2 -= ;
}
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exSTR))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class MagicalPenetration : Effect
{
@ -24,17 +24,17 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("exmp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exMP))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exmpt", StringComparison.CurrentCultureIgnoreCase)) ?? "";
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class NormalAttackHardTimeReduce : Effect
{
@ -24,15 +24,15 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("nahtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double nahtr))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class PhysicalPenetration : Effect
{
@ -24,17 +24,17 @@ namespace Oshima.FunGame.OshimaModules.OpenEffects
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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("expp", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double exPP))
string key = Values.Keys.FirstOrDefault(s => s.Equals("exppt", StringComparison.CurrentCultureIgnoreCase)) ?? "";
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.OpenEffects
namespace Oshima.FunGame.OshimaModules.Effects.OpenEffects
{
public class SkillHardTimeReduce : Effect
{
@ -40,15 +40,15 @@ namespace Oshima.FunGame.OshimaModules.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;
Source = source;
Item = item;
if (skill.OtherArgs.Count > 0)
if (Values.Count > 0)
{
string key = skill.OtherArgs.Keys.FirstOrDefault(s => s.Equals("shtr", StringComparison.CurrentCultureIgnoreCase)) ?? "";
if (key.Length > 0 && double.TryParse(skill.OtherArgs[key].ToString(), out double shtr))
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.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Effects
namespace Oshima.FunGame.OshimaModules.Effects.SkillEffects
{
public class : Effect
{

View File

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

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.ItemEffects;
using Oshima.FunGame.OshimaModules.Effects.ItemEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules.Items

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.ItemEffects;
using Oshima.FunGame.OshimaModules.Effects.ItemEffects;
namespace Oshima.FunGame.OshimaModules.Items
{

View File

@ -1,7 +1,8 @@
using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Effects;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Items;
using Oshima.FunGame.OshimaModules.OpenEffects;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules
@ -54,14 +55,14 @@ namespace Oshima.FunGame.OshimaModules
(long)PassiveID. => new (),
(long)PassiveID. => 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)
{
skill.OtherArgs[key] = dict[key];
skill.Values[key] = dict[key];
}
}
@ -73,32 +74,32 @@ namespace Oshima.FunGame.OshimaModules
{
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)
{
Effect? effect = (EffectID)id switch
return (EffectID)id switch
{
EffectID.ExATK => new ExATK(skill),
EffectID.ExDEF => new ExDEF(skill),
EffectID.ExSTR => new ExSTR(skill),
EffectID.ExAGI => new ExAGI(skill),
EffectID.ExINT => new ExINT(skill),
EffectID.SkillHardTimeReduce => new SkillHardTimeReduce(skill),
EffectID.NormalAttackHardTimeReduce => new NormalAttackHardTimeReduce(skill),
EffectID.AccelerationCoefficient => new AccelerationCoefficient(skill),
EffectID.ExSPD => new ExSPD(skill),
EffectID.ExActionCoefficient => new ExActionCoefficient(skill),
EffectID.ExCDR => new ExCDR(skill),
EffectID.ExMaxHP => new ExMaxHP(skill),
EffectID.ExMaxMP => new ExMaxMP(skill),
EffectID.ExCritRate => new ExCritRate(skill),
EffectID.ExCritDMG => new ExCritDMG(skill),
EffectID.ExEvadeRate => new ExEvadeRate(skill),
EffectID.PhysicalPenetration => new PhysicalPenetration(skill),
EffectID.MagicalPenetration => new MagicalPenetration(skill),
EffectID.ExPDR => new ExPDR(skill),
EffectID.ExMDF => new ExMDF(skill),
EffectID.ExHR => new ExHR(skill),
EffectID.ExMR => new ExMR(skill),
EffectID.ExATK => new ExATK(skill, dict),
EffectID.ExDEF => new ExDEF(skill, dict),
EffectID.ExSTR => new ExSTR(skill, dict),
EffectID.ExAGI => new ExAGI(skill, dict),
EffectID.ExINT => new ExINT(skill, dict),
EffectID.SkillHardTimeReduce => new SkillHardTimeReduce(skill, dict),
EffectID.NormalAttackHardTimeReduce => new NormalAttackHardTimeReduce(skill, dict),
EffectID.AccelerationCoefficient => new AccelerationCoefficient(skill, dict),
EffectID.ExSPD => new ExSPD(skill, dict),
EffectID.ExActionCoefficient => new ExActionCoefficient(skill, dict),
EffectID.ExCDR => new ExCDR(skill, dict),
EffectID.ExMaxHP => new ExMaxHP(skill, dict),
EffectID.ExMaxMP => new ExMaxMP(skill, dict),
EffectID.ExCritRate => new ExCritRate(skill, dict),
EffectID.ExCritDMG => new ExCritDMG(skill, dict),
EffectID.ExEvadeRate => new ExEvadeRate(skill, dict),
EffectID.PhysicalPenetration => new PhysicalPenetration(skill, dict),
EffectID.MagicalPenetration => new MagicalPenetration(skill, dict),
EffectID.ExPDR => new ExPDR(skill, dict),
EffectID.ExMDF => new ExMDF(skill, dict),
EffectID.ExHR => new ExHR(skill, dict),
EffectID.ExMR => new ExMR(skill, dict),
_ => null
};
}

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{

View File

@ -24,10 +24,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
public override long Id => Skill.Id;
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;
private readonly double = 0.055;
private readonly double = 0.04;
private double = 0;
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)

View File

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

View File

@ -1,4 +1,5 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant;
namespace Oshima.FunGame.OshimaModules.Skills
@ -24,12 +25,57 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
public override long Id => Skill.Id;
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) + "" : "");
public override bool TargetSelf => true;
private double = 0;
private double = 0;
private double = 0.3;
private double = 0.25;
private bool = false;
public override void OnEffectGained(Character character)
{
= true;
ResetEffect(character, true);
}
public override void OnEffectLost(Character character)
{
= false;
ResetEffect(character, false);
}
private void ResetEffect(Character character, bool isAdd)
{
if (isAdd)
{
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
{
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)
{
@ -48,6 +94,12 @@ namespace Oshima.FunGame.OshimaModules.Skills
}
}
public override bool BeforeCriticalCheck(Character character, ref double throwingBonus)
{
throwingBonus += 100;
return false;
}
public override void OnTimeElapsed(Character character, double elapsed)
{
if (Skill.Character != null)
@ -67,6 +119,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
c.ExINT = -c.BaseINT;
c.ExSTR = + c.BaseINT + ;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if (!)
{
ResetEffect(character, true);
}
}
}
else
@ -83,6 +139,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
c.ExINT = + c.BaseSTR + ;
c.ExSTR = -c.BaseSTR;
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
if ()
{
ResetEffect(character, false);
}
}
}
}

View File

@ -22,22 +22,35 @@ namespace Oshima.FunGame.OshimaModules.Skills
{
public override long Id => Skill.Id;
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 Durative => true;
public override double Duration => 40;
private double => 1.4 + 0.4 * (Level - 1);
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)
{
character.NormalAttack.SetMagicType(true, character.MagicType);
= ;
= ;
character.PhysicalPenetration += ;
character.MagicalPenetration += ;
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
}
public override void OnEffectLost(Character character)
{
character.NormalAttack.SetMagicType(false, character.MagicType);
= 0;
= 0;
character.PhysicalPenetration -= ;
character.MagicalPenetration -= ;
}
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
@ -50,7 +63,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
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)

View File

@ -11,6 +11,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override double EPCost => 100;
public override double CD => 55 - 3 * (Level - 1);
public override double HardnessTime { get; set; } = 25;
public override string Slogan => "灭!!!!";
public (Character? character = null) : base(SkillType.SuperSkill, character)
{
@ -27,9 +28,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
public override bool TargetSelf => false;
public override double TargetRange => 999;
private double => 0.55 * Level;
private double => 0.25 * Level;
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)
{

View File

@ -1,6 +1,6 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects;
using Oshima.FunGame.OshimaModules.Effects.SkillEffects;
namespace Oshima.FunGame.OshimaModules.Skills
{