mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-23 12:29:35 +08:00
添加 OpenEffects
This commit is contained in:
parent
48e40f864d
commit
b2368e54a4
@ -4,6 +4,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Milimoe.FunGame.Core.Api.Transmittal;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Library.Exception;
|
||||
using Milimoe.FunGame.Core.Library.SQLScript.Common;
|
||||
using Oshima.Core.Constant;
|
||||
|
||||
namespace Oshima.Core.Controllers
|
||||
@ -30,7 +31,7 @@ namespace Oshima.Core.Controllers
|
||||
SQLHelper? sql = Statics.RunningPlugin.SQLHelper;
|
||||
if (sql != null)
|
||||
{
|
||||
sql.ExecuteDataSet("Select Max(LoginTime) LastTime From ServerLoginLogs");
|
||||
sql.ExecuteDataSet(ServerLoginLogs.Select_GetLastLoginTime());
|
||||
if (sql.Success && DateTime.TryParse(sql.DataSet.Tables[0].Rows[0]["LastTime"].ToString(), out DateTime date))
|
||||
{
|
||||
string month = date.ToString("MMM", CultureInfo.InvariantCulture);
|
||||
|
154
OshimaModules/Modules/EntityFactory.cs
Normal file
154
OshimaModules/Modules/EntityFactory.cs
Normal file
@ -0,0 +1,154 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
using Oshima.FunGame.OshimaModules.OpenEffects;
|
||||
using Oshima.FunGame.OshimaModules.Skills;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
public class EntityFactory
|
||||
{
|
||||
public static Skill? GetSkill(long id, SkillType type)
|
||||
{
|
||||
if (type == SkillType.Magic)
|
||||
{
|
||||
switch ((MagicID)id)
|
||||
{
|
||||
case MagicID.冰霜攻击:
|
||||
return new 冰霜攻击();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Skill)
|
||||
{
|
||||
switch ((SkillID)id)
|
||||
{
|
||||
case SkillID.疾风步:
|
||||
return new 疾风步();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.SuperSkill)
|
||||
{
|
||||
switch ((SuperSkillID)id)
|
||||
{
|
||||
case SuperSkillID.力量爆发:
|
||||
return new 力量爆发();
|
||||
case SuperSkillID.天赐之力:
|
||||
return new 天赐之力();
|
||||
case SuperSkillID.魔法涌流:
|
||||
return new 魔法涌流();
|
||||
case SuperSkillID.三重叠加:
|
||||
return new 三重叠加();
|
||||
case SuperSkillID.变幻之心:
|
||||
return new 变幻之心();
|
||||
case SuperSkillID.精准打击:
|
||||
return new 精准打击();
|
||||
case SuperSkillID.绝对领域:
|
||||
return new 绝对领域();
|
||||
case SuperSkillID.能量毁灭:
|
||||
return new 能量毁灭();
|
||||
case SuperSkillID.迅捷之势:
|
||||
return new 迅捷之势();
|
||||
case SuperSkillID.嗜血本能:
|
||||
return new 嗜血本能();
|
||||
case SuperSkillID.平衡强化:
|
||||
return new 平衡强化();
|
||||
case SuperSkillID.血之狂欢:
|
||||
return new 血之狂欢();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Passive)
|
||||
{
|
||||
switch ((PassiveID)id)
|
||||
{
|
||||
case PassiveID.META马:
|
||||
return new META马();
|
||||
case PassiveID.心灵之火:
|
||||
return new 心灵之火();
|
||||
case PassiveID.魔法震荡:
|
||||
return new 魔法震荡();
|
||||
case PassiveID.灵能反射:
|
||||
return new 灵能反射();
|
||||
case PassiveID.智慧与力量:
|
||||
return new 智慧与力量();
|
||||
case PassiveID.致命打击:
|
||||
return new 致命打击();
|
||||
case PassiveID.毁灭之势:
|
||||
return new 毁灭之势();
|
||||
case PassiveID.枯竭打击:
|
||||
return new 枯竭打击();
|
||||
case PassiveID.玻璃大炮:
|
||||
return new 玻璃大炮();
|
||||
case PassiveID.累积之压:
|
||||
return new 累积之压();
|
||||
case PassiveID.敏捷之刃:
|
||||
return new 敏捷之刃();
|
||||
case PassiveID.弱者猎手:
|
||||
return new 弱者猎手();
|
||||
}
|
||||
switch ((ItemPassiveID)id)
|
||||
{
|
||||
case ItemPassiveID.攻击之爪:
|
||||
return new 攻击之爪技能();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Item? GetItem(long id, ItemType type)
|
||||
{
|
||||
if (type == ItemType.MagicCardPack)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (type == ItemType.Accessory)
|
||||
{
|
||||
switch ((AccessoryID)id)
|
||||
{
|
||||
case AccessoryID.攻击之爪10:
|
||||
return new 攻击之爪10();
|
||||
case AccessoryID.攻击之爪30:
|
||||
return new 攻击之爪30();
|
||||
case AccessoryID.攻击之爪50:
|
||||
return new 攻击之爪50();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Effect? GetEffect(long id, Skill skill, Character? source = null, Item? item = null)
|
||||
{
|
||||
return (EffectID)id switch
|
||||
{
|
||||
EffectID.ExATK => new ExATK(skill, source, item),
|
||||
EffectID.ExDEF => new ExDEF(skill, source, item),
|
||||
EffectID.ExSTR => new ExSTR(skill, source, item),
|
||||
EffectID.ExAGI => new ExAGI(skill, source, item),
|
||||
EffectID.ExINT => new ExINT(skill, source, item),
|
||||
EffectID.SkillHardTimeReduce => new SkillHardTimeReduce(skill, source, item),
|
||||
EffectID.NormalAttackHardTimeReduce => new NormalAttackHardTimeReduce(skill, source, item),
|
||||
EffectID.AccelerationCoefficient => new AccelerationCoefficient(skill, source, item),
|
||||
EffectID.ExSPD => new ExSPD(skill, source, item),
|
||||
EffectID.ExActionCoefficient => new ExActionCoefficient(skill, source, item),
|
||||
EffectID.ExCDR => new ExCDR(skill, source, item),
|
||||
EffectID.ExMaxHP => new ExMaxHP(skill, source, item),
|
||||
EffectID.ExMaxMP => new ExMaxMP(skill, source, item),
|
||||
EffectID.ExCritRate => new ExCritRate(skill, source, item),
|
||||
EffectID.ExCritDMG => new ExCritDMG(skill, source, item),
|
||||
EffectID.ExEvadeRate => new ExEvadeRate(skill, source, item),
|
||||
EffectID.PhysicalPenetration => new PhysicalPenetration(skill, source, item),
|
||||
EffectID.MagicalPenetration => new MagicalPenetration(skill, source, item),
|
||||
EffectID.ExPDR => new ExPDR(skill, source, item),
|
||||
EffectID.ExMDF => new ExMDF(skill, source, item),
|
||||
EffectID.ExHR => new ExHR(skill, source, item),
|
||||
EffectID.ExMR => new ExMR(skill, source, item),
|
||||
_ => null
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
@ -27,32 +26,88 @@ namespace Oshima.FunGame.OshimaModules
|
||||
prev.SetPropertyToItemModuleNew(next);
|
||||
config[key] = next;
|
||||
}
|
||||
Item item = config[key];
|
||||
HashSet<Skill> skills = item.Skills.Passives;
|
||||
if (item.Skills.Active != null) skills.Add(item.Skills.Active);
|
||||
List<Skill> skilllist = [.. skills];
|
||||
foreach (Skill skill in skilllist)
|
||||
{
|
||||
Skill? newSkill = EntityFactory.GetSkill(skill.Id, skill.SkillType);
|
||||
if (newSkill != null)
|
||||
{
|
||||
if (newSkill.IsActive)
|
||||
{
|
||||
item.Skills.Active = newSkill;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Skills.Passives.Remove(skill);
|
||||
item.Skills.Passives.Add(newSkill);
|
||||
}
|
||||
}
|
||||
Skill s = newSkill ?? skill;
|
||||
List<Effect> effects = [.. s.Effects];
|
||||
foreach (Effect effect in effects)
|
||||
{
|
||||
skill.Effects.Remove(effect);
|
||||
Effect? newEffect = EntityFactory.GetEffect(effect.Id, skill);
|
||||
if (newEffect != null)
|
||||
{
|
||||
skill.Effects.Add(newEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return [.. config.Values];
|
||||
}
|
||||
}
|
||||
|
||||
public override Item? GetItem(long id, string name, ItemType type)
|
||||
protected override void AfterLoad()
|
||||
{
|
||||
if (type == ItemType.MagicCardPack)
|
||||
Factory.OpenFactory.RegisterFactory(args =>
|
||||
{
|
||||
|
||||
if (args.TryGetValue("id", out object? value) && value is long id && args.TryGetValue("itemtype", out value) && value is int type)
|
||||
{
|
||||
Item? item = EntityFactory.GetItem(id, (ItemType)type);
|
||||
if (item != null)
|
||||
{
|
||||
HashSet<Skill> skills = item.Skills.Passives;
|
||||
if (item.Skills.Active != null) skills.Add(item.Skills.Active);
|
||||
List<Skill> skilllist = [.. skills];
|
||||
foreach (Skill skill in skilllist)
|
||||
{
|
||||
item.Skills.Passives.Remove(skill);
|
||||
Skill newSkill = EntityFactory.GetSkill(skill.Id, skill.SkillType) ?? new OpenSkill(skill.Id, skill.Name);
|
||||
if (newSkill != null)
|
||||
{
|
||||
if (newSkill.IsActive)
|
||||
{
|
||||
item.Skills.Active = newSkill;
|
||||
}
|
||||
|
||||
if (type == ItemType.Accessory)
|
||||
else
|
||||
{
|
||||
switch ((AccessoryID)id)
|
||||
{
|
||||
case AccessoryID.攻击之爪10:
|
||||
return new 攻击之爪10();
|
||||
case AccessoryID.攻击之爪30:
|
||||
return new 攻击之爪30();
|
||||
case AccessoryID.攻击之爪50:
|
||||
return new 攻击之爪50();
|
||||
item.Skills.Passives.Add(newSkill);
|
||||
}
|
||||
}
|
||||
Skill s = newSkill ?? skill;
|
||||
List<Effect> effects = [.. s.Effects];
|
||||
foreach (Effect effect in effects)
|
||||
{
|
||||
skill.Effects.Remove(effect);
|
||||
Effect? newEffect = EntityFactory.GetEffect(effect.Id, skill);
|
||||
if (newEffect != null)
|
||||
{
|
||||
skill.Effects.Add(newEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override Item? GetItem(long id, string name, ItemType type) => EntityFactory.GetItem(id, type);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Items;
|
||||
using Oshima.FunGame.OshimaModules.Skills;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules
|
||||
{
|
||||
@ -22,104 +20,27 @@ namespace Oshima.FunGame.OshimaModules
|
||||
foreach (string key in config.Keys)
|
||||
{
|
||||
Skill prev = config[key];
|
||||
Skill? next = GetSkill(prev.Id, prev.Name, prev.SkillType);
|
||||
Skill? next = EntityFactory.GetSkill(prev.Id, prev.SkillType);
|
||||
if (next != null)
|
||||
{
|
||||
config[key] = next;
|
||||
}
|
||||
Skill skill = config[key];
|
||||
List<Effect> effects = [.. skill.Effects];
|
||||
foreach (Effect effect in effects)
|
||||
{
|
||||
Effect? newEffect = EntityFactory.GetEffect(effect.Id, skill);
|
||||
if (newEffect != null)
|
||||
{
|
||||
skill.Effects.Remove(effect);
|
||||
skill.Effects.Add(newEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
return [.. config.Values];
|
||||
}
|
||||
}
|
||||
|
||||
public override Skill? GetSkill(long id, string name, SkillType type)
|
||||
{
|
||||
if (type == SkillType.Magic)
|
||||
{
|
||||
switch ((MagicID)id)
|
||||
{
|
||||
case MagicID.冰霜攻击:
|
||||
return new 冰霜攻击();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Skill)
|
||||
{
|
||||
switch ((SkillID)id)
|
||||
{
|
||||
case SkillID.疾风步:
|
||||
return new 疾风步();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.SuperSkill)
|
||||
{
|
||||
switch ((SuperSkillID)id)
|
||||
{
|
||||
case SuperSkillID.力量爆发:
|
||||
return new 力量爆发();
|
||||
case SuperSkillID.天赐之力:
|
||||
return new 天赐之力();
|
||||
case SuperSkillID.魔法涌流:
|
||||
return new 魔法涌流();
|
||||
case SuperSkillID.三重叠加:
|
||||
return new 三重叠加();
|
||||
case SuperSkillID.变幻之心:
|
||||
return new 变幻之心();
|
||||
case SuperSkillID.精准打击:
|
||||
return new 精准打击();
|
||||
case SuperSkillID.绝对领域:
|
||||
return new 绝对领域();
|
||||
case SuperSkillID.能量毁灭:
|
||||
return new 能量毁灭();
|
||||
case SuperSkillID.迅捷之势:
|
||||
return new 迅捷之势();
|
||||
case SuperSkillID.嗜血本能:
|
||||
return new 嗜血本能();
|
||||
case SuperSkillID.平衡强化:
|
||||
return new 平衡强化();
|
||||
case SuperSkillID.血之狂欢:
|
||||
return new 血之狂欢();
|
||||
}
|
||||
}
|
||||
|
||||
if (type == SkillType.Passive)
|
||||
{
|
||||
switch ((PassiveID)id)
|
||||
{
|
||||
case PassiveID.META马:
|
||||
return new META马();
|
||||
case PassiveID.心灵之火:
|
||||
return new 心灵之火();
|
||||
case PassiveID.魔法震荡:
|
||||
return new 魔法震荡();
|
||||
case PassiveID.灵能反射:
|
||||
return new 灵能反射();
|
||||
case PassiveID.智慧与力量:
|
||||
return new 智慧与力量();
|
||||
case PassiveID.致命打击:
|
||||
return new 致命打击();
|
||||
case PassiveID.毁灭之势:
|
||||
return new 毁灭之势();
|
||||
case PassiveID.枯竭打击:
|
||||
return new 枯竭打击();
|
||||
case PassiveID.玻璃大炮:
|
||||
return new 玻璃大炮();
|
||||
case PassiveID.累积之压:
|
||||
return new 累积之压();
|
||||
case PassiveID.敏捷之刃:
|
||||
return new 敏捷之刃();
|
||||
case PassiveID.弱者猎手:
|
||||
return new 弱者猎手();
|
||||
}
|
||||
switch ((ItemPassiveID)id)
|
||||
{
|
||||
case ItemPassiveID.攻击之爪:
|
||||
return new 攻击之爪技能();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public override Skill? GetSkill(long id, string name, SkillType type) => EntityFactory.GetSkill(id, type);
|
||||
}
|
||||
}
|
||||
|
42
OshimaModules/OpenEffects/AccelerationCoefficient.cs
Normal file
42
OshimaModules/OpenEffects/AccelerationCoefficient.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class AccelerationCoefficient : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.AccelerationCoefficient;
|
||||
public override string 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.AccelerationCoefficient += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.AccelerationCoefficient -= 实际加成;
|
||||
}
|
||||
|
||||
public AccelerationCoefficient(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exACC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
115
OshimaModules/OpenEffects/EffectID.cs
Normal file
115
OshimaModules/OpenEffects/EffectID.cs
Normal file
@ -0,0 +1,115 @@
|
||||
namespace Oshima.FunGame.OshimaModules.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
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExAGI.cs
Normal file
42
OshimaModules/OpenEffects/ExAGI.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExAGI : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExAGI;
|
||||
public override string Name => "敏捷加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExAGI += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExAGI -= 实际加成;
|
||||
}
|
||||
|
||||
public ExAGI(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exAGI;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExATK.cs
Normal file
42
OshimaModules/OpenEffects/ExATK.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExATK : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExATK;
|
||||
public override string Name => "攻击力加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExATK2 += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExATK2 -= 实际加成;
|
||||
}
|
||||
|
||||
public ExATK(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exATK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExActionCoefficient.cs
Normal file
42
OshimaModules/OpenEffects/ExActionCoefficient.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExActionCoefficient : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExActionCoefficient;
|
||||
public override string 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.ExActionCoefficient += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExActionCoefficient -= 实际加成;
|
||||
}
|
||||
|
||||
public ExActionCoefficient(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exAC;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExCDR.cs
Normal file
42
OshimaModules/OpenEffects/ExCDR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExCDR : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCDR;
|
||||
public override string 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.ExCDR += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCDR -= 实际加成;
|
||||
}
|
||||
|
||||
public ExCDR(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exCDR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExCritDMG.cs
Normal file
42
OshimaModules/OpenEffects/ExCritDMG.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExCritDMG : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCritDMG;
|
||||
public override string 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.ExCritDMG += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCritDMG -= 实际加成;
|
||||
}
|
||||
|
||||
public ExCritDMG(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exCRD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExCritRate.cs
Normal file
42
OshimaModules/OpenEffects/ExCritRate.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExCritRate : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExCritRate;
|
||||
public override string 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.ExCritRate += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExCritRate -= 实际加成;
|
||||
}
|
||||
|
||||
public ExCritRate(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exCR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExDEF.cs
Normal file
42
OshimaModules/OpenEffects/ExDEF.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExDEF : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExDEF;
|
||||
public override string Name => "物理护甲加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExDEF2 += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExDEF2 -= 实际加成;
|
||||
}
|
||||
|
||||
public ExDEF(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exDEF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExEvadeRate.cs
Normal file
42
OshimaModules/OpenEffects/ExEvadeRate.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExEvadeRate : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExEvadeRate;
|
||||
public override string 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.ExEvadeRate += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExEvadeRate -= 实际加成;
|
||||
}
|
||||
|
||||
public ExEvadeRate(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exER;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExHR.cs
Normal file
42
OshimaModules/OpenEffects/ExHR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExHR : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExHR;
|
||||
public override string Name => "生命回复加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExHR += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExHR -= 实际加成;
|
||||
}
|
||||
|
||||
public ExHR(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exHR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExINT.cs
Normal file
42
OshimaModules/OpenEffects/ExINT.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExINT : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExINT;
|
||||
public override string Name => "智力加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExINT += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExINT -= 实际加成;
|
||||
}
|
||||
|
||||
public ExINT(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exINT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
115
OshimaModules/OpenEffects/ExMDF.cs
Normal file
115
OshimaModules/OpenEffects/ExMDF.cs
Normal file
@ -0,0 +1,115 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExMDF : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMDF;
|
||||
public override string Name => "魔法抗性加成";
|
||||
public override string Description => $"增加角色 {实际加成 * 100:0.##}% {CharacterSet.GetMagicResistanceName(魔法类型)}。" + (!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 readonly MagicType 魔法类型 = MagicType.None;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
switch (魔法类型)
|
||||
{
|
||||
case MagicType.Starmark:
|
||||
character.MDF.Starmark += 实际加成;
|
||||
break;
|
||||
case MagicType.PurityNatural:
|
||||
character.MDF.PurityNatural += 实际加成;
|
||||
break;
|
||||
case MagicType.PurityContemporary:
|
||||
character.MDF.PurityContemporary += 实际加成;
|
||||
break;
|
||||
case MagicType.Bright:
|
||||
character.MDF.Bright += 实际加成;
|
||||
break;
|
||||
case MagicType.Shadow:
|
||||
character.MDF.Shadow += 实际加成;
|
||||
break;
|
||||
case MagicType.Element:
|
||||
character.MDF.Element += 实际加成;
|
||||
break;
|
||||
case MagicType.Fleabane:
|
||||
character.MDF.Fleabane += 实际加成;
|
||||
break;
|
||||
case MagicType.Particle:
|
||||
character.MDF.Particle += 实际加成;
|
||||
break;
|
||||
case MagicType.None:
|
||||
default:
|
||||
character.MDF.None += 实际加成;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
switch (魔法类型)
|
||||
{
|
||||
case MagicType.Starmark:
|
||||
character.MDF.Starmark -= 实际加成;
|
||||
break;
|
||||
case MagicType.PurityNatural:
|
||||
character.MDF.PurityNatural -= 实际加成;
|
||||
break;
|
||||
case MagicType.PurityContemporary:
|
||||
character.MDF.PurityContemporary -= 实际加成;
|
||||
break;
|
||||
case MagicType.Bright:
|
||||
character.MDF.Bright -= 实际加成;
|
||||
break;
|
||||
case MagicType.Shadow:
|
||||
character.MDF.Shadow -= 实际加成;
|
||||
break;
|
||||
case MagicType.Element:
|
||||
character.MDF.Element -= 实际加成;
|
||||
break;
|
||||
case MagicType.Fleabane:
|
||||
character.MDF.Fleabane -= 实际加成;
|
||||
break;
|
||||
case MagicType.Particle:
|
||||
character.MDF.Particle -= 实际加成;
|
||||
break;
|
||||
case MagicType.None:
|
||||
default:
|
||||
character.MDF.None -= 实际加成;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public ExMDF(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
if (Enum.IsDefined(typeof(MagicType), mdfType))
|
||||
{
|
||||
魔法类型 = (MagicType)mdfType;
|
||||
}
|
||||
else
|
||||
{
|
||||
魔法类型 = 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))
|
||||
{
|
||||
实际加成 = mdfValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExMR.cs
Normal file
42
OshimaModules/OpenEffects/ExMR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExMR : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMR;
|
||||
public override string Name => "魔法回复加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExMR += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExMR -= 实际加成;
|
||||
}
|
||||
|
||||
public ExMR(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exMR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExMaxHP.cs
Normal file
42
OshimaModules/OpenEffects/ExMaxHP.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExMaxHP : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxHP;
|
||||
public override string Name => "最大生命值加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExHP2 += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExHP2 -= 实际加成;
|
||||
}
|
||||
|
||||
public ExMaxHP(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exHP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExMaxMP.cs
Normal file
42
OshimaModules/OpenEffects/ExMaxMP.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExMaxMP : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExMaxMP;
|
||||
public override string Name => "最大魔法值加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExMP2 += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExMP2 -= 实际加成;
|
||||
}
|
||||
|
||||
public ExMaxMP(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exMP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExPDR.cs
Normal file
42
OshimaModules/OpenEffects/ExPDR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExPDR : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExPDR;
|
||||
public override string 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.ExPDR += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExPDR -= 实际加成;
|
||||
}
|
||||
|
||||
public ExPDR(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exPDR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExSPD.cs
Normal file
42
OshimaModules/OpenEffects/ExSPD.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExSPD : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExSPD;
|
||||
public override string Name => "行动速度加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExSPD += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExSPD -= 实际加成;
|
||||
}
|
||||
|
||||
public ExSPD(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exSPD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/ExSTR.cs
Normal file
42
OshimaModules/OpenEffects/ExSTR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class ExSTR : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.ExSTR;
|
||||
public override string Name => "力量加成";
|
||||
public override string Description => $"增加角色 {实际加成: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.ExDEF2 += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.ExDEF2 -= 实际加成;
|
||||
}
|
||||
|
||||
public ExSTR(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exSTR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/MagicalPenetration.cs
Normal file
42
OshimaModules/OpenEffects/MagicalPenetration.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class MagicalPenetration : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.MagicalPenetration;
|
||||
public override string 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.MagicalPenetration += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.MagicalPenetration -= 实际加成;
|
||||
}
|
||||
|
||||
public MagicalPenetration(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exMP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/NormalAttackHardTimeReduce.cs
Normal file
42
OshimaModules/OpenEffects/NormalAttackHardTimeReduce.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class NormalAttackHardTimeReduce : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.NormalAttackHardTimeReduce;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少: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 -= 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public NormalAttackHardTimeReduce(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际硬直时间减少 = nahtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
OshimaModules/OpenEffects/PhysicalPenetration.cs
Normal file
42
OshimaModules/OpenEffects/PhysicalPenetration.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class PhysicalPenetration : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.PhysicalPenetration;
|
||||
public override string 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.PhysicalPenetration += 实际加成;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.PhysicalPenetration -= 实际加成;
|
||||
}
|
||||
|
||||
public PhysicalPenetration(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际加成 = exPP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
58
OshimaModules/OpenEffects/SkillHardTimeReduce.cs
Normal file
58
OshimaModules/OpenEffects/SkillHardTimeReduce.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.OpenEffects
|
||||
{
|
||||
public class SkillHardTimeReduce : Effect
|
||||
{
|
||||
public override long Id => (long)EffectID.SkillHardTimeReduce;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少: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 -= 实际硬直时间减少;
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
}
|
||||
|
||||
public SkillHardTimeReduce(Skill skill, Character? source, Item? item) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
if (skill.OtherArgs.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))
|
||||
{
|
||||
实际硬直时间减少 = shtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user