mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-04-22 12:19:34 +08:00
新的技能测试
This commit is contained in:
parent
9673c1a1b2
commit
d2938baf67
@ -1,30 +0,0 @@
|
|||||||
using Milimoe.FunGame.Core.Api.Utility;
|
|
||||||
using Milimoe.FunGame.Core.Entity;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Effects
|
|
||||||
{
|
|
||||||
public class 大岛特性特效(Skill skill) : Effect(skill)
|
|
||||||
{
|
|
||||||
public override long Id => 1;
|
|
||||||
public override string Name => "大岛特性";
|
|
||||||
public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP} ] 能量值。";
|
|
||||||
public override bool TargetSelf => true;
|
|
||||||
public static double EP => 10;
|
|
||||||
|
|
||||||
public override bool AlterEPAfterGetDamage(Character character, double baseEP, out double newEP)
|
|
||||||
{
|
|
||||||
newEP = Calculation.Round2Digits(baseEP * 1.5);
|
|
||||||
if (Skill.Character != null) Console.WriteLine("[ " + Skill.Character + " ] 发动了META马专属被动!本次获得了 " + newEP + " 能量!");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnTurnStart(Character character)
|
|
||||||
{
|
|
||||||
if (character.EP < 200)
|
|
||||||
{
|
|
||||||
character.EP += EP;
|
|
||||||
Console.WriteLine("[ " + character + " ] 发动了META马专属被动!本次获得了 " + EP + " 能量!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
52
Library/Effects/眩晕.cs
Normal file
52
Library/Effects/眩晕.cs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Effects
|
||||||
|
{
|
||||||
|
public class 眩晕 : Effect
|
||||||
|
{
|
||||||
|
public override long Id => 4101;
|
||||||
|
public override string Name => "眩晕";
|
||||||
|
public override string Description => $"此角色被眩晕了,不能行动。来自:[ " + _sourceCharacter + " ] 的 [ " + Skill.Name + " ]";
|
||||||
|
public override EffectControlType ControlType => EffectControlType.Stun;
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
public override Character Source => _sourceCharacter;
|
||||||
|
public override bool Durative => _durative;
|
||||||
|
public override double Duration => _duration;
|
||||||
|
public override int DurationTurn => _durationTurn;
|
||||||
|
|
||||||
|
private readonly Character _sourceCharacter;
|
||||||
|
private readonly bool _durative;
|
||||||
|
private readonly double _duration;
|
||||||
|
private readonly int _durationTurn;
|
||||||
|
|
||||||
|
public 眩晕(Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
|
||||||
|
{
|
||||||
|
ActionQueue = skill.ActionQueue;
|
||||||
|
_sourceCharacter = sourceCharacter;
|
||||||
|
_durative = durative;
|
||||||
|
_duration = duration;
|
||||||
|
_durationTurn = durationTurn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
if (_durative) RemainDuration = Duration;
|
||||||
|
else RemainDurationTurn = DurationTurn;
|
||||||
|
character.CharacterEffectStates.Add(this, CharacterState.NotActionable);
|
||||||
|
character.UpdateCharacterState();
|
||||||
|
InterruptCasting(character, Source);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectLost(Character character)
|
||||||
|
{
|
||||||
|
character.CharacterEffectStates.Remove(this);
|
||||||
|
character.UpdateCharacterState();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnTurnStart(Character character)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -91,35 +91,86 @@ if (list.Count > 3)
|
|||||||
character9, character10, character11, character12
|
character9, character10, character11, character12
|
||||||
];
|
];
|
||||||
|
|
||||||
|
int clevel = 60;
|
||||||
|
int slevel = 6;
|
||||||
|
int mlevel = 8;
|
||||||
|
|
||||||
// 升级和赋能
|
// 升级和赋能
|
||||||
for (int index = 0; index < characters.Count; index++)
|
for (int index = 0; index < characters.Count; index++)
|
||||||
{
|
{
|
||||||
Character c = characters[index];
|
Character c = characters[index];
|
||||||
c.Level = 60;
|
c.Level = clevel;
|
||||||
c.NormalAttack.Level += 7;
|
c.NormalAttack.Level = mlevel;
|
||||||
|
|
||||||
Skill 冰霜攻击 = new 冰霜攻击(c);
|
Skill 冰霜攻击 = new 冰霜攻击(c)
|
||||||
冰霜攻击.Level += 8;
|
{
|
||||||
|
Level = mlevel
|
||||||
|
};
|
||||||
c.Skills.Add(冰霜攻击);
|
c.Skills.Add(冰霜攻击);
|
||||||
|
|
||||||
if (c.ToString() == character1.ToString())
|
if (c == character1)
|
||||||
{
|
{
|
||||||
Skill 大岛特性 = new 大岛特性(c);
|
Skill META马 = new META马(c)
|
||||||
大岛特性.Level++;
|
{
|
||||||
c.Skills.Add(大岛特性);
|
Level = 1
|
||||||
|
};
|
||||||
|
c.Skills.Add(META马);
|
||||||
|
|
||||||
|
Skill 力量爆发 = new 力量爆发(c)
|
||||||
|
{
|
||||||
|
Level = mlevel
|
||||||
|
};
|
||||||
|
c.Skills.Add(力量爆发);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.ToString() == character9.ToString())
|
if (c == character2)
|
||||||
{
|
{
|
||||||
Skill 疾风步 = new 疾风步(c);
|
Skill 心灵之火 = new 心灵之火(c)
|
||||||
疾风步.Level += 6;
|
{
|
||||||
|
Level = 1
|
||||||
|
};
|
||||||
|
c.Skills.Add(心灵之火);
|
||||||
|
|
||||||
|
Skill 天赐之力 = new 天赐之力(c)
|
||||||
|
{
|
||||||
|
Level = slevel
|
||||||
|
};
|
||||||
|
c.Skills.Add(天赐之力);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c== character3)
|
||||||
|
{
|
||||||
|
Skill 魔法震荡 = new 魔法震荡(c)
|
||||||
|
{
|
||||||
|
Level = 1
|
||||||
|
};
|
||||||
|
c.Skills.Add(魔法震荡);
|
||||||
|
|
||||||
|
Skill 魔法涌流 = new 魔法涌流(c)
|
||||||
|
{
|
||||||
|
Level = slevel
|
||||||
|
};
|
||||||
|
c.Skills.Add(魔法涌流);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == character9)
|
||||||
|
{
|
||||||
|
Skill 疾风步 = new 疾风步(c)
|
||||||
|
{
|
||||||
|
Level = slevel
|
||||||
|
};
|
||||||
c.Skills.Add(疾风步);
|
c.Skills.Add(疾风步);
|
||||||
}
|
}
|
||||||
|
|
||||||
Skill 天赐之力 = new 天赐之力(c);
|
if (c != character1 && c != character2 && c != character3)
|
||||||
天赐之力.Level += 6;
|
{
|
||||||
|
Skill 天赐之力 = new 天赐之力(c)
|
||||||
|
{
|
||||||
|
Level = slevel
|
||||||
|
};
|
||||||
c.Skills.Add(天赐之力);
|
c.Skills.Add(天赐之力);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 显示角色信息
|
// 显示角色信息
|
||||||
characters.ForEach(c => Console.WriteLine(c.GetInfo()));
|
characters.ForEach(c => Console.WriteLine(c.GetInfo()));
|
||||||
@ -138,6 +189,8 @@ if (list.Count > 3)
|
|||||||
{
|
{
|
||||||
// 检查是否有角色可以行动
|
// 检查是否有角色可以行动
|
||||||
Character? characterToAct = actionQueue.NextCharacter();
|
Character? characterToAct = actionQueue.NextCharacter();
|
||||||
|
|
||||||
|
// 处理回合
|
||||||
if (characterToAct != null)
|
if (characterToAct != null)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"=== Round {i++} ===");
|
Console.WriteLine($"=== Round {i++} ===");
|
||||||
|
35
Library/Skills/Mayor/致命打击.cs
Normal file
35
Library/Skills/Mayor/致命打击.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 致命打击 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4006;
|
||||||
|
public override string Name => "致命打击";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 致命打击(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 致命打击特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 致命打击特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"暴击伤害提升 30%。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
character.ExCritDMG += 0.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
Library/Skills/NanGanyu/法术操控.cs
Normal file
30
Library/Skills/NanGanyu/法术操控.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 法术操控 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4004;
|
||||||
|
public override string Name => "法术操控";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 法术操控(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 法术操控特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 法术操控特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"每释放两次魔法才会触发硬直时间,且魔法命中时基于智力获得额外能量值。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
}
|
||||||
|
}
|
30
Library/Skills/NiuNan/智慧与力量.cs
Normal file
30
Library/Skills/NiuNan/智慧与力量.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 智慧与力量 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4005;
|
||||||
|
public override string Name => "智慧与力量";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 智慧与力量(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 智慧与力量特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 智慧与力量特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"当生命值低于 30% 时,智力转化为力量;当生命值高于或等于 30% 时,力量转化为智力。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
}
|
||||||
|
}
|
47
Library/Skills/Oshima/META马.cs
Normal file
47
Library/Skills/Oshima/META马.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class META马 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4001;
|
||||||
|
public override string Name => "META马";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public META马(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new META马特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class META马特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP} ] 能量值。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
public static double EP => 10;
|
||||||
|
|
||||||
|
public override void AlterEPAfterGetDamage(Character character, ref double baseEP)
|
||||||
|
{
|
||||||
|
baseEP = Calculation.Round2Digits(baseEP * 1.5);
|
||||||
|
if (Skill.Character != null) WriteLine("[ " + Skill.Character + " ] 发动了META马专属被动!本次获得了 " + baseEP + " 能量!");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnTurnStart(Character character)
|
||||||
|
{
|
||||||
|
if (character.EP < 200)
|
||||||
|
{
|
||||||
|
character.EP += EP;
|
||||||
|
WriteLine("[ " + character + " ] 发动了META马专属被动!本次获得了 " + EP + " 能量!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
58
Library/Skills/Oshima/力量爆发.cs
Normal file
58
Library/Skills/Oshima/力量爆发.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 力量爆发 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 3002;
|
||||||
|
public override string Name => "力量爆发";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 100;
|
||||||
|
public override double CD => 55;
|
||||||
|
public override double HardnessTime => 0;
|
||||||
|
|
||||||
|
public 力量爆发(Character character) : base(SkillType.SuperSkill, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 力量爆发特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 力量爆发特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => "力量爆发";
|
||||||
|
public override string Description => $"获得 150% 力量 [ {攻击力加成} ] 的攻击力加成,持续 {Duration} 秒,清除硬直时间。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
public override bool Durative => true;
|
||||||
|
public override double Duration => 10 + 1 * (Level - 1);
|
||||||
|
|
||||||
|
private double 攻击力加成 => Calculation.Round2Digits(Skill.Character?.STR * 1.5 ?? 0); // 300% 攻击力加成
|
||||||
|
private double 实际攻击力加成 = 0;
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
实际攻击力加成 = 攻击力加成;
|
||||||
|
character.ExATK2 += 实际攻击力加成;
|
||||||
|
WriteLine($"[ {character} ] 的攻击力增加了 [ {实际攻击力加成} ] !");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectLost(Character character)
|
||||||
|
{
|
||||||
|
// 恢复到原始攻击力
|
||||||
|
character.ExATK2 -= 实际攻击力加成;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
|
{
|
||||||
|
RemainDuration = Duration;
|
||||||
|
if (!actor.Effects.Contains(this))
|
||||||
|
{
|
||||||
|
实际攻击力加成 = 0;
|
||||||
|
actor.Effects.Add(this);
|
||||||
|
OnEffectGained(actor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,13 +2,28 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Effects
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
{
|
{
|
||||||
|
public class 疾风步 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 2001;
|
||||||
|
public override string Name => "疾风步";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 35;
|
||||||
|
public override double CD => 35;
|
||||||
|
public override double HardnessTime => 5;
|
||||||
|
|
||||||
|
public 疾风步(Character character) : base(SkillType.Skill, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 疾风步特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class 疾风步特效(Skill skill) : Effect(skill)
|
public class 疾风步特效(Skill skill) : Effect(skill)
|
||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => "疾风步";
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"进入不可选中状态,获得 100 行动速度,持续 {Duration} 时间。在持续时间内,首次造成伤害会附加 {Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * 100)}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。剩余的持续时间内,提高 15% 闪避率和暴击率。";
|
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 15% 闪避率和 15% 暴击率,持续 {Duration} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * 100)}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
public override bool Durative => true;
|
public override bool Durative => true;
|
||||||
public override double Duration => 15 + (2 * (Level - 1));
|
public override double Duration => 15 + (2 * (Level - 1));
|
||||||
@ -30,47 +45,40 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
|
|
||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
character.IsUnselectable = true;
|
|
||||||
Skill.IsInEffect = true;
|
Skill.IsInEffect = true;
|
||||||
|
character.IsUnselectable = true;
|
||||||
character.ExSPD += 100;
|
character.ExSPD += 100;
|
||||||
|
character.ExEvadeRate += 0.15;
|
||||||
|
character.ExCritRate += 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
Skill.IsInEffect = false;
|
Skill.IsInEffect = false;
|
||||||
if (破隐一击)
|
if (!破隐一击)
|
||||||
{
|
|
||||||
character.ExEvadeRate -= 0.15;
|
|
||||||
character.ExCritRate -= 0.15;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
// 在没有打出破隐一击的情况下,恢复角色状态
|
||||||
character.IsUnselectable = false;
|
character.IsUnselectable = false;
|
||||||
}
|
}
|
||||||
character.ExSPD -= 100;
|
character.ExSPD -= 100;
|
||||||
|
character.ExEvadeRate -= 0.15;
|
||||||
|
character.ExCritRate -= 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, bool isCritical, out double newDamage)
|
public override void AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, bool isCritical)
|
||||||
{
|
{
|
||||||
if (首次伤害)
|
if (character == Skill.Character && 首次伤害)
|
||||||
{
|
{
|
||||||
首次伤害 = false;
|
首次伤害 = false;
|
||||||
newDamage = Calculation.Round2Digits(damage + 伤害加成);
|
|
||||||
Console.WriteLine($"[ {character} ] 发动了 [ 疾风步 ] 的特效,获得了 [ {伤害加成} ] 点伤害加成!");
|
|
||||||
破隐一击 = true;
|
破隐一击 = true;
|
||||||
character.ExEvadeRate += 0.15;
|
|
||||||
character.ExCritRate += 0.15;
|
|
||||||
character.IsUnselectable = false;
|
character.IsUnselectable = false;
|
||||||
return true;
|
double d = 伤害加成;
|
||||||
}
|
damage = Calculation.Round2Digits(damage + d);
|
||||||
else
|
WriteLine($"[ {character} ] 触发了疾风步破隐一击,获得了 [ {d} ] 点伤害加成!");
|
||||||
{
|
|
||||||
newDamage = damage;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnSkillCasted(ActionQueue queue, Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
if (!actor.Effects.Contains(this))
|
if (!actor.Effects.Contains(this))
|
||||||
{
|
{
|
@ -2,13 +2,28 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Effects
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
{
|
{
|
||||||
|
public class 天赐之力 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 3001;
|
||||||
|
public override string Name => "天赐之力";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 100;
|
||||||
|
public override double CD => 60;
|
||||||
|
public override double HardnessTime => 15;
|
||||||
|
|
||||||
|
public 天赐之力(Character character) : base(SkillType.SuperSkill, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 天赐之力特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class 天赐之力特效(Skill skill) : Effect(skill)
|
public class 天赐之力特效(Skill skill) : Effect(skill)
|
||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => "天赐之力";
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"{Duration} 时间内,获得 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {Calculation.Round2Digits((1.2 + (1 + 0.6 * (Skill.Level - 1))) * 100)}% 核心属性 [ {伤害加成} ] 强化普通攻击的伤害。";
|
public override string Description => $"{Duration} 时间内,获得 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {Calculation.Round2Digits((1.2 + (1 + 0.6 * (Skill.Level - 1))) * 100)}% 敏捷 [ {伤害加成} ] 强化普通攻击的伤害。";
|
||||||
public override bool TargetSelf => false;
|
public override bool TargetSelf => false;
|
||||||
public override int TargetCount => 1;
|
public override int TargetCount => 1;
|
||||||
public override bool Durative => true;
|
public override bool Durative => true;
|
||||||
@ -21,7 +36,7 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
double d = 0;
|
double d = 0;
|
||||||
if (Skill.Character != null)
|
if (Skill.Character != null)
|
||||||
{
|
{
|
||||||
d = Calculation.Round2Digits(1.2 * (1 + 0.6 * (Skill.Level - 1)) * Skill.Character.PrimaryAttributeValue);
|
d = Calculation.Round2Digits(1.2 * (1 + 0.6 * (Skill.Level - 1)) * Skill.Character.AGI);
|
||||||
}
|
}
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
@ -37,23 +52,20 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
character.ExEvadeRate -= 0.25;
|
character.ExEvadeRate -= 0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool AlterExpectedDamageBeforeCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, out double newDamage)
|
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||||
{
|
{
|
||||||
newDamage = damage;
|
if (character == Skill.Character && isNormalAttack)
|
||||||
if (isNormalAttack)
|
|
||||||
{
|
{
|
||||||
newDamage = Calculation.Round2Digits(damage + 伤害加成);
|
damage = Calculation.Round2Digits(damage + 伤害加成);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool AlterHardnessTimeAfterNormalAttack(Character character, double baseHardnessTime, out double newHardnessTime)
|
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime)
|
||||||
{
|
{
|
||||||
newHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnSkillCasted(ActionQueue queue, Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
RemainDuration = Duration;
|
RemainDuration = Duration;
|
||||||
if (!actor.Effects.Contains(this))
|
if (!actor.Effects.Contains(this))
|
36
Library/Skills/XinYin/心灵之火.cs
Normal file
36
Library/Skills/XinYin/心灵之火.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 心灵之火 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4002;
|
||||||
|
public override string Name => "心灵之火";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 心灵之火(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 心灵之火特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 心灵之火特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"普通攻击硬直时间减少 20%。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime)
|
||||||
|
{
|
||||||
|
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
64
Library/Skills/Yang/魔法涌流.cs
Normal file
64
Library/Skills/Yang/魔法涌流.cs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 魔法涌流 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 3003;
|
||||||
|
public override string Name => "魔法涌流";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 100;
|
||||||
|
public override double CD => 65;
|
||||||
|
public override double HardnessTime => 10;
|
||||||
|
|
||||||
|
public 魔法涌流(Character character) : base(SkillType.SuperSkill, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 魔法涌流特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 魔法涌流特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => "魔法涌流";
|
||||||
|
public override string Description => $"{Duration} 秒内,增加所有伤害的20%伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
public override bool Durative => true;
|
||||||
|
public override double Duration => 50;
|
||||||
|
|
||||||
|
private double 减伤比例 => Calculation.Round2Digits(0.2 + 0.02 * (Level -1));
|
||||||
|
private double 实际比例 = 0;
|
||||||
|
|
||||||
|
public override void OnEffectGained(Character character)
|
||||||
|
{
|
||||||
|
实际比例 = 减伤比例;
|
||||||
|
character.NormalAttack.SetMagicType(true, character.MagicType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEffectLost(Character character)
|
||||||
|
{
|
||||||
|
character.NormalAttack.SetMagicType(false, character.MagicType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AlterActualDamageAfterCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, bool isCritical)
|
||||||
|
{
|
||||||
|
if (enemy == Skill.Character)
|
||||||
|
{
|
||||||
|
damage = Calculation.Round2Digits(damage * (1 - 实际比例));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
|
{
|
||||||
|
RemainDuration = Duration;
|
||||||
|
if (!actor.Effects.Contains(this))
|
||||||
|
{
|
||||||
|
实际比例 = 0;
|
||||||
|
actor.Effects.Add(this);
|
||||||
|
OnEffectGained(actor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
50
Library/Skills/Yang/魔法震荡.cs
Normal file
50
Library/Skills/Yang/魔法震荡.cs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Milimoe.FunGame.Testing.Effects;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 魔法震荡 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4003;
|
||||||
|
public override string Name => "魔法震荡";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 魔法震荡(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 魔法震荡特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 魔法震荡特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"造成魔法伤害时有 35% 几率使敌人眩晕 1 回合。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, bool isCritical)
|
||||||
|
{
|
||||||
|
if (character == Skill.Character && isMagicDamage && new Random().NextDouble() < 0.35)
|
||||||
|
{
|
||||||
|
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||||
|
if (effects.Any())
|
||||||
|
{
|
||||||
|
effects.First().RemainDurationTurn++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
眩晕 e = new(Skill, character, false, 0, 1);
|
||||||
|
enemy.Effects.Add(e);
|
||||||
|
e.OnEffectGained(enemy);
|
||||||
|
}
|
||||||
|
WriteLine($"[ {character} ] 的魔法伤害触发了魔法震荡,[ {enemy} ] 被眩晕了!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,22 +0,0 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
|
||||||
using Milimoe.FunGame.Testing.Effects;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
|
||||||
{
|
|
||||||
public class 冰霜攻击 : Skill
|
|
||||||
{
|
|
||||||
public override long Id => 2001;
|
|
||||||
public override string Name => "冰霜攻击";
|
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
|
||||||
public override double MPCost => BaseMPCost + (50 * (Level - 1));
|
|
||||||
public override double CD => 20;
|
|
||||||
public override double CastTime => 6;
|
|
||||||
public override double HardnessTime => 3;
|
|
||||||
protected override double BaseMPCost => 30;
|
|
||||||
|
|
||||||
public 冰霜攻击(Character character) : base(true, true, character)
|
|
||||||
{
|
|
||||||
Effects.Add(new 冰霜攻击特效(this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
|
||||||
using Milimoe.FunGame.Testing.Effects;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
|
||||||
{
|
|
||||||
public class 大岛特性 : Skill
|
|
||||||
{
|
|
||||||
public override long Id => 5001;
|
|
||||||
public override string Name => "大岛特性";
|
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
|
||||||
|
|
||||||
public 大岛特性(Character character) : base(false, false, character)
|
|
||||||
{
|
|
||||||
Effects.Add(new 大岛特性特效(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
|
||||||
{
|
|
||||||
return Effects;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
|
||||||
using Milimoe.FunGame.Testing.Effects;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
|
||||||
{
|
|
||||||
public class 天赐之力 : Skill
|
|
||||||
{
|
|
||||||
public override long Id => 3001;
|
|
||||||
public override string Name => "天赐之力";
|
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
|
||||||
public override double EPCost => 100;
|
|
||||||
public override double CD => 60;
|
|
||||||
public override double HardnessTime => 15;
|
|
||||||
|
|
||||||
public 天赐之力(Character character) : base(true, character)
|
|
||||||
{
|
|
||||||
Effects.Add(new 天赐之力特效(this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
|
||||||
using Milimoe.FunGame.Testing.Effects;
|
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
|
||||||
{
|
|
||||||
public class 疾风步 : Skill
|
|
||||||
{
|
|
||||||
public override long Id => 4001;
|
|
||||||
public override string Name => "疾风步";
|
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
|
||||||
public override double EPCost => 35;
|
|
||||||
public override double CD => 35;
|
|
||||||
public override double HardnessTime => 5;
|
|
||||||
|
|
||||||
public 疾风步(Character character) : base(true, false, character)
|
|
||||||
{
|
|
||||||
Effects.Add(new 疾风步特效(this));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,12 +2,29 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Effects
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
{
|
{
|
||||||
|
public class 冰霜攻击 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 2001;
|
||||||
|
public override string Name => "冰霜攻击";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double MPCost => BaseMPCost + (50 * (Level - 1));
|
||||||
|
public override double CD => 20;
|
||||||
|
public override double CastTime => 6;
|
||||||
|
public override double HardnessTime => 3;
|
||||||
|
protected override double BaseMPCost => 30;
|
||||||
|
|
||||||
|
public 冰霜攻击(Character character) : base(SkillType.Magic, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 冰霜攻击特效(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class 冰霜攻击特效(Skill skill) : Effect(skill)
|
public class 冰霜攻击特效(Skill skill) : Effect(skill)
|
||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => "冰霜攻击";
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}%智力 [ {Damage} ] 点{CharacterSet.GetMagicName(MagicType)}。";
|
public override string Description => $"对目标敌人造成 {Calculation.Round2Digits(90 + 60 * (Skill.Level - 1))} + {Calculation.Round2Digits((1.2 + 1.8 * (Skill.Level - 1)) * 100)}%智力 [ {Damage} ] 点{CharacterSet.GetMagicName(MagicType)}。";
|
||||||
public override bool TargetSelf => false;
|
public override bool TargetSelf => false;
|
||||||
public override int TargetCount => 1;
|
public override int TargetCount => 1;
|
||||||
@ -25,14 +42,10 @@ namespace Milimoe.FunGame.Testing.Effects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnSkillCasted(ActionQueue queue, Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
public override void OnSkillCasted(Character actor, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
Character enemy = enemys[new Random().Next(enemys.Count)];
|
Character enemy = enemys[new Random().Next(enemys.Count)];
|
||||||
double damageBase = Damage;
|
DamageToEnemy(actor, enemy, true, MagicType, Damage);
|
||||||
if (queue.CalculateMagicalDamage(actor, enemy, false, MagicType, damageBase, out double damage) != DamageResult.Evaded)
|
|
||||||
{
|
|
||||||
queue.DamageToEnemy(actor, enemy, damage, false, true, MagicType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
30
Library/Skills/马猴烧酒/毁灭之势.cs
Normal file
30
Library/Skills/马猴烧酒/毁灭之势.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
|
{
|
||||||
|
public class 毁灭之势 : Skill
|
||||||
|
{
|
||||||
|
public override long Id => 4007;
|
||||||
|
public override string Name => "毁灭之势";
|
||||||
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
|
||||||
|
public 毁灭之势(Character character) : base(SkillType.Passive, character)
|
||||||
|
{
|
||||||
|
Effects.Add(new 毁灭之势特效(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
||||||
|
{
|
||||||
|
return Effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class 毁灭之势特效(Skill skill) : Effect(skill)
|
||||||
|
{
|
||||||
|
public override long Id => Skill.Id;
|
||||||
|
public override string Name => Skill.Name;
|
||||||
|
public override string Description => $"每时间提升 2.5% 所有伤害,无上限,但受到伤害时效果清零。";
|
||||||
|
public override bool TargetSelf => true;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user