mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-23 04:19:36 +08:00
优化 round 的问题
This commit is contained in:
parent
46f5f76f81
commit
dd16b49428
@ -6,7 +6,7 @@ namespace Oshima.Core.Configs
|
||||
public class OSMCore
|
||||
{
|
||||
public const string version = "v1.0";
|
||||
public const string version2 = "Beta4";
|
||||
public const string version2 = "Beta5";
|
||||
|
||||
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {GetBuiltTime(Assembly.GetExecutingAssembly().Location)}\r\nSee: https://github.com/milimoe";
|
||||
|
||||
|
@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Oshima.Core.Configs;
|
||||
using Oshima.Core.Models;
|
||||
using Oshima.Core.Utils;
|
||||
|
||||
|
@ -13,11 +13,11 @@ namespace Oshima.Core.Controllers
|
||||
private readonly ILogger<QQController> _logger = logger;
|
||||
|
||||
[HttpPost("bind")]
|
||||
public string Post([FromBody] BindQQ b)
|
||||
public string Bind([FromBody] BindQQ b)
|
||||
{
|
||||
if (QQOpenID.QQAndOpenID.Values.Any(qq => qq == b.QQ))
|
||||
if (b.Openid.Trim() == "" || b.QQ <= 0)
|
||||
{
|
||||
return NetworkUtility.JsonSerialize($"此QQ已被其他人绑定,如果你是此QQ的主人,请联系客服处理。");
|
||||
return NetworkUtility.JsonSerialize("请输入正确的OpenID和QQ!");
|
||||
}
|
||||
|
||||
if (QQOpenID.QQAndOpenID.TryGetValue(b.Openid, out long bindqq) && bindqq != 0)
|
||||
@ -25,6 +25,11 @@ namespace Oshima.Core.Controllers
|
||||
return NetworkUtility.JsonSerialize($"你已经绑定过:{bindqq},如绑定错误请联系客服处理。");
|
||||
}
|
||||
|
||||
if (QQOpenID.QQAndOpenID.Values.Any(qq => qq == b.QQ && b.Openid != b.Openid))
|
||||
{
|
||||
return NetworkUtility.JsonSerialize($"此QQ {b.QQ} 已被其他人绑定,如果你是此QQ的主人,请联系客服处理。");
|
||||
}
|
||||
|
||||
if (QQOpenID.QQAndOpenID.TryAdd(b.Openid, b.QQ))
|
||||
{
|
||||
QQOpenID.SaveConfig();
|
||||
@ -34,7 +39,18 @@ namespace Oshima.Core.Controllers
|
||||
return NetworkUtility.JsonSerialize($"绑定失败,请稍后再试!如持续绑定失败请联系客服处理。");
|
||||
}
|
||||
|
||||
return NetworkUtility.JsonSerialize("绑定成功!");
|
||||
return NetworkUtility.JsonSerialize("绑定成功!如果需要解除绑定,请发送【解绑+QQ号】(如:解绑123456789)!");
|
||||
}
|
||||
|
||||
[HttpPost("unbind")]
|
||||
public string Unbind([FromBody] BindQQ b)
|
||||
{
|
||||
if (QQOpenID.QQAndOpenID.TryGetValue(b.Openid, out long bindqq) && bindqq == b.QQ && QQOpenID.QQAndOpenID.Remove(b.Openid))
|
||||
{
|
||||
return NetworkUtility.JsonSerialize($"解绑成功!");
|
||||
}
|
||||
|
||||
return NetworkUtility.JsonSerialize("解绑失败!没有查到绑定的信息或者此账号已被其他人绑定,如果你是此QQ的主人,请联系客服处理。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ namespace Oshima.Core.Utils
|
||||
Dictionary<Character, double> 他们的血量百分比 = [];
|
||||
foreach (Character c in characters)
|
||||
{
|
||||
他们的血量百分比.TryAdd(c, Calculation.Round4Digits(c.HP / c.MaxHP));
|
||||
他们的血量百分比.TryAdd(c, c.HP / c.MaxHP);
|
||||
}
|
||||
double max = 他们的血量百分比.Values.Max();
|
||||
Character winner = 他们的血量百分比.Keys.Where(c => 他们的血量百分比[c] == max).First();
|
||||
@ -378,7 +378,7 @@ namespace Oshima.Core.Utils
|
||||
if (PrintOut)
|
||||
{
|
||||
Console.WriteLine("--- End ---");
|
||||
Console.WriteLine("总游戏时长:" + Calculation.Round2Digits(totalTime));
|
||||
Console.WriteLine($"总游戏时长:{totalTime:0.##}");
|
||||
Console.WriteLine("");
|
||||
}
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
namespace Oshima.FunGame.OshimaModules.Controllers
|
||||
{
|
||||
public class Controller
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
@ -8,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的所有主动技能 {实际硬直时间减少:0.##} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
@ -19,12 +18,12 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime - 实际硬直时间减少);
|
||||
s.HardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime - 实际硬直时间减少);
|
||||
s.HardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,12 +31,12 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
foreach (Skill s in character.Skills)
|
||||
{
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime + 实际硬直时间减少);
|
||||
s.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
foreach (Skill? s in character.Items.Select(i => i.Skills.Active))
|
||||
{
|
||||
if (s != null)
|
||||
s.HardnessTime = Calculation.Round2Digits(s.HardnessTime + 实际硬直时间减少);
|
||||
s.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加角色 {实际攻击力加成} 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override string Description => $"增加角色 {实际攻击力加成:0.##} 点攻击力。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
@ -8,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override string Description => $"减少角色的普通攻击 {实际硬直时间减少:0.##} 硬直时间。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
@ -17,12 +16,12 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime = Calculation.Round2Digits(character.NormalAttack.HardnessTime - 实际硬直时间减少); ;
|
||||
character.NormalAttack.HardnessTime -= 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
{
|
||||
character.NormalAttack.HardnessTime = Calculation.Round2Digits(character.NormalAttack.HardnessTime + 实际硬直时间减少); ;
|
||||
character.NormalAttack.HardnessTime += 实际硬直时间减少;
|
||||
}
|
||||
|
||||
public 普攻硬直时间减少(Skill skill, Character? source, Item? item, double reduce) : base(skill)
|
||||
|
@ -7,7 +7,7 @@ namespace Oshima.FunGame.OshimaModules.ItemEffects
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"增加角色 {实际物理护甲加成} 点物理护甲。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override string Description => $"增加角色 {实际物理护甲加成:0.##} 点物理护甲。" + (!TargetSelf ? $"来自:[ {Source} ]" + (Item != null ? $" 的 [ {Item.Name} ]" : "") : "");
|
||||
public override EffectType EffectType => EffectType.Item;
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Items
|
||||
{
|
||||
public override long Id => 5999;
|
||||
public override string Name => "独奏弓";
|
||||
public override string Description => $"增加角色 {攻击力加成} 点攻击力,减少普通攻击 {硬直时间减少} 硬直时间。";
|
||||
public override string Description => $"增加角色 {攻击力加成:0.##} 点攻击力,减少普通攻击 {硬直时间减少:0.##} 硬直时间。";
|
||||
|
||||
private readonly double 攻击力加成 = 80;
|
||||
private readonly double 硬直时间减少 = 2;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
@ -30,7 +29,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override double Duration => 30;
|
||||
|
||||
public HashSet<Character> 角色有第四层 { get; } = [];
|
||||
private double 吸血 => Calculation.Round4Digits(0.03 * Level);
|
||||
private double 吸血 => 0.03 * Level;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
@ -45,9 +44,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
层数 = 4;
|
||||
}
|
||||
double 实际吸血 = Calculation.Round2Digits(吸血 * 层数 * damage);
|
||||
double 实际吸血 = 吸血 * 层数 * damage;
|
||||
character.HP += 实际吸血;
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血:0.##} 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Oshima.FunGame.OshimaModules.Effects;
|
||||
|
||||
@ -57,7 +56,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
// 移除标记
|
||||
enemy.Effects.Remove(e);
|
||||
double 额外伤害 = Calculation.Round2Digits(enemy.MaxHP * 系数);
|
||||
double 额外伤害 = enemy.MaxHP * 系数;
|
||||
WriteLine($"[ {character} ] 发动了累积之压!将对 [ {enemy} ] 造成眩晕和额外伤害!");
|
||||
// 眩晕
|
||||
IEnumerable<Effect> effects3 = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -42,9 +41,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
double 实际伤害提升 = Calculation.Round2Digits(damage * 累计伤害);
|
||||
damage = Calculation.Round2Digits(damage + 实际伤害提升);
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {实际伤害提升} 点!");
|
||||
double 实际伤害提升 = damage * 累计伤害;
|
||||
damage += 实际伤害提升;
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {实际伤害提升:0.##} 点!");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -52,7 +51,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override void OnTimeElapsed(Character character, double eapsed)
|
||||
{
|
||||
累计伤害 = Calculation.Round4Digits(累计伤害 + 伤害提升 * eapsed);
|
||||
累计伤害 += 伤害提升 * eapsed;
|
||||
WriteLine($"[ {character} ] 的 [ {Name} ] 效果增加了,当前总提升:{累计伤害 * 100:0.##}%。");
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,13 +22,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:0.##}% [ {敏捷提升} ]。此技能会消耗至少 100 点能量。";
|
||||
public override string Description => $"{Duration:0.##} 时间内无法受到任何伤害,且敏捷提升 {系数 * 100:0.##}% [ {敏捷提升:0.##} ]。此技能会消耗至少 100 点能量。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => Calculation.Round2Digits(16 + 释放时的能量值 * 0.03);
|
||||
public override double Duration => 16 + 释放时的能量值 * 0.03;
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(0.3 + 0.03 * (Level - 1));
|
||||
private double 敏捷提升 => Calculation.Round2Digits(系数 * Skill.Character?.BaseAGI ?? 0);
|
||||
private double 系数 => 0.3 + 0.03 * (Level - 1);
|
||||
private double 敏捷提升 => 系数 * Skill.Character?.BaseAGI ?? 0;
|
||||
private double 实际敏捷提升 = 0;
|
||||
private double 释放时的能量值 = 0;
|
||||
|
||||
@ -37,7 +36,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
实际敏捷提升 = 敏捷提升;
|
||||
character.ExAGI += 实际敏捷提升;
|
||||
WriteLine($"[ {character} ] 的敏捷提升了 {系数 * 100:0.##}% [ {实际敏捷提升} ] !");
|
||||
WriteLine($"[ {character} ] 的敏捷提升了 {系数 * 100:0.##}% [ {实际敏捷提升:0.##} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -28,8 +27,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
||||
private double 暴击率提升 => Calculation.Round4Digits(0.2 + 0.03 * (Level - 1));
|
||||
private double 暴击伤害提升 => Calculation.Round4Digits(0.8 + 0.04 * (Level - 1));
|
||||
private double 暴击率提升 => 0.2 + 0.03 * (Level - 1);
|
||||
private double 暴击伤害提升 => 0.8 + 0.04 * (Level - 1);
|
||||
private double 实际暴击率提升 = 0;
|
||||
private double 实际暴击伤害提升 = 0;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -25,19 +24,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每释放 {触发硬直次数} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值} ] 获得额外能量值。";
|
||||
public override string Description => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法命中时基于 25% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
public bool 是否支持普攻 { get; set; } = false;
|
||||
public int 触发硬直次数 { get; set; } = 2;
|
||||
public int 释放次数 { get; set; } = 0;
|
||||
public double 获得额外能量值
|
||||
{
|
||||
get
|
||||
{
|
||||
return Calculation.Round2Digits(0.25 * Skill.Character?.INT ?? 0);
|
||||
}
|
||||
}
|
||||
public double 获得额外能量值 => 0.25 * Skill.Character?.INT ?? 0;
|
||||
|
||||
public override void AfterDamageCalculation(Character character, Character enemy, double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType, DamageResult damageResult)
|
||||
{
|
||||
@ -45,13 +38,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
double 实际获得能量值 = 获得额外能量值;
|
||||
character.EP += 实际获得能量值;
|
||||
WriteLine("[ " + character + " ] 发动了灵能反射!额外获得了 " + 实际获得能量值 + " 能量!");
|
||||
WriteLine($"[ {character} ] 发动了灵能反射!额外获得了 {实际获得能量值:0.##} 能量!");
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三重叠加特效);
|
||||
if (effects.Any() && effects.First() is 三重叠加特效 e)
|
||||
{
|
||||
double 获得的魔法值 = Calculation.Round2Digits(实际获得能量值 * 10);
|
||||
double 获得的魔法值 = 实际获得能量值 * 10;
|
||||
character.MP += 获得的魔法值;
|
||||
WriteLine("[ " + character + " ] 发动了三重叠加!回复了 " + 获得的魔法值 + " 魔法值!");
|
||||
WriteLine($"[ {character} ] 发动了三重叠加!回复了 {获得的魔法值:0.##} 魔法值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -26,8 +25,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override string Description => $"检查 [ 智慧与力量 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值;智力模式下,下一次魔法伤害提升 {伤害提升 * 100:0.##}%。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 生命值回复 => Calculation.Round4Digits(0.25 + 0.03 * (Level - 1));
|
||||
private double 伤害提升 => Calculation.Round4Digits(0.55 + 0.25 * (Level - 1));
|
||||
private double 生命值回复 => 0.25 + 0.03 * (Level - 1);
|
||||
private double 伤害提升 => 0.55 + 0.25 * (Level - 1);
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
@ -44,9 +43,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
if (character == Skill.Character && isMagicDamage)
|
||||
{
|
||||
double 实际伤害提升百分比 = 伤害提升;
|
||||
double 实际伤害提升 = Calculation.Round2Digits(damage * 实际伤害提升百分比);
|
||||
damage = Calculation.Round2Digits(damage + 实际伤害提升);
|
||||
WriteLine("[ " + character + " ] 发动了变幻之心!伤害提升了 " + 实际伤害提升 + " 点!");
|
||||
double 实际伤害提升 = damage * 实际伤害提升百分比;
|
||||
damage += 实际伤害提升;
|
||||
WriteLine($"[ {character} ] 发动了变幻之心!伤害提升了 {实际伤害提升:0.##} 点!");
|
||||
character.Effects.Remove(this);
|
||||
OnEffectLost(character);
|
||||
}
|
||||
@ -59,9 +58,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (caster.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double 回复的生命 = Calculation.Round2Digits(生命值回复 * caster.MaxHP);
|
||||
double 回复的生命 = 生命值回复 * caster.MaxHP;
|
||||
caster.HP += 回复的生命;
|
||||
WriteLine("[ " + caster + " ] 回复了 " + 回复的生命 + " 点生命值!");
|
||||
WriteLine($"[ {caster} ] 回复了 {回复的生命:0.##} 点生命值!");
|
||||
}
|
||||
else if (caster.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -25,14 +24,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP} ] 能量值。";
|
||||
public override string Description => $"META马专属被动:力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP:0.##} ] 能量值。";
|
||||
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 + " 能量!");
|
||||
baseEP *= 1.5;
|
||||
if (Skill.Character != null) WriteLine($"[ {Skill.Character} ] 发动了META马专属被动!本次获得了 {baseEP:0.##} 能量!");
|
||||
}
|
||||
|
||||
public override void OnTurnStart(Character character)
|
||||
@ -40,7 +39,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
if (character.EP < 200)
|
||||
{
|
||||
character.EP += EP;
|
||||
WriteLine("[ " + character + " ] 发动了META马专属被动!本次获得了 " + EP + " 能量!");
|
||||
WriteLine($"[ {character} ] 发动了META马专属被动!本次获得了 {EP:0.##} 能量!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,20 +22,20 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "力量爆发";
|
||||
public override string Description => $"获得 150% 力量 [ {攻击力加成} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值} ],持续 {Duration} 时间。";
|
||||
public override string Description => $"获得 150% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次攻击都会损失 9% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} 时间。";
|
||||
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);
|
||||
private double 当前生命值 => Calculation.Round2Digits(Skill.Character?.HP * 0.09 ?? 0);
|
||||
private double 攻击力加成 => Skill.Character?.STR * 1.5 ?? 0;
|
||||
private double 当前生命值 => Skill.Character?.HP * 0.09 ?? 0;
|
||||
private double 实际攻击力加成 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
实际攻击力加成 = 攻击力加成;
|
||||
character.ExATK2 += 实际攻击力加成;
|
||||
WriteLine($"[ {character} ] 的攻击力增加了 [ {实际攻击力加成} ] !");
|
||||
WriteLine($"[ {character} ] 的攻击力增加了 [ {实际攻击力加成:0.##} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(Character character)
|
||||
@ -51,7 +50,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
double 生命值减少 = 当前生命值;
|
||||
character.HP -= 生命值减少;
|
||||
WriteLine($"[ {character} ] 由于自身力量过于强大而被反噬,损失了 [ {生命值减少} ] 点生命值!");
|
||||
WriteLine($"[ {character} ] 由于自身力量过于强大而被反噬,损失了 [ {生命值减少:0.##} ] 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -26,7 +25,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"生命值高于 30% 时,受到额外的 [ {高于30额外伤害下限}~{高于30额外伤害上限}% ] 伤害,但是获得 [ 累计所受伤害的 {高于30的加成下限}~{高于30的加成上限}% ] 伤害加成;生命值低于等于 30% 时,不会受到额外的伤害,仅能获得 [ 累计受到的伤害 {低于30的加成下限}~{低于30的加成上限}% ] 伤害加成。" +
|
||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害})" : "");
|
||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##})" : "");
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 累计受到的伤害 = 0;
|
||||
@ -34,8 +33,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
private double 受到伤害之前的HP = 0;
|
||||
private double 这次受到的额外伤害 = 0;
|
||||
private readonly double 常规伤害加成 = 0.35;
|
||||
private readonly int 高于30额外伤害上限 = 40;
|
||||
private readonly int 高于30额外伤害下限 = 20;
|
||||
private readonly int 高于30额外伤害上限 = 30;
|
||||
private readonly int 高于30额外伤害下限 = 15;
|
||||
private readonly int 高于30的加成上限 = 100;
|
||||
private readonly int 高于30的加成下限 = 80;
|
||||
private readonly int 低于30的加成上限 = 60;
|
||||
@ -49,15 +48,15 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (character.HP > character.MaxHP * 0.3)
|
||||
{
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100));
|
||||
系数 = 1.0 + ((Random.Shared.Next(高于30的加成下限, 高于30的加成上限) + 0.0) / 100);
|
||||
}
|
||||
else
|
||||
{
|
||||
系数 = Calculation.Round4Digits(1.0 + ((new Random().Next(低于30的加成下限, 低于30的加成上限) + 0.0) / 100));
|
||||
系数 = 1.0 + ((Random.Shared.Next(低于30的加成下限, 低于30的加成上限) + 0.0) / 100);
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * 累计受到的伤害);
|
||||
return 系数 * 累计受到的伤害;
|
||||
}
|
||||
return Calculation.Round2Digits(系数 * damage);
|
||||
return 系数 * damage;
|
||||
}
|
||||
|
||||
public override void AlterExpectedDamageBeforeCalculation(Character character, Character enemy, ref double damage, bool isNormalAttack, bool isMagicDamage, MagicType magicType)
|
||||
@ -65,8 +64,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
这次的伤害加成 = 伤害加成(damage);
|
||||
damage = Calculation.Round2Digits(damage + 这次的伤害加成);
|
||||
WriteLine($"[ {character} ] 发动了玻璃大炮,获得了 {这次的伤害加成} 点伤害加成!");
|
||||
damage += 这次的伤害加成;
|
||||
WriteLine($"[ {character} ] 发动了玻璃大炮,获得了 {这次的伤害加成:0.##} 点伤害加成!");
|
||||
累计受到的伤害 = 0;
|
||||
}
|
||||
|
||||
@ -76,10 +75,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
if (enemy.HP > enemy.MaxHP * 0.3)
|
||||
{
|
||||
// 额外受到伤害
|
||||
double 系数 = Calculation.Round4Digits((new Random().Next(高于30额外伤害下限, 高于30额外伤害上限) + 0.0) / 100);
|
||||
这次受到的额外伤害 = Calculation.Round2Digits(damage * 系数);
|
||||
damage = Calculation.Round2Digits(damage + 这次受到的额外伤害);
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,将额外受到 {这次受到的额外伤害} 点伤害!");
|
||||
double 系数 = (Random.Shared.Next(高于30额外伤害下限, 高于30额外伤害上限) + 0.0) / 100;
|
||||
这次受到的额外伤害 = damage * 系数;
|
||||
damage += 这次受到的额外伤害;
|
||||
WriteLine($"[ {enemy} ] 的玻璃大炮触发,将额外受到 {这次受到的额外伤害:0.##} 点伤害!");
|
||||
}
|
||||
else 这次受到的额外伤害 = 0;
|
||||
}
|
||||
@ -89,7 +88,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (enemy == Skill.Character && damageResult != DamageResult.Evaded)
|
||||
{
|
||||
累计受到的伤害 = Calculation.Round2Digits(累计受到的伤害 + damage);
|
||||
累计受到的伤害 += damage;
|
||||
if (enemy.HP < 0 && 受到伤害之前的HP - damage + 这次受到的额外伤害 > 0)
|
||||
{
|
||||
enemy.HP = 10;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,13 +22,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [{智力加成}] 强化普通攻击伤害。";
|
||||
public override string Description => $"{Duration:0.##} 时间内,普通攻击转为魔法伤害,且硬直时间减少50%,并基于 {智力系数 * 100:0.##}% 智力 [ {智力加成:0.##} ] 强化普通攻击伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
|
||||
private double 智力系数 => Calculation.Round4Digits(1.4 + 0.4 * (Level - 1));
|
||||
private double 智力加成 => Calculation.Round2Digits(智力系数 * Skill.Character?.INT ?? 0);
|
||||
private double 智力系数 => 1.4 + 0.4 * (Level - 1);
|
||||
private double 智力加成 => 智力系数 * Skill.Character?.INT ?? 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
{
|
||||
@ -45,13 +44,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage + 智力加成);
|
||||
damage += 智力加成;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.5);
|
||||
baseHardnessTime *= 0.5;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -35,13 +34,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && !是否是嵌套伤害)
|
||||
{
|
||||
// 减少能量
|
||||
double EP = new Random().Next(10, 25);
|
||||
double EP = Random.Shared.Next(10, 25);
|
||||
enemy.EP -= EP;
|
||||
WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP} 点!现有能量:{enemy.EP}。");
|
||||
WriteLine($"[ {character} ] 发动了枯竭打击![ {enemy} ] 的能量值被减少了 {EP:0.##} 点!现有能量:{enemy.EP:0.##}。");
|
||||
// 额外伤害
|
||||
if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150)
|
||||
{
|
||||
double 额外伤害 = Calculation.Round2Digits(damage * 0.3);
|
||||
double 额外伤害 = damage * 0.3;
|
||||
WriteLine($"[ {character} ] 发动了枯竭打击!将造成额外伤害!");
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, isMagicDamage, magicType, 额外伤害);
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -24,13 +23,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对所有角色造成 " +
|
||||
$"{能量系数 * 100:0.##}% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害} ] 的魔法伤害。";
|
||||
$"{能量系数 * 100:0.##}% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害:0.##} ] 的魔法伤害。";
|
||||
public override bool TargetSelf => false;
|
||||
public override double TargetRange => 999;
|
||||
|
||||
private double 智力系数 => Calculation.Round4Digits(0.55 * Level);
|
||||
private double 智力伤害 => Calculation.Round2Digits(智力系数 * Skill.Character?.INT ?? 0);
|
||||
private double 能量系数 => Calculation.Round4Digits(0.75 * Level);
|
||||
private double 智力系数 => 0.55 * Level;
|
||||
private double 智力伤害 => 智力系数 * Skill.Character?.INT ?? 0;
|
||||
private double 能量系数 => 0.75 * Level;
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
{
|
||||
@ -38,7 +37,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
WriteLine($"[ {caster} ] 正在毁灭 [ {c} ] 的能量!!");
|
||||
double ep = c.EP;
|
||||
DamageToEnemy(caster, c, true, MagicType, Calculation.Round2Digits(ep * 能量系数 + 智力伤害));
|
||||
DamageToEnemy(caster, c, true, MagicType, ep * 能量系数 + 智力伤害);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -32,14 +31,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (character == Skill.Character && (enemy.HP / enemy.MaxHP) <= (character.HP / character.MaxHP))
|
||||
{
|
||||
double 额外伤害 = Calculation.Round2Digits(damage * 0.5);
|
||||
damage = Calculation.Round2Digits(damage + 额外伤害);
|
||||
double 额外伤害 = damage * 0.5;
|
||||
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))];
|
||||
IEnumerable<Character> list = [.. enemys.OrderBy(e => e.HP / e.MaxHP)];
|
||||
if (list.Any())
|
||||
{
|
||||
enemys.Clear();
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"获得 40% 吸血,持续 {Duration} 时间。";
|
||||
public override string Description => $"获得 40% 吸血,持续 {Duration:0.##} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
@ -32,9 +31,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (character == Skill.Character && damageResult != DamageResult.Evaded && character.HP < character.MaxHP)
|
||||
{
|
||||
double 实际吸血 = Calculation.Round2Digits(0.4 * damage);
|
||||
double 实际吸血 = 0.4 * damage;
|
||||
character.HP += 实际吸血;
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血} 点生命值!");
|
||||
WriteLine($"[ {character} ] 回复了 {实际吸血:0.##} 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,15 +22,15 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Duration} 时间内,增加 40% 攻击力 [ {攻击力提升} ]、30% 物理穿透和 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 强化普通攻击的伤害。在持续时间内,【心灵之火】的冷却时间降低至 3 时间。";
|
||||
public override string Description => $"{Duration:0.##} 时间内,增加 40% 攻击力 [ {攻击力提升:0.##} ]、30% 物理穿透和 25% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成:0.##} ] 强化普通攻击的伤害。在持续时间内,【心灵之火】的冷却时间降低至 3 时间。";
|
||||
public override bool TargetSelf => false;
|
||||
public override int TargetCount => 1;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(1.2 * (1 + 0.6 * (Skill.Level - 1)));
|
||||
private double 伤害加成 => Calculation.Round2Digits(系数 * Skill.Character?.AGI ?? 0);
|
||||
private double 攻击力提升 => Calculation.Round2Digits(0.4 * Skill.Character?.BaseATK ?? 0);
|
||||
private double 系数 => 1.2 * (1 + 0.6 * (Skill.Level - 1));
|
||||
private double 伤害加成 => 系数 * Skill.Character?.AGI ?? 0;
|
||||
private double 攻击力提升 => 0.4 * Skill.Character?.BaseATK ?? 0;
|
||||
private double 实际的攻击力提升 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
@ -68,13 +67,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage + 伤害加成);
|
||||
damage += 伤害加成;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||
baseHardnessTime *= 0.8;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(Character caster, List<Character> enemys, List<Character> teammates, Dictionary<string, object> others)
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -53,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (冷却时间 > 0)
|
||||
{
|
||||
冷却时间 = Calculation.Round2Digits(冷却时间 - elapsed);
|
||||
冷却时间 -= elapsed;
|
||||
if (冷却时间 <= 0)
|
||||
{
|
||||
冷却时间 = 0;
|
||||
@ -63,7 +62,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
|
||||
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
|
||||
{
|
||||
baseHardnessTime = Calculation.Round2Digits(baseHardnessTime * 0.8);
|
||||
baseHardnessTime *= 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,12 +22,12 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "魔法涌流";
|
||||
public override string Description => $"{Duration} 时间内,增加所有伤害的 {减伤比例 * 100:0.##}% 伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||
public override string Description => $"{Duration:0.##} 时间内,增加所有伤害的 {减伤比例 * 100:0.##}% 伤害减免,并将普通攻击转为魔法伤害,可叠加魔法震荡的效果。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 25;
|
||||
|
||||
private double 减伤比例 => Calculation.Round2Digits(0.1 + 0.02 * (Level - 1));
|
||||
private double 减伤比例 => 0.1 + 0.02 * (Level - 1);
|
||||
private double 实际比例 = 0;
|
||||
|
||||
public override void OnEffectGained(Character character)
|
||||
@ -46,7 +45,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
damage = Calculation.Round2Digits(damage * (1 - 实际比例));
|
||||
damage *= 1 - 实际比例;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration} 时间。";
|
||||
public override string Description => $"敏捷提高 20%,然后将目前的力量补充到与敏捷持平,持续 {Duration:0.##} 时间。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -28,7 +27,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
public override string Description => $"每次普通攻击都将附带基于 {敏捷系数 * 100:0.##}% 敏捷 [ {敏捷伤害} ] 的魔法伤害。";
|
||||
public override bool TargetSelf => true;
|
||||
|
||||
private double 敏捷伤害 => Calculation.Round2Digits(敏捷系数 * Skill.Character?.AGI ?? 0);
|
||||
private double 敏捷伤害 => 敏捷系数 * Skill.Character?.AGI ?? 0;
|
||||
private readonly double 敏捷系数 = 2.5;
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -23,13 +22,13 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {系数 * 100:0.##}% 敏捷 [ {伤害加成} ] 的强化伤害,并解除不可选中状态。";
|
||||
public override string Description => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration:0.##} 时间。破隐一击:在持续时间内,首次造成伤害会附加 {系数 * 100:0.##}% 敏捷 [ {伤害加成:0.##} ] 的强化伤害,并解除不可选中状态。";
|
||||
public override bool TargetSelf => true;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 12 + (1 * (Level - 1));
|
||||
|
||||
private double 系数 => Calculation.Round4Digits(0.5 + 0.5 * (Skill.Level - 1));
|
||||
private double 伤害加成 => Calculation.Round2Digits(系数 * Skill.Character?.AGI ?? 0);
|
||||
private double 系数 => 0.5 + 0.5 * (Skill.Level - 1);
|
||||
private double 伤害加成 => 系数 * Skill.Character?.AGI ?? 0;
|
||||
private bool 首次伤害 { get; set; } = true;
|
||||
private bool 破隐一击 { get; set; } = false;
|
||||
|
||||
@ -64,8 +63,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
character.CharacterEffectTypes.Remove(this);
|
||||
character.UpdateCharacterState();
|
||||
double d = 伤害加成;
|
||||
damage = Calculation.Round2Digits(damage + d);
|
||||
WriteLine($"[ {character} ] 触发了疾风步破隐一击,获得了 [ {d} ] 点伤害加成!");
|
||||
damage += d;
|
||||
WriteLine($"[ {character} ] 触发了疾风步破隐一击,获得了 [ {d:0.##} ] 点伤害加成!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Milimoe.FunGame.Core.Api.Utility;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
|
||||
namespace Oshima.FunGame.OshimaModules.Skills
|
||||
@ -24,7 +23,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
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.GetMagicDamageName(MagicType)}。";
|
||||
public override string Description => $"对目标敌人造成 {90 + 60 * (Skill.Level - 1):0.##} + {(1.2 + 1.8 * (Skill.Level - 1)) * 100:0.##}% 智力 [ {Damage:0.##} ] 点{CharacterSet.GetMagicDamageName(MagicType)}。";
|
||||
public override bool TargetSelf => false;
|
||||
public override int TargetCount => 1;
|
||||
|
||||
@ -35,7 +34,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
||||
double d = 0;
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
d = Calculation.Round2Digits(90 + 60 * (Skill.Level - 1) + (1.2 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT);
|
||||
d = 90 + 60 * (Skill.Level - 1) + (1.2 + 1.8 * (Skill.Level - 1)) * Skill.Character.INT;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user