chore: initialize OshimaBot repository (rename from Enhancement)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 冰狱冥嚎 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.冰狱冥嚎;
|
||||
public override string Name => "冰狱冥嚎";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 55 + (55 * (Level - 1)) : 55;
|
||||
public override double CD => 32;
|
||||
public override double CastTime => 10;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override double MagicBottleneck => 20 + 22 * (Level - 1);
|
||||
|
||||
public 冰狱冥嚎(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 30, 35, 0.2, 0.2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 冰霜攻击 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.冰霜攻击;
|
||||
public override string Name => "冰霜攻击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 50 + (50 * (Level - 1)) : 50;
|
||||
public override double CD => 25;
|
||||
public override double CastTime => 5;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override double MagicBottleneck => 20 + 22 * (Level - 1);
|
||||
|
||||
public 冰霜攻击(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 90, 60, 0.35, 0.4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 凝胶稠絮 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.凝胶稠絮;
|
||||
public override string Name => "凝胶稠絮";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (75 * (Level - 1)) : 75;
|
||||
// 调整:L8 CD 19.5 → 20.5(魔法下限 20)
|
||||
public override double CD => Level > 0 ? 31 - (1.5 * (Level - 1)) : 31;
|
||||
public override double CastTime => 11;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 15 + 16 * (Level - 1);
|
||||
|
||||
public 凝胶稠絮(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成虚弱(this, false, 0, 3, 0, 0.08, 0.5, 0.05, 0.1,
|
||||
0.025, 0.1, 0.015, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
using FunGame.Core.Entity;
|
||||
using OshimaBot.Content.Effects;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 十二宫星环:为目标友方附加【强运】被动状态
|
||||
/// <para/>· 作用角色数随等级提升:1 / 2 / 3 / 4
|
||||
/// <para/>· 强运持续回合数随等级提升:2 / 3 / 4 / 4
|
||||
/// <para/>· 强运状态下,角色每个回合结束时随机生成 2~3 份绑定自身的回合奖励
|
||||
/// </summary>
|
||||
public class 十二宫星环 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.十二宫星环;
|
||||
public override string Name => "十二宫星环";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + 75 * (Level - 1) : 70;
|
||||
public override double CD => Level > 0 ? 50 - (1 * (Level - 1)) : 50;
|
||||
public override double CastTime => Level > 0 ? 4 + (0.5 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
>= 4 => 4,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 魔法瓶颈(2026-09-23 修订):此前设为 0(= 放弃该参数,效能恒 100%),
|
||||
/// 原因是本技能只施加【强运】状态、不吃效能乘算。
|
||||
/// <para/>现改为**把效能当命中率系数**使用(见特效的命中检定)⇒ 需要给出瓶颈才能算出效能:
|
||||
/// 效能 = `clamp(1 + (施法者INT − 瓶颈) / 瓶颈, 0.01, 2.0)`,命中率 = 效能 × 0.5。
|
||||
/// 取手册的「L8 主流值 103」⇒ 施法者 INT = 103 时命中 50%、INT ≥ 206 时必中。
|
||||
/// </summary>
|
||||
public override double MagicBottleneck => 103;
|
||||
|
||||
public 十二宫星环(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 十二宫星环特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 十二宫星环特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description =>
|
||||
$"为{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色附加【强运】状态,持续 {持续回合} 回合;" +
|
||||
$"强运状态下,角色每个回合结束时随机生成 {强运.最小生成数量}~{强运.最大生成数量} 份绑定自身的回合奖励。";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
/// <summary>持续回合:2 / 3 / 4 / 4(随等级提升,最高 4)</summary>
|
||||
private int 持续回合 => Math.Min(4, Math.Max(2, 2 + (Skill.Level - 1)));
|
||||
|
||||
/// <summary>
|
||||
/// 命中率:统一走 <see cref="EfficacyHit"/>(2026-09-23 统一口径)。
|
||||
/// <para/>纯机制魔法没有自身概率 ⇒ 取默认基础概率 0.5、成长 0
|
||||
/// ⇒ 效能 200% 必中 / 100% 命中 50% / →0% →0%。
|
||||
/// </summary>
|
||||
private double 命中率 => EfficacyHit.命中率(Skill);
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
foreach (Character target in ctx.Targets)
|
||||
{
|
||||
if (target.HP <= 0) continue;
|
||||
if (!命中检定(caster, target)) continue;
|
||||
|
||||
强运 e = new(Skill, target, caster, false, 0, 持续回合);
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
WriteLine($"[ {target} ] 被十二宫星环笼罩,获得【强运】状态!持续 {持续回合} 回合!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>命中检定:统一走 <see cref="EfficacyHit.检定"/>(效能够高时必中且不消耗随机数)。</summary>
|
||||
private bool 命中检定(Character caster, Character target)
|
||||
{
|
||||
double rate = 命中率;
|
||||
string info = EfficacyHit.文本(Skill, rate);
|
||||
if (!EfficacyHit.检定(rate, Random))
|
||||
{
|
||||
WriteLine($"[ {caster} ] 的十二宫星环未能笼罩 [ {target} ],被抵抗了!({info})");
|
||||
return false;
|
||||
}
|
||||
WriteLine($"[ {caster} ] 的十二宫星环命中了 [ {target} ]({info})。");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 反魔法领域 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.反魔法领域;
|
||||
public override string Name => "反魔法领域";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 魔法消耗基础 + 7 * 魔法消耗等级成长,
|
||||
7 => 魔法消耗基础 + 5 * 魔法消耗等级成长,
|
||||
6 => 魔法消耗基础 + 5 * 魔法消耗等级成长,
|
||||
5 => 魔法消耗基础 + 4 * 魔法消耗等级成长,
|
||||
4 => 魔法消耗基础 + 3 * 魔法消耗等级成长,
|
||||
3 => 魔法消耗基础 + 2 * 魔法消耗等级成长,
|
||||
_ => 魔法消耗基础
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double CD => Level > 0 ? 55 - (2 * (Level - 1)) : 55;
|
||||
public override double CastTime => Level > 0 ? 5 + (0.5 * (Level - 1)) : 5;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 6,
|
||||
7 => 5,
|
||||
6 => 4,
|
||||
5 => 4,
|
||||
4 => 3,
|
||||
3 => 2,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
private double 魔法消耗基础 { get; set; } = 85;
|
||||
private double 魔法消耗等级成长 { get; set; } = 80;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 13 + 14 * (Level - 1);
|
||||
|
||||
public 反魔法领域(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 造成封技(this, true, 15, 0, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 回复术 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.回复术;
|
||||
public override string Name => "回复术";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (75 * (Level - 1)) : 75;
|
||||
public override double CD => 28;
|
||||
public override double CastTime => 3;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 11 + 12 * (Level - 1);
|
||||
|
||||
public 回复术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 纯数值回复生命(this, 540, 430));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 回复术复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.回复术复;
|
||||
public override string Name => "回复术·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 95 + (105 * (Level - 1)) : 95;
|
||||
public override double CD => 34;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 4,
|
||||
6 => 4,
|
||||
7 => 5,
|
||||
8 => 5,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 13 + 14 * (Level - 1);
|
||||
|
||||
public 回复术复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 百分比回复生命值(this, 0.24, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 回复术改 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.回复术改;
|
||||
public override string Name => "回复术·改";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 80 + (80 * (Level - 1)) : 80;
|
||||
public override double CD => 40;
|
||||
public override double CastTime => 3;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 回复术改(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 百分比回复生命值(this, 0.36, 0.04));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 圣灵术 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.圣灵术;
|
||||
public override string Name => "圣灵术";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.FirstOrDefault(e => e is 弱驱散特效)?.DispelDescription ?? "";
|
||||
public override double MPCost => Level > 0 ? 110 + (95 * (Level - 1)) : 110;
|
||||
public override double CD => Level > 0 ? 65 - (2 * (Level - 1)) : 65;
|
||||
public override double CastTime => 3;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool SelectAllTeammates => true;
|
||||
public override bool AllowSelectDead => true;
|
||||
public override double MagicBottleneck => 15 + 16 * (Level - 1);
|
||||
|
||||
public 圣灵术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 强驱散特效(this));
|
||||
Effects.Add(new 纯数值回复生命(this, 380, 270, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 地狱之门 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.地狱之门;
|
||||
public override string Name => "地狱之门";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (60 * (Level - 1)) : 75;
|
||||
public override double CD => Level > 0 ? 30 + (0.8 * (Level - 1)) : 30;
|
||||
public override double CastTime => 3;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 => 2,
|
||||
5 => 2,
|
||||
6 => 3,
|
||||
7 => 3,
|
||||
8 => 4,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Sector;
|
||||
public override int CanSelectTargetRange => 4;
|
||||
public override double MagicBottleneck => 15 + 20 * (Level - 1);
|
||||
|
||||
public 地狱之门(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 纯数值伤害(this, 75, 15, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 3, 0, 0.5, 0.2, 0.03, false, 85.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 复苏术 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.复苏术;
|
||||
public override string Name => "复苏术";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.FirstOrDefault(e => e is 弱驱散特效)?.DispelDescription ?? "";
|
||||
public override double MPCost => Level > 0 ? 95 + (85 * (Level - 1)) : 95;
|
||||
public override double CD => 48;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override bool AllowSelectDead => true;
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 复苏术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP >= 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 强驱散特效(this));
|
||||
Effects.Add(new 百分比回复生命值(this, 0.21, 0.02, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 大地之墙 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.大地之墙;
|
||||
public override string Name => "大地之墙";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => "驱散性:持续性弱驱散\r\n被驱散性:护盾不可驱散,持续性弱驱散在护盾值用尽前需强驱散,否则可弱驱散";
|
||||
public override double MPCost
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 魔法消耗基础 + 6 * 魔法消耗等级成长,
|
||||
7 => 魔法消耗基础 + 4 * 魔法消耗等级成长,
|
||||
6 => 魔法消耗基础 + 4 * 魔法消耗等级成长,
|
||||
5 => 魔法消耗基础 + 3 * 魔法消耗等级成长,
|
||||
4 => 魔法消耗基础 + 3 * 魔法消耗等级成长,
|
||||
3 => 魔法消耗基础 + 2.5 * 魔法消耗等级成长,
|
||||
_ => 魔法消耗基础
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double CD => Level > 0 ? 48 - (2 * (Level - 1)) : 48;
|
||||
public override double CastTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 7,
|
||||
7 => 7,
|
||||
6 => 8,
|
||||
5 => 8,
|
||||
4 => 9,
|
||||
3 => 10,
|
||||
2 => 11,
|
||||
_ => 12
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
private double 魔法消耗基础 { get; set; } = 90;
|
||||
private double 魔法消耗等级成长 { get; set; } = 90;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 4,
|
||||
7 => 3,
|
||||
6 => 3,
|
||||
5 => 2,
|
||||
4 => 2,
|
||||
3 => 2,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 大地之墙(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effect effect = new 大地之墙特效(this);
|
||||
Effect shield = new 增加物理护盾_特效持续型(this, 120, 160, true, 20)
|
||||
{
|
||||
DispelledType = DispelledType.CannotBeDispelled,
|
||||
ParentEffect = effect
|
||||
};
|
||||
Effects.Add(shield);
|
||||
Effect dispel = new 施加持续性弱驱散(this, durative: true, duration: 12)
|
||||
{
|
||||
DispelledType = DispelledType.Strong,
|
||||
ParentEffect = effect
|
||||
};
|
||||
Effects.Add(dispel);
|
||||
Effects.Add(effect);
|
||||
}
|
||||
}
|
||||
|
||||
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 ForceHideInStatusBar => true;
|
||||
|
||||
private List<Character> _targets = [];
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (!character.Effects.Any(e => e is 物理护盾 && e.ParentEffect == this))
|
||||
{
|
||||
if (character.Effects.FirstOrDefault(e => e is 施加持续性弱驱散 && e.ParentEffect == this) is 施加持续性弱驱散 e)
|
||||
{
|
||||
e.DispelledType = DispelledType.Weak;
|
||||
}
|
||||
else
|
||||
{
|
||||
character.Effects.Remove(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
_targets = targets;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
target.Effects.Add(this);
|
||||
}
|
||||
}
|
||||
|
||||
public string Observer()
|
||||
{
|
||||
return $"正在监控目标角色 [ {string.Join(" ] / [ ", _targets)} ] 的对象:{string.Join(",", _targets.SelectMany(c => c.Effects.Where(e => e.ParentEffect == this).Distinct().Select(e => e.Name)))}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 导力停止 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.导力停止;
|
||||
public override string Name => "导力停止";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 120 + (80 * (Level - 1)) : 120;
|
||||
public override double CD => Level > 0 ? 60 - (1.5 * (Level - 1)) : 60;
|
||||
public override double CastTime => Level > 0 ? 3 + (0.5 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool SelectAllEnemies => true;
|
||||
public override double MagicBottleneck => 28 + 24 * (Level - 1);
|
||||
|
||||
public 导力停止(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 纯数值伤害(this, 45, 20, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Silence, true, 8, 0, 1.2, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 岩石之息 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.岩石之息;
|
||||
public override string Name => "岩石之息";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 40 + (35 * (Level - 1)) : 40;
|
||||
public override double CD => 32;
|
||||
public override double CastTime => 9;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.LinePass;
|
||||
public override int CanSelectTargetRange => 2;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 岩石之息(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.STR, 30, 10, 0.30, 0.2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 弧光消耗 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.弧光消耗;
|
||||
public override string Name => "弧光消耗";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double MPCost => Level > 0 ? 35 + (30 * (Level - 1)) : 35;
|
||||
public override double CD => 35;
|
||||
public override double CastTime => 4;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 弧光消耗(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 吸取魔法值(this, 35, 30, false, 0.7));
|
||||
Effects.Add(new 吸取能量值(this, 4, 3, false, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 弧形日珥 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.弧形日珥;
|
||||
public override string Name => "弧形日珥";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 55 + (55 * (Level - 1)) : 55;
|
||||
public override double CD => 35;
|
||||
public override double CastTime => 8;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 弧形日珥(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.AGI, 45, 25, 0.2, 0.12));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 强音之力 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.强音之力;
|
||||
public override string Name => "强音之力";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 65 + (70 * (Level - 1)) : 65;
|
||||
public override double CD => Level > 0 ? 40 - (1 * (Level - 1)) : 40;
|
||||
public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 强音之力(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 强音之力特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 强音之力特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DamageBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.06 + 0.06 * (Level - 1) : 0.06;
|
||||
|
||||
public 强音之力特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DamageBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 强音之力复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.强音之力复;
|
||||
public override string Name => "强音之力·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 85 + (85 * (Level - 1)) : 85;
|
||||
public override double CD => Level > 0 ? 45 - (0.5 * (Level - 1)) : 45;
|
||||
public override double CastTime => Level > 0 ? 3 + (0.5 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 强音之力复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 强音之力复特效(this, false, 0, 3));
|
||||
}
|
||||
}
|
||||
|
||||
public class 强音之力复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DamageBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.045 + 0.045 * (Level - 1) : 0.045;
|
||||
|
||||
public 强音之力复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DamageBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 心灵之霞 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.心灵之霞;
|
||||
public override string Name => "心灵之霞";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 35 + (50 * (Level - 1)) : 35;
|
||||
public override double CD => 30;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override double MagicBottleneck => 25 + 22 * (Level - 1);
|
||||
|
||||
public 心灵之霞(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 80, 55, 0.5, 0.6));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间减速 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间减速;
|
||||
public override string Name => "时间减速";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 65 + (75 * (Level - 1)) : 65;
|
||||
public override double CD => Level > 0 ? 28 - (1 * (Level - 1)) : 28;
|
||||
public override double CastTime => Level > 0 ? 2 + (2 * (Level - 1)) : 2;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 时间减速(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 降低敌方行动速度(this, 65, 35));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间减速复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间减速复;
|
||||
public override string Name => "时间减速·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 85 + (95 * (Level - 1)) : 85;
|
||||
public override double CD => Level > 0 ? 32 - (1 * (Level - 1)) : 32;
|
||||
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 14 + 14 * (Level - 1);
|
||||
|
||||
public 时间减速复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 时间减速复特效(this, false, 0, 3, 0, 40, 30, 0.08, 0.01));
|
||||
}
|
||||
}
|
||||
|
||||
public class 时间减速复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" +
|
||||
$"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.Slow;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool ExemptDuration => true;
|
||||
public override bool IsDebuff => true;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _baseSpd;
|
||||
private readonly double _baseAcc;
|
||||
private readonly double _spdLevelGrowth;
|
||||
private readonly double _accLevelGrowth;
|
||||
|
||||
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
|
||||
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
|
||||
|
||||
public 时间减速复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_baseSpd = baseSpd;
|
||||
_spdLevelGrowth = spdLevelGrowth;
|
||||
_baseAcc = baseAcc;
|
||||
_accLevelGrowth = accLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
|
||||
{
|
||||
{ "exspd", -ExSPD }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·行动速度降低",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
if (!CheckExemption(caster, target, e1))
|
||||
{
|
||||
WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!");
|
||||
target.Effects.Add(e1);
|
||||
e1.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e1.IsDebuff = true;
|
||||
GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false);
|
||||
}
|
||||
Effect e2 = new AccelerationCoefficient(Skill, new()
|
||||
{
|
||||
{ "exacc", -ExACC }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·加速系数降低",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
if (!CheckExemption(caster, target, e2))
|
||||
{
|
||||
WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!");
|
||||
target.Effects.Add(e2);
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e2.IsDebuff = true;
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Slow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间减速改 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间减速改;
|
||||
public override string Name => "时间减速·改";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (85 * (Level - 1)) : 75;
|
||||
public override double CD => Level > 0 ? 38 - (1 * (Level - 1)) : 38;
|
||||
public override double CastTime => Level > 0 ? 4 + (0.5 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override double MagicBottleneck => 15 + 15 * (Level - 1);
|
||||
|
||||
public 时间减速改(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 时间减速改特效(this, false, 0, 4, 0, 50, 40, 0.1, 0.02));
|
||||
}
|
||||
}
|
||||
|
||||
public class 时间减速改特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" +
|
||||
$"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.Slow;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool ExemptDuration => true;
|
||||
public override bool IsDebuff => true;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _baseSpd;
|
||||
private readonly double _baseAcc;
|
||||
private readonly double _spdLevelGrowth;
|
||||
private readonly double _accLevelGrowth;
|
||||
|
||||
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
|
||||
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
|
||||
|
||||
public 时间减速改特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_baseSpd = baseSpd;
|
||||
_spdLevelGrowth = spdLevelGrowth;
|
||||
_baseAcc = baseAcc;
|
||||
_accLevelGrowth = accLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
|
||||
{
|
||||
{ "exspd", -ExSPD }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·行动速度降低",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
if (!CheckExemption(caster, target, e1))
|
||||
{
|
||||
WriteLine($"[ {target} ] 的行动速度降低了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被延长了 30%!持续时间:{持续时间}!");
|
||||
target.Effects.Add(e1);
|
||||
e1.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e1.IsDebuff = true;
|
||||
GamingQueue?.ChangeCharacterHardnessTime(target, 0.3, true, false);
|
||||
}
|
||||
Effect e2 = new AccelerationCoefficient(Skill, new()
|
||||
{
|
||||
{ "exacc", -ExACC }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·加速系数降低",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
if (!CheckExemption(caster, target, e2))
|
||||
{
|
||||
WriteLine($"[ {target} ] 的加速系数降低了 {ExACC * 100:0.##}%!持续时间:{持续时间}!");
|
||||
target.Effects.Add(e2);
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e2.IsDebuff = true;
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Slow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using FunGame.Core.Entity;
|
||||
using OshimaBot.Content.Effects;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 魔法 · 控制型【时间剥夺】—— 直接剥夺对手的决策点
|
||||
/// <para/>设计意图:本项目首次把「控制」从**状态层面**下移到**资源层面**。
|
||||
/// 实测表明决策点是硬约束(AI 行动循环持续到 `CurrentDecisionPoints` 耗尽,
|
||||
/// `GamingQueue.cs:1201`)且每回合被用光(上回合结束仅剩 ~7%)
|
||||
/// ⇒ **把对手的决策点削到 0,等于直接终止他本回合的行动**,且不吃"控制状态"的免疫/驱散。
|
||||
/// <para/>标尺(魔法):MP L8 240–900 → 365|CD 20–65 → L8 = 41|吟唱 2–12 → 3|硬直 3–8 → 5;
|
||||
/// `MagicBottleneck` 必填 → 103。剥夺量 L1–3=1 / L4–7=2 / L8=3。
|
||||
/// <para/>⚠ 归属:这是**新型控制手段**,手册标尺原本没有对应条目,本实现按
|
||||
/// 「每次剥夺 2 点 ≈ 目标少做 1 件事、弱于封技 1 回合」定价,并留 41 秒冷却。
|
||||
/// </summary>
|
||||
public class 时间剥夺 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间剥夺;
|
||||
public override string Name => "时间剥夺";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 105 + 95 * (Level - 1) : 105;
|
||||
public override double CD => Level > 0 ? 45 + 2 * (Level - 1) : 45;
|
||||
public override double CastTime => Level > 0 ? 3 + 1 * (Level - 1) : 3;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectEnemy => true;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 103;
|
||||
|
||||
public 时间剥夺(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 时间剥夺特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 时间剥夺特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"剥夺目标 {剥夺量} 点决策点(不会使其低于 0)。";
|
||||
|
||||
/// <summary>剥夺量:L1–3 = 1 / L4–7 = 2 / L8 = 3</summary>
|
||||
private int 剥夺量 => 1 + Skill.Level / 4;
|
||||
|
||||
/// <summary>
|
||||
/// 命中率:统一走 <see cref="EfficacyHit"/>(2026-09-23 统一口径)。
|
||||
/// <para/>纯机制魔法没有自身概率 ⇒ 取默认基础概率 0.5、成长 0
|
||||
/// ⇒ 效能 200% 必中 / 100% 命中 50% / →0% →0%。
|
||||
/// </summary>
|
||||
private double 命中率 => EfficacyHit.命中率(Skill);
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
if (GamingQueue is null) return;
|
||||
foreach (Character target in ctx.Targets)
|
||||
{
|
||||
if (target.HP <= 0) continue;
|
||||
if (!命中检定(caster, target)) continue;
|
||||
if (!GamingQueue.CharacterDecisionPoints.TryGetValue(target, out DecisionPoints? dp) || dp is null) continue;
|
||||
int before = dp.CurrentDecisionPoints;
|
||||
dp.CurrentDecisionPoints = Math.Max(0, before - 剥夺量);
|
||||
int actual = before - dp.CurrentDecisionPoints;
|
||||
WriteLine($"[ {caster} ] 对 [ {target} ] 施放了时间剥夺:[ {target} ] 失去 {actual} 点决策点({before} → {dp.CurrentDecisionPoints} / {dp.MaxDecisionPoints}){(dp.CurrentDecisionPoints == 0 ? ",本回合已无法行动!" : "")}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>命中检定:统一走 <see cref="EfficacyHit.检定"/>(效能够高时必中且不消耗随机数)。</summary>
|
||||
private bool 命中检定(Character caster, Character target)
|
||||
{
|
||||
double rate = 命中率;
|
||||
string info = EfficacyHit.文本(Skill, rate);
|
||||
if (!EfficacyHit.检定(rate, Random))
|
||||
{
|
||||
WriteLine($"[ {caster} ] 的时间剥夺被 [ {target} ] 抵抗了!({info})");
|
||||
return false;
|
||||
}
|
||||
WriteLine($"[ {caster} ] 的时间剥夺命中了 [ {target} ]({info})。");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间加速 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间加速;
|
||||
public override string Name => "时间加速";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70;
|
||||
// 调整:L8 CD 18 → 20(魔法下限 20)
|
||||
public override double CD => Level > 0 ? 27 - (1 * (Level - 1)) : 27;
|
||||
public override double CastTime => Level > 0 ? 2 + (1 * (Level - 1)) : 2;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 时间加速(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 提升友方行动速度(this, 65, 30));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间加速复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间加速复;
|
||||
public override string Name => "时间加速·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90;
|
||||
public override double CD => Level > 0 ? 55 - (0.8 * (Level - 1)) : 55;
|
||||
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 14 + 14 * (Level - 1);
|
||||
|
||||
public 时间加速复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 时间加速复特效(this, false, 0, 3, 0, 40, 20, 0.08, 0.01));
|
||||
}
|
||||
}
|
||||
|
||||
public class 时间加速复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" +
|
||||
$"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.Haste;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool IsDebuff => false;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _baseSpd;
|
||||
private readonly double _baseAcc;
|
||||
private readonly double _spdLevelGrowth;
|
||||
private readonly double _accLevelGrowth;
|
||||
|
||||
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
|
||||
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
|
||||
|
||||
public 时间加速复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_baseSpd = baseSpd;
|
||||
_spdLevelGrowth = spdLevelGrowth;
|
||||
_baseAcc = baseAcc;
|
||||
_accLevelGrowth = accLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的行动速度提升了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}!");
|
||||
WriteLine($"[ {target} ] 的加速系数提升了 {ExACC * 100:0.##}%!持续时间:{持续时间}!");
|
||||
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
|
||||
{
|
||||
{ "exspd", ExSPD }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·行动速度提升",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
target.Effects.Add(e1);
|
||||
e1.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e1.IsDebuff = false;
|
||||
GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false);
|
||||
Effect e2 = new AccelerationCoefficient(Skill, new()
|
||||
{
|
||||
{ "exacc", ExACC }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·加速系数提升",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e2.IsDebuff = false;
|
||||
RecordCharacterApplyEffects(target, EffectType.Haste);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 时间加速改 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.时间加速改;
|
||||
public override string Name => "时间加速·改";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 120 + (115 * (Level - 1)) : 120;
|
||||
public override double CD => Level > 0 ? 45 - (0.5 * (Level - 1)) : 45;
|
||||
public override double CastTime => 3;
|
||||
// 调整:硬直 9 → 8(魔法区间 3–8)
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override double MagicBottleneck => 15 + 15 * (Level - 1);
|
||||
|
||||
public 时间加速改(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 时间加速改特效(this, false, 0, 4, 0, 45, 25, 0.1, 0.02));
|
||||
}
|
||||
}
|
||||
|
||||
public class 时间加速改特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExSPD):0.##} 点行动速度,并{(!IsDebuff ? "缩短" : "延长")}目标 30% 的行动等待时间(当前硬直时间);" +
|
||||
$"{(!IsDebuff ? "增加" : "减少")}{Skill.TargetDescription()} {Math.Abs(ExACC) * 100:0.##}% 加速系数。持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.Haste;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool IsDebuff => false;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _baseSpd;
|
||||
private readonly double _baseAcc;
|
||||
private readonly double _spdLevelGrowth;
|
||||
private readonly double _accLevelGrowth;
|
||||
|
||||
private double ExSPD => Level > 0 ? _baseSpd + _spdLevelGrowth * (Level - 1) : _baseSpd;
|
||||
private double ExACC => Level > 0 ? _baseAcc + _accLevelGrowth * (Level - 1) : _baseAcc;
|
||||
|
||||
public 时间加速改特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double baseSpd = 0, double spdLevelGrowth = 0, double baseAcc = 0, double accLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_baseSpd = baseSpd;
|
||||
_spdLevelGrowth = spdLevelGrowth;
|
||||
_baseAcc = baseAcc;
|
||||
_accLevelGrowth = accLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的行动速度提升了 {ExSPD:0.##} 点,行动等待时间(当前硬直时间)被缩短了 30%!持续时间:{持续时间}!");
|
||||
WriteLine($"[ {target} ] 的加速系数提升了 {ExACC * 100:0.##}%!持续时间:{持续时间}!");
|
||||
Effect e1 = new ExSPD(Skill, new Dictionary<string, object>()
|
||||
{
|
||||
{ "exspd", ExSPD }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·行动速度提升",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
target.Effects.Add(e1);
|
||||
e1.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e1.IsDebuff = false;
|
||||
GamingQueue?.ChangeCharacterHardnessTime(target, -0.3, true, false);
|
||||
Effect e2 = new AccelerationCoefficient(Skill, new()
|
||||
{
|
||||
{ "exacc", ExACC }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·加速系数提升",
|
||||
Durative = _durative,
|
||||
Duration = 实际持续时间,
|
||||
DurationTurn = (int)实际持续时间
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
e2.IsDebuff = false;
|
||||
RecordCharacterApplyEffects(target, EffectType.Haste);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 暗物质 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.暗物质;
|
||||
public override string Name => "暗物质";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (80 * (Level - 1)) : 70;
|
||||
public override double CD => 40;
|
||||
public override double CastTime => 10;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 暗物质(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_无基础伤害(this, 1.3, 0.28));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 根源屏障 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.根源屏障;
|
||||
public override string Name => "根源屏障";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => "被驱散性:可弱驱散";
|
||||
public override double MPCost => Level > 0 ? 200 + (75 * (Level - 1)) : 200;
|
||||
public override double CD => Level > 0 ? 50 - (3 * (Level - 1)) : 50;
|
||||
public override double CastTime => Level > 0 ? 12 - (0.5 * (Level - 1)) : 12;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 11 + 12 * (Level - 1);
|
||||
|
||||
public 根源屏障(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 根源屏障特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 根源屏障特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"为{Skill.TargetDescription()}提供{CharacterSet.GetImmuneTypeName(ImmuneType.Magical)},持续 {持续时间}。" + (Skill.Level > 4 ? $"为{Skill.TargetDescription()}提供{CharacterSet.GetImmuneTypeName(ImmuneType.Skilled)},持续 1 回合。" : "");
|
||||
public override EffectType EffectType => EffectType.MagicalImmune;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => $"{实际持续时间} 回合";
|
||||
private int 实际持续时间
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 or 4 or 5 => 3,
|
||||
6 or 7 or 8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public 根源屏障特效(Skill skill) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
Effect effect = new 施加免疫(Skill, ImmuneType.Magical, false, 0, 实际持续时间);
|
||||
effect.OnSkillCasted(ctx);
|
||||
if (Level > 4)
|
||||
{
|
||||
effect = new 施加免疫(Skill, ImmuneType.Skilled, false, 0, 2);
|
||||
effect.OnSkillCasted(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 次元上升 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.次元上升;
|
||||
public override string Name => "次元上升";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成眩晕).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 造成眩晕).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
|
||||
public override double CD => Level > 0 ? 35 - (1.5 * (Level - 1)) : 35;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override double MagicBottleneck => 15 + 21 * (Level - 1);
|
||||
|
||||
public 次元上升(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 35, 25, 0.3, 0.25));
|
||||
Effects.Add(new 造成眩晕(this, true, 10, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 死亡咆哮 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.死亡咆哮;
|
||||
public override string Name => "死亡咆哮";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
|
||||
public override double CD => Level > 0 ? 55 + (1 * (Level - 1)) : 55;
|
||||
public override double CastTime => 3;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 => 2,
|
||||
5 => 2,
|
||||
6 => 2,
|
||||
7 => 3,
|
||||
8 => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 20 + 24 * (Level - 1);
|
||||
|
||||
public 死亡咆哮(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 纯数值伤害(this, 70, 30, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Cripple, true, 3, 0, 1, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 水之矢 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.水之矢;
|
||||
public override string Name => "水之矢";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 30 + (40 * (Level - 1)) : 30;
|
||||
public override double CD => 20;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 水之矢(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于核心属性的伤害(this, 65, 45, 0.35, 0.45));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 水蓝轰炸 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.水蓝轰炸;
|
||||
public override string Name => "水蓝轰炸";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 45 + (50 * (Level - 1)) : 45;
|
||||
public override double CD => 30;
|
||||
public override double CastTime => 8;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 水蓝轰炸(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 基于核心属性的伤害(this, 15, 35, 0.15, 0.2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 沉默十字 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.沉默十字;
|
||||
public override string Name => "沉默十字";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 魔法消耗基础 + 5 * 魔法消耗等级成长,
|
||||
7 => 魔法消耗基础 + 4 * 魔法消耗等级成长,
|
||||
6 => 魔法消耗基础 + 4 * 魔法消耗等级成长,
|
||||
5 => 魔法消耗基础 + 3 * 魔法消耗等级成长,
|
||||
4 => 魔法消耗基础 + 3 * 魔法消耗等级成长,
|
||||
3 => 魔法消耗基础 + 2 * 魔法消耗等级成长,
|
||||
_ => 魔法消耗基础
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double CD => Level > 0 ? 55 - (3 * (Level - 1)) : 55;
|
||||
public override double CastTime => Level > 0 ? 10 - (0.5 * (Level - 1)) : 10;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
8 => 3,
|
||||
7 => 2,
|
||||
6 => 2,
|
||||
5 => 2,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
private double 魔法消耗基础 { get; set; } = 65;
|
||||
private double 魔法消耗等级成长 { get; set; } = 65;
|
||||
|
||||
public 沉默十字(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成封技(this, false, 0, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 治愈术 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.治愈术;
|
||||
public override string Name => "治愈术";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double MPCost => Level > 0 ? 80 + (85 * (Level - 1)) : 80;
|
||||
public override double CD => Level > 0 ? 35 - (1 * (Level - 1)) : 35;
|
||||
public override double CastTime => Level > 0 ? 3 + (0.25 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 治愈术(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
Effects.Add(new 百分比回复生命值(this, 0.28, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 治愈术复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.治愈术复;
|
||||
public override string Name => "治愈术·复";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85;
|
||||
public override double CD => Level > 0 ? 42 - (1 * (Level - 1)) : 42;
|
||||
public override double CastTime => Level > 0 ? 3 + (0.25 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 14 + 14 * (Level - 1);
|
||||
|
||||
public 治愈术复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
SelectTargetPredicates.Add(c => c.HP > 0 && c.HP < c.MaxHP);
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
Effects.Add(new 纯数值回复生命(this, 420, 340));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 混沌烙印 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.混沌烙印;
|
||||
public override string Name => "混沌烙印";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成气绝).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 造成气绝).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 65 + (70 * (Level - 1)) : 65;
|
||||
public override double CD => Level > 0 ? 50 - (1.5 * (Level - 1)) : 50;
|
||||
public override double CastTime => 4;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 15 + 15 * (Level - 1);
|
||||
|
||||
public 混沌烙印(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成气绝(this, true, 4, 0, 0.5, true, 0, 0.05));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 火之矢 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.火之矢;
|
||||
public override string Name => "火之矢";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 30 + (40 * (Level - 1)) : 30;
|
||||
public override double CD => 20;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 火之矢(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于核心属性的伤害(this, 45, 65, 0.45, 0.35));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 火山咆哮 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.火山咆哮;
|
||||
public override string Name => "火山咆哮";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 45 + (50 * (Level - 1)) : 45;
|
||||
public override double CD => 30;
|
||||
public override double CastTime => 8;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 火山咆哮(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
Effects.Add(new 基于核心属性的伤害(this, 35, 15, 0.2, 0.15));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 灾难冲击波 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.灾难冲击波;
|
||||
public override string Name => "灾难冲击波";
|
||||
public override string Description => string.Join("\r\n", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 灾难冲击波特效).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 灾难冲击波特效).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 95 + (75 * (Level - 1)) : 95;
|
||||
public override double CD => Level > 0 ? 35 - (1.5 * (Level - 1)) : 35;
|
||||
public override double CastTime => Level > 0 ? 6 + (0.5 * (Level - 1)) : 6;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 2,
|
||||
4 => 2,
|
||||
5 => 3,
|
||||
6 => 3,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 15 + 20 * (Level - 1);
|
||||
|
||||
public 灾难冲击波(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 15, 0.1, 0.04));
|
||||
Effects.Add(new 灾难冲击波特效(this, false, 0, 4, 0, 0.1, 0.025));
|
||||
}
|
||||
}
|
||||
|
||||
public class 灾难冲击波特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对{Skill.TargetDescription()}造成魔法抗性降低 {ActualMDFReductionPercent * 100:0.##}%,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.MagicResistBreak;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool ExemptDuration => true;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _MDFReductionPercent;
|
||||
private readonly double _MDFReductionPercentLevelGrowth;
|
||||
private double ActualMDFReductionPercent => Level > 0 ? _MDFReductionPercent + _MDFReductionPercentLevelGrowth * (Level - 1) : _MDFReductionPercent;
|
||||
|
||||
public 灾难冲击波特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double MDFReductionPercent = 0, double MDFReductionPercentLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_MDFReductionPercent = MDFReductionPercent;
|
||||
_MDFReductionPercentLevelGrowth = MDFReductionPercentLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
ExMDF e = new(Skill, new(){
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", -ActualMDFReductionPercent }
|
||||
}, caster);
|
||||
if (!CheckExemption(caster, target, e))
|
||||
{
|
||||
WriteLine($"[ {target} ] 的魔法抗性降低了 {ActualMDFReductionPercent * 100:0.##}%!持续时间:{持续时间}!");
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.MagicResistBreak;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, e.EffectType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 盖亚之盾 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.盖亚之盾;
|
||||
public override string Name => "盖亚之盾";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double MPCost => Level > 0 ? 魔法消耗基础 + (魔法消耗等级成长 * (Level - 1)) : 魔法消耗基础;
|
||||
public override double CD => Level > 0 ? 50 - (3 * (Level - 1)) : 50;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
private double 魔法消耗基础 { get; set; } = 100;
|
||||
private double 魔法消耗等级成长 { get; set; } = 100;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool SelectAllTeammates => true;
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 盖亚之盾(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 增加混合护盾值(this, 160, 120));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 石之锤 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.石之锤;
|
||||
public override string Name => "石之锤";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 35 + (30 * (Level - 1)) : 35;
|
||||
public override double CD => 22;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 石之锤(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.STR, 100, 50, 0.55, 0.4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 破碎虚空 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.破碎虚空;
|
||||
public override string Name => "破碎虚空";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 80 + (80 * (Level - 1)) : 80;
|
||||
public override double CD => 30;
|
||||
public override double CastTime => 10;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override double MagicBottleneck => 16 + 17 * (Level - 1);
|
||||
|
||||
public 破碎虚空(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_无基础伤害(this, 0.60, 0.1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 神圣祝福 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.神圣祝福;
|
||||
public override string Name => "神圣祝福";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 95 + (100 * (Level - 1)) : 95;
|
||||
public override double CD => Level > 0 ? 40 - (1.5 * (Level - 1)) : 40;
|
||||
public override double CastTime => Level > 0 ? 5 + (1 * (Level - 1)) : 5;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 神圣祝福(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 神圣祝福特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 神圣祝福特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力、{ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.05 + 0.05 * (Level - 1) : 0.05;
|
||||
private double ExDEF => Level > 0 ? 0.15 + 0.2 * (Level - 1) : 0.15;
|
||||
private double ExMDF => Level > 0 ? 0.01 + 0.015 * (Level - 1) : 0.01;
|
||||
|
||||
public 神圣祝福特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%,物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·攻击力提升"
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExDEF2 e2 = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·物理护甲提升"
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExMDF e3 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·魔法抗性提升"
|
||||
};
|
||||
target.Effects.Add(e3);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e3.Durative = true;
|
||||
e3.Duration = 实际持续时间;
|
||||
e3.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e3.Durative = false;
|
||||
e3.DurationTurn = (int)实际持续时间;
|
||||
e3.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e3.EffectType = EffectType.DefenseBoost;
|
||||
e3.Source = caster;
|
||||
e3.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DamageBoost, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 神圣祝福复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.神圣祝福复;
|
||||
public override string Name => "神圣祝福·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 110 + (110 * (Level - 1)) : 110;
|
||||
public override double CD => Level > 0 ? 50 - (1.5 * (Level - 1)) : 50;
|
||||
public override double CastTime => Level > 0 ? 3 + (1 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 神圣祝福复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 神圣祝福复特效(this, false, 0, 3));
|
||||
}
|
||||
}
|
||||
|
||||
public class 神圣祝福复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExATK * 100:0.##}% 攻击力、{ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExATK => Level > 0 ? 0.04 + 0.035 * (Level - 1) : 0.04;
|
||||
private double ExDEF => Level > 0 ? 0.12 + 0.15 * (Level - 1) : 0.12;
|
||||
private double ExMDF => Level > 0 ? 0.008 + 0.012 * (Level - 1) : 0.008;
|
||||
|
||||
public 神圣祝福复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ExATK * 100:0.##}%,物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ExATK }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·攻击力提升"
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DamageBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExDEF2 e2 = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·物理护甲提升"
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExMDF e3 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·魔法抗性提升"
|
||||
};
|
||||
target.Effects.Add(e3);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e3.Durative = true;
|
||||
e3.Duration = 实际持续时间;
|
||||
e3.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e3.Durative = false;
|
||||
e3.DurationTurn = (int)实际持续时间;
|
||||
e3.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e3.EffectType = EffectType.DefenseBoost;
|
||||
e3.Source = caster;
|
||||
e3.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DamageBoost, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 等离子之波 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.等离子之波;
|
||||
public override string Name => "等离子之波";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
|
||||
public override double CD => Level > 0 ? 20 + (1.5 * (Level - 1)) : 20;
|
||||
public override double CastTime => 6;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 => 2,
|
||||
5 => 2,
|
||||
6 => 3,
|
||||
7 => 3,
|
||||
8 => 4,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 20 + 22 * (Level - 1);
|
||||
|
||||
public 等离子之波(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 纯数值伤害(this, 60, 20, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Silence, false, 0, 2, 0, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 结晶防护 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.结晶防护;
|
||||
public override string Name => "结晶防护";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75;
|
||||
public override double CD => Level > 0 ? 27 - (1 * (Level - 1)) : 27;
|
||||
public override double CastTime => Level > 0 ? 3 + (1.5 * (Level - 1)) : 3;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 结晶防护(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 结晶防护特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 结晶防护特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExDEF => Level > 0 ? 0.2 + 0.2 * (Level - 1) : 0.2;
|
||||
private double ExMDF => Level > 0 ? 0.03 + 0.03 * (Level - 1) : 0.03;
|
||||
|
||||
public 结晶防护特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExDEF2 e = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DefenseBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExMDF e2 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster);
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 结晶防护复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.结晶防护复;
|
||||
public override string Name => "结晶防护·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 90 + (95 * (Level - 1)) : 90;
|
||||
public override double CD => Level > 0 ? 35 - (0.5 * (Level - 1)) : 35;
|
||||
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 14 + 15 * (Level - 1);
|
||||
|
||||
public 结晶防护复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 结晶防护复特效(this, false, 0, 3));
|
||||
}
|
||||
}
|
||||
|
||||
public class 结晶防护复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ExDEF * 100:0.##}% 物理护甲和 {ExMDF * 100:0.##}% 魔法抗性,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double ExDEF => Level > 0 ? 0.15 + 0.15 * (Level - 1) : 0.15;
|
||||
private double ExMDF => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02;
|
||||
|
||||
public 结晶防护复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的物理护甲提升了 {ExDEF * 100:0.##}%,魔法抗性提升了 {ExMDF * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExDEF2 e = new(Skill, new()
|
||||
{
|
||||
{ "exdef", ExDEF }
|
||||
}, caster);
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.DefenseBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExMDF e2 = new(Skill, new()
|
||||
{
|
||||
{ "mdftype", 0 },
|
||||
{ "mdfvalue", ExMDF }
|
||||
}, caster);
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.DefenseBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 苍白地狱 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.苍白地狱;
|
||||
public override string Name => "苍白地狱";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 45 + (55 * (Level - 1)) : 45;
|
||||
public override double CD => 35;
|
||||
public override double CastTime => 9;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override double MagicBottleneck => 15 + 22 * (Level - 1);
|
||||
|
||||
public 苍白地狱(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.INT, 30, 25, 0.25, 0.2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 虚弱领域 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.虚弱领域;
|
||||
public override string Name => "虚弱领域";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("\r\n", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 造成虚弱).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85;
|
||||
// 调整:L8 CD 16 → 20(魔法下限 20,同时缓解「持续 > CD」)
|
||||
public override double CD => Level > 0 ? 34 - (2 * (Level - 1)) : 34;
|
||||
public override double CastTime => 8;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool SelectAllEnemies => true;
|
||||
public override double MagicBottleneck => 15 + 15 * (Level - 1);
|
||||
|
||||
public 虚弱领域(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 造成虚弱(this, true, 7, 0, 2, 0.1, 1, 0.1, 0.25, 0.001));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 钻石星尘 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.钻石星尘;
|
||||
public override string Name => "钻石星尘";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => "被驱散性:冻结需强驱散,易伤可弱驱散";
|
||||
public override double MPCost => Level > 0 ? 80 + (75 * (Level - 1)) : 80;
|
||||
public override double CD => Level > 0 ? 35 + (2 * (Level - 1)) : 35;
|
||||
public override double CastTime => 9;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 or 5 or 6 => 2,
|
||||
7 or 8 => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.Circle;
|
||||
public override int CanSelectTargetRange => 2;
|
||||
public override double MagicBottleneck => 35 + 24 * (Level - 1);
|
||||
|
||||
public 钻石星尘(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
ExemptionDescription = $"冻结{SkillSet.GetExemptionDescription(EffectType.Freeze)}\r\n易伤{SkillSet.GetExemptionDescription(EffectType.Vulnerable)}";
|
||||
Effects.Add(new 纯数值伤害(this, 60, 30, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Freeze, false, 0, 1, 0, 0.2, 0.03));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Vulnerable, false, 0, 3, 0, 0.2, 0.03, DamageType.Magical, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using OshimaBot.Content.Effects;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 银色荆棘 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.银色荆棘;
|
||||
public override string Name => "银色荆棘";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 100 + (80 * (Level - 1)) : 100;
|
||||
public override double CD => Level > 0 ? 55 - (1.5 * (Level - 1)) : 55;
|
||||
public override double CastTime => 12;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 => 2,
|
||||
5 => 2,
|
||||
6 => 2,
|
||||
7 => 3,
|
||||
8 => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 20 + 24 * (Level - 1);
|
||||
|
||||
public 银色荆棘(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 银色荆棘特效(this, false, 0, 2, 0, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
|
||||
public class 银色荆棘特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对{Skill.TargetDescription()}造成 {Damage:0.##} 点{CharacterSet.GetDamageTypeName(DamageType.Magical, MagicType)}。" +
|
||||
$"随后 {ActualConfusionProbability * 100:0.##}% 概率对目标施加混乱状态,持续 {持续时间}。混乱:进入行动受限状态,失控并随机行动,且所有指令均会在所有角色中随机选取目标。";
|
||||
public override DispelledType DispelledType => DispelledType.Strong;
|
||||
public override EffectType EffectType => EffectType.Confusion;
|
||||
public override bool ExemptDuration => true;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
private double Damage => Skill.Level > 0 ? 基础数值伤害 + 基础伤害等级成长 * (Skill.Level - 1) : 基础数值伤害;
|
||||
private double 基础数值伤害 { get; set; } = 50;
|
||||
private double 基础伤害等级成长 { get; set; } = 40;
|
||||
/// <summary>实际混乱概率:统一走 <see cref="EfficacyHit.命中率"/>(效能乘整体,2026-09-23 统一口径)。</summary>
|
||||
private double ActualConfusionProbability => EfficacyHit.命中率(_confusionProbability, _confusionProbabilityLevelGrowth, Level, MagicEfficacy);
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
private readonly double _confusionProbability;
|
||||
private readonly double _confusionProbabilityLevelGrowth;
|
||||
|
||||
public 银色荆棘特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0, double confusionProbability = 0, double confusionProbabilityLevelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
_confusionProbability = confusionProbability;
|
||||
_confusionProbabilityLevelGrowth = confusionProbabilityLevelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
DamageToEnemy(caster, target, DamageType.Magical, MagicType, Damage);
|
||||
if (target.HP > 0 && Random.NextDouble() < ActualConfusionProbability)
|
||||
{
|
||||
混乱 e = new(Skill, caster);
|
||||
if (!CheckExemption(caster, target, e))
|
||||
{
|
||||
WriteLine($"[ {target} ] 陷入了混乱!!持续时间:{持续时间}!");
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, e.EffectType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 风之守护 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.风之守护;
|
||||
public override string Name => "风之守护";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 75 + (80 * (Level - 1)) : 75;
|
||||
public override double CD => Level > 0 ? 30 - (0.5 * (Level - 1)) : 30;
|
||||
public override double CastTime => Level > 0 ? 4 + (1 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
public override double MagicBottleneck => 13 + 14 * (Level - 1);
|
||||
|
||||
public 风之守护(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 风之守护特效(this, false, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
public class 风之守护特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {CritRate * 100:0.##}% 暴击率和 {EvadeRate * 100:0.##}% 闪避率,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.CritBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double CritRate => Level > 0 ? 0.03 + 0.03 * (Level - 1) : 0.03;
|
||||
private double EvadeRate => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02;
|
||||
|
||||
public 风之守护特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的暴击率提升了 {CritRate * 100:0.##}%,闪避率提升了 {EvadeRate * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExCritRate e = new(Skill, new()
|
||||
{
|
||||
{ "excr", CritRate }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·暴击率加成"
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.CritBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExEvadeRate e2 = new(Skill, new()
|
||||
{
|
||||
{ "exer", EvadeRate }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·闪避率加成"
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.EvadeBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.CritBoost, EffectType.EvadeBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 风之守护复 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.风之守护复;
|
||||
public override string Name => "风之守护·复";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 85 + (90 * (Level - 1)) : 85;
|
||||
public override double CD => Level > 0 ? 35 - (0.5 * (Level - 1)) : 35;
|
||||
public override double CastTime => Level > 0 ? 4 + (0.5 * (Level - 1)) : 4;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 3,
|
||||
6 => 4,
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 15 + 16 * (Level - 1);
|
||||
|
||||
public 风之守护复(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 风之守护复特效(this, false, 0, 3));
|
||||
}
|
||||
}
|
||||
|
||||
public class 风之守护复特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {CritRate * 100:0.##}% 暴击率和 {EvadeRate * 100:0.##}% 闪避率,持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.CritBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private string 持续时间 => _durative && _duration > 0 ? 实际持续时间 + $" {GameplayEquilibriumConstant.InGameTime}" : (!_durative && _durationTurn > 0 ? 实际持续时间 + " 回合" : $"0 {GameplayEquilibriumConstant.InGameTime}");
|
||||
private double 实际持续时间 => _durative && _duration > 0 ? (_duration + _levelGrowth * (Level - 1) * MagicEfficacy) : (!_durative && _durationTurn > 0 ? ((int)Math.Round(_durationTurn + _levelGrowth * (Level - 1) * MagicEfficacy, 0, MidpointRounding.ToPositiveInfinity)) : 0);
|
||||
|
||||
private readonly bool _durative;
|
||||
private readonly double _duration;
|
||||
private readonly int _durationTurn;
|
||||
private readonly double _levelGrowth;
|
||||
|
||||
private double CritRate => Level > 0 ? 0.02 + 0.02 * (Level - 1) : 0.02;
|
||||
private double EvadeRate => Level > 0 ? 0.015 + 0.012 * (Level - 1) : 0.015;
|
||||
|
||||
public 风之守护复特效(Skill skill, bool durative = false, double duration = 0, int durationTurn = 1, double levelGrowth = 0) : base(skill)
|
||||
{
|
||||
GamingQueue = skill.GamingQueue;
|
||||
_durative = durative;
|
||||
_duration = duration;
|
||||
_durationTurn = durationTurn;
|
||||
_levelGrowth = levelGrowth;
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的暴击率提升了 {CritRate * 100:0.##}%,闪避率提升了 {EvadeRate * 100:0.##}%!持续时间:{持续时间}!");
|
||||
ExCritRate e = new(Skill, new()
|
||||
{
|
||||
{ "excr", CritRate }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·暴击率加成"
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e.Durative = true;
|
||||
e.Duration = 实际持续时间;
|
||||
e.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e.Durative = false;
|
||||
e.DurationTurn = (int)实际持续时间;
|
||||
e.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e.EffectType = EffectType.CritBoost;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
ExEvadeRate e2 = new(Skill, new()
|
||||
{
|
||||
{ "exer", EvadeRate }
|
||||
}, caster)
|
||||
{
|
||||
Name = Name + "·闪避率加成"
|
||||
};
|
||||
target.Effects.Add(e2);
|
||||
if (_durative && _duration > 0)
|
||||
{
|
||||
e2.Durative = true;
|
||||
e2.Duration = 实际持续时间;
|
||||
e2.RemainDuration = 实际持续时间;
|
||||
}
|
||||
else if (!_durative && _durationTurn > 0)
|
||||
{
|
||||
e2.Durative = false;
|
||||
e2.DurationTurn = (int)实际持续时间;
|
||||
e2.RemainDurationTurn = (int)实际持续时间;
|
||||
}
|
||||
e2.EffectType = EffectType.EvadeBoost;
|
||||
e2.Source = caster;
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.CritBoost, EffectType.EvadeBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 风之轮 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.风之轮;
|
||||
public override string Name => "风之轮";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double MPCost => Level > 0 ? 50 + (60 * (Level - 1)) : 50;
|
||||
public override double CD => 30;
|
||||
public override double CastTime => 10;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override double MagicBottleneck => 12 + 13 * (Level - 1);
|
||||
|
||||
public 风之轮(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 基于属性的伤害(this, PrimaryAttribute.AGI, 120, 80, 0.4, 0.4));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 鬼魅之痛 : Skill
|
||||
{
|
||||
public override long Id => (long)MagicID.鬼魅之痛;
|
||||
public override string Name => "鬼魅之痛";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 施加概率负面).ExemptionDescription : "";
|
||||
public override double MPCost => Level > 0 ? 70 + (75 * (Level - 1)) : 70;
|
||||
public override double CD => Level > 0 ? 38 + (1 * (Level - 1)) : 38;
|
||||
public override double CastTime => 9;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override int CanSelectTargetCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
4 => 2,
|
||||
5 => 2,
|
||||
6 => 2,
|
||||
7 => 3,
|
||||
8 => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
public override double MagicBottleneck => 20 + 24 * (Level - 1);
|
||||
|
||||
public 鬼魅之痛(Character? character = null) : base(SkillType.Magic, character)
|
||||
{
|
||||
Effects.Add(new 纯数值伤害(this, 65, 35, DamageType.Magical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Stun, true, 6, 0, 0.7, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user