mirror of
https://github.com/milimoe/FunGame-Testing.git
synced 2025-04-22 12:19:34 +08:00
进度 12/12
This commit is contained in:
parent
3178fa0569
commit
6ce313e7c0
@ -16,7 +16,7 @@ namespace FunGame.Testing.Characters
|
|||||||
c.NickName = "大島シヤ";
|
c.NickName = "大島シヤ";
|
||||||
c.PrimaryAttribute = PrimaryAttribute.STR;
|
c.PrimaryAttribute = PrimaryAttribute.STR;
|
||||||
c.InitialATK = 25;
|
c.InitialATK = 25;
|
||||||
c.InitialHP = 160;
|
c.InitialHP = 145;
|
||||||
c.InitialMP = 10;
|
c.InitialMP = 10;
|
||||||
c.InitialSTR = 35;
|
c.InitialSTR = 35;
|
||||||
c.STRGrowth = 3.5;
|
c.STRGrowth = 3.5;
|
||||||
|
@ -257,22 +257,41 @@ if (list.Count > 3)
|
|||||||
};
|
};
|
||||||
c.Skills.Add(累积之压);
|
c.Skills.Add(累积之压);
|
||||||
|
|
||||||
Skill 嗜血标记 = new 嗜血标记(c)
|
Skill 嗜血本能 = new 嗜血本能(c)
|
||||||
{
|
{
|
||||||
Level = slevel
|
Level = slevel
|
||||||
};
|
};
|
||||||
c.Skills.Add(嗜血标记);
|
c.Skills.Add(嗜血本能);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c != character1 && c != character2 && c != character3 && c != character4 &&
|
if (c == character11)
|
||||||
c != character5 && c != character6 && c != character7 && c != character8 &&
|
|
||||||
c != character9 && c != character10) //&& c != character11 && c != character12)
|
|
||||||
{
|
{
|
||||||
Skill 天赐之力 = new 天赐之力(c)
|
Skill 敏捷之刃 = new 敏捷之刃(c)
|
||||||
|
{
|
||||||
|
Level = 1
|
||||||
|
};
|
||||||
|
c.Skills.Add(敏捷之刃);
|
||||||
|
|
||||||
|
Skill 平衡强化 = new 平衡强化(c)
|
||||||
{
|
{
|
||||||
Level = slevel
|
Level = slevel
|
||||||
};
|
};
|
||||||
c.Skills.Add(天赐之力);
|
c.Skills.Add(平衡强化);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == character12)
|
||||||
|
{
|
||||||
|
Skill 弱者猎手 = new 弱者猎手(c)
|
||||||
|
{
|
||||||
|
Level = 1
|
||||||
|
};
|
||||||
|
c.Skills.Add(弱者猎手);
|
||||||
|
|
||||||
|
Skill 血之狂欢 = new 血之狂欢(c)
|
||||||
|
{
|
||||||
|
Level = slevel
|
||||||
|
};
|
||||||
|
c.Skills.Add(血之狂欢);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,22 +5,22 @@ using Milimoe.FunGame.Testing.Effects;
|
|||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
{
|
{
|
||||||
public class 嗜血标记 : Skill
|
public class 嗜血本能 : Skill
|
||||||
{
|
{
|
||||||
public override long Id => 3010;
|
public override long Id => 3010;
|
||||||
public override string Name => "嗜血标记";
|
public override string Name => "嗜血本能";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
public override double EPCost => 100;
|
public override double EPCost => 100;
|
||||||
public override double CD => 42 - 1 * (Level - 1);
|
public override double CD => 42 - 1 * (Level - 1);
|
||||||
public override double HardnessTime => 12;
|
public override double HardnessTime => 12;
|
||||||
|
|
||||||
public 嗜血标记(Character character) : base(SkillType.SuperSkill, character)
|
public 嗜血本能(Character character) : base(SkillType.SuperSkill, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 嗜血标记特效(this));
|
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 => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
@ -45,7 +45,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
层数 = 4;
|
层数 = 4;
|
||||||
}
|
}
|
||||||
double 实际吸血 = Calculation.Round2Digits(吸血 * damage);
|
double 实际吸血 = Calculation.Round2Digits(吸血 * 层数 * damage);
|
||||||
character.HP += 实际吸血;
|
character.HP += 实际吸血;
|
||||||
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||||
}
|
}
|
@ -41,8 +41,8 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
if (effects.Any() && effects.First() is 累积之压标记 e)
|
if (effects.Any() && effects.First() is 累积之压标记 e)
|
||||||
{
|
{
|
||||||
e.MarkLevel++;
|
e.MarkLevel++;
|
||||||
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血标记特效);
|
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血本能特效);
|
||||||
if (effects2.Any() && effects2.First() is 嗜血标记特效 e2)
|
if (effects2.Any() && effects2.First() is 嗜血本能特效 e2)
|
||||||
{
|
{
|
||||||
if (e.MarkLevel >= 4)
|
if (e.MarkLevel >= 4)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => "三重叠加";
|
public override string Name => "三重叠加";
|
||||||
public override string Description => $"使 [ 灵能反射 ] 的当前释放魔法次数归零,并且最大消除次数提高到 {灵能反射次数},并且在魔法命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
public override string Description => $"使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 10 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
||||||
$"(剩余:{剩余持续次数} 次)";
|
$"(剩余:{剩余持续次数} 次)";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
@ -35,6 +35,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||||
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
||||||
{
|
{
|
||||||
|
e.是否支持普攻 = true;
|
||||||
e.触发硬直次数 = 3;
|
e.触发硬直次数 = 3;
|
||||||
e.释放次数 = 0;
|
e.释放次数 = 0;
|
||||||
}
|
}
|
||||||
@ -45,6 +46,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||||
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
if (effects.Any() && effects.First() is 灵能反射特效 e)
|
||||||
{
|
{
|
||||||
|
e.是否支持普攻 = false;
|
||||||
e.触发硬直次数 = 2;
|
e.触发硬直次数 = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值} ] 获得额外能量值。";
|
public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值} ] 获得额外能量值。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public bool 是否支持普攻 { get; set; } = false;
|
||||||
public int 触发硬直次数 { get; set; } = 2;
|
public int 触发硬直次数 { get; set; } = 2;
|
||||||
public int 释放次数 { get; set; } = 0;
|
public int 释放次数 { get; set; } = 0;
|
||||||
public double 获得额外能量值
|
public double 获得额外能量值
|
||||||
@ -40,7 +41,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
|
|
||||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||||
{
|
{
|
||||||
if (character == Skill.Character && isMagicDamage && damageResult != DamageResult.Evaded && character.EP < 200)
|
if (character == Skill.Character && (是否支持普攻 && isNormalAttack || isMagicDamage) && damageResult != DamageResult.Evaded && character.EP < 200)
|
||||||
{
|
{
|
||||||
double 实际获得能量值 = 获得额外能量值;
|
double 实际获得能量值 = 获得额外能量值;
|
||||||
character.EP += 实际获得能量值;
|
character.EP += 实际获得能量值;
|
||||||
@ -55,12 +56,29 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AlterHardnessTimeAfterCastSkill(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||||
|
{
|
||||||
|
if (是否支持普攻)
|
||||||
|
{
|
||||||
|
AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void AlterHardnessTimeAfterCastSkill(Character character, Skill skill, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||||
|
{
|
||||||
|
if (skill.SkillType == SkillType.Magic)
|
||||||
|
{
|
||||||
|
AlterHardnessTime(character, ref baseHardnessTime, ref isCheckProtected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AlterHardnessTime(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||||
{
|
{
|
||||||
释放次数++;
|
释放次数++;
|
||||||
if (释放次数 < 触发硬直次数)
|
if (释放次数 < 触发硬直次数)
|
||||||
{
|
{
|
||||||
baseHardnessTime = 0;
|
baseHardnessTime = 0;
|
||||||
|
isCheckProtected = false;
|
||||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -70,6 +88,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
||||||
{
|
{
|
||||||
baseHardnessTime = 0;
|
baseHardnessTime = 0;
|
||||||
|
isCheckProtected = false;
|
||||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||||
e.剩余持续次数--;
|
e.剩余持续次数--;
|
||||||
if (e.剩余持续次数 == 0)
|
if (e.剩余持续次数 == 0)
|
||||||
|
@ -25,7 +25,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"生命值高于30%时,受到额外的 [ 20~40% ] 伤害,但是获得 [ 上次所受伤害的 80% ] 伤害加成;生命值低于等于30%时,不会受到额外的伤害,但是仅能获得 [ 上次所受伤害的 30% ] 伤害加成。" +
|
public override string Description => $"生命值高于30%时,受到额外的 [ 20~40% ] 伤害,但是获得 [ 上次所受伤害的 110~140% ] 伤害加成;生命值低于等于30%时,不会受到额外的伤害,仅能获得 [ 上次所受伤害的 35% ] 伤害加成。" +
|
||||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:f2}% 伤害加成。(当前伤害加成:{伤害加成 * 100:f2}%)";
|
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:f2}% 伤害加成。(当前伤害加成:{伤害加成 * 100:f2}%)";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
@ -33,8 +33,9 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
private double 这次的伤害加成 = 0;
|
private double 这次的伤害加成 = 0;
|
||||||
private double 这次受到的额外伤害 = 0;
|
private double 这次受到的额外伤害 = 0;
|
||||||
private readonly double 常规伤害加成 = 0.2;
|
private readonly double 常规伤害加成 = 0.2;
|
||||||
private readonly double 高于30的加成 = 0.8;
|
private readonly int 高于30的加成上限 = 40;
|
||||||
private readonly double 低于30的加成 = 0.3;
|
private readonly int 高于30的加成下限 = 10;
|
||||||
|
private readonly double 低于30的加成 = 0.35;
|
||||||
|
|
||||||
private double 伤害加成
|
private double 伤害加成
|
||||||
{
|
{
|
||||||
@ -47,7 +48,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
if (character.HP > character.MaxHP * 0.3)
|
if (character.HP > character.MaxHP * 0.3)
|
||||||
{
|
{
|
||||||
系数 = 高于30的加成;
|
系数 = Calculation.Round2Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
double EP = new Random().Next(10, 25);
|
double EP = new Random().Next(10, 25);
|
||||||
enemy.EP -= EP;
|
enemy.EP -= EP;
|
||||||
WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP} 点!现有能量:{enemy.EP}。");
|
WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP} 点!现有能量:{enemy.EP}。");
|
||||||
// 伤害提升
|
// 额外伤害
|
||||||
if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150)
|
if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150)
|
||||||
{
|
{
|
||||||
double 额外伤害 = Calculation.Round2Digits(damage * 0.3);
|
double 额外伤害 = Calculation.Round2Digits(damage * 0.3);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
@ -24,7 +25,28 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"优先攻击血量更低的角色,对生命值低于自己的角色造成150%伤害。";
|
public override string Description => $"优先攻击血量更低的角色,对生命值百分比低于自己的角色造成 150% 伤害。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||||
|
{
|
||||||
|
if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP))
|
||||||
|
{
|
||||||
|
double 额外伤害 = Calculation.Round2Digits(damage * 1.5);
|
||||||
|
damage = Calculation.Round2Digits(damage + 额外伤害);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool AlterEnemyListBeforeAction(Character character, List<Character> enemys, List<Character> teammates, List<Skill> skills, Dictionary<Character, int> continuousKilling, Dictionary<Character, int> earnedMoney)
|
||||||
|
{
|
||||||
|
IEnumerable<Character> list = [.. enemys.OrderBy(e => Calculation.Round4Digits(e.HP / e.MaxHP))];
|
||||||
|
if (list.Any())
|
||||||
|
{
|
||||||
|
enemys.Clear();
|
||||||
|
enemys.Add(list.First());
|
||||||
|
WriteLine($"[ {character} ] 发动了弱者猎手![ {list.First()} ] 被盯上了!");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Milimoe.FunGame.Testing.Effects;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
{
|
{
|
||||||
@ -8,82 +10,42 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override long Id => 4012;
|
public override long Id => 4012;
|
||||||
public override string Name => "血之狂欢";
|
public override string Name => "血之狂欢";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 100;
|
||||||
|
public override double CD => 45;
|
||||||
|
public override double HardnessTime => 7;
|
||||||
|
|
||||||
public 血之狂欢(Character character) : base(SkillType.Passive, character)
|
public 血之狂欢(Character character) : base(SkillType.SuperSkill, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 血之狂欢特效(this));
|
Effects.Add(new 血之狂欢特效(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
|
||||||
{
|
|
||||||
return Effects;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"30秒内,获得50%吸血。";
|
public override string Description => $"获得 40% 吸血,持续 {Duration} 时间。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
public override bool Durative => true;
|
||||||
|
public override double Duration => 30;
|
||||||
|
|
||||||
private double 交换前的额外智力 = 0;
|
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||||
private double 交换前的额外力量 = 0;
|
|
||||||
|
|
||||||
public override void OnAttributeChanged(Character character)
|
|
||||||
{
|
{
|
||||||
if (Skill.Character != null)
|
if (character == Skill.Character && damageResult != DamageResult.Evaded && character.HP < character.MaxHP)
|
||||||
{
|
{
|
||||||
if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT)
|
double 实际吸血 = Calculation.Round2Digits(0.4 * damage);
|
||||||
{
|
character.HP += 实际吸血;
|
||||||
double diff = character.ExSTR - 交换前的额外力量;
|
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||||
character.ExINT = 交换前的额外力量 + character.BaseSTR + diff;
|
|
||||||
}
|
|
||||||
else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR)
|
|
||||||
{
|
|
||||||
double diff = character.ExINT - 交换前的额外智力;
|
|
||||||
character.ExSTR = 交换前的额外智力 + character.BaseINT + diff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnTimeElapsed(Character character, double elapsed)
|
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
if (Skill.Character != null)
|
RemainDuration = Duration;
|
||||||
|
if (!caster.Effects.Contains(this))
|
||||||
{
|
{
|
||||||
Character c = Skill.Character;
|
caster.Effects.Add(this);
|
||||||
if (c.HP < c.MaxHP * 0.3)
|
OnEffectGained(caster);
|
||||||
{
|
|
||||||
if (c.PrimaryAttribute == PrimaryAttribute.INT)
|
|
||||||
{
|
|
||||||
double pastHP = c.HP;
|
|
||||||
double pastMaxHP = c.MaxHP;
|
|
||||||
double pastMP = c.MP;
|
|
||||||
double pastMaxMP = c.MaxMP;
|
|
||||||
c.PrimaryAttribute = PrimaryAttribute.STR;
|
|
||||||
交换前的额外智力 = c.ExINT;
|
|
||||||
交换前的额外力量 = c.ExSTR;
|
|
||||||
c.ExINT = -c.BaseINT;
|
|
||||||
c.ExSTR = 交换前的额外智力 + c.BaseINT + 交换前的额外力量;
|
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
|
||||||
{
|
|
||||||
double pastHP = c.HP;
|
|
||||||
double pastMaxHP = c.MaxHP;
|
|
||||||
double pastMP = c.MP;
|
|
||||||
double pastMaxMP = c.MaxMP;
|
|
||||||
c.PrimaryAttribute = PrimaryAttribute.INT;
|
|
||||||
交换前的额外智力 = c.ExINT;
|
|
||||||
交换前的额外力量 = c.ExSTR;
|
|
||||||
c.ExINT = 交换前的额外力量 + c.BaseSTR + 交换前的额外智力;
|
|
||||||
c.ExSTR = -c.BaseSTR;
|
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {Calculation.Round2Digits((1.5 + 1.5 * (Skill.Level - 1)) * 100)}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。";
|
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {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 => 12 + (1 * (Level - 1));
|
||||||
|
|
||||||
private double 伤害加成
|
private double 伤害加成
|
||||||
{
|
{
|
||||||
|
@ -8,82 +8,62 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override long Id => 4011;
|
public override long Id => 4011;
|
||||||
public override string Name => "平衡强化";
|
public override string Name => "平衡强化";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
|
public override double EPCost => 100;
|
||||||
|
public override double CD => 55 - (1 * (Level - 1));
|
||||||
|
public override double HardnessTime => 12;
|
||||||
|
|
||||||
public 平衡强化(Character character) : base(SkillType.Passive, character)
|
public 平衡强化(Character character) : base(SkillType.SuperSkill, character)
|
||||||
{
|
{
|
||||||
Effects.Add(new 平衡强化特效(this));
|
Effects.Add(new 平衡强化特效(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IEnumerable<Effect> AddInactiveEffectToCharacter()
|
|
||||||
{
|
|
||||||
return Effects;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"敏捷提高20%,然后将目前的力量补充到与敏捷持平,持续30秒。";
|
public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration} 时间。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
public override bool Durative => true;
|
||||||
|
public override double Duration => 30;
|
||||||
|
|
||||||
private double 交换前的额外智力 = 0;
|
private double 本次提升的敏捷 = 0;
|
||||||
private double 交换前的额外力量 = 0;
|
private double 本次提升的力量 = 0;
|
||||||
|
|
||||||
public override void OnAttributeChanged(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
if (Skill.Character != null)
|
double pastHP = character.HP;
|
||||||
{
|
double pastMaxHP = character.MaxHP;
|
||||||
if (Skill.Character.PrimaryAttribute == PrimaryAttribute.INT)
|
double pastMP = character.MP;
|
||||||
{
|
double pastMaxMP = character.MaxMP;
|
||||||
double diff = character.ExSTR - 交换前的额外力量;
|
本次提升的敏捷 = character.BaseAGI * 0.2;
|
||||||
character.ExINT = 交换前的额外力量 + character.BaseSTR + diff;
|
character.ExAGI += 本次提升的敏捷;
|
||||||
}
|
本次提升的力量 = character.AGI - character.STR;
|
||||||
else if (Skill.Character.PrimaryAttribute == PrimaryAttribute.STR)
|
character.ExSTR += 本次提升的力量;
|
||||||
{
|
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||||
double diff = character.ExINT - 交换前的额外智力;
|
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:f2},力量提升了 {本次提升的力量:f2}!");
|
||||||
character.ExSTR = 交换前的额外智力 + character.BaseINT + diff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnTimeElapsed(Character character, double elapsed)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
if (Skill.Character != null)
|
double pastHP = character.HP;
|
||||||
|
double pastMaxHP = character.MaxHP;
|
||||||
|
double pastMP = character.MP;
|
||||||
|
double pastMaxMP = character.MaxMP;
|
||||||
|
character.ExAGI -= character.BaseAGI * 0.2;
|
||||||
|
character.ExSTR -= 本次提升的力量;
|
||||||
|
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
Character c = Skill.Character;
|
RemainDuration = Duration;
|
||||||
if (c.HP < c.MaxHP * 0.3)
|
if (!caster.Effects.Contains(this))
|
||||||
{
|
{
|
||||||
if (c.PrimaryAttribute == PrimaryAttribute.INT)
|
本次提升的敏捷 = 0;
|
||||||
{
|
本次提升的力量 = 0;
|
||||||
double pastHP = c.HP;
|
caster.Effects.Add(this);
|
||||||
double pastMaxHP = c.MaxHP;
|
OnEffectGained(caster);
|
||||||
double pastMP = c.MP;
|
|
||||||
double pastMaxMP = c.MaxMP;
|
|
||||||
c.PrimaryAttribute = PrimaryAttribute.STR;
|
|
||||||
交换前的额外智力 = c.ExINT;
|
|
||||||
交换前的额外力量 = c.ExSTR;
|
|
||||||
c.ExINT = -c.BaseINT;
|
|
||||||
c.ExSTR = 交换前的额外智力 + c.BaseINT + 交换前的额外力量;
|
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
|
||||||
{
|
|
||||||
double pastHP = c.HP;
|
|
||||||
double pastMaxHP = c.MaxHP;
|
|
||||||
double pastMP = c.MP;
|
|
||||||
double pastMaxMP = c.MaxMP;
|
|
||||||
c.PrimaryAttribute = PrimaryAttribute.INT;
|
|
||||||
交换前的额外智力 = c.ExINT;
|
|
||||||
交换前的额外力量 = c.ExSTR;
|
|
||||||
c.ExINT = 交换前的额外力量 + c.BaseSTR + 交换前的额外智力;
|
|
||||||
c.ExSTR = -c.BaseSTR;
|
|
||||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Api.Utility;
|
||||||
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
|
||||||
namespace Milimoe.FunGame.Testing.Skills
|
namespace Milimoe.FunGame.Testing.Skills
|
||||||
@ -24,7 +25,26 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"每次普通攻击都将附带基于敏捷的魔法伤害。";
|
public override string Description => $"每次普通攻击都将附带基于 {敏捷系数 * 100:f2}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。";
|
||||||
public override bool TargetSelf => true;
|
public override bool TargetSelf => true;
|
||||||
|
|
||||||
|
private double 敏捷伤害 => Calculation.Round2Digits(敏捷系数 * Skill.Character?.AGI ?? 0);
|
||||||
|
private readonly double 敏捷系数 = 2.5;
|
||||||
|
private bool 是否是嵌套伤害 = false;
|
||||||
|
|
||||||
|
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||||
|
{
|
||||||
|
if (character == Skill.Character && isNormalAttack && damageResult != DamageResult.Evaded && !是否是嵌套伤害)
|
||||||
|
{
|
||||||
|
WriteLine($"[ {character} ] 发动了敏捷之刃!将造成额外伤害!");
|
||||||
|
是否是嵌套伤害 = true;
|
||||||
|
DamageToEnemy(character, enemy, true, magicType, 敏捷伤害);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (character == Skill.Character && 是否是嵌套伤害)
|
||||||
|
{
|
||||||
|
是否是嵌套伤害 = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override string Name => "绝对领域";
|
public override string Name => "绝对领域";
|
||||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||||
public override double EPCost => Math.Max(100, Character?.EP ?? 100);
|
public override double EPCost => Math.Max(100, Character?.EP ?? 100);
|
||||||
public override double CD => 32;
|
public override double CD => 32 + (1 * (Level - 1));
|
||||||
public override double HardnessTime => 12;
|
public override double HardnessTime => 12;
|
||||||
|
|
||||||
public 绝对领域(Character character) : base(SkillType.SuperSkill, character)
|
public 绝对领域(Character character) : base(SkillType.SuperSkill, character)
|
||||||
@ -26,9 +26,9 @@ namespace Milimoe.FunGame.Testing.Skills
|
|||||||
public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:f2}% [ {敏捷提升} ]。此技能会消耗至少 100 点能量。";
|
public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:f2}% [ {敏捷提升} ]。此技能会消耗至少 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 => Calculation.Round2Digits(20 + 释放时的能量值 * 0.03);
|
public override double Duration => Calculation.Round2Digits(16 + 释放时的能量值 * 0.03);
|
||||||
|
|
||||||
private double 系数 => Calculation.Round4Digits(0.3 + 0.04 * (Level - 1));
|
private double 系数 => Calculation.Round4Digits(0.3 + 0.03 * (Level - 1));
|
||||||
private double 敏捷提升 => Calculation.Round2Digits(系数 * Skill.Character?.BaseAGI ?? 0);
|
private double 敏捷提升 => Calculation.Round2Digits(系数 * Skill.Character?.BaseAGI ?? 0);
|
||||||
private double 实际敏捷提升 = 0;
|
private double 实际敏捷提升 = 0;
|
||||||
private double 释放时的能量值 = 0;
|
private double 释放时的能量值 = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user