128 lines
7.2 KiB
C#

using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.FunGame.OshimaModules.Effects.ItemEffects;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
using Oshima.FunGame.OshimaModules.Items;
using Oshima.FunGame.OshimaModules.Skills;
namespace Oshima.FunGame.OshimaModules
{
public class SkillModule : Milimoe.FunGame.Core.Library.Common.Addon.SkillModule
{
public override string Name => OshimaGameModuleConstant.Skill;
public override string Description => OshimaGameModuleConstant.Description;
public override string Version => OshimaGameModuleConstant.Version;
public override string Author => OshimaGameModuleConstant.Author;
public override Dictionary<string, Skill> Skills
{
get
{
return Factory.GetGameModuleInstances<Skill>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Skill);
}
}
protected override Factory.EntityFactoryDelegate<Skill> SkillFactory()
{
return (id, name, args) =>
{
return id switch
{
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)MagicID. => new (),
(long)SkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)SuperSkillID. => new (),
(long)PassiveID.META马 => new META马(),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)PassiveID. => new (),
(long)ItemPassiveID. => new (),
_ => null
};
};
}
protected override Factory.EntityFactoryDelegate<Effect> EffectFactory()
{
return (id, name, args) =>
{
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
{
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),
EffectID.ExATK2 => new ExATK2(skill, dict),
EffectID.ExDEF2 => new ExDEF2(skill, dict),
EffectID.ExSTR2 => new ExSTR2(skill, dict),
EffectID.ExAGI2 => new ExAGI2(skill, dict),
EffectID.ExINT2 => new ExINT2(skill, dict),
EffectID.SkillHardTimeReduce2 => new SkillHardTimeReduce2(skill, dict),
EffectID.NormalAttackHardTimeReduce2 => new NormalAttackHardTimeReduce2(skill, dict),
EffectID.ExMaxHP2 => new ExMaxHP2(skill, dict),
EffectID.ExMaxMP2 => new ExMaxMP2(skill, dict),
EffectID.RecoverHP => new RecoverHP(skill, dict),
EffectID.RecoverMP => new RecoverMP(skill, dict),
EffectID.RecoverHP2 => new RecoverHP2(skill, dict),
EffectID.RecoverMP2 => new RecoverMP2(skill, dict),
EffectID.GetEP => new GetEP(skill, dict),
_ => null
};
}
return null;
};
}
}
}