mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-04-21 19:59:34 +08:00
添加动态扩展测试
This commit is contained in:
parent
8cea6dfa3e
commit
775c90c594
@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 冷却缩减加成(Skill skill, Character? source, Item? item, double exCdr) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际冷却缩减加成 = exCdr;
|
||||
|
@ -43,7 +43,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 技能硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际硬直时间减少 = reduce;
|
||||
|
@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 攻击力加成(Skill skill, Character? source, Item? item, double exATK) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际攻击力加成 = exATK;
|
||||
|
@ -27,7 +27,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 普攻硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际硬直时间减少 = reduce;
|
||||
|
@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 物理护甲加成(Skill skill, Character? source, Item? item, double exDef) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
Source = source;
|
||||
Item = item;
|
||||
实际物理护甲加成 = exDef;
|
||||
|
42
Library/Effects/OpenEffects/ExATK.cs
Normal file
42
Library/Effects/OpenEffects/ExATK.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Effects
|
||||
{
|
||||
public class ExATK : Effect
|
||||
{
|
||||
public override long Id => 8001;
|
||||
public override string Name => "攻击力加成";
|
||||
public override string Description => $"增加角色 {实际攻击力加成} 点攻击力。" + (!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)
|
||||
{
|
||||
IEnumerable<string> keys = skill.OtherArgs.Keys.Where(s => s.Equals("exatk", StringComparison.CurrentCultureIgnoreCase));
|
||||
if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exATK))
|
||||
{
|
||||
实际攻击力加成 = exATK;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
Library/Effects/OpenEffects/ExDEF.cs
Normal file
42
Library/Effects/OpenEffects/ExDEF.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Effects
|
||||
{
|
||||
public class ExDEF : Effect
|
||||
{
|
||||
public override long Id => 8002;
|
||||
public override string Name => "物理护甲加成";
|
||||
public override string Description => $"增加角色 {实际物理护甲加成} 点物理护甲。" + (!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)
|
||||
{
|
||||
IEnumerable<string> keys = skill.OtherArgs.Keys.Where(s => s.Equals("exdef", StringComparison.CurrentCultureIgnoreCase));
|
||||
if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exDEF))
|
||||
{
|
||||
实际物理护甲加成 = exDEF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
Library/Effects/OpenEffects/ExSTR.cs
Normal file
42
Library/Effects/OpenEffects/ExSTR.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Effects
|
||||
{
|
||||
public class ExSTR : Effect
|
||||
{
|
||||
public override long Id => 8003;
|
||||
public override string Name => "力量加成";
|
||||
public override string Description => $"增加角色 {实际力量加成} 点力量。" + (!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)
|
||||
{
|
||||
IEnumerable<string> keys = skill.OtherArgs.Keys.Where(s => s.Equals("exstr", StringComparison.CurrentCultureIgnoreCase));
|
||||
if (keys.Any() && double.TryParse(skill.OtherArgs[keys.First()].ToString(), out double exSTR))
|
||||
{
|
||||
实际力量加成 = exSTR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 眩晕(Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
|
@ -17,7 +17,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
||||
|
||||
public 累积之压标记(Skill skill, Character sourceCharacter) : base(skill)
|
||||
{
|
||||
ActionQueue = skill.ActionQueue;
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_sourceCharacter = sourceCharacter;
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,14 @@
|
||||
<RootNamespace>Milimoe.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>1701;1702;IDE0130</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<NoWarn>1701;1702;IDE0130</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="FunGame.Core">
|
||||
<HintPath>..\..\FunGame.Core\bin\Debug\net8.0\FunGame.Core.dll</HintPath>
|
||||
|
@ -1,3 +1,3 @@
|
||||
using Milimoe.FunGame.Testing.Tests;
|
||||
|
||||
_ = new WebSocketTest();
|
||||
_ = new SkillJSONTest();
|
||||
|
@ -35,12 +35,12 @@ namespace Milimoe.FunGame.Testing.Skills
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && ActionQueue != null)
|
||||
if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && GamingQueue != null)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了心灵之火!额外进行一次普通攻击!");
|
||||
冷却时间 = 基础冷却时间;
|
||||
是否是嵌套普通攻击 = true;
|
||||
character.NormalAttack.Attack(ActionQueue, character, enemy);
|
||||
character.NormalAttack.Attack(GamingQueue, character, enemy);
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套普通攻击)
|
||||
|
@ -20,7 +20,7 @@ namespace Addons
|
||||
|
||||
public override string Author => "FunGamer";
|
||||
|
||||
protected override bool BeforeLoad()
|
||||
protected override bool BeforeLoad(params object[] objs)
|
||||
{
|
||||
EntityModuleConfig<Character> config = new(ExampleGameModuleConstant.Example, ExampleGameModuleConstant.ExampleCharacter)
|
||||
{
|
||||
|
@ -1,9 +1,10 @@
|
||||
using System.Text;
|
||||
using Milimoe.FunGame.Testing.Items;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Common.Addon;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Core.Model;
|
||||
using Milimoe.FunGame.Testing.Items;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Tests
|
||||
@ -293,11 +294,11 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
if (PrintOut) characters.ForEach(c => Console.WriteLine(c.GetInfo()));
|
||||
|
||||
// 创建顺序表并排序
|
||||
ActionQueue actionQueue = new(characters, WriteLine);
|
||||
ActionQueue ActionQueue = new(characters, WriteLine);
|
||||
if (PrintOut) Console.WriteLine();
|
||||
|
||||
// 显示初始顺序表
|
||||
actionQueue.DisplayQueue();
|
||||
ActionQueue.DisplayQueue();
|
||||
if (PrintOut) Console.WriteLine();
|
||||
|
||||
// 总游戏时长
|
||||
@ -305,7 +306,7 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
|
||||
// 开始空投
|
||||
Msg = "";
|
||||
空投(actionQueue, totalTime);
|
||||
空投(ActionQueue, totalTime);
|
||||
if (isWeb) result.Add("=== 空投 ===\r\n" + Msg);
|
||||
|
||||
// 总回合数
|
||||
@ -327,15 +328,15 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
foreach (Character c in characters.Where(c => c != winner && c.HP > 0))
|
||||
{
|
||||
WriteLine("[ " + winner + " ] 对 [ " + c + " ] 造成了 99999999999 点真实伤害。");
|
||||
actionQueue.DeathCalculation(winner, c);
|
||||
ActionQueue.DeathCalculation(winner, c);
|
||||
}
|
||||
actionQueue.EndGameInfo(winner);
|
||||
ActionQueue.EndGameInfo(winner);
|
||||
result.Add(Msg);
|
||||
break;
|
||||
}
|
||||
|
||||
// 检查是否有角色可以行动
|
||||
Character? characterToAct = actionQueue.NextCharacter();
|
||||
Character? characterToAct = ActionQueue.NextCharacter();
|
||||
|
||||
// 处理回合
|
||||
if (characterToAct != null)
|
||||
@ -343,23 +344,23 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
WriteLine($"=== Round {i++} ===");
|
||||
WriteLine("现在是 [ " + characterToAct + " ] 的回合!");
|
||||
|
||||
bool isGameEnd = actionQueue.ProcessTurn(characterToAct);
|
||||
bool isGameEnd = ActionQueue.ProcessTurn(characterToAct);
|
||||
if (isGameEnd)
|
||||
{
|
||||
result.Add(Msg);
|
||||
break;
|
||||
}
|
||||
|
||||
actionQueue.DisplayQueue();
|
||||
ActionQueue.DisplayQueue();
|
||||
WriteLine("");
|
||||
}
|
||||
|
||||
// 模拟时间流逝
|
||||
totalTime += actionQueue.TimeLapse();
|
||||
totalTime += ActionQueue.TimeLapse();
|
||||
|
||||
if (actionQueue.Eliminated.Count > deaths)
|
||||
if (ActionQueue.Eliminated.Count > deaths)
|
||||
{
|
||||
deaths = actionQueue.Eliminated.Count;
|
||||
deaths = ActionQueue.Eliminated.Count;
|
||||
if (!isWeb)
|
||||
{
|
||||
string roundMsg = Msg;
|
||||
@ -386,10 +387,10 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
int top = isWeb ? 12 : 6;
|
||||
Msg = $"=== 伤害排行榜 TOP{top} ===\r\n";
|
||||
int count = 1;
|
||||
foreach (Character character in actionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key))
|
||||
foreach (Character character in ActionQueue.CharacterStatistics.OrderByDescending(d => d.Value.TotalDamage).Select(d => d.Key))
|
||||
{
|
||||
StringBuilder builder = new();
|
||||
CharacterStatistics stats = actionQueue.CharacterStatistics[character];
|
||||
CharacterStatistics stats = ActionQueue.CharacterStatistics[character];
|
||||
builder.AppendLine($"{count}. [ {character.ToStringWithLevel()} ] ({stats.Kills} / {stats.Assists})");
|
||||
builder.AppendLine($"存活时长:{stats.LiveTime} / 存活回合数:{stats.LiveRound} / 行动回合数:{stats.ActionTurn}");
|
||||
builder.AppendLine($"总计伤害:{stats.TotalDamage} / 总计物理伤害:{stats.TotalPhysicalDamage} / 总计魔法伤害:{stats.TotalMagicDamage}");
|
||||
@ -457,9 +458,9 @@ namespace Milimoe.FunGame.Testing.Tests
|
||||
// 显示每个角色的信息
|
||||
if (isWeb)
|
||||
{
|
||||
for (i = actionQueue.Eliminated.Count - 1; i >= 0; i--)
|
||||
for (i = ActionQueue.Eliminated.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Character character = actionQueue.Eliminated[i];
|
||||
Character character = ActionQueue.Eliminated[i];
|
||||
result.Add($"=== 角色 [ {character} ] ===\r\n{character.GetInfo()}");
|
||||
}
|
||||
}
|
||||
|
239
Library/Tests/SkillJSONTest.cs
Normal file
239
Library/Tests/SkillJSONTest.cs
Normal file
@ -0,0 +1,239 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Testing.Effects;
|
||||
using Milimoe.FunGame.Testing.Items;
|
||||
using Milimoe.FunGame.Testing.Skills;
|
||||
using MilimoeFunGame.Testing.Characters;
|
||||
|
||||
namespace Milimoe.FunGame.Testing.Tests
|
||||
{
|
||||
internal class SkillJSONTest
|
||||
{
|
||||
public SkillJSONTest()
|
||||
{
|
||||
//EntityModuleConfig<Character> config = new(nameof(SkillJSONTest), nameof(Character))
|
||||
//{
|
||||
// { "Oshima", OshimaCharacters.Oshima },
|
||||
// { "Xinyin", OshimaCharacters.Xinyin },
|
||||
// { "Yang", OshimaCharacters.Yang },
|
||||
// { "NanGanyu", OshimaCharacters.NanGanyu },
|
||||
// { "NiuNan", OshimaCharacters.NiuNan },
|
||||
// { "Mayor", OshimaCharacters.Mayor },
|
||||
// { "马猴烧酒", OshimaCharacters.马猴烧酒 },
|
||||
// { "QingXiang", OshimaCharacters.QingXiang },
|
||||
// { "QWQAQW", OshimaCharacters.QWQAQW },
|
||||
// { "ColdBlue", OshimaCharacters.ColdBlue },
|
||||
// { "绿拱门", OshimaCharacters.绿拱门 },
|
||||
// { "QuDuoduo", OshimaCharacters.QuDuoduo }
|
||||
//};
|
||||
//config.SaveConfig();
|
||||
|
||||
EntityModuleConfig<Skill> config2 = new(nameof(SkillJSONTest), nameof(Skill));
|
||||
Character c = Factory.GetCharacter();
|
||||
List<Skill> listSkill = [];
|
||||
listSkill.Add(new 精准打击(c));
|
||||
foreach (Skill s in listSkill)
|
||||
{
|
||||
config2.Add(s.Name, s);
|
||||
}
|
||||
config2.SaveConfig();
|
||||
|
||||
config2.LoadConfig();
|
||||
foreach (string key in config2.Keys)
|
||||
{
|
||||
Skill prev = config2[key];
|
||||
Skill? next = GetSkill(prev.Id, prev.Name, prev.SkillType);
|
||||
if (next != null)
|
||||
{
|
||||
config2[key] = next;
|
||||
}
|
||||
Skill skill = config2[key];
|
||||
foreach (Effect effect in skill.Effects.ToList())
|
||||
{
|
||||
Effect? newEffect = GetEffect(effect.Id, effect.Name, skill);
|
||||
if (newEffect != null)
|
||||
{
|
||||
skill.Effects.Remove(effect);
|
||||
skill.Effects.Add(newEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine(string.Join("\r\n", config2.Values));
|
||||
|
||||
EntityModuleConfig<Item> config3 = new(nameof(SkillJSONTest), nameof(Item)); ;
|
||||
//EntityModuleConfig<Item> config3 = new(nameof(SkillJSONTest), nameof(Item))
|
||||
//{
|
||||
// { "攻击之爪10", new 攻击之爪10() }
|
||||
//};
|
||||
//config3.SaveConfig();
|
||||
config3.LoadConfig();
|
||||
foreach (string key in config3.Keys)
|
||||
{
|
||||
Item prev = config3[key];
|
||||
Item? next = GetItem(prev.Id, prev.Name, prev.ItemType);
|
||||
if (next != null)
|
||||
{
|
||||
prev.SetPropertyToItemModuleNew(next);
|
||||
config3[key] = next;
|
||||
}
|
||||
Item item = config3[key];
|
||||
HashSet<Skill> skills = item.Skills.Passives;
|
||||
if (item.Skills.Active != null) skills.Add(item.Skills.Active);
|
||||
foreach (Skill skill in skills.ToList())
|
||||
{
|
||||
Skill? newSkill = GetSkill(skill.Id, skill.Name, 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;
|
||||
foreach (Effect effect in s.Effects.ToList())
|
||||
{
|
||||
Effect? newEffect = GetEffect(effect.Id, effect.Name, skill);
|
||||
if (newEffect != null)
|
||||
{
|
||||
skill.Effects.Remove(effect);
|
||||
skill.Effects.Add(newEffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine(string.Join("\r\n", config3.Values));
|
||||
|
||||
}
|
||||
|
||||
public static Item? GetItem(long id, string name, ItemType type)
|
||||
{
|
||||
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 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 static Effect? GetEffect(long id, string name, Skill skill)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 8001:
|
||||
return new ExATK(skill, null, null);
|
||||
case 8002:
|
||||
return new ExDEF(skill, null, null);
|
||||
case 8003:
|
||||
return new ExSTR(skill, null, null);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user