chore: initialize OshimaBot repository (rename from Enhancement)
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 全军出击 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.全军出击;
|
||||
public override string Name => "全军出击";
|
||||
public override string Description => Effects.Count > 0 ? ((全军出击特效)Effects.First()).GeneralDescription : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 100;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 全军出击(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 全军出击特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 全军出击特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description { get; set; } = "";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public string GeneralDescription => $"将雇佣兵数量立即补全至 {雇佣兵团特效.最大数量} 名,每名雇佣兵的生命值回复至满并提升 {攻击力提升 * 100:0.##}% 攻击力。在 {持续时间} {GameplayEquilibriumConstant.InGameTime}内,场上的每名雇佣兵额外为{Skill.SkillOwner()}提供 {攻击力 * 100:0.##}% 攻击力和 {行动速度:0.##} 点行动速度、{加速系数 * 100:0.##}% 加速系数、{冷却缩减 * 100:0.##}% 冷却缩减。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 持续时间;
|
||||
|
||||
public double 持续时间 => 20 + 2 * (Skill.Level - 1);
|
||||
public const double 攻击力 = 0.04;
|
||||
public const double 冷却缩减 = 0.03;
|
||||
public const double 加速系数 = 0.03;
|
||||
public const double 行动速度 = 30;
|
||||
public const double 攻击力提升 = 0.4;
|
||||
private double 实际攻击力提升 = 0;
|
||||
private double 实际行动速度提升 = 0;
|
||||
private double 实际加速系数提升 = 0;
|
||||
private double 实际冷却缩减提升 = 0;
|
||||
|
||||
public 全军出击特效(Skill skill) : base(skill)
|
||||
{
|
||||
Description = GeneralDescription;
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
刷新技能效果(character);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
Skill.IsInEffect = false;
|
||||
刷新技能效果(character);
|
||||
}
|
||||
|
||||
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;
|
||||
Skill.IsInEffect = true;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
if (caster.Effects.FirstOrDefault(e => e is 雇佣兵团特效 && e.Skill.Character == Skill.Character) is 雇佣兵团特效 e)
|
||||
{
|
||||
e.Skill.CurrentCD = 0;
|
||||
e.Skill.Enable = true;
|
||||
int count = e.雇佣兵团.Count;
|
||||
if (count < 雇佣兵团特效.最大数量)
|
||||
{
|
||||
do
|
||||
{
|
||||
count = e.新增雇佣兵(caster);
|
||||
}
|
||||
while (count < 雇佣兵团特效.最大数量);
|
||||
}
|
||||
foreach (雇佣兵 gyb in e.雇佣兵团)
|
||||
{
|
||||
gyb.Recovery();
|
||||
gyb.ExATKPercentage += 0.05;
|
||||
}
|
||||
}
|
||||
刷新技能效果(caster);
|
||||
}
|
||||
|
||||
public void 刷新技能效果(Character character)
|
||||
{
|
||||
if (实际攻击力提升 != 0)
|
||||
{
|
||||
character.ExATKPercentage -= 实际攻击力提升;
|
||||
实际攻击力提升 = 0;
|
||||
}
|
||||
if (实际行动速度提升 != 0)
|
||||
{
|
||||
character.ExSPD -= 实际行动速度提升;
|
||||
实际行动速度提升 = 0;
|
||||
}
|
||||
if (实际加速系数提升 != 0)
|
||||
{
|
||||
character.ExAccelerationCoefficient -= 实际加速系数提升;
|
||||
实际加速系数提升 = 0;
|
||||
}
|
||||
if (实际冷却缩减提升 != 0)
|
||||
{
|
||||
character.ExCDR -= 实际冷却缩减提升;
|
||||
实际冷却缩减提升 = 0;
|
||||
}
|
||||
if (!Skill.IsInEffect)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (character.Effects.FirstOrDefault(e => e is 雇佣兵团特效 && e.Skill.Character == Skill.Character) is 雇佣兵团特效 e)
|
||||
{
|
||||
int count = e.雇佣兵团.Count;
|
||||
实际攻击力提升 = 攻击力 * count;
|
||||
实际行动速度提升 = 行动速度 * count;
|
||||
实际加速系数提升 = 加速系数 * count;
|
||||
实际冷却缩减提升 = 冷却缩减 * count;
|
||||
character.ExATKPercentage += 实际攻击力提升;
|
||||
character.ExSPD += 实际行动速度提升;
|
||||
character.ExAccelerationCoefficient += 实际加速系数提升;
|
||||
character.ExCDR += 实际冷却缩减提升;
|
||||
Description = $"{GeneralDescription}(当前雇佣兵数量:{count},攻击力提升:{实际攻击力提升 * 100:0.##}% [ {character.BaseATK * 实际攻击力提升:0.##} ] 点,行动速度提升:{实际行动速度提升:0.##} 点,加速系数提升:{实际加速系数提升 * 100:0.##}%,冷却缩减提升:{实际冷却缩减提升 * 100:0.##}%)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using Milimoe.FunGameTesting.Others;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 雇佣兵团 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.雇佣兵团;
|
||||
public override string Name => "雇佣兵团";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 雇佣兵团(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 雇佣兵团特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 雇佣兵团特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}在场上时,会召唤数名雇佣兵协助战斗,初始数量为 {最小数量} 名,雇佣兵具有独立的回合,生命值为{Skill.SkillOwner()}的 {生命值比例 * 100:0.##}% [ {Skill.Character?.MaxHP * 生命值比例:0.##} ],攻击力为{Skill.SkillOwner()}的 {攻击力比例 * 100:0.##}% 基础攻击力 [ {Skill.Character?.BaseATK * 攻击力比例:0.##} ]," +
|
||||
$"完整继承其他能力值(暴击率、闪避率等),雇佣兵每{GameplayEquilibriumConstant.InGameTime}流失 {生命流失 * 100:0.##}% 当前生命值。当{Skill.SkillOwner()}参与击杀时,便会临时产生一名额外的雇佣兵。场上最多可以存在 {最大数量} 名雇佣兵,达到数量后不再产生新的雇佣兵;当不足 {最小数量} 名雇佣兵时,{补充间隔} {GameplayEquilibriumConstant.InGameTime}后会重新补充一名雇佣兵。" +
|
||||
(雇佣兵团.Count < 最小数量 && Skill.CurrentCD > 0 ? $"(下次补充:{Skill.CurrentCD:0.##} {GameplayEquilibriumConstant.InGameTime}后)" : "");
|
||||
|
||||
public List<雇佣兵> 雇佣兵团 { get; } = [];
|
||||
public const int 最小数量 = 1;
|
||||
public const int 最大数量 = 5;
|
||||
public const int 补充间隔 = 30;
|
||||
public const double 生命值比例 = 0.1;
|
||||
public const double 攻击力比例 = 0.6;
|
||||
public const double 生命流失 = 0.09;
|
||||
|
||||
private bool 激活 = false;
|
||||
|
||||
public override void OnGameStart(HookContext ctx)
|
||||
{
|
||||
if (!激活)
|
||||
{
|
||||
激活 = true;
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
保底补充(Skill.Character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDeathCalculation(DeathContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character death) return;
|
||||
bool hasMaster = ctx.HasMaster;
|
||||
Character? killer = ctx.Killer;
|
||||
Dictionary<Character, int> continuousKilling = ctx.ContinuousKilling;
|
||||
Dictionary<Character, int> earnedMoney = ctx.EarnedMoney;
|
||||
Character[] assists = ctx.Assists;
|
||||
if (death is 雇佣兵 gyb)
|
||||
{
|
||||
WriteLine($"[ {killer} ] 杀死了 [ {death} ]!");
|
||||
雇佣兵团.Remove(gyb);
|
||||
if (GamingQueue is FunGame.Core.Model.Queue.GamingQueue queue)
|
||||
{
|
||||
if (queue.Map != null) queue.RemoveCharacterFromMap(gyb);
|
||||
else queue.RemoveCharacterFromQueue(gyb);
|
||||
}
|
||||
if (雇佣兵团.Count < 最小数量 && Skill.CurrentCD == 0)
|
||||
{
|
||||
Skill.CurrentCD = 补充间隔;
|
||||
Skill.Enable = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (death == Skill.Character)
|
||||
{
|
||||
OnEffectLost(new HookContext(GamingQueue, death));
|
||||
}
|
||||
|
||||
if (Skill.Character != null && death != Skill.Character && (killer == Skill.Character || assists.Contains(Skill.Character)) && 雇佣兵团.Count < 最大数量)
|
||||
{
|
||||
新增雇佣兵(Skill.Character);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
保底补充(character);
|
||||
}
|
||||
foreach (雇佣兵 gyb in 雇佣兵团)
|
||||
{
|
||||
if (gyb.HP > 0)
|
||||
{
|
||||
double lost = gyb.HP * 生命流失 * elapsed;
|
||||
gyb.HP -= lost;
|
||||
if (gyb.HP <= 0)
|
||||
{
|
||||
gyb.HP = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
if (GamingQueue is FunGame.Core.Model.Queue.GamingQueue queue)
|
||||
{
|
||||
if (queue.Map != null) queue.RemoveCharacterFromMap(雇佣兵团);
|
||||
else queue.RemoveCharacterFromQueue(雇佣兵团);
|
||||
}
|
||||
雇佣兵团.Clear();
|
||||
WriteLine($"[ {character} ] 的雇佣兵团已消散!");
|
||||
}
|
||||
}
|
||||
|
||||
public void 保底补充(Character character)
|
||||
{
|
||||
if (!激活) return;
|
||||
int count = 雇佣兵团.Count;
|
||||
if (count < 最小数量 && Skill.Enable)
|
||||
{
|
||||
do
|
||||
{
|
||||
count = 新增雇佣兵(character);
|
||||
}
|
||||
while (count < 最小数量);
|
||||
}
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
foreach (雇佣兵 gyb in 雇佣兵团.Where(g => !GamingQueue.Queue.Contains(g)))
|
||||
{
|
||||
if (gyb.HP <= 0) gyb.HP = 1;
|
||||
添加到地图(character, gyb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int 新增雇佣兵(Character character)
|
||||
{
|
||||
雇佣兵 gyb = new(character, RandomNames.GenerateRandomChineseName(Random))
|
||||
{
|
||||
Level = 1,
|
||||
InitialHP = character.MaxHP * 生命值比例,
|
||||
InitialATK = character.BaseATK * 攻击力比例,
|
||||
ExCritRate = character.CritRate - GameplayEquilibriumConstant.CritRate,
|
||||
ExCritDMG = character.CritDMG - GameplayEquilibriumConstant.CritDMG,
|
||||
ExEvadeRate = character.EvadeRate - GameplayEquilibriumConstant.EvadeRate,
|
||||
InitialSPD = character.SPD,
|
||||
InitialDEF = character.DEF,
|
||||
InitialHR = character.HR,
|
||||
InitialMR = character.MR,
|
||||
Lifesteal = character.Lifesteal,
|
||||
ExPDR = character.ExPDR,
|
||||
PhysicalPenetration = character.PhysicalPenetration,
|
||||
MagicalPenetration = character.MagicalPenetration,
|
||||
ExMOV = character.MOV,
|
||||
ExATR = character.ATR - 1
|
||||
};
|
||||
gyb.MDF.AddAllValue(character.MDF.Avg);
|
||||
gyb.Recovery();
|
||||
雇佣兵团.Add(gyb);
|
||||
|
||||
添加到地图(character, gyb);
|
||||
WriteLine($"[ {character} ] 召唤了{gyb}!");
|
||||
|
||||
return 雇佣兵团.Count;
|
||||
}
|
||||
|
||||
public void 添加到地图(Character character, 雇佣兵 gyb)
|
||||
{
|
||||
// 添加到地图/队列
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
if (GamingQueue.Map is GameMap map)
|
||||
{
|
||||
Grid? current = map.GetCharacterCurrentGrid(character);
|
||||
if (current != null)
|
||||
{
|
||||
List<Grid> nearbyGrids = map.GetGridsByRange(current, 5, false);
|
||||
Grid? target = nearbyGrids.OrderBy(g => GameMap.CalculateManhattanDistance(g, current)).FirstOrDefault();
|
||||
if (target != null)
|
||||
{
|
||||
map.SetCharacterCurrentGrid(gyb, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
GamingQueue.Queue.Add(gyb);
|
||||
GamingQueue.ChangeCharacterHardnessTime(gyb, 5, false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 极寒渴望 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.极寒渴望;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 55;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 极寒渴望(Character? character = null) : base(SkillType.SuperSkill, 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 => $"{Duration} {GameplayEquilibriumConstant.InGameTime}内,增强 [ 累积之压 ] 的最大生命值伤害 {最大生命值伤害 * 100:0.##}%,并获得 {吸血 * 100:0.##}% 吸血。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 25;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private static double 吸血 => 0.2;
|
||||
private double 最大生命值伤害 => 0.015 * Level;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.Lifesteal += 吸血;
|
||||
if (character.Effects.Where(e => e is 累积之压特效 && e.Skill.Character == character).FirstOrDefault() is 累积之压特效 e)
|
||||
{
|
||||
e.系数 += 最大生命值伤害;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.Lifesteal -= 吸血;
|
||||
if (character.Effects.Where(e => e is 累积之压特效 && e.Skill.Character == character).FirstOrDefault() is 累积之压特效 e)
|
||||
{
|
||||
e.系数 -= 最大生命值伤害;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost, EffectType.Lifesteal);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 累积之压 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.累积之压;
|
||||
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 累积之压(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 累积之压特效(this));
|
||||
ExemptionDescription = SkillSet.GetExemptionDescription(EffectType.Cripple);
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 累积之压特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"造成伤害时会标记目标,攻击具有标记的敌人将对其造成战斗不能 1 回合,并回收标记,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。";
|
||||
public override string DispelDescription => "被驱散性:战斗不能需强驱散,标记可弱驱散";
|
||||
|
||||
public double 系数 { get; set; } = 0.12;
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override BeforeCriticalCheckResult BeforeCriticalCheck(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character actor || ctx.Enemy is not Character enemy) return default;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
if (actor == Skill.Character)
|
||||
{
|
||||
// 嵌套伤害不进行暴击检定
|
||||
return new BeforeCriticalCheckResult { SkipCriticalCheck = 是否是嵌套伤害 };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && actualDamage > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !是否是嵌套伤害 && enemy.HP > 0)
|
||||
{
|
||||
// 叠标记
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记 && e.Source == character);
|
||||
if (effects.FirstOrDefault() is 累积之压标记 e)
|
||||
{
|
||||
// 移除标记
|
||||
enemy.Effects.Remove(e);
|
||||
double 额外伤害 = enemy.MaxHP * 系数;
|
||||
WriteLine($"[ {character} ] 发动了累积之压!将对 [ {enemy} ] 造成战斗不能和额外伤害!");
|
||||
// 战斗不能
|
||||
IEnumerable<Effect> effects3 = enemy.Effects.Where(e => e is 战斗不能 && e.Skill == Skill);
|
||||
if (effects3.Any())
|
||||
{
|
||||
effects3.First().RemainDurationTurn++;
|
||||
}
|
||||
else
|
||||
{
|
||||
战斗不能 e3 = new(Skill, character, false, 0, 1);
|
||||
enemy.Effects.Add(e3);
|
||||
e3.OnEffectGained(new HookContext(GamingQueue, enemy));
|
||||
}
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, DamageType.Physical, magicType, 额外伤害);
|
||||
}
|
||||
else
|
||||
{
|
||||
enemy.Effects.Add(new 累积之压标记(Skill, character));
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 少女绮想 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.少女绮想;
|
||||
public override string Name => "少女绮想";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 少女绮想(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 少女绮想特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 少女绮想特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}进入祈祷的心境。每经过 {时间流逝} {GameplayEquilibriumConstant.InGameTime},提升 {伤害提升 * 100:0.##}% 所有伤害,无上限。受到伤害时清零;造成伤害后,累计提升减少总量的 30%。(下一次提升在:{下一次提升:0.##} {GameplayEquilibriumConstant.InGameTime}后{(累计伤害 > 0 ? $",当前总提升:{累计伤害 * 100:0.##}%" : "")})";
|
||||
|
||||
private readonly double 时间流逝 = 7;
|
||||
private readonly double 伤害提升 = 0.21;
|
||||
private double 累计伤害 = 0;
|
||||
private double 下一次提升 = 7;
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character == Skill.Character)
|
||||
{
|
||||
double 实际伤害提升 = damage * 累计伤害;
|
||||
if (实际伤害提升 > 0) WriteLine($"[ {character} ] 的伤害提升了 {累计伤害 * 100:0.##}% [ {实际伤害提升:0.##} ] 点!");
|
||||
累计伤害 *= 0.7;
|
||||
return new AlterActualDamageResult { DamageDelta = 实际伤害提升 };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if ((damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy == Skill.Character && actualDamage > 0 && !enemy.Effects.Where(e => e is 绝对领域特效 && e.Skill.Character == character).Any())
|
||||
{
|
||||
累计伤害 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double eapsed = ctx.Elapsed;
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
下一次提升 -= eapsed;
|
||||
if (下一次提升 <= 0)
|
||||
{
|
||||
累计伤害 += 伤害提升;
|
||||
下一次提升 += 时间流逝;
|
||||
WriteLine($"[ {character} ] 的 [ {Name} ] 效果增加了,当前总提升:{累计伤害 * 100:0.##}%。");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 绝对领域 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.绝对领域;
|
||||
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 EPCost => Math.Max(100, Character?.EP ?? 100);
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 绝对领域(Character? character = null) : base(SkillType.SuperSkill, 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.SkillOwner()}展开绝对领域。在 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,敏捷提升 {系数 * 100:0.##}% [ {敏捷提升:0.##} ],无法受到任何伤害,但不免疫负面效果。此技能会消耗至少 100 点能量,每额外消耗 10 能量,持续时间提升 1 {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 释放时的能量值 >= 100 ? 13 + (释放时的能量值 - 100) * 0.1 : 14;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 系数 => 0.2 + 0.015 * (Level - 1);
|
||||
private double 敏捷提升 => 系数 * Skill.Character?.BaseAGI ?? 0;
|
||||
private double 实际敏捷提升 = 0;
|
||||
private double 释放时的能量值 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际敏捷提升 = 敏捷提升;
|
||||
character.ExAGI += 实际敏捷提升;
|
||||
WriteLine($"[ {character} ] 的敏捷提升了 {系数 * 100:0.##}% [ {实际敏捷提升:0.##} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExAGI -= 实际敏捷提升;
|
||||
}
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
WriteLine($"[ {enemy} ] 发动了绝对领域,巧妙的化解了此伤害!");
|
||||
return new AlterActualDamageResult { IsEvaded = true };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override BeforeApplyTrueDamageResult BeforeApplyTrueDamage(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
WriteLine($"[ {enemy} ] 发动了绝对领域,巧妙的化解了此伤害!");
|
||||
return new BeforeApplyTrueDamageResult { NullifyDamage = true };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override void OnSkillCasting(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
释放时的能量值 = caster.EP;
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际敏捷提升 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Invulnerable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 零式崩解 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.零式崩解;
|
||||
public override string Name => "零式崩解";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 零式崩解(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 零式崩解特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 零式崩解特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}的零式剑法能够轻松命中敌人弱点。{Skill.SkillOwner()}的暴击伤害提升 70%。";
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExCritDMG += 0.7;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExCritDMG -= 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 零式灭杀 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.零式灭杀;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 60 - 1.5 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 零式灭杀(Character? character = null) : base(SkillType.SuperSkill, 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.SkillOwner()}展现零式剑法精准而凶残的奥义。30 {GameplayEquilibriumConstant.InGameTime}内暴击率提升 {暴击率提升 * 100:0.##}%,暴击伤害提升 {暴击伤害提升 * 100:0.##}%,物理穿透提升 {物理穿透提升 * 100:0.##}%。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 暴击率提升 => 0.2 + 0.03 * (Level - 1);
|
||||
private double 暴击伤害提升 => 0.8 + 0.04 * (Level - 1);
|
||||
private double 物理穿透提升 => 0.3;
|
||||
private double 实际暴击率提升 = 0;
|
||||
private double 实际暴击伤害提升 = 0;
|
||||
private double 实际物理穿透提升 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际暴击率提升 = 暴击率提升;
|
||||
实际暴击伤害提升 = 暴击伤害提升;
|
||||
实际物理穿透提升 = 物理穿透提升;
|
||||
character.ExCritRate += 实际暴击率提升;
|
||||
character.ExCritDMG += 实际暴击伤害提升;
|
||||
character.PhysicalPenetration += 实际物理穿透提升;
|
||||
WriteLine($"[ {character} ] 的暴击率提升了 [ {实际暴击率提升 * 100:0.##}% ],暴击伤害提升了 [ {实际暴击伤害提升 * 100:0.##}% ],物理穿透提升了 [ {实际物理穿透提升 * 100:0.##}% ] !!");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExCritRate -= 实际暴击率提升;
|
||||
character.ExCritDMG -= 实际暴击伤害提升;
|
||||
character.PhysicalPenetration -= 实际物理穿透提升;
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际暴击率提升 = 0;
|
||||
实际暴击伤害提升 = 0;
|
||||
实际物理穿透提升 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.CritBoost, EffectType.PenetrationBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 三相灵枢 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.三相灵枢;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 80 - 4 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 0;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 三相灵枢(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 三相灵枢特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 三相灵枢特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "三相灵枢";
|
||||
public override string Description => $"{Skill.SkillOwner()}操纵三相之力,使 [ 灵能反射 ] 支持普通攻击,且当前释放魔法次数归零,最大硬直消除次数提高到 {灵能反射次数} 次;在魔法命中和普通攻击命中时能够回复所回复能量值的 {魔法值倍数:0.#} 倍魔法值,持续 {技能持续次数} 次(灵能反射每消除次数达到最大时算一次)。" +
|
||||
$"(剩余:{剩余持续次数} 次)";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
public int 剩余持续次数 { get; set; } = 0;
|
||||
private readonly int 灵能反射次数 = 3;
|
||||
private double 魔法值倍数
|
||||
{
|
||||
get
|
||||
{
|
||||
return Skill.Level * 0.5;
|
||||
}
|
||||
}
|
||||
private int 技能持续次数
|
||||
{
|
||||
get
|
||||
{
|
||||
return Skill.Level > 3 ? 2 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||
if (effects.Any() && effects.First() is 灵能反射特效 e && e.Skill.Character == Skill.Character)
|
||||
{
|
||||
e.是否支持普攻 = true;
|
||||
e.触发硬直次数 = 3;
|
||||
e.释放次数 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 灵能反射特效);
|
||||
if (effects.Any() && effects.First() is 灵能反射特效 e && e.Skill.Character == Skill.Character)
|
||||
{
|
||||
e.是否支持普攻 = false;
|
||||
e.触发硬直次数 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
剩余持续次数 = 技能持续次数;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.MPRegen, EffectType.Haste);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 灵能反射 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.灵能反射;
|
||||
public override string Name => "灵能反射";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 灵能反射(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 灵能反射特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 灵能反射特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每释放 {触发硬直次数:0.##} 次魔法才会触发硬直时间,且魔法伤害命中时基于 8% 智力 [ {获得额外能量值:0.##} ] 获得额外能量值,并减少所有技能 2 {GameplayEquilibriumConstant.InGameTime}冷却时间。";
|
||||
|
||||
public bool 是否支持普攻 { get; set; } = false;
|
||||
public int 触发硬直次数 { get; set; } = 2;
|
||||
public int 释放次数 { get; set; } = 0;
|
||||
public double 获得额外能量值 => 0.08 * Skill.Character?.INT ?? 0;
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && (是否支持普攻 && isNormalAttack || damageType == DamageType.Magical) && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.EP < 200)
|
||||
{
|
||||
double 实际获得能量值 = 获得额外能量值;
|
||||
character.EP += 实际获得能量值;
|
||||
foreach (Skill scd in character.Skills)
|
||||
{
|
||||
scd.CurrentCD -= 2;
|
||||
if (scd.CurrentCD <= 0)
|
||||
{
|
||||
scd.CurrentCD = 0;
|
||||
scd.Enable = true;
|
||||
}
|
||||
}
|
||||
WriteLine($"[ {character} ] 发动了灵能反射!额外获得了 {实际获得能量值:0.##} 能量,并消除了 2 {GameplayEquilibriumConstant.InGameTime}冷却时间!");
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三相灵枢特效);
|
||||
if (effects.Any() && effects.First() is 三相灵枢特效 e && e.Skill.Character == Skill.Character)
|
||||
{
|
||||
double 获得的魔法值 = 实际获得能量值 * 3;
|
||||
character.MP += 获得的魔法值;
|
||||
WriteLine($"[ {character} ] 发动了三相灵枢!回复了 {获得的魔法值:0.##} 魔法值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override AlterHardnessTimeResult AlterHardnessTimeAfterNormalAttack(HardnessContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
if (是否支持普攻)
|
||||
{
|
||||
return new AlterHardnessTimeResult { ClearHardnessTime = ClearHardnessTime(character) };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override AlterHardnessTimeResult AlterHardnessTimeAfterCastSkill(HardnessContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
if (ctx.Skill is Skill skill && skill.SkillType == SkillType.Magic)
|
||||
{
|
||||
return new AlterHardnessTimeResult { ClearHardnessTime = ClearHardnessTime(character) };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 触发灵能反射副作用;返回是否清零硬直时间(框架据此将硬直置 0 并解除插队保护)
|
||||
/// </summary>
|
||||
private bool ClearHardnessTime(Character character)
|
||||
{
|
||||
释放次数++;
|
||||
if (释放次数 < 触发硬直次数)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||
if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(character, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
dp.ActionsTaken = 1;
|
||||
dp.ActionsHardnessTime.Clear();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
释放次数 = 0;
|
||||
IEnumerable<Effect> effects = character.Effects.Where(e => e is 三相灵枢特效);
|
||||
if (effects.Any() && effects.First() is 三相灵枢特效 e && e.Skill.Character == Skill.Character)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了灵能反射,消除了硬直时间!!");
|
||||
if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(character, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
dp.ActionsTaken = 1;
|
||||
dp.ActionsHardnessTime.Clear();
|
||||
}
|
||||
e.剩余持续次数--;
|
||||
if (e.剩余持续次数 == 0)
|
||||
{
|
||||
character.Effects.Remove(e);
|
||||
e.OnEffectLost(new HookContext(GamingQueue, character));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
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.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 海王星的野望 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.海王星的野望;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 75;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectEnemy => true;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
public override int CanSelectTargetRange => 3;
|
||||
|
||||
public 海王星的野望(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
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.TargetDescription()},持续 {持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。立即对标记目标造成 {直接伤害:0.##} 点{CharacterSet.GetDamageTypeName(DamageType.Magical, MagicType)}。" +
|
||||
$"在持续时间内{爆炸伤害描述}在此期间,{Skill.SkillOwner()}的力量提升 60% [ {力量提升:0.##} ],并且 [ {nameof(深海之戟)} ] 改变为相同机制,可以叠加触发。无视免疫。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 持续时间;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override MagicType MagicType => Skill.Character?.MagicType ?? MagicType.None;
|
||||
public override ImmuneType IgnoreImmune => ImmuneType.All;
|
||||
|
||||
public string 爆炸伤害描述 => $"对受到标记的目标造成伤害时将产生爆炸,爆炸将产生 {分裂伤害系数 * 100:0.##}% 分裂伤害。分裂伤害为全图索敌,会优先分裂至三个在持续时间内对{Skill.SkillOwner()}造成伤害最多的敌人,若没有符合条件的敌人或敌人数量不足,则将分裂至被标记的敌人,或至多三个随机的敌人。";
|
||||
public double 直接伤害 => 180 + 75 * (Skill.Level - 1);
|
||||
public double 持续时间 => 25 + 2 * (Skill.Level - 1);
|
||||
public double 分裂伤害系数 => 0.25 + 0.02 * (Skill.Level - 1);
|
||||
public double 力量提升 => 0.6 * (Skill.Character?.BaseSTR ?? 0);
|
||||
public Dictionary<Character, double> 敌人伤害统计 { get; set; } = [];
|
||||
|
||||
private double 实际力量提升 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际力量提升 = 力量提升;
|
||||
character.ExSTR += 实际力量提升;
|
||||
if (character.Effects.Where(e => e is 深海之戟特效 && e.Skill.Character == character).FirstOrDefault() is 深海之戟特效 e)
|
||||
{
|
||||
e.野望 = this;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExSTR -= 实际力量提升;
|
||||
if (character.Effects.Where(e => e is 深海之戟特效 && e.Skill.Character == character).FirstOrDefault() is 深海之戟特效 e)
|
||||
{
|
||||
e.野望 = null;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
if (!敌人伤害统计.TryAdd(character, actualDamage))
|
||||
{
|
||||
敌人伤害统计[character] += actualDamage;
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy.Effects.FirstOrDefault(e => e is 海王星的野望标记 && e.Source == Skill.Character) is 海王星的野望标记 e)
|
||||
{
|
||||
分裂伤害(character, enemy, actualDamage, damageType, magicType);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
实际力量提升 = 0;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
DamageToEnemy(caster, target, DamageType.Magical, MagicType, 直接伤害);
|
||||
}
|
||||
// 造成伤害之后再一起上标记,否则会立即触发标记特效
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
Effect e = new 海王星的野望标记(Skill, caster)
|
||||
{
|
||||
Durative = true,
|
||||
Duration = 持续时间,
|
||||
RemainDuration = Duration
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
AddEffectTypeToCharacter(target, [e.EffectType]);
|
||||
}
|
||||
RecordCharacterApplyEffects(caster, EffectType.DamageBoost);
|
||||
}
|
||||
|
||||
public void 分裂伤害(Character character, Character enemy, double damage, DamageType damageType, MagicType magicType)
|
||||
{
|
||||
List<Character> targets = [];
|
||||
targets.AddRange(敌人伤害统计.Where(w => w.Key != character && w.Key != enemy && w.Key.HP > 0).OrderByDescending(o => o.Value).Select(s => s.Key).Take(3));
|
||||
if (targets.Count < 3)
|
||||
{
|
||||
int count = 3 - targets.Count;
|
||||
// 获取所有敌人
|
||||
List<Character> allEnemys = [];
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
allEnemys = [.. GamingQueue.GetEnemies(character).Where(c => c != character && c != enemy && !targets.Contains(c) && c.HP > 0)];
|
||||
targets.AddRange(allEnemys.Where(c => c.Effects.Any(e => e is 海王星的野望标记 && e.Source == character)).Take(count));
|
||||
if (targets.Count < 3)
|
||||
{
|
||||
count = 3 - targets.Count;
|
||||
targets.AddRange(allEnemys.OrderBy(o => Random.Next()).Take(count));
|
||||
}
|
||||
}
|
||||
}
|
||||
damage *= 分裂伤害系数;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
DamageToEnemy(character, target, damageType, magicType, damage, new(character)
|
||||
{
|
||||
CalculateCritical = false,
|
||||
CalculateReduction = true,
|
||||
TriggerEffects = false,
|
||||
IgnoreImmune = true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using FunGame.Core.Entity;
|
||||
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)PassiveID.深海之戟;
|
||||
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 int CanSelectTargetRange => 5;
|
||||
|
||||
public 深海之戟(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 深海之戟特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 深海之戟特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
string str = $"分裂伤害:{分裂百分比 * 100:0.##}%。无视免疫。";
|
||||
if (野望 != null)
|
||||
{
|
||||
return $"技能机制受 [ {nameof(海王星的野望)} ] 影响而改变:{野望.爆炸伤害描述}未攻击标记目标时,按原机制,在普通攻击暴击时分裂。";
|
||||
}
|
||||
else if (GamingQueue?.Map != null)
|
||||
{
|
||||
return $"普通攻击暴击时会自动产生分裂伤害至其附近半径为 {Skill.CanSelectTargetRange} 格的菱形区域内的敌人,但最多只会对两个敌人造成分裂伤害。{str}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"普通攻击暴击时会自动产生分裂伤害至其他两个随机的敌人。{str}";
|
||||
}
|
||||
}
|
||||
}
|
||||
public override ImmuneType IgnoreImmune => ImmuneType.All;
|
||||
|
||||
public double 分裂百分比 { get; set; } = 0.25;
|
||||
public 海王星的野望特效? 野望 { get; set; } = null;
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && 野望 != null && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && enemy.Effects.FirstOrDefault(e => e is 海王星的野望标记 && e.Source == Skill.Character) is 海王星的野望标记 e)
|
||||
{
|
||||
野望.分裂伤害(character, enemy, actualDamage, damageType, magicType);
|
||||
}
|
||||
else if (character == Skill.Character && isNormalAttack && damageResult == DamageResult.Critical && GamingQueue != null)
|
||||
{
|
||||
List<Character> allEnemys = [.. GamingQueue.GetEnemies(character).Where(c => c != character && c != enemy && c.HP > 0)];
|
||||
List<Character> targets = [];
|
||||
if (GamingQueue?.Map is GameMap map)
|
||||
{
|
||||
List<Grid> grids = [];
|
||||
Grid? enemyGrid = map.GetCharacterCurrentGrid(enemy);
|
||||
if (enemyGrid != null)
|
||||
{
|
||||
grids.AddRange(map.GetGridsByRange(enemyGrid, Skill.CanSelectTargetRange, true));
|
||||
grids = [.. grids.Where(g => g.Characters.Count > 0).OrderBy(g => GameMap.CalculateManhattanDistance(enemyGrid, g)).Take(2)];
|
||||
}
|
||||
targets = Skill.SelectTargetsByRange(character, allEnemys, [], [], grids, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
targets.AddRange(allEnemys.OrderBy(o => Random.Next()).Take(2));
|
||||
}
|
||||
double 分裂伤害 = actualDamage * 分裂百分比;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
DamageToEnemy(character, target, damageType, magicType, 分裂伤害, new(character)
|
||||
{
|
||||
CalculateCritical = false,
|
||||
CalculateReduction = true,
|
||||
TriggerEffects = false,
|
||||
IgnoreImmune = true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 双生流转 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.双生流转;
|
||||
public override string Name => "双生流转";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 双生流转(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 双生流转特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 双生流转特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"当生命值低于 30% 时,进入力量模式,核心属性转为力量,将所有基础智力转化为额外力量;当生命值高于或等于 30% 时,进入智力模式,核心属性转为智力,还原所有基础智力。力量模式下,造成伤害必定暴击;智力模式下,获得 15% 暴击率、15% 闪避率和 15% 魔法抗性。" +
|
||||
(Skill.Character != null ? "(当前模式:" + CharacterSet.GetPrimaryAttributeName(Skill.Character.PrimaryAttribute) + ")" : "");
|
||||
|
||||
private double 交换的基础智力 = 0;
|
||||
private readonly double 实际增加暴击率 = 0.15;
|
||||
private readonly double 实际增加闪避率 = 0.15;
|
||||
private readonly double 实际增加魔法抗性 = 0.15;
|
||||
private bool 已经加过 = false;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
ResetEffect(character, true);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
ResetEffect(character, false);
|
||||
}
|
||||
|
||||
private void ResetEffect(Character character, bool isAdd)
|
||||
{
|
||||
if (isAdd)
|
||||
{
|
||||
if (!已经加过)
|
||||
{
|
||||
已经加过 = true;
|
||||
character.ExEvadeRate += 实际增加闪避率;
|
||||
character.ExCritRate += 实际增加暴击率;
|
||||
character.MDF[character.MagicType] += 实际增加魔法抗性;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (已经加过)
|
||||
{
|
||||
已经加过 = false;
|
||||
character.ExEvadeRate -= 实际增加闪避率;
|
||||
character.ExCritRate -= 实际增加暴击率;
|
||||
character.MDF[character.MagicType] -= 实际增加魔法抗性;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override BeforeCriticalCheckResult BeforeCriticalCheck(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character actor || ctx.Enemy is not Character enemy) return default;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
if (actor == Skill.Character)
|
||||
{
|
||||
// 力量模式下必定暴击:提供极高的暴击检定加值
|
||||
return new BeforeCriticalCheckResult { ThrowingBonusDelta = 200 };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
Changed(character);
|
||||
}
|
||||
|
||||
public override void OnAttributeChanged(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
Changed(character);
|
||||
}
|
||||
|
||||
private void Changed(Character character)
|
||||
{
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
Character c = Skill.Character;
|
||||
if (c.HP < c.MaxHP * 0.3)
|
||||
{
|
||||
if (c.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
double pastHP = c.HP;
|
||||
double pastMaxHP = c.MaxHP;
|
||||
double pastMP = c.MP;
|
||||
double pastMaxMP = c.MaxMP;
|
||||
c.PrimaryAttribute = PrimaryAttribute.STR;
|
||||
交换的基础智力 = c.BaseINT;
|
||||
c.ExINT -= 交换的基础智力;
|
||||
c.ExSTR += 交换的基础智力;
|
||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
ResetEffect(character, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (c.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double pastHP = c.HP;
|
||||
double pastMaxHP = c.MaxHP;
|
||||
double pastMP = c.MP;
|
||||
double pastMaxMP = c.MaxMP;
|
||||
c.PrimaryAttribute = PrimaryAttribute.INT;
|
||||
c.ExSTR -= 交换的基础智力;
|
||||
c.ExINT += 交换的基础智力;
|
||||
交换的基础智力 = 0;
|
||||
c.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
ResetEffect(character, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 变幻之心 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.变幻之心;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 变幻之心(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 变幻之心特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 变幻之心特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "变幻之心";
|
||||
public override string Description => $"检查 [ 双生流转 ] 的模式。在力量模式下,立即回复 {生命值回复 * 100:0.##}% 生命值,同时下 {吸血次数} 次对敌人造成伤害时获得 30% 生命偷取;" +
|
||||
$"智力模式下,下 {魔法加成次数} 次魔法伤害提升 {伤害提升 * 100:0.##}%。此技能效果不叠加,重复释放时将重置次数;若是模式切换后重复释放,将回收先前的效果。{当前次数描述}";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private string 当前次数描述
|
||||
{
|
||||
get
|
||||
{
|
||||
string str = "";
|
||||
if (当前吸血次数 > 0 || 当前魔法加成次数 > 0)
|
||||
{
|
||||
str = 当前吸血次数 > 0 ? "吸血次数" : (当前魔法加成次数 > 0 ? "魔法加成次数" : "");
|
||||
if (str != "")
|
||||
{
|
||||
str = $"剩余{str}:";
|
||||
}
|
||||
if (当前吸血次数 > 0)
|
||||
{
|
||||
str += $"{当前吸血次数} 次。";
|
||||
}
|
||||
else if (当前魔法加成次数 > 0)
|
||||
{
|
||||
str += $"{当前魔法加成次数} 次。";
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
private int 吸血次数
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
1 => 2,
|
||||
2 => 2,
|
||||
3 => 3,
|
||||
4 => 3,
|
||||
5 => 4,
|
||||
6 => 3,
|
||||
_ => 2
|
||||
};
|
||||
}
|
||||
}
|
||||
private int 魔法加成次数
|
||||
{
|
||||
get
|
||||
{
|
||||
return Level switch
|
||||
{
|
||||
1 => 1,
|
||||
2 => 1,
|
||||
3 => 2,
|
||||
4 => 2,
|
||||
5 => 3,
|
||||
6 => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
private double 生命值回复 => 0.25 + 0.03 * (Level - 1);
|
||||
private double 伤害提升 => 0.6 + 0.4 * (Level - 1);
|
||||
private int 当前吸血次数 = 0;
|
||||
private int 当前魔法加成次数 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (character.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
当前吸血次数 = 吸血次数;
|
||||
}
|
||||
else if (character.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
当前魔法加成次数 = 魔法加成次数;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
当前吸血次数 = 0;
|
||||
当前魔法加成次数 = 0;
|
||||
}
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && damageType == DamageType.Magical && 当前魔法加成次数 > 0)
|
||||
{
|
||||
当前魔法加成次数--;
|
||||
double 实际伤害提升百分比 = 伤害提升;
|
||||
double 实际伤害提升 = damage * 实际伤害提升百分比;
|
||||
WriteLine($"[ {character} ] 发动了变幻之心!伤害提升了 {实际伤害提升:0.##} 点!变幻之心加成剩余:{当前魔法加成次数} 次。");
|
||||
if (当前魔法加成次数 == 0)
|
||||
{
|
||||
character.Effects.Remove(this);
|
||||
OnEffectLost(new HookContext(GamingQueue, character));
|
||||
}
|
||||
return 实际伤害提升;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && 当前吸血次数 > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && damage > 0)
|
||||
{
|
||||
当前吸血次数--;
|
||||
double 实际吸血 = damage * 0.3;
|
||||
character.HP += 实际吸血;
|
||||
WriteLine($"[ {character} ] 发动了变幻之心!回复了 {实际吸血:0.##} 点生命值!变幻之心加成剩余:{当前吸血次数} 次。");
|
||||
if (当前吸血次数 == 0)
|
||||
{
|
||||
character.Effects.Remove(this);
|
||||
OnEffectLost(new HookContext(GamingQueue, character));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
IEnumerable<Effect> effects = caster.Effects.Where(e => e is 双生流转特效 && e.Skill.Character == Skill.Character);
|
||||
if (effects.Any())
|
||||
{
|
||||
if (caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Remove(this);
|
||||
OnEffectLost(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
if (caster.PrimaryAttribute == PrimaryAttribute.STR)
|
||||
{
|
||||
double 回复的生命 = 生命值回复 * caster.MaxHP;
|
||||
HealToTarget(caster, caster, 回复的生命);
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Lifesteal);
|
||||
}
|
||||
else if (caster.PrimaryAttribute == PrimaryAttribute.INT)
|
||||
{
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class META马 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.META马;
|
||||
public override string Name => "META马";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public META马(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new META马特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class META马特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"META马专属被动:初始力量+5,力量成长+0.5;在受到伤害时,获得的能量提升50%,每回合开始还能获得额外的 [ {EP:0.##} ] 能量值。";
|
||||
|
||||
public static double EP => 7;
|
||||
|
||||
public override AlterEPResult AlterEPAfterGetDamage(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
double baseEP = ctx.BaseEP * 1.5;
|
||||
if (Skill.Character != null) WriteLine($"[ {Skill.Character} ] 发动了META马专属被动!本次获得了 {baseEP:0.##} 能量!");
|
||||
return new AlterEPResult { BaseEP = baseEP };
|
||||
}
|
||||
|
||||
public override void OnTurnStart(TurnContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
List<Character> enemys = ctx.Enemys;
|
||||
List<Character> teammates = ctx.Teammates;
|
||||
List<Skill> skills = ctx.Skills;
|
||||
List<Item> items = ctx.Items;
|
||||
if (character.EP < 200)
|
||||
{
|
||||
character.EP += EP;
|
||||
WriteLine($"[ {character} ] 发动了META马专属被动!本次获得了 {EP:0.##} 能量!");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.InitialSTR += 5;
|
||||
character.STRGrowth += 0.5;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.InitialSTR -= 5;
|
||||
character.STRGrowth -= 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 熵灭极诣 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.熵灭极诣;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 55;
|
||||
public override double HardnessTime { get; set; } = 0;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 熵灭极诣(Character? character = null) : base(SkillType.SuperSkill, 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.SkillOwner()}释放「熵灭」的力量,获得 135% 力量 [ {攻击力加成:0.##} ] 的攻击力加成,但每次普通攻击命中时都会损失自身 6% 当前生命值 [ {当前生命值:0.##} ],持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 10 + 2 * (Level - 1);
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 攻击力加成 => Skill.Character?.STR * 1.35 ?? 0;
|
||||
private double 当前生命值 => Skill.Character?.HP * 0.06 ?? 0;
|
||||
private double 实际攻击力加成 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际攻击力加成 = 攻击力加成;
|
||||
character.ExATK2 += 实际攻击力加成;
|
||||
WriteLine($"[ {character} ] 的攻击力增加了 [ {实际攻击力加成:0.##} ] !");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
// 恢复到原始攻击力
|
||||
character.ExATK2 -= 实际攻击力加成;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
double 生命值减少 = 当前生命值;
|
||||
character.HP -= 生命值减少;
|
||||
WriteLine($"[ {character} ] 由于自身力量过于强大而被反噬,损失了 [ {生命值减少:0.##} ] 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
实际攻击力加成 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 宿命时律 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.宿命时律;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 60 - 4 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 宿命时律(Character? character = null) : base(SkillType.SuperSkill, 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 => $"{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,提升自身 25% 物理伤害减免和魔法抗性,普通攻击转为魔法伤害,且硬直时间减少 30%,并基于 {智力系数 * 100:0.##}% 智力 [ {智力加成:0.##} ] 强化普通攻击伤害。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 40;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 智力系数 => 1.4 + 0.4 * (Level - 1);
|
||||
private double 智力加成 => 智力系数 * Skill.Character?.INT ?? 0;
|
||||
private double 物理伤害减免 => 0.25;
|
||||
private double 魔法抗性 => 0.25;
|
||||
private double 实际物理伤害减免 = 0;
|
||||
private double 实际魔法抗性 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
||||
实际物理伤害减免 = 物理伤害减免;
|
||||
实际魔法抗性 = 魔法抗性;
|
||||
character.ExPDR += 实际物理伤害减免;
|
||||
character.MDF[character.MagicType] += 实际魔法抗性;
|
||||
WriteLine($"[ {character} ] 提升了 {实际物理伤害减免 * 100:0.##}% 物理伤害减免,{实际魔法抗性 * 100:0.##}% 魔法抗性!!");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
||||
character.ExPDR -= 实际物理伤害减免;
|
||||
character.MDF[character.MagicType] -= 实际魔法抗性;
|
||||
实际物理伤害减免 = 0;
|
||||
实际魔法抗性 = 0;
|
||||
}
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了宿命时律!伤害提升了 {智力加成:0.##} 点!");
|
||||
return 智力加成;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override AlterHardnessTimeResult AlterHardnessTimeAfterNormalAttack(HardnessContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
return new AlterHardnessTimeResult { Factor = -0.7 };
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost, EffectType.Haste, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 破釜沉舟 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.破釜沉舟;
|
||||
public override string Name => "破釜沉舟";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 破釜沉舟(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 破釜沉舟特效(this));
|
||||
Effects.Add(new ExMaxHP2(this, new()
|
||||
{
|
||||
{ "exhp", -0.2 }
|
||||
})
|
||||
{
|
||||
ParentEffect = Effects.First(),
|
||||
ForceHideInStatusBar = true
|
||||
});
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 破釜沉舟特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}已经看透了生命的真谛。{Skill.SkillOwner()}的最大生命值减少 20%,并获得破釜沉舟特效。破釜沉舟:生命值高于 40% 时,受到额外的 [ {高于40额外伤害下限}~{高于40额外伤害上限}% ] 伤害,获得 [ 累计所受伤害的 {高于40的加成下限}~{高于40的加成上限}% ] 伤害加成;生命值低于等于 40% 时,不会受到额外的伤害,并且获得 [ 累计受到的伤害 {低于40的加成下限}~{低于40的加成上限}% ] 的伤害加成。" +
|
||||
$"在没有累计任何受到伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成和 {常规生命偷取 * 100:0.##}% 生命偷取。通过累计受到伤害发动破釜沉舟时,目标的闪避检定获得 30% 的减值,并立即清除累计受到的伤害。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##})" : "");
|
||||
|
||||
private bool 已通过累计受到伤害发动破釜沉舟 = false;
|
||||
private double 累计受到的伤害 = 0;
|
||||
private double 这次的伤害加成 = 0;
|
||||
private double 受到伤害之前的HP = 0;
|
||||
private double 这次受到的额外伤害 = 0;
|
||||
private readonly double 常规伤害加成 = 0.35;
|
||||
private readonly double 常规生命偷取 = 0.15;
|
||||
private readonly int 高于40额外伤害上限 = 40;
|
||||
private readonly int 高于40额外伤害下限 = 20;
|
||||
private readonly int 高于40的加成上限 = 90;
|
||||
private readonly int 高于40的加成下限 = 60;
|
||||
private readonly int 低于40的加成上限 = 120;
|
||||
private readonly int 低于40的加成下限 = 100;
|
||||
|
||||
private double 伤害加成(double damage)
|
||||
{
|
||||
double 系数 = 常规伤害加成;
|
||||
Character? character = Skill.Character;
|
||||
if (character != null && 累计受到的伤害 != 0)
|
||||
{
|
||||
if (character.HP > character.MaxHP * 0.4)
|
||||
{
|
||||
系数 = (Random.Next(高于40的加成下限, 高于40的加成上限) + 0.0) / 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
系数 = (Random.Next(低于40的加成下限, 低于40的加成上限) + 0.0) / 100;
|
||||
}
|
||||
return 系数 * 累计受到的伤害;
|
||||
}
|
||||
return 系数 * damage;
|
||||
}
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
已通过累计受到伤害发动破釜沉舟 = 累计受到的伤害 != 0;
|
||||
这次的伤害加成 = 伤害加成(damage);
|
||||
WriteLine($"[ {character} ] 发动了破釜沉舟,获得了 {这次的伤害加成:0.##} 点伤害加成!");
|
||||
return 这次的伤害加成;
|
||||
}
|
||||
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
受到伤害之前的HP = enemy.HP;
|
||||
if (enemy.HP > enemy.MaxHP * 0.4)
|
||||
{
|
||||
// 额外受到伤害
|
||||
double 系数 = (Random.Next(高于40额外伤害下限, 高于40额外伤害上限) + 0.0) / 100;
|
||||
这次受到的额外伤害 = damage * 系数;
|
||||
WriteLine($"[ {enemy} ] 的破釜沉舟触发,将额外受到 {这次受到的额外伤害:0.##} 点伤害!");
|
||||
}
|
||||
else 这次受到的额外伤害 = 0;
|
||||
return 这次受到的额外伤害;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
累计受到的伤害 += actualDamage;
|
||||
if (enemy.HP < 0 && 受到伤害之前的HP - actualDamage + 这次受到的额外伤害 > 0)
|
||||
{
|
||||
enemy.HP = 10;
|
||||
WriteLine($"[ {enemy} ] 的破釜沉舟触发,保护了自己不进入死亡!!");
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 已通过累计受到伤害发动破釜沉舟)
|
||||
{
|
||||
已通过累计受到伤害发动破釜沉舟 = false;
|
||||
累计受到的伤害 = 0;
|
||||
double ls = actualDamage * 常规生命偷取;
|
||||
HealToTarget(character, character, ls, triggerEffects: false);
|
||||
WriteLine($"[ {character} ] 发动了破釜沉舟,回复了 {ls:0.##} 点生命值!");
|
||||
}
|
||||
}
|
||||
|
||||
public override BeforeEvadeCheckResult BeforeEvadeCheck(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character actor) return default;
|
||||
if (已通过累计受到伤害发动破釜沉舟 && actor == Skill.Character)
|
||||
{
|
||||
// 发动后本次攻击更易被闪避
|
||||
return new BeforeEvadeCheckResult { ThrowingBonusDelta = -0.3 };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override void OnTurnEnd(TurnContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
已通过累计受到伤害发动破釜沉舟 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 暗香疏影 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.暗香疏影;
|
||||
public override string Name => "暗香疏影";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 暗香疏影(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 暗香疏影特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 暗香疏影特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每次造成伤害都会随机减少对方 [ 7~15 ] 点能量值,对能量值低于一半的角色额外造成 30% 伤害。对于暗香疏影而言,能量值大于 100 且小于 150 时,视为低于一半。";
|
||||
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !是否是嵌套伤害 && enemy.HP > 0)
|
||||
{
|
||||
// 减少能量
|
||||
double EP = Random.Next(7, 15);
|
||||
enemy.EP -= EP;
|
||||
WriteLine($"[ {character} ] 发动了暗香疏影![ {enemy} ] 的能量值被减少了 {EP:0.##} 点!现有能量:{enemy.EP:0.##}。");
|
||||
// 额外伤害
|
||||
if (enemy.EP >= 0 && enemy.EP < 50 || enemy.EP >= 100 && enemy.EP < 150)
|
||||
{
|
||||
double 额外伤害 = damage * 0.3;
|
||||
WriteLine($"[ {character} ] 发动了暗香疏影!将造成额外伤害!");
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, damageType, magicType, 额外伤害);
|
||||
}
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 残香凋零 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.残香凋零;
|
||||
public override string Name => "残香凋零";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 100 - 4 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 12;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectEnemy => true;
|
||||
|
||||
public 残香凋零(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
CastAnywhere = true;
|
||||
Effects.Add(new 残香凋零特效(this));
|
||||
}
|
||||
|
||||
public override void OnTurnStart(Character character, List<Character> enemys, List<Character> teammates, List<Skill> skills, List<Item> items)
|
||||
{
|
||||
if (Character == character)
|
||||
{
|
||||
CanSelectTargetCount = enemys.Count;
|
||||
if (CanSelectTargetCount > 6) CanSelectTargetCount = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class 残香凋零特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}释放能够动荡能量流的深渊之死气。对至多 6 个角色造成 " +
|
||||
$"{能量系数 * 100:0.##}% 其现有能量值 + {智力系数 * 100:0.##}% 智力 [ {智力伤害:0.##} ] 的魔法伤害。";
|
||||
|
||||
private double 智力系数 => 0.2 * Level;
|
||||
private double 智力伤害 => 智力系数 * Skill.Character?.INT ?? 0;
|
||||
private double 能量系数 => 1 * Level;
|
||||
|
||||
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 c in targets)
|
||||
{
|
||||
double ep = c.EP;
|
||||
DamageToEnemy(caster, c, DamageType.Magical, MagicType, ep * 能量系数 + 智力伤害);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Interface.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 弱者猎手 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.弱者猎手;
|
||||
public override string Name => "弱者猎手";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 弱者猎手(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 弱者猎手特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 弱者猎手特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"在 AI 控制下,任何目标都将则优先选择血量更低的角色。行动开始时,弱者猎手会盯上一名角色,然后标记所有生命值百分比低于自己的角色。在此回合内攻击被盯上或者被标记的角色,将造成 140% 伤害。";
|
||||
|
||||
public HashSet<Character> 猎手标记 { get; set; } = [];
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && 猎手标记.Contains(enemy))
|
||||
{
|
||||
double 额外伤害 = damage * 0.4;
|
||||
return 额外伤害;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void AlterSelectListBeforeSelection(SelectionContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Skill is not ISkill skill) return;
|
||||
List<Character> allEnemys = ctx.AllEnemys;
|
||||
List<Character> allTeammates = ctx.AllTeammates;
|
||||
List<Character> enemys = ctx.Enemys;
|
||||
List<Character> teammates = ctx.Teammates;
|
||||
猎手标记.Clear();
|
||||
AddHalfOfMe([.. enemys.Where(e => e.HP > 0).OrderBy(e => e.HP / e.MaxHP)]);
|
||||
if (猎手标记.Count > 0)
|
||||
{
|
||||
WriteLine($"[ {character} ] 的弱者猎手标记了以下角色:[ {string.Join(" ] / [ ", 猎手标记)} ] !");
|
||||
if (IsCharacterInAIControlling(character))
|
||||
{
|
||||
enemys.Clear();
|
||||
int count = skill.RealCanSelectTargetCount(enemys, teammates);
|
||||
enemys.AddRange(猎手标记.Take(count));
|
||||
WriteLine($"[ {character} ] 发动了弱者猎手![ {string.Join(" ] / [ ", enemys)} ] 被盯上了!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddHalfOfMe(params IEnumerable<Character> enemys)
|
||||
{
|
||||
foreach (Character enemy in enemys)
|
||||
{
|
||||
if (Skill.Character != null && enemy.HP > 0 && (enemy.HP / enemy.MaxHP) < (Skill.Character.HP / Skill.Character.MaxHP))
|
||||
{
|
||||
猎手标记.Add(enemy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 饕餮盛宴 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.饕餮盛宴;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 45 + 1 * (Level - 1);
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 饕餮盛宴(Character? character = null) : base(SkillType.SuperSkill, 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 => $"获得 {吸血系数 * 100:0.##}% 吸血,持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 吸血系数 => 0.2 + 0.05 * (Level - 1);
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && character.HP < character.MaxHP)
|
||||
{
|
||||
double 实际吸血 = 吸血系数 * damage;
|
||||
HealToTarget(character, character, 实际吸血);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Lifesteal);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 不息之流 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.不息之流;
|
||||
public override string Name => "不息之流";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 不息之流(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 不息之流特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 不息之流特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}处于正常态和吟唱态时,每秒回复 {回复系数 * 100:0.##}% 最大生命值 [ {Skill.Character?.MaxHP * 回复系数:0.##} ] 并获得 {能量获取:0.##} 点能量。";
|
||||
|
||||
public double 回复系数 { get; set; } = 0.01;
|
||||
public double 能量获取 { get; set; } = 1;
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (character.CharacterState == CharacterState.Actionable || character.CharacterState == CharacterState.Casting || character.CharacterState == CharacterState.PreCastSuperSkill)
|
||||
{
|
||||
character.HP += (Skill.Character?.MaxHP ?? 0) * 回复系数 * elapsed;
|
||||
character.EP += 能量获取 * elapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 宿命之潮 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.宿命之潮;
|
||||
public override string Name => "宿命之潮";
|
||||
public override string Description => Effects.Count > 0 ? ((宿命之潮特效)Effects.First()).通用描述 : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First().ExemptionDescription : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 80;
|
||||
public override double HardnessTime { get; set; } = 2;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 宿命之潮(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 宿命之潮特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 宿命之潮特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description { get; set; } = "";
|
||||
public override bool Durative => true;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override string DispelDescription => $"被驱散性:所有回复/禁止回复不可驱散,攻击力加成不可驱散,嘲讽需强驱散";
|
||||
public override PrimaryAttribute ExemptionType => PrimaryAttribute.AGI;
|
||||
public override bool ExemptDuration => false;
|
||||
|
||||
public string 通用描述 => $"{Skill.SkillOwner()}可以选择获得哪一种力量:\r\n{熵核描述}\r\n{守护描述}";
|
||||
private string 熵核描述 => $"【熵核】加速生命回复,每{GameplayEquilibriumConstant.InGameTime}额外回复 {熵核额外回复 * 100:0.##}% 当前生命值 [ {Skill.Character?.HP * 熵核额外回复:0.##} ],攻击力提升 {熵核攻击力提升 * 100:0.##}% [ {Skill.Character?.BaseATK * 熵核攻击力提升:0.##} ],但是受到的伤害提升 {熵核受到伤害提升 * 100:0.##}%。" +
|
||||
$"对敌人造成伤害会使其在 {熵核影响敌人时间:0.##} {GameplayEquilibriumConstant.InGameTime}内无法获得自然的生命和魔法回复的禁止治疗效果,施加该状态时,只有目标的敏捷高于{Skill.SkillOwner()}的角色才能进行豁免检定。持续 {熵核持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
private static double 熵核额外回复 => 0.02;
|
||||
private double 熵核攻击力提升 => 0.2 + 0.1 * (Skill.Level - 1);
|
||||
private double 熵核受到伤害提升 => 0.15 + 0.05 * (Skill.Level - 1);
|
||||
private static double 熵核影响敌人时间 => 10;
|
||||
private double 熵核持续时间 => 15 + 2 * (Skill.Level - 1);
|
||||
private string 守护描述 => $"【守护】极致地加速生命回复,每{GameplayEquilibriumConstant.InGameTime}额外回复 {守护额外回复 * 100:0.##}% 当前生命值 [ {Skill.Character?.HP * 守护额外回复:0.##} ],为全体友方角色提供每{GameplayEquilibriumConstant.InGameTime}额外 {守护友方回复 * 100:0.##}% 当前生命值的生命回复,并嘲讽全体敌方角色,被嘲讽的角色仅能将{Skill.SkillOwner()}作为攻击目标。" +
|
||||
$"施加嘲讽状态时,只有目标的敏捷高于{Skill.SkillOwner()}的角色才能进行豁免检定。持续 {守护持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
private double 守护额外回复 => 0.01 + 0.003 * (Skill.Level - 1);
|
||||
private double 守护友方回复 => 0.01 + 0.002 * (Skill.Level - 1);
|
||||
private double 守护持续时间 => 15 + 1 * (Skill.Level - 1);
|
||||
private bool 选择熵核 { get; set; } = false;
|
||||
|
||||
private double 实际攻击力提升 = 0;
|
||||
private bool 实际选择熵核 = false;
|
||||
|
||||
public 宿命之潮特效(Skill skill) : base(skill)
|
||||
{
|
||||
Description = 通用描述;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (实际选择熵核)
|
||||
{
|
||||
实际攻击力提升 = 熵核攻击力提升;
|
||||
character.ExATKPercentage += 实际攻击力提升;
|
||||
WriteLine($"[ {character} ] 的攻击力提升了 {实际攻击力提升 * 100:0.##}% [ {character.BaseATK * 实际攻击力提升:0.##} ] !");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (实际选择熵核)
|
||||
{
|
||||
character.ExATKPercentage -= 实际攻击力提升;
|
||||
}
|
||||
}
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (实际选择熵核 && enemy == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
double bouns = -(damage * 熵核受到伤害提升);
|
||||
WriteLine($"[ {enemy} ] 触发了宿命之潮,额外受到 {Math.Abs(bouns):0.##} 伤害!");
|
||||
return new AlterActualDamageResult { DamageDelta = bouns };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (实际选择熵核 && character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !CheckSkilledImmune(character, enemy, Skill))
|
||||
{
|
||||
禁止治疗 e = new(Skill, character, false, true, true, true, 熵核影响敌人时间, 0)
|
||||
{
|
||||
ExemptionType = PrimaryAttribute.AGI,
|
||||
ExemptDuration = false,
|
||||
DispelledType = DispelledType
|
||||
};
|
||||
if (enemy.AGI <= character.AGI || (enemy.AGI > character.AGI && !CheckExemption(character, enemy, e)))
|
||||
{
|
||||
WriteLine($"[ {character} ] 对 [ {enemy} ] 施加了禁止治疗{e.禁止类型}!!持续时间:{熵核影响敌人时间:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, enemy));
|
||||
GamingQueue?.AddApplyEffects(enemy, e.EffectType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
if (caster.Effects.Contains(this))
|
||||
{
|
||||
OnEffectLost(new HookContext(GamingQueue, caster));
|
||||
caster.Effects.Remove(this);
|
||||
}
|
||||
caster.Effects.Add(this);
|
||||
实际攻击力提升 = 0;
|
||||
InquiryResponse response = Inquiry(caster, new(InquiryType.Choice, nameof(宿命之潮))
|
||||
{
|
||||
Description = "作出抉择",
|
||||
Choices = new()
|
||||
{
|
||||
{ "熵核", 熵核描述 },
|
||||
{ "守护", 守护描述 }
|
||||
},
|
||||
DefaultChoice = Random.Next() % 2 == 0 ? "熵核" : "守护",
|
||||
CanCancel = false
|
||||
});
|
||||
if (response.Choices.Count > 0)
|
||||
{
|
||||
选择熵核 = response.Choices[0] == "熵核";
|
||||
}
|
||||
实际选择熵核 = 选择熵核;
|
||||
Duration = 实际选择熵核 ? 熵核持续时间 : 守护持续时间;
|
||||
RemainDuration = Duration;
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
if (实际选择熵核)
|
||||
{
|
||||
Description = $"作出抉择:{熵核描述}";
|
||||
Effect effect = new 持续回复(Skill, caster, caster, true, Duration, 0, true, 0, 熵核额外回复)
|
||||
{
|
||||
DispelledType = DispelledType
|
||||
};
|
||||
WriteLine($"[ {caster} ] 获得了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
caster.Effects.Add(effect);
|
||||
effect.OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
GamingQueue?.AddApplyEffects(caster, effect.EffectType);
|
||||
}
|
||||
else
|
||||
{
|
||||
Description = $"作出抉择:{守护描述}";
|
||||
Effect effect = new 持续回复(Skill, caster, caster, true, Duration, 0, true, 0, 守护额外回复)
|
||||
{
|
||||
DispelledType = DispelledType
|
||||
};
|
||||
WriteLine($"[ {caster} ] 获得了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
caster.Effects.Add(effect);
|
||||
effect.OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
GamingQueue?.AddApplyEffects(caster, effect.EffectType);
|
||||
List<Character> allEnemys = [];
|
||||
List<Character> allTeammates = [];
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
allEnemys = [.. GamingQueue.GetEnemies(caster).Where(c => c != caster && GamingQueue.Queue.Contains(c))];
|
||||
allTeammates = [.. GamingQueue.GetTeammates(caster).Where(c => c != caster && GamingQueue.Queue.Contains(c))];
|
||||
}
|
||||
foreach (Character enemy in allEnemys)
|
||||
{
|
||||
Effect e = new 愤怒(Skill, caster, caster, true, Duration, 0)
|
||||
{
|
||||
ExemptionType = PrimaryAttribute.AGI,
|
||||
DispelledType = DispelledType.Strong
|
||||
};
|
||||
if (enemy.AGI <= caster.AGI || (enemy.AGI > caster.AGI && !CheckExemption(caster, enemy, e)))
|
||||
{
|
||||
WriteLine($"[ {caster} ] 嘲讽了 [ {enemy} ],[ {enemy} ] 愤怒了!!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, enemy));
|
||||
GamingQueue?.AddApplyEffects(enemy, e.EffectType);
|
||||
}
|
||||
}
|
||||
foreach (Character teammate in allTeammates)
|
||||
{
|
||||
Effect e = new 持续回复(Skill, caster, caster, true, Duration, 0, true, 0, 守护友方回复)
|
||||
{
|
||||
DispelledType = DispelledType
|
||||
};
|
||||
WriteLine($"[ {caster} ] 对 [ {teammate} ] 施加了持续生命回复!持续时间:{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
teammate.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, teammate));
|
||||
GamingQueue?.AddApplyEffects(teammate, e.EffectType);
|
||||
}
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Focusing, EffectType.HealOverTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 开宫 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.开宫;
|
||||
public override string Name => "开宫";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 开宫(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 开宫特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 开宫特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}在游戏开始时进入 [ {nameof(长期监视)} ] 状态,时刻监视着场上的一举一动。当场上有角色死亡时,如果该角色死于技能,则{Skill.SkillOwner()}复制该技能获得使用权,持续 3 回合;如果该角色死于普通攻击,则{Skill.SkillOwner()}的普通攻击将转为魔法伤害并且无视闪避,持续 3 回合。" +
|
||||
$"接着,{Skill.SkillOwner()}给予击杀者 [ {nameof(时雨标记)} ]。{Skill.SkillOwner()}在造成魔法伤害时,会基于伤害值的 15% 治疗持有标记的友方角色;{Skill.SkillOwner()}与所有持有标记的友方角色对持有标记的敌方角色的伤害加成提升 25%,并且使持有标记的敌方角色在持续时间内的回合开始阶段,有 65% 概率陷入混乱。" +
|
||||
$"混乱:进入行动受限状态,失控并随机行动,且所有指令均会在所有角色中随机选取目标。时雨标记持续 3 回合。";
|
||||
|
||||
private bool 激活 = false;
|
||||
|
||||
public override void OnGameStart(HookContext ctx)
|
||||
{
|
||||
if (!激活)
|
||||
{
|
||||
激活 = true;
|
||||
发送他们标记();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (激活)
|
||||
{
|
||||
发送他们标记();
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character != Skill.Character || GamingQueue is null || damageType != DamageType.Magical || (damageResult != DamageResult.Normal && damageResult != DamageResult.Critical))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Character[] characters = [.. GamingQueue.GetTeammates(character).Where(c => c.Effects.Any(e => e is 时雨标记 && e.Source == character))];
|
||||
if (characters.Length > 0)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了开宫!");
|
||||
double heal = actualDamage * 0.15;
|
||||
foreach (Character target in characters)
|
||||
{
|
||||
HealToTarget(character, target, heal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void 发送他们标记()
|
||||
{
|
||||
if (GamingQueue is null || Skill.Character is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
foreach (Character character in GamingQueue.Queue)
|
||||
{
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!character.Effects.Any(e => e is 长期监视 && e.Source == Skill.Character))
|
||||
{
|
||||
Effect e = new 长期监视(Skill, Skill.Character, character);
|
||||
character.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, character));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 放监 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.放监;
|
||||
public override string Name => "放监";
|
||||
public override string Description => Effects.Count > 0 ? ((放监特效)Effects.First()).通用描述 : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override double EPCost => 100;
|
||||
public override double CD => 65;
|
||||
public override double HardnessTime { get; set; } = 14;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public 放监被动 Passive { get; set; }
|
||||
|
||||
public 放监(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 放监特效(this));
|
||||
Passive = new 放监被动(this);
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return [Passive];
|
||||
}
|
||||
}
|
||||
|
||||
public class 放监被动(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}阻止任何来自持有 [ 宫监手标记 ] 的角色所发起的指向性技能攻击。";
|
||||
public override bool DurativeWithoutDuration => true;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
public override BeforeSkillCastedOnStatusResult BeforeSkillCastedOnStatus(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster || ctx.Skill is not Skill skill) return default;
|
||||
List<Character> targets = ctx.Targets;
|
||||
List<Grid> grids = ctx.Grids;
|
||||
Dictionary<string, object> others = ctx.Others;
|
||||
if (Skill.Character != null && caster.Effects.FirstOrDefault(e => e is 宫监手标记 && e.Source == Source) is 宫监手标记 effect)
|
||||
{
|
||||
WriteLine($"[ {Skill.Character} ] 高声呼喊:“宫监手,放监!”");
|
||||
复制技能 e = new(Skill, Skill.Character, skill)
|
||||
{
|
||||
Durative = false,
|
||||
DurationTurn = 4,
|
||||
RemainDurationTurn = 4
|
||||
};
|
||||
e.CopiedSkill.Values[nameof(时雨标记)] = 1;
|
||||
e.CopiedSkill.CurrentCD = 0;
|
||||
e.CopiedSkill.FreeCostEP = true;
|
||||
e.CopiedSkill.FreeCostMP = true;
|
||||
e.CopiedSkill.Enable = true;
|
||||
e.CopiedSkill.IsInEffect = false;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, Skill.Character));
|
||||
Skill.Character.Effects.Add(e);
|
||||
WriteLine($"[ {Skill.Character} ] 复制了 [ {caster} ] 的技能:{skill.Name}!!");
|
||||
effect.指向性技能任务完成(caster);
|
||||
// 返回 RemoveFromTargets 让框架移除该目标(阻止技能对持有放监的角色释放)
|
||||
return new BeforeSkillCastedOnStatusResult { RemoveFromTargets = true };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
public class 放监特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => 通用描述;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
public string 通用描述 => $"使场上现有的时雨标记变得不可驱散,并且刷新为持续 3 回合。并给予持有时雨标记的敌方角色 [ 宫监手标记 ],宫监手标记不可驱散,持续 3 回合。{任务要求}";
|
||||
public string 任务要求 => $"持有宫监手标记的角色,必须完成以下两个任务以消除标记,否则将在标记消失时,每个未完成的任务给予角色基于{Skill.SkillOwner()} {核心属性系数 * 100:0.##}% 核心属性 + {攻击力系数 * 100:0.##}% 攻击力 [ {Skill.Character?.PrimaryAttributeValue * 核心属性系数 + Skill.Character?.ATK * 攻击力系数:0.##} ] 的真实伤害:\r\n" +
|
||||
$"1. 使用 [ 普通攻击 ] 攻击一次队友,此伤害必定暴击且无视闪避;\r\n2. 对{Skill.SkillOwner()}释放一个指向性技能,{Skill.SkillOwner()}将此技能效果无效化并且复制该技能获得使用权持续 4 回合。\r\n注意:在宫监手标记被消除前,对{Skill.SkillOwner()}释放指向性技能始终会触发无效化和复制效果。杀死{Skill.SkillOwner()}可以终止所有放监任务。";
|
||||
public double 核心属性系数 => 0.7 * Skill.Level;
|
||||
public double 攻击力系数 => 0.2 + 0.10 * (Skill.Level - 1);
|
||||
|
||||
public void 造成伤害(Character character, int count)
|
||||
{
|
||||
if (Skill.Character != null)
|
||||
{
|
||||
WriteLine($"[ {character} ] 未完成「放监」任务!");
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
double damage = Skill.Character.PrimaryAttributeValue * 核心属性系数 + Skill.Character.ATK * 攻击力系数;
|
||||
DamageToEnemy(Skill.Character, character, DamageType.True, MagicType, damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
List<Character> enemies = GamingQueue.GetEnemies(caster);
|
||||
foreach (Character character in GamingQueue.Queue)
|
||||
{
|
||||
if (character.Effects.FirstOrDefault(e => e is 时雨标记 && e.Source == caster) is 时雨标记 e)
|
||||
{
|
||||
e.DispelledType = DispelledType.CannotBeDispelled;
|
||||
e.RemainDurationTurn = 3;
|
||||
if (enemies.Contains(character))
|
||||
{
|
||||
Effect e2 = new 宫监手标记(Skill, caster, character, this)
|
||||
{
|
||||
Durative = false,
|
||||
DurationTurn = 3,
|
||||
RemainDurationTurn = 3
|
||||
};
|
||||
character.Effects.Add(e2);
|
||||
e2.OnEffectGained(new HookContext(GamingQueue, character));
|
||||
}
|
||||
}
|
||||
}
|
||||
GamingQueue.AddApplyEffects(caster, EffectType.Focusing);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,487 @@
|
||||
// 注:
|
||||
// 爆发技增益效果通常不可驱散。
|
||||
// 未注明友方·的增益技能均为自身,反之,可选取友方或者自身。特殊情况:友方不含自身等。
|
||||
// 被动技能不可驱散,未说明作用对象时均为自身。
|
||||
// 省略了作用目标的负面技能均为作用于敌方。(特殊地,减少硬直是增益)
|
||||
// 技能名称来源:《英雄传说 空之轨迹》/《英雄联盟》/《DOTA2》
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/**
|
||||
* 冰霜攻击 = 单体伤害
|
||||
* 火之矢 = 单体伤害
|
||||
* 水之矢 = 单体伤害
|
||||
* 石之锤 = 单体伤害
|
||||
* 风之轮 = 单体伤害
|
||||
* 心灵之霞 = 单体伤害
|
||||
* 次元上升 = 单体伤害+眩晕(时间型),需强驱散
|
||||
* 暗物质 = 单体伤害
|
||||
*
|
||||
* 回复术 = 我方·单体回复(数值)
|
||||
* 治愈术 = 我方·单体弱驱散+回复(百分比)
|
||||
* 复苏术 = 我方·单体强驱散+回复(百分比)+复苏
|
||||
* 圣灵术 = 我方·全体强驱散+回复(数值)+复苏
|
||||
* 时间加速 = 我方·单体速度提升(时间型)
|
||||
* 时间减速 = 单体速度减少(时间型)
|
||||
* 反魔法领域 = 多目标封技(技能受限,时间型)+施法解除,可弱驱散
|
||||
* 沉默十字 = 多目标封技(技能受限,回合型)+施法解除,可弱驱散
|
||||
* 虚弱领域 = 全体虚弱(伤害降低+护甲魔抗降低+重伤,时间型),可弱驱散
|
||||
* 混沌烙印 = 单体气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 凝胶稠絮 = 单体虚弱(伤害降低+护甲魔抗降低+重伤,回合型),可弱驱散
|
||||
*
|
||||
* 大地之墙 = 我方·多目标物理护盾+持续性弱驱散(时间型)
|
||||
* 盖亚之盾 = 我方·全体物理+魔法护盾值
|
||||
* 风之守护 = 我方·暴击率+闪避提升(回合型)
|
||||
* 结晶防护 = 我方·护甲+魔抗提升(回合型)
|
||||
* 强音之力 = 我方·攻击提升(回合型)
|
||||
* 神圣祝福 = 我方·攻击+护甲+魔抗提升(回合型)
|
||||
* 根源屏障 = 我方·技能免疫+魔法免疫(回合型)
|
||||
*
|
||||
* 灾难冲击波 = 多目标伤害+魔抗降低(回合型),可弱驱散
|
||||
* 银色荆棘 = 多目标伤害,概率混乱(行动受限,如同AI控制行动,回合型),需强驱散
|
||||
* 等离子之波 = 多目标伤害,概率封技(技能受限,回合型)+施法解除,可弱驱散
|
||||
* 地狱之门 = 多目标伤害,概率气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 钻石星尘 = 多目标伤害,概率冻结(完全行动不能+魔法易伤,回合型),需强驱散
|
||||
* 死亡咆哮 = 多目标伤害,概率战斗不能(时间型),需强驱散
|
||||
* 鬼魅之痛 = 多目标伤害,概率眩晕(时间型),需强驱散
|
||||
* 导力停止 = 全体封技(技能受限)+施法解除+魔抗降低,时间型,可弱驱散
|
||||
*
|
||||
* 冰狱冥嚎 = 多目标伤害(冰霜攻击·复)
|
||||
* 火山咆哮 = 多目标伤害(火之矢·复)
|
||||
* 水蓝轰炸 = 多目标伤害(水之矢·复)
|
||||
* 岩石之息 = 多目标伤害(石之锤·复)
|
||||
* 弧形日珥 = 多目标伤害(风之轮·复)
|
||||
* 苍白地狱 = 多目标伤害(心灵之霞·复)
|
||||
* 破碎虚空 = 多目标伤害(暗物质·复)
|
||||
* 弧光消耗 = 多目标吸取魔法值和能量值
|
||||
*
|
||||
* 回复术·改 = 我方·单体回复(百分比)
|
||||
* 回复术·复 = 我方·多目标回复(百分比)
|
||||
* 治愈术·复 = 我方·多目标弱驱散+回复(数值)
|
||||
* 风之守护·复 = 我方·多目标暴击率+闪避提升(回合型)
|
||||
* 强音之力·复 = 我方·多目标攻击提升(回合型)
|
||||
* 结晶防护·复 = 我方·多目标护甲+魔抗提升(回合型)
|
||||
* 神圣祝福·复 = 我方·多目标攻击+护甲+魔抗提升(回合型)
|
||||
* 时间加速·改 = 我方·单体速度+加速系数提升(回合型)
|
||||
* 时间减速·改 = 单体速度+加速系数减少(回合型)
|
||||
* 时间加速·复 = 我方·多目标速度+加速系数提升(回合型)
|
||||
* 时间减速·复 = 多目标速度+加速系数减少(回合型)
|
||||
* 十二宫星环 = 我方·多目标附加【强运】状态;强运状态下每回合结束随机生成 2~3 份绑定自身的回合奖励
|
||||
*/
|
||||
public enum MagicID : long
|
||||
{
|
||||
冰霜攻击 = 1001,
|
||||
火之矢 = 1002,
|
||||
水之矢 = 1003,
|
||||
石之锤 = 1004,
|
||||
风之轮 = 1005,
|
||||
心灵之霞 = 1006,
|
||||
次元上升 = 1007,
|
||||
暗物质 = 1008,
|
||||
|
||||
回复术 = 1009,
|
||||
治愈术 = 1010,
|
||||
复苏术 = 1011,
|
||||
圣灵术 = 1012,
|
||||
时间加速 = 1013,
|
||||
时间减速 = 1014,
|
||||
反魔法领域 = 1015,
|
||||
沉默十字 = 1016,
|
||||
虚弱领域 = 1017,
|
||||
混沌烙印 = 1018,
|
||||
凝胶稠絮 = 1019,
|
||||
|
||||
大地之墙 = 1020,
|
||||
盖亚之盾 = 1021,
|
||||
风之守护 = 1022,
|
||||
结晶防护 = 1023,
|
||||
强音之力 = 1024,
|
||||
神圣祝福 = 1025,
|
||||
根源屏障 = 1026,
|
||||
|
||||
灾难冲击波 = 1027,
|
||||
银色荆棘 = 1028,
|
||||
等离子之波 = 1029,
|
||||
地狱之门 = 1030,
|
||||
钻石星尘 = 1031,
|
||||
死亡咆哮 = 1032,
|
||||
鬼魅之痛 = 1033,
|
||||
导力停止 = 1034,
|
||||
|
||||
冰狱冥嚎 = 1035,
|
||||
火山咆哮 = 1036,
|
||||
水蓝轰炸 = 1037,
|
||||
岩石之息 = 1038,
|
||||
弧形日珥 = 1039,
|
||||
苍白地狱 = 1040,
|
||||
破碎虚空 = 1041,
|
||||
弧光消耗 = 1042,
|
||||
|
||||
回复术改 = 1043,
|
||||
回复术复 = 1044,
|
||||
治愈术复 = 1045,
|
||||
风之守护复 = 1046,
|
||||
强音之力复 = 1047,
|
||||
结晶防护复 = 1048,
|
||||
神圣祝福复 = 1049,
|
||||
时间加速改 = 1050,
|
||||
时间减速改 = 1051,
|
||||
时间加速复 = 1052,
|
||||
时间减速复 = 1053,
|
||||
十二宫星环 = 1054,
|
||||
// —— 节奏维度(2026-09-23):首个剥夺「决策点」的魔法 ——
|
||||
时间剥夺 = 1055
|
||||
}
|
||||
|
||||
/**
|
||||
* 疾风步 = 自身·速度/暴击提升(时间型)+不可选中+破隐一击
|
||||
* 助威 = 我方·多目标攻击力提升(回合型)
|
||||
* 挑拨 = 多目标愤怒(嘲讽,回合型),需强驱散
|
||||
* 绞丝棍 = 单体伤害
|
||||
* 金刚击 = 单体伤害+施法解除
|
||||
* 旋风轮 = 多目标伤害
|
||||
* 双连击 = 单体2次普通攻击
|
||||
* 绝影 = 单体伤害+迟滞(硬直时间延长),可弱驱散
|
||||
* 胧 = 单体攻击,概率战斗不能(攻击受限+施法不能),需强驱散
|
||||
* 魔眼 = 单体迟滞(硬直时间延长)、概率混乱(行动受限,如同AI控制行动,回合型),需强驱散
|
||||
* 风之鞭 = 多目标伤害
|
||||
* 拘束之鞭 = 单体伤害+施法解除
|
||||
* 天堂之吻 = 我方·硬直时间提前(时间型)
|
||||
* 狐媚暗随 = 单体伤害
|
||||
* 快速狙击 = 随机单体目标伤害
|
||||
* 精准射击 = 单体伤害+施法解除
|
||||
* 欢乐激发 = 我方·多目标回复
|
||||
* 乱心安魂曲 = 多目标伤害
|
||||
* 斗魂 = 攻击力降低+物理护甲降低,可弱驱散
|
||||
* 岚 = 多目标伤害+施法解除
|
||||
* 公牛之怒 = 自身·扣除生命值+回复能量
|
||||
* 火焰碎击 = 单体伤害+战斗不能(时间型)+施法解除,需强驱散
|
||||
* 螺旋之刃 = 单体迟滞(硬直时间延长),可弱驱散
|
||||
* 霸王疾风 = 单体伤害
|
||||
* 回复弹 = 我方·单体弱驱散+回复
|
||||
* 导力装甲 = 自身·封技+攻击力提升+护甲魔抗提升+硬直时间提前
|
||||
* 回复原状 = 自身·解除导力装甲
|
||||
* 强打 = 单体伤害,概率气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 龙神功 = 自身·攻击力提升+护甲魔抗提升(回合型)
|
||||
* 养命功 = 自身·持续性弱驱散+回复(回合型)
|
||||
* 月华掌 = 单体伤害,概率混乱(行动受限,如同AI控制行动,回合型),需强驱散
|
||||
* 雷神脚 = 多目标伤害
|
||||
* 弓刃交错 = 单体伤害+迟滞(硬直时间延长),可弱驱散
|
||||
* 神圣祈祷 = 我方·持续性强驱散+回复(时间型)
|
||||
* 牺牲之箭 = 我方不含自身·能量回复
|
||||
* 石化之矢 = 单体伤害+石化(完全行动不能,时间型),需强驱散
|
||||
* 死亡制裁 = 多目标伤害
|
||||
* 剑风闪 = 多目标伤害
|
||||
* 落叶 = 单体伤害+迟滞(硬直时间延长),可弱驱散
|
||||
* 风花阵 = 自身·攻击力提升+护甲降低
|
||||
* 陀螺舞 = 多目标愤怒(嘲讽,回合型),需强驱散
|
||||
* 光破斩 = 多目标伤害
|
||||
* 跳跃点射 = 单体伤害+护甲降低+施法解除,需强驱散
|
||||
* 鲨鱼锚击 = 单体伤害+缴械(攻击受限,回合型),可弱驱散
|
||||
* 光鬼斩 = 单体伤害,概率气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 雷索吸缚 = 单体愤怒(嘲讽,回合型)、概率气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 狂刃剑舞 = 敌方·单体攻击,概率混乱(行动受限,如同AI控制行动,回合型),需强驱散
|
||||
* 无相飞刀 = 单体封技+施法解除,可弱驱散
|
||||
* 破邪显正 = 多目标伤害
|
||||
* 镜花水月 = 自身·完全免疫,回合型
|
||||
* 号令 = 我方不含自身·攻击力提升
|
||||
* 千剑之雨 = 多目标伤害
|
||||
* 无尽剑制 = 全体伤害
|
||||
* 灾难一掷 = 单体伤害,概率战斗不能
|
||||
* 血腥旋转 = 多目标伤害,概率战斗不能
|
||||
* 疾走 = 提升移动距离
|
||||
* 闪现 = 传送到指定位置
|
||||
* 抢夺命运 = 夺取敌方未来行动回合的回合奖励,无奖励可夺时改为造成魔法伤害
|
||||
* 命运剥夺 = 摧毁敌方未来行动回合的全部回合奖励,并造成魔法伤害
|
||||
* 命运馈赠 = 为友方绑定一份未来行动回合的回合奖励
|
||||
* 命运之赐 = 回合奖励内容:回复生命值并获得攻击力提升
|
||||
*/
|
||||
public enum SkillID : long
|
||||
{
|
||||
疾风步 = 2001,
|
||||
助威 = 2002,
|
||||
挑拨 = 2003,
|
||||
绞丝棍 = 2004,
|
||||
金刚击 = 2005,
|
||||
旋风轮 = 2006,
|
||||
双连击 = 2007,
|
||||
绝影 = 2008,
|
||||
胧 = 2009,
|
||||
魔眼 = 2010,
|
||||
风之鞭 = 2011,
|
||||
拘束之鞭 = 2012,
|
||||
天堂之吻 = 2013,
|
||||
狐媚暗随 = 2014,
|
||||
快速狙击 = 2015,
|
||||
精准射击 = 2016,
|
||||
欢乐激发 = 2017,
|
||||
乱心安魂曲 = 2018,
|
||||
斗魂 = 2019,
|
||||
岚 = 2020,
|
||||
公牛之怒 = 2021,
|
||||
火焰碎击 = 2022,
|
||||
螺旋之刃 = 2023,
|
||||
霸王疾风 = 2024,
|
||||
回复弹 = 2025,
|
||||
导力装甲 = 2026,
|
||||
回复原状 = 2027,
|
||||
强打 = 2028,
|
||||
龙神功 = 2029,
|
||||
养命功 = 2030,
|
||||
月华掌 = 2031,
|
||||
雷神脚 = 2032,
|
||||
弓刃交错 = 2033,
|
||||
神圣祈祷 = 2034,
|
||||
牺牲之箭 = 2035,
|
||||
石化之矢 = 2036,
|
||||
死亡制裁 = 2037,
|
||||
剑风闪 = 2038,
|
||||
落叶 = 2039,
|
||||
风花阵 = 2040,
|
||||
陀螺舞 = 2041,
|
||||
光破斩 = 2042,
|
||||
跳跃点射 = 2043,
|
||||
鲨鱼锚击 = 2044,
|
||||
光鬼斩 = 2045,
|
||||
雷索吸缚 = 2046,
|
||||
狂刃剑舞 = 2047,
|
||||
无相飞刀 = 2048,
|
||||
破邪显正 = 2049,
|
||||
镜花水月 = 2050,
|
||||
号令 = 2051,
|
||||
千剑之雨 = 2052,
|
||||
无尽剑制 = 2053,
|
||||
灾难一掷 = 2054,
|
||||
血腥旋转 = 2055,
|
||||
疾走 = 2056,
|
||||
闪现 = 2057,
|
||||
转换战斗天赋 = 2058,
|
||||
抢夺命运 = 2059,
|
||||
命运剥夺 = 2060,
|
||||
命运馈赠 = 2061,
|
||||
命运之赐 = 2062,
|
||||
断罪斩 = 2099,
|
||||
// —— 决策点维度(2026-09-23 新增):本项目首个作用于「决策点」的技能/装备 ——
|
||||
战术部署 = 2098,
|
||||
// —— 节奏维度(2026-09-23)——
|
||||
过载 = 2097
|
||||
}
|
||||
|
||||
/**
|
||||
* 熵灭极诣 = 攻击力提升+普攻自残
|
||||
* 千羽瞬华 = 攻击力+物理穿透+闪避率提升,减少普攻硬直,强化普攻,减少心灵之弦CD
|
||||
* 咒怨洪流 = 普攻转为魔法伤害,可以普攻多个目标,护甲+魔抗提升,减少蚀魂震击CD
|
||||
* 三相灵枢 = 强化灵能反射,并在触发灵能反射时回复能量
|
||||
* 变幻之心 = 根据双生流转的模式触发回血+吸血或者魔法伤害加成
|
||||
* 零式灭杀 = 提升暴击率和暴击伤害、物理穿透
|
||||
* 绝对领域 = 免疫所有伤害,时间型;起步消耗100能量,每10能量额外时间
|
||||
* 残香凋零 = 多目标魔法伤害,伤害量基于敌人能量值
|
||||
* 宿命时律 = 护甲+魔抗提升,普攻转为魔法伤害,减少普攻硬直,强化普攻
|
||||
* 极寒渴望 = 获得吸血,强化累积之压
|
||||
* 身心一境 = 力量+敏捷提升
|
||||
* 饕餮盛宴 = 获得吸血
|
||||
* 樱花无双击 = 单体伤害+生命偷取
|
||||
* 漆黑之牙 = 全体伤害,此技能击杀敌人时,永久提升该技能伤害
|
||||
* 女王之怒 = 单体伤害+虚弱(伤害降低+护甲魔抗降低+重伤,回合型),可弱驱散
|
||||
* 裁决塔罗 = 多目标伤害+以下状态之一:冻结(完全行动不能+魔法易伤)/混乱(行动受限,如同AI控制行动,回合型)/战斗不能(攻击受限+施法不能),需强驱散
|
||||
* 光明之环 = 我方·全体强驱散+复苏,复苏的回复量为20%;起步消耗100能量,每10能量额外增加护甲魔抗
|
||||
* 圣星光旋 = 全体伤害,概率眩晕(时间型),需强驱散
|
||||
* 炎龙倒海 = 全体伤害,减少行动速度,推迟当前硬直
|
||||
* 卫星激光 = 多目标伤害,随后一定时间内造成持续真实伤害
|
||||
* 泰山玄武靠 = 多目标伤害,概率气绝(行动受限+持续伤害,时间型),需强驱散
|
||||
* 星杯领域 = 我方·完全免疫,回合型;起步消耗100能量,每100能量额外回合
|
||||
* 魔枪洛亚 = 全体伤害,施法解除+魔抗降低,可弱驱散
|
||||
* 八叶灭杀 = 单体伤害,随后基于目标已损失生命值再次造成额外伤害
|
||||
* 樱花残月 = 单体伤害,随后提升自身行动速度、加速系数、减少硬直
|
||||
* 圣洁祝福 = 我方不含自身·单体强驱散+回复+能量回复
|
||||
* 天堂阻灭 = 单体巨额伤害
|
||||
* 歼灭 = 全体伤害,概率战斗不能
|
||||
* 归元环 = 伤害必定暴击,强化八卦阵
|
||||
* 放监 = 强化开宫,要求持有开宫标记的角色完成任务,否则造成巨额伤害
|
||||
* 海王星的野望 = 力量提升,对目标造成伤害,在此期间对目标造成伤害后,溅射到其他敌人,强化深海之戟
|
||||
* 全军出击 = 补全雇佣兵数量,根据雇佣兵数量额外提升冷却缩减、加速系数、行动系数,雇佣兵伤害提升
|
||||
* 宿命之潮 = 二选一:加速生命回复,攻击力提升,受到伤害提升,造成伤害后额外造成100%重伤;极致加速生命回复,提供友方生命回复,嘲讽所有敌人
|
||||
* 神之因果 = 改变全局法则,回合型
|
||||
*/
|
||||
public enum SuperSkillID : long
|
||||
{
|
||||
熵灭极诣 = 3001,
|
||||
千羽瞬华 = 3002,
|
||||
咒怨洪流 = 3003,
|
||||
三相灵枢 = 3004,
|
||||
变幻之心 = 3005,
|
||||
零式灭杀 = 3006,
|
||||
绝对领域 = 3007,
|
||||
残香凋零 = 3008,
|
||||
宿命时律 = 3009,
|
||||
极寒渴望 = 3010,
|
||||
身心一境 = 3011,
|
||||
饕餮盛宴 = 3012,
|
||||
樱花无双击 = 3013,
|
||||
漆黑之牙 = 3014,
|
||||
女王之怒 = 3015,
|
||||
裁决塔罗 = 3016,
|
||||
光明之环 = 3017,
|
||||
圣星光旋 = 3018,
|
||||
炎龙倒海 = 3019,
|
||||
卫星激光 = 3020,
|
||||
泰山玄武靠 = 3021,
|
||||
星杯领域 = 3022,
|
||||
魔枪洛亚 = 3023,
|
||||
八叶灭杀 = 3024,
|
||||
樱花残月 = 3025,
|
||||
圣洁祝福 = 3026,
|
||||
天堂阻灭 = 3027,
|
||||
歼灭 = 3028,
|
||||
归元环 = 3029,
|
||||
放监 = 3030,
|
||||
海王星的野望 = 3031,
|
||||
全军出击 = 3032,
|
||||
宿命之潮 = 3033,
|
||||
神之因果 = 3034,
|
||||
// —— 节奏维度(2026-09-23 新增)——
|
||||
催战鼓 = 3035,
|
||||
}
|
||||
|
||||
/**
|
||||
* META马 = 提升初始力量和力量成长,每回合开始和受击时获得额外能量
|
||||
* 心灵之弦 = 减少普攻硬直,普攻时额外普攻一次,第二次伤害减半
|
||||
* 蚀魂震击 = 造成魔法伤害时眩晕目标,对处于控制态的敌人造成额外伤害
|
||||
* 灵能反射 = 一定次数内释放魔法不会进入硬直,魔法命中后获得额外能量并减少所有技能CD
|
||||
* 双生流转 = 根据当前生命值比例将基础智力转为额外力量或还原,力量模式造成伤害必定暴击,智力模式获得暴击+闪避+魔抗提升
|
||||
* 零式崩解 = 暴击伤害提升
|
||||
* 少女绮想 = 每经过一段时间,获得伤害加成,造成伤害后减少加成总量的一部分,受到伤害会清零
|
||||
* 暗香疏影 = 对一半以下能量的敌人造成额外伤害并削减他们的能量
|
||||
* 破釜沉舟 = 减少一部分最大生命值换取伤害加成;获得基于累计受到伤害的百分比伤害加成,技能发动后清零
|
||||
* 累积之压 = 造成伤害时标记目标,攻击带有目标的角色造成最大生命值伤害和眩晕
|
||||
* 银隼之赐 = 基于敏捷强化普攻
|
||||
* 弱者猎手 = 每个回合都会标记血量最少和血量百分比低于自身的敌人;对受到标记的目标造成额外伤害
|
||||
* 征服者 = 普攻或技能命中叠加层数,叠满后下次攻击造成额外真实伤害并提供额外核心属性
|
||||
* 致命节奏 = 普攻造成伤害后大幅提升行动速度,行动系数超过阈值后,获得额外攻击力
|
||||
* 迅捷步法 = 造成伤害回复生命值并提升行动系数和加速系数
|
||||
* 强攻 = 3次连续普攻同一目标时造成额外伤害并使其进入“易损”状态,后续承受伤害提升
|
||||
* 电刑 = 一定时间内用3个独立普攻/技能命中同一目标时,造成额外伤害
|
||||
* 黑暗收割 = 对一半以下生命值的目标造成伤害时,收集其灵魂永久提升伤害
|
||||
* 丛刃 = 造成伤害将在短时间内大幅减少硬直时间
|
||||
* 贪欲猎手 = 造成伤害时回复生命值
|
||||
* 召唤艾黎 = 普通攻击或技能命中时造成伤害或提供护盾
|
||||
* 相位猛冲 = 一定时间用3个独立普攻/技能命中敌人后,获得行动速度和加速系数加成
|
||||
* 奥术彗星 = 技能命中时造成额外伤害
|
||||
* 风暴聚集 = 每过一段时间获得永久额外核心属性
|
||||
* 不灭之握 = 普攻造成额外最大生命值伤害并回复生命值,并永久提升生命值(有累计上限)
|
||||
* 余震 = 对目标造成控制态时,获得双抗加成,随后溅射魔法伤害至随机几个目标
|
||||
* 守护者 = 承受超过一定量伤害时提供护盾、行动速度和加速系数
|
||||
* 骸骨镀层 = 承受敌方技能伤害后,一定时间内减少其后续3次普攻/技能的伤害
|
||||
* 冰川增幅 = 普攻或技能减敌人的行动速度,减速期间友军对其伤害提升
|
||||
* 先攻 = 先手攻击英雄时,造成额外真实伤害并获得金币。一段时间内相互未攻击,将重置先手判定
|
||||
* 饼干配送 = 每过一段时间获得免费饼干,回复生命值和魔法值
|
||||
* 折射 = 受到伤害时,减少受到的伤害,并反弹一部分伤害给攻击者
|
||||
* 恩赐解脱 = 攻击敌人时,有一定概率提升暴击伤害
|
||||
* 静电场 = 技能命中时,造成额外真实伤害
|
||||
* 竭心光环 = 造成伤害后,对敌人施加持续百分比真实伤害,并无视其生命回复
|
||||
* 海妖外壳 = 每过一段时间生成护盾,护盾破碎时强驱散自身(净化有内部冷却)
|
||||
* 自然蔽护 = 一定时间内未受到伤害,将提升行动速度和治疗加成
|
||||
* 勇气之霎 = 受到伤害时,概率触发获得吸血和攻击力提升
|
||||
* 深海重击 = 每3次普攻造成眩晕和额外伤害
|
||||
* 反击螺旋 = 受到伤害时概率对来源者和随机两个敌人造成真实伤害
|
||||
* 刀光谍影 = 造成伤害后,概率进入不可选中状态,持续一段时间或再次攻击敌人
|
||||
* 幽冥剧毒 = 普攻附带持续伤害,基于目标已损失生命值
|
||||
* 八卦阵 = 造成时概率提升双倍伤害;受到伤害时概率减少一半伤害
|
||||
* 开宫 = 角色死亡时偷取技能,或使自己的普攻转为魔法伤害并无视闪避;标记击杀者,被标记者获得互动效果
|
||||
* 深海之戟 = 普攻暴击时溅射伤害到随机的两个敌人身上
|
||||
* 雇佣兵团 = 召唤雇佣兵,提供额外伤害和承受伤害,雇佣兵会自发攻击随机敌人或者具有仇恨的敌人
|
||||
* 不息之流 = 常态下回复百分比最大生命值,回复能量
|
||||
* 概念之骰 = 随机增益效果叠加
|
||||
* 掠夺者 = 成功夺取他人回合奖励时永久叠加攻击力,自身奖励被夺走时获得短暂攻击力与行动速度
|
||||
* 生命链接 = 造成伤害后,为生命值百分比最低的队友回复生命值(不超过本次伤害),有内部冷却
|
||||
* 共鸣护盾 = 行动结束后,为生命值偏低且护盾不足的队友提供混合护盾,有内部冷却
|
||||
* 战地巡诊 = 周期性地为生命值最低的队友回复生命值;若其处于重伤则额外对其弱驱散
|
||||
* 同袍之誓 = 队友阵亡时,全体存活队友获得攻击力、行动系数与加速系数提升并回复生命值,同名刷新不叠加
|
||||
* 援护号令 = 自身回合开始时(号令就绪)为全体队友提升行动系数,同名刷新不叠加
|
||||
*/
|
||||
public enum PassiveID : long
|
||||
{
|
||||
META马 = 4001,
|
||||
心灵之弦 = 4002,
|
||||
蚀魂震击 = 4003,
|
||||
灵能反射 = 4004,
|
||||
双生流转 = 4005,
|
||||
零式崩解 = 4006,
|
||||
少女绮想 = 4007,
|
||||
暗香疏影 = 4008,
|
||||
破釜沉舟 = 4009,
|
||||
累积之压 = 4010,
|
||||
银隼之赐 = 4011,
|
||||
弱者猎手 = 4012,
|
||||
征服者 = 4013,
|
||||
致命节奏 = 4014,
|
||||
迅捷步法 = 4015,
|
||||
强攻 = 4016,
|
||||
电刑 = 4017,
|
||||
黑暗收割 = 4018,
|
||||
丛刃 = 4019,
|
||||
贪欲猎手 = 4020,
|
||||
召唤艾黎 = 4021,
|
||||
相位猛冲 = 4022,
|
||||
奥术彗星 = 4023,
|
||||
风暴聚集 = 4024,
|
||||
不灭之握 = 4025,
|
||||
余震 = 4026,
|
||||
守护者 = 4027,
|
||||
骸骨镀层 = 4028,
|
||||
冰川增幅 = 4029,
|
||||
先攻 = 4030,
|
||||
饼干配送 = 4031,
|
||||
折射 = 4032,
|
||||
恩赐解脱 = 4033,
|
||||
静电场 = 4034,
|
||||
竭心光环 = 4035,
|
||||
海妖外壳 = 4036,
|
||||
自然蔽护 = 4037,
|
||||
勇气之霎 = 4038,
|
||||
深海重击 = 4039,
|
||||
反击螺旋 = 4040,
|
||||
刀光谍影 = 4041,
|
||||
幽冥剧毒 = 4042,
|
||||
八卦阵 = 4043,
|
||||
开宫 = 4044,
|
||||
深海之戟 = 4045,
|
||||
雇佣兵团 = 4046,
|
||||
不息之流 = 4047,
|
||||
概念之骰 = 4048,
|
||||
掠夺者 = 4049,
|
||||
生命链接 = 4050,
|
||||
共鸣护盾 = 4051,
|
||||
战地巡诊 = 4052,
|
||||
同袍之誓 = 4053,
|
||||
援护号令 = 4054,
|
||||
// —— 节奏维度(2026-09-23 新增)——
|
||||
战术余裕 = 4055
|
||||
}
|
||||
|
||||
public enum ItemPassiveID : long
|
||||
{
|
||||
攻击之爪 = 5001,
|
||||
糖糖一周年纪念武器 = 5002,
|
||||
糖糖一周年纪念防具 = 5003,
|
||||
糖糖一周年纪念鞋子 = 5004,
|
||||
糖糖一周年纪念饰品1 = 5005,
|
||||
糖糖一周年纪念饰品2 = 5006,
|
||||
行军医箱 = 5007,
|
||||
共鸣核心 = 5008,
|
||||
接力信标 = 5009,
|
||||
// —— 节奏维度(2026-09-23)——
|
||||
万能钥匙 = 5010,
|
||||
节拍器 = 5011
|
||||
}
|
||||
|
||||
public enum ItemActiveID : long
|
||||
{
|
||||
经验书 = 6001,
|
||||
回复药 = 6002,
|
||||
魔力填充剂 = 6003,
|
||||
能量饮料 = 6004,
|
||||
礼包 = 6005,
|
||||
复苏药 = 6006,
|
||||
应急装置 = 6007
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 概念之骰 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.概念之骰;
|
||||
public override string Name => "概念之骰";
|
||||
public override string Description => Effects.Count > 0 ? ((概念之骰特效)Effects.First()).GeneralDescription : "";
|
||||
public int 力层数 { get; set; } = 0;
|
||||
public int 暴层数 { get; set; } = 0;
|
||||
public int 噬层数 { get; set; } = 0;
|
||||
public int 御层数 { get; set; } = 0;
|
||||
|
||||
public 概念之骰(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 概念之骰特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
|
||||
public override void OnCharacterRespawn(Skill newSkill)
|
||||
{
|
||||
if (newSkill is 概念之骰 skill)
|
||||
{
|
||||
skill.力层数 = 力层数;
|
||||
skill.暴层数 = 暴层数;
|
||||
skill.噬层数 = 噬层数;
|
||||
skill.御层数 = 御层数;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class 概念之骰特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description { get; set; } = "";
|
||||
public string GeneralDescription => $"{Skill.SkillOwner()}的助攻窗口期永远不会过期。{Skill.SkillOwner()}每次参与击杀时都会进行一次概念投掷,获得一层永久持续的增益效果,且每个概念都最多可以叠加 {最多层数} 层。每次概念投掷可取得以下任意一项概念增益:\r\n" +
|
||||
$"「力」:攻击力提升 {攻击力提升 * 100:0.##}% [ {Skill.Character?.BaseATK * 攻击力提升:0.##} ]。\r\n「暴」:暴击率提升 {暴击率提升 * 100:0.##}%,暴击伤害提升 {暴击伤害提升 * 100:0.##}%。\r\n「噬」:生命偷取提升 {生命偷取提升 * 100:0.##}%。\r\n「御」:受到的伤害减少 {攻击力提升 * 100:0.##}%。\r\n" +
|
||||
$"取得第一层「噬」后,同时获得「恒」效果:当总生命偷取超过 {生命偷取阈值 * 100:0.##}% 后,超出部分每 {生命偷取每单位 * 100:0.##}% 转化为 {生命偷取转化 * 100:0.##}% 攻击力。";
|
||||
|
||||
public static int 最多层数 => 8;
|
||||
public static double 攻击力提升 => 0.06;
|
||||
public static double 暴击率提升 => 0.03;
|
||||
public static double 暴击伤害提升 => 0.06;
|
||||
public static double 生命偷取提升 => 0.04;
|
||||
public static double 受到伤害减少 => 0.05;
|
||||
public static double 生命偷取阈值 => 0.3;
|
||||
public static double 生命偷取每单位 => 0.01;
|
||||
public static double 生命偷取转化 => 0.005;
|
||||
|
||||
private double 实际攻击力提升 = 0;
|
||||
private double 实际暴击率提升 = 0;
|
||||
private double 实际暴击伤害提升 = 0;
|
||||
private double 实际生命偷取提升 = 0;
|
||||
private double 实际受到伤害减少 = 0;
|
||||
private double 实际生命偷取转化 = 0;
|
||||
|
||||
public 概念之骰特效(Skill skill) : base(skill)
|
||||
{
|
||||
Description = GeneralDescription;
|
||||
}
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (enemy == Skill.Character && 实际受到伤害减少 > 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
double reduce = damage * 实际受到伤害减少;
|
||||
WriteLine($"[ {Skill.Character} ] 发动了概念之骰!伤害减少了 {reduce:0.##} 点!");
|
||||
return new AlterActualDamageResult { DamageDelta = -reduce };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
public override void AfterDeathCalculation(DeathContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character death) return;
|
||||
bool hasMaster = ctx.HasMaster;
|
||||
Character? killer = ctx.Killer;
|
||||
Dictionary<Character, int> continuousKilling = ctx.ContinuousKilling;
|
||||
Dictionary<Character, int> earnedMoney = ctx.EarnedMoney;
|
||||
Character[] assists = ctx.Assists;
|
||||
if (Skill.Character != null && death != Skill.Character && !hasMaster && (killer == Skill.Character || assists.Contains(Skill.Character)) && Skill is 概念之骰 skill)
|
||||
{
|
||||
WriteLine($"[ {Skill.Character} ] 进行概念投掷:“此乃,神之概念。”");
|
||||
bool result = false;
|
||||
do
|
||||
{
|
||||
switch (Random.Next(4))
|
||||
{
|
||||
case 0:
|
||||
if (skill.力层数 < 最多层数)
|
||||
{
|
||||
skill.力层数++;
|
||||
WriteLine($"[ {Skill.Character} ] 获得了「力」概念效果,当前「力」层数:{skill.力层数}。");
|
||||
result = true;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (skill.暴层数 < 最多层数)
|
||||
{
|
||||
skill.暴层数++;
|
||||
WriteLine($"[ {Skill.Character} ] 获得了「暴」概念效果,当前「暴」层数:{skill.暴层数}。");
|
||||
result = true;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (skill.噬层数 < 最多层数)
|
||||
{
|
||||
skill.噬层数++;
|
||||
WriteLine($"[ {Skill.Character} ] 获得了「噬」概念效果,当前「噬」层数:{skill.噬层数}。");
|
||||
result = true;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (skill.御层数 < 最多层数)
|
||||
{
|
||||
skill.御层数++;
|
||||
WriteLine($"[ {Skill.Character} ] 获得了「御」概念效果,当前「御」层数:{skill.御层数}。");
|
||||
result = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (skill.力层数 + skill.暴层数 + skill.噬层数 + skill.御层数 >= 最多层数 * 4)
|
||||
{
|
||||
WriteLine($"[ {Skill.Character} ] 已经完成了「概念之骰」的全部概念收集!!");
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
while (!result);
|
||||
if (result)
|
||||
{
|
||||
刷新技能效果(Skill.Character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
刷新技能效果(character);
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
刷新技能效果(character);
|
||||
if (GamingQueue != null && GamingQueue.AssistDetails.TryGetValue(character, out AssistDetail? ad) && ad != null)
|
||||
{
|
||||
foreach (Character enemy in ad.DamageLastTime.Keys)
|
||||
{
|
||||
ad.DamageLastTime[enemy] = GamingQueue.TotalTime;
|
||||
}
|
||||
foreach (Character teammate in ad.NotDamageAssistLastTime.Keys)
|
||||
{
|
||||
ad.NotDamageAssistLastTime[teammate] = GamingQueue.TotalTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void 刷新技能效果(Character character)
|
||||
{
|
||||
if (实际攻击力提升 != 0)
|
||||
{
|
||||
character.ExATKPercentage -= 实际攻击力提升;
|
||||
实际攻击力提升 = 0;
|
||||
}
|
||||
if (实际暴击率提升 != 0)
|
||||
{
|
||||
character.ExCritRate -= 实际暴击率提升;
|
||||
实际暴击率提升 = 0;
|
||||
}
|
||||
if (实际暴击伤害提升 != 0)
|
||||
{
|
||||
character.ExCritDMG -= 实际暴击伤害提升;
|
||||
实际暴击伤害提升 = 0;
|
||||
}
|
||||
if (实际生命偷取提升 != 0)
|
||||
{
|
||||
character.Lifesteal -= 实际生命偷取提升;
|
||||
实际生命偷取提升 = 0;
|
||||
}
|
||||
if (实际受到伤害减少 != 0)
|
||||
{
|
||||
实际受到伤害减少 = 0;
|
||||
}
|
||||
if (实际生命偷取转化 != 0)
|
||||
{
|
||||
character.ExATKPercentage -= 实际生命偷取转化;
|
||||
实际生命偷取转化 = 0;
|
||||
}
|
||||
if (Skill is 概念之骰 skill)
|
||||
{
|
||||
实际攻击力提升 = 攻击力提升 * skill.力层数;
|
||||
实际暴击率提升 = 暴击率提升 * skill.暴层数;
|
||||
实际暴击伤害提升 = 暴击伤害提升 * skill.暴层数;
|
||||
实际生命偷取提升 = 生命偷取提升 * skill.噬层数;
|
||||
实际受到伤害减少 = 受到伤害减少 * skill.御层数;
|
||||
character.ExATKPercentage += 实际攻击力提升;
|
||||
character.ExCritRate += 实际暴击率提升;
|
||||
character.ExCritDMG += 实际暴击伤害提升;
|
||||
character.Lifesteal += 实际生命偷取提升;
|
||||
if (skill.噬层数 > 0 && character.Lifesteal > 生命偷取阈值)
|
||||
{
|
||||
double 超出部分 = character.Lifesteal - 生命偷取阈值;
|
||||
实际生命偷取转化 = 超出部分 / 生命偷取每单位 * 生命偷取转化;
|
||||
}
|
||||
character.ExATKPercentage += 实际生命偷取转化;
|
||||
Description = $"{Skill.SkillOwner()}的助攻窗口期永远不会过期。{Skill.SkillOwner()}每次参与击杀时都会进行一次概念投掷,获得一层永久持续的增益效果,且每个概念都最多可以叠加 {最多层数} 层。(当前层数:「力」× {skill.力层数}、「暴」× {skill.暴层数}、「噬」× {skill.噬层数}、「御」× {skill.御层数},攻击力提升:{(实际攻击力提升 + 实际生命偷取转化) * 100:0.##}% [ {character.BaseATK * (实际攻击力提升 + 实际生命偷取转化):0.##} ] 点,暴击率提升:{实际暴击率提升 * 100:0.##}%,暴击伤害提升:{实际暴击伤害提升 * 100:0.##}%,生命偷取提升:{实际生命偷取提升 * 100:0.##}%,受到伤害减少:{实际受到伤害减少 * 100:0.##}%)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 神之因果 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.神之因果;
|
||||
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 EPCost => 100;
|
||||
public override bool CostAllEP => true;
|
||||
public override double CD => 90;
|
||||
public override double HardnessTime { get; set; } = 1;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 神之因果(Character? character = null) : base(SkillType.SuperSkill, 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.SkillOwner()}短暂显现其「神」之本质,开启持续 4 回合的「神之领域」:在持续时间内,{Skill.SkillOwner()}对任意敌方目标造成的伤害,都将记录为「因果伤害值」。" +
|
||||
$"在持续时间结束后,所有敌方角色都会受到 [ 基于总因果伤害值的 {系数 * 100:0.##}% 除以当前在场敌方角色数量 ] 的真实伤害。在持续时间内,{Skill.SkillOwner()}可以对任何负面效果进行豁免。" +
|
||||
(因果伤害值 > 0 ? $"(当前累计因果:{因果伤害值:0.##} 点)" : "");
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override bool Durative => false;
|
||||
public override int DurationTurn => 4;
|
||||
|
||||
public double 因果伤害值 { get; set; } = 0;
|
||||
public double 系数 => 1 + 0.2 * (Skill.Level - 1);
|
||||
|
||||
public override OnExemptionCheckResult OnExemptionCheck(ImmuneContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
return new OnExemptionCheckResult { ThrowingBonusDelta = 300 };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
因果伤害值 += actualDamage;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AfterDeathCalculation(DeathContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character death) return;
|
||||
bool hasMaster = ctx.HasMaster;
|
||||
Character? killer = ctx.Killer;
|
||||
Dictionary<Character, int> continuousKilling = ctx.ContinuousKilling;
|
||||
Dictionary<Character, int> earnedMoney = ctx.EarnedMoney;
|
||||
Character[] assists = ctx.Assists;
|
||||
if (death == Skill.Character)
|
||||
{
|
||||
因果伤害值 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
因果伤害值 = 0;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (GamingQueue != null && 因果伤害值 > 0)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了神之因果!万象因果,命运既定!!!");
|
||||
List<Character> enemies = [.. GamingQueue.GetEnemies(character).Where(GamingQueue.Queue.Contains)];
|
||||
double damage = 因果伤害值 * 系数 / enemies.Count;
|
||||
foreach (Character enemy in enemies)
|
||||
{
|
||||
DamageToEnemy(character, enemy, DamageType.True, MagicType, damage, new(character)
|
||||
{
|
||||
CalculateShield = false,
|
||||
IgnoreImmune = true,
|
||||
TriggerEffects = false
|
||||
});
|
||||
}
|
||||
因果伤害值 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDurationTurn = DurationTurn;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Focusing);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 八卦阵 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.八卦阵;
|
||||
public override string Name => "八卦阵";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 八卦阵(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 八卦阵特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 八卦阵特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"每次造成伤害或受到伤害时,进行投掷检定,结果为偶数时,造成的伤害提升 {伤害提升 * 100:0.##}%,受到伤害减少 {伤害减少 * 100:0.##}%;结果为奇数时,该回合提升 {奇数平衡性提升 * 100:0.##}% 暴击率和闪避率、{奇数平衡性提升 * 100:0.##}% 魔法抗性,并将下一次伤害提升 {奇数伤害提升 * 100:0.##}% 或减免 {奇数伤害减少 * 100:0.##}% 下一次受到伤害,若下一次投掷结果为偶数,将叠加该效果。";
|
||||
|
||||
public bool 归元 { get; set; } = false;
|
||||
public bool 回合投掷出奇数 { get; set; } = false;
|
||||
public bool 奇数效果 { get; set; } = false;
|
||||
public double 伤害提升 { get; set; } = 0.6;
|
||||
public double 伤害减少 { get; set; } = 0.3;
|
||||
public double 奇数平衡性提升 { get; set; } = 0.1;
|
||||
public double 奇数伤害提升 { get; set; } = 0.3;
|
||||
public double 奇数伤害减少 { get; set; } = 0.15;
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
double bonus = 0;
|
||||
if (character != Skill.Character && enemy != Skill.Character)
|
||||
{
|
||||
return bonus;
|
||||
}
|
||||
if (奇数效果)
|
||||
{
|
||||
奇数效果 = false;
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
bonus = damage * 奇数伤害提升;
|
||||
WriteLine($"[ {Skill.Character} ] 发动了八卦阵!伤害提升了 {Math.Abs(bonus):0.##} 点!");
|
||||
}
|
||||
else if (enemy == Skill.Character)
|
||||
{
|
||||
bonus = -(damage * 奇数伤害减少);
|
||||
WriteLine($"[ {Skill.Character} ] 发动了八卦阵!伤害减少了 {Math.Abs(bonus):0.##} 点!");
|
||||
}
|
||||
}
|
||||
bool result = 归元 || (!归元 && Random.Next(10) % 2 == 0);
|
||||
WriteLine($"[ {Skill.Character} ] 的八卦阵投掷结果为:{(result ? "偶数" : "奇数")}。");
|
||||
if (damage > 0 && result)
|
||||
{
|
||||
if (character == Skill.Character)
|
||||
{
|
||||
double bonus2 = damage * 伤害提升;
|
||||
bonus += bonus2;
|
||||
WriteLine($"[ {Skill.Character} ] 发动了八卦阵!伤害提升了 {Math.Abs(bonus2):0.##} 点!");
|
||||
}
|
||||
else if (enemy == Skill.Character)
|
||||
{
|
||||
double bonus2 = damage * 伤害减少;
|
||||
bonus -= bonus2;
|
||||
WriteLine($"[ {Skill.Character} ] 发动了八卦阵!伤害减少了 {Math.Abs(bonus2):0.##} 点!");
|
||||
}
|
||||
if (归元)
|
||||
{
|
||||
WriteLine($"[ {Skill.Character} ] 发动了归元环!冷却时间减少了 {归元环特效.冷却时间减少 * 100:0.##}%!");
|
||||
foreach (Skill s in Skill.Character.Skills)
|
||||
{
|
||||
s.CurrentCD -= s.CD * 归元环特效.冷却时间减少;
|
||||
if (s.CurrentCD <= 0)
|
||||
{
|
||||
s.CurrentCD = 0;
|
||||
s.Enable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!回合投掷出奇数)
|
||||
{
|
||||
回合投掷出奇数 = true;
|
||||
Effect e = new DynamicsEffect(Skill, new()
|
||||
{
|
||||
{ "excr", 奇数平衡性提升 },
|
||||
{ "exer", 奇数平衡性提升 },
|
||||
{ "mdftype", (int)MagicType.None },
|
||||
{ "mdfvalue", 奇数平衡性提升 }
|
||||
}, Skill.Character)
|
||||
{
|
||||
Name = "八卦阵·奇数",
|
||||
Durative = false,
|
||||
DurationTurn = 1,
|
||||
RemainDurationTurn = 1
|
||||
};
|
||||
Skill.Character.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, Skill.Character));
|
||||
WriteLine($"[ {Skill.Character} ] 发动了八卦阵!该回合提升 {奇数平衡性提升 * 100:0.##}% 暴击率和闪避率、{奇数平衡性提升 * 100:0.##}% 魔法抗性!");
|
||||
}
|
||||
if (!奇数效果)
|
||||
{
|
||||
奇数效果 = true;
|
||||
}
|
||||
}
|
||||
return bonus;
|
||||
}
|
||||
|
||||
public override void OnTurnEnd(TurnContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
回合投掷出奇数 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 归元环 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.归元环;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 归元环(Character? character = null) : base(SkillType.SuperSkill, 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 => $"{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,造成伤害必定暴击;使 [ 八卦阵 ] 不需要检定,直接产生偶数效果;并且每次触发偶数效果时,减少所有主动技能 {冷却时间减少 * 100:0.##}% 冷却时间。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
public const double 冷却时间减少 = 0.1;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (character.Effects.Where(e => e is 八卦阵特效 && e.Skill.Character == character).FirstOrDefault() is 八卦阵特效 e)
|
||||
{
|
||||
e.归元 = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
if (character.Effects.Where(e => e is 八卦阵特效 && e.Skill.Character == character).FirstOrDefault() is 八卦阵特效 e)
|
||||
{
|
||||
e.归元 = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override BeforeCriticalCheckResult BeforeCriticalCheck(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character actor || ctx.Enemy is not Character enemy) return default;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
if (actor == Skill.Character)
|
||||
{
|
||||
// 归元期间必定暴击:提供极高的暴击检定加值
|
||||
return new BeforeCriticalCheckResult { ThrowingBonusDelta = 200 };
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
RecordCharacterApplyEffects(caster, EffectType.CritBoost, EffectType.DamageBoost, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 千羽瞬华 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.千羽瞬华;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 千羽瞬华(Character? character = null) : base(SkillType.SuperSkill, 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.SkillOwner()}将世间事物的弱点完全暴露在「千羽」的绚烂之下。{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,增加{Skill.SkillOwner()} {攻击力提升系数 * 100:0.##}% 攻击力 [ {攻击力提升:0.##} ]、{物理穿透提升 * 100:0.##}% 物理穿透和 {闪避率提升 * 100:0.##}% 闪避率(不可叠加),普通攻击硬直时间额外减少 20%,基于 {系数 * 100:0.##}% 敏捷 [ {伤害加成:0.##} ] 强化普通攻击的伤害。在持续时间内,[ 心灵之弦 ] 的冷却时间降低至 3 {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 系数 => 1.2 * (1 + 0.5 * (Skill.Level - 1));
|
||||
private double 伤害加成 => 系数 * Skill.Character?.AGI ?? 0;
|
||||
private double 攻击力提升系数 => Skill.Level > 0 ? 0.15 + 0.03 * (Skill.Level - 1) : 0.15;
|
||||
private double 攻击力提升 => 攻击力提升系数 * Skill.Character?.BaseATK ?? 0;
|
||||
private double 物理穿透提升 => Skill.Level > 0 ? 0.1 + 0.03 * (Skill.Level - 1) : 0.1;
|
||||
private double 闪避率提升 => Skill.Level > 0 ? 0.1 + 0.02 * (Skill.Level - 1) : 0.1;
|
||||
|
||||
private double 实际的攻击力提升 = 0;
|
||||
private double 实际的物理穿透提升 = 0;
|
||||
private double 实际的闪避率提升 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际的攻击力提升 = 攻击力提升;
|
||||
实际的物理穿透提升 = 物理穿透提升;
|
||||
实际的闪避率提升 = 闪避率提升;
|
||||
character.ExATK2 += 实际的攻击力提升;
|
||||
character.PhysicalPenetration += 实际的物理穿透提升;
|
||||
character.ExEvadeRate += 实际的闪避率提升;
|
||||
if (character.Effects.FirstOrDefault(e => e is 心灵之弦特效 && e.Skill.Character == character) is 心灵之弦特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 3;
|
||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
character.ExATK2 -= 实际的攻击力提升;
|
||||
character.PhysicalPenetration -= 实际的物理穿透提升;
|
||||
character.ExEvadeRate -= 实际的闪避率提升;
|
||||
if (character.Effects.FirstOrDefault(e => e is 心灵之弦特效 && e.Skill.Character == character) is 心灵之弦特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 10;
|
||||
}
|
||||
}
|
||||
|
||||
public override AlterActionTypeResult AlterActionTypeBeforeAction(DecisionContext ctx)
|
||||
{
|
||||
return new AlterActionTypeResult { PNormalAttack = ctx.PNormalAttack + 0.1 };
|
||||
}
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && isNormalAttack)
|
||||
{
|
||||
return 伤害加成;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override AlterHardnessTimeResult AlterHardnessTimeAfterNormalAttack(HardnessContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
return new AlterHardnessTimeResult { Factor = -0.2 };
|
||||
}
|
||||
|
||||
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;
|
||||
实际的攻击力提升 = 0;
|
||||
实际的物理穿透提升 = 0;
|
||||
实际的闪避率提升 = 0;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost, EffectType.PenetrationBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 心灵之弦 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.心灵之弦;
|
||||
public override string Name => "心灵之弦";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
|
||||
public 心灵之弦(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 心灵之弦特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 心灵之弦特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"普通攻击硬直时间减少 20%。每次使用普通攻击时,额外再发动一次普通攻击,伤害特效可叠加,但伤害折减一半,冷却 {基础冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime}。额外普通攻击立即发动,不占用决策点配额。" +
|
||||
(冷却时间 > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime})" : "");
|
||||
|
||||
public double 冷却时间 { get; set; } = 0;
|
||||
public double 基础冷却时间 { get; set; } = 10;
|
||||
private bool 是否是嵌套普通攻击 = false;
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && 是否是嵌套普通攻击 && isNormalAttack && damage > 0)
|
||||
{
|
||||
return new AlterActualDamageResult { DamageDelta = -(damage / 2) };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && isNormalAttack && 冷却时间 == 0 && !是否是嵌套普通攻击 && GamingQueue != null && enemy.HP > 0)
|
||||
{
|
||||
WriteLine($"[ {character} ] 发动了心灵之弦!额外进行一次普通攻击!");
|
||||
冷却时间 = 基础冷却时间;
|
||||
是否是嵌套普通攻击 = true;
|
||||
character.NormalAttack.Attack(GamingQueue, character, null, enemy);
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套普通攻击)
|
||||
{
|
||||
是否是嵌套普通攻击 = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (冷却时间 > 0)
|
||||
{
|
||||
冷却时间 -= elapsed;
|
||||
if (冷却时间 <= 0)
|
||||
{
|
||||
冷却时间 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override AlterHardnessTimeResult AlterHardnessTimeAfterNormalAttack(HardnessContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return default;
|
||||
return new AlterHardnessTimeResult { Factor = -0.2 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Interface.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 咒怨洪流 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.咒怨洪流;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 65;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 咒怨洪流(Character? character = null) : base(SkillType.SuperSkill, character)
|
||||
{
|
||||
Effects.Add(new 咒怨洪流特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 咒怨洪流特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => "咒怨洪流";
|
||||
public override string Description => $"{Skill.SkillOwner()}将「熵核」的污染之力附着在武器之上。{Duration:0.##} {GameplayEquilibriumConstant.InGameTime}内,增加自身所有伤害的 {减伤比例 * 100:0.##}% 伤害减免;[ 蚀魂震击 ] 的冷却时间降低至 5 {GameplayEquilibriumConstant.InGameTime},并将普通攻击转为魔法伤害;在一个回合里首次使用普通攻击后,附赠 {额外攻击次数} 次普通攻击决策点配额,但后续普通攻击必须选取不重复的目标。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 减伤比例 => 0.15 + 0.02 * (Level - 1);
|
||||
private double 实际比例 = 0;
|
||||
private readonly List<Character> 本回合已攻击的目标 = [];
|
||||
private bool 本回合可附赠动作 = true;
|
||||
private readonly int 额外攻击次数 = 2;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际比例 = 减伤比例;
|
||||
character.NormalAttack.SetMagicType(new(this, true, MagicType.None, 999), GamingQueue);
|
||||
if (character.Effects.Where(e => e is 蚀魂震击特效 && e.Skill.Character == character).FirstOrDefault() is 蚀魂震击特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 5;
|
||||
if (e.冷却时间 > e.基础冷却时间) e.冷却时间 = e.基础冷却时间;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
实际比例 = 0;
|
||||
character.NormalAttack.UnsetMagicType(this, GamingQueue);
|
||||
if (character.Effects.Where(e => e is 蚀魂震击特效 && e.Skill.Character == character).FirstOrDefault() is 蚀魂震击特效 e)
|
||||
{
|
||||
e.基础冷却时间 = 10;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTurnStart(TurnContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
List<Character> enemys = ctx.Enemys;
|
||||
List<Character> teammates = ctx.Teammates;
|
||||
List<Skill> skills = ctx.Skills;
|
||||
List<Item> items = ctx.Items;
|
||||
本回合已攻击的目标.Clear();
|
||||
本回合可附赠动作 = true;
|
||||
}
|
||||
|
||||
public override void AfterCharacterNormalAttack(NormalAttackContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
NormalAttack? normalAttack = ctx.NormalAttack;
|
||||
List<Character> targets = ctx.Targets;
|
||||
本回合已攻击的目标.AddRange(targets);
|
||||
if (本回合可附赠动作 && GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(character, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
本回合可附赠动作 = false;
|
||||
dp.AddTempActionQuota(this, CharacterActionType.NormalAttack, 额外攻击次数);
|
||||
WriteLine($"[ {character} ] 发动了{nameof(咒怨洪流)}!本回合可额外发动 {额外攻击次数} 次普通攻击!");
|
||||
}
|
||||
}
|
||||
|
||||
public override void AlterSelectListBeforeSelection(SelectionContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
ISkill? skill = ctx.Skill;
|
||||
List<Character> allEnemys = ctx.AllEnemys;
|
||||
List<Character> allTeammates = ctx.AllTeammates;
|
||||
List<Character> enemys = ctx.Enemys;
|
||||
List<Character> teammates = ctx.Teammates;
|
||||
if (skill is NormalAttack && !本回合可附赠动作)
|
||||
{
|
||||
enemys.RemoveAll(本回合已攻击的目标.Contains);
|
||||
}
|
||||
}
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (enemy == Skill.Character)
|
||||
{
|
||||
return new AlterActualDamageResult { DamageDelta = -(damage * 实际比例) };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DefenseBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 蚀魂震击 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.蚀魂震击;
|
||||
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 蚀魂震击(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
ExemptionDescription = SkillSet.GetExemptionDescription(EffectType.Stun);
|
||||
Effects.Add(new 蚀魂震击特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 蚀魂震击特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对处于完全行动不能、行动受限、战斗不能、技能受限、攻击受限状态的敌人额外造成 {系数 * 100:0.##}% 力量 [ {伤害加成:0.##} ] 点伤害;造成魔法伤害时使敌人眩晕 1 回合,冷却 {基础冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime}。" +
|
||||
(冷却时间 > 0 ? $"(正在冷却:剩余 {冷却时间:0.##} {GameplayEquilibriumConstant.InGameTime})" : "");
|
||||
public override string DispelDescription => "被驱散性:眩晕需强驱散";
|
||||
public double 冷却时间 { get; set; } = 0;
|
||||
public double 基础冷却时间 { get; set; } = 10;
|
||||
private static double 系数 => 4;
|
||||
private double 伤害加成 => 系数 * Skill.Character?.STR ?? 0;
|
||||
|
||||
public override double AlterExpectedDamageBeforeCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return 0;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && (
|
||||
enemy.CharacterState == CharacterState.NotActionable ||
|
||||
enemy.CharacterState == CharacterState.ActionRestricted ||
|
||||
enemy.CharacterState == CharacterState.BattleRestricted ||
|
||||
enemy.CharacterState == CharacterState.SkillRestricted ||
|
||||
enemy.CharacterState == CharacterState.AttackRestricted))
|
||||
{
|
||||
return 伤害加成;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (character == Skill.Character && damageType == DamageType.Magical && actualDamage > 0 && 冷却时间 == 0 && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical))
|
||||
{
|
||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
||||
if (effects.Any())
|
||||
{
|
||||
effects.First().RemainDurationTurn++;
|
||||
}
|
||||
else
|
||||
{
|
||||
眩晕 e = new(Skill, character, false, 0, 1);
|
||||
enemy.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, enemy));
|
||||
}
|
||||
WriteLine($"[ {character} ] 的魔法伤害触发了蚀魂震击,[ {enemy} ] 被眩晕了!");
|
||||
冷却时间 = 基础冷却时间;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTimeElapsed(TimeLapseContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double elapsed = ctx.Elapsed;
|
||||
if (冷却时间 > 0)
|
||||
{
|
||||
冷却时间 -= elapsed;
|
||||
if (冷却时间 <= 0)
|
||||
{
|
||||
冷却时间 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 身心一境 : Skill
|
||||
{
|
||||
public override long Id => (long)SuperSkillID.身心一境;
|
||||
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 EPCost => 100;
|
||||
public override double CD => 55 - (1 * (Level - 1));
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 身心一境(Character? character = null) : base(SkillType.SuperSkill, 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 => $"敏捷提高 20% [ {敏捷提升:0.##} ] 点。若当前总力量低于敏捷,则获得额外力量提升,使得总力量等于敏捷的 {平衡系数 * 100:0.##}%{(Skill.Character != null ? $" [ {Skill.Character.AGI * 平衡系数:0.##} ]" : "")},持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 30;
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 敏捷提升 => (0.2 * Skill.Character?.BaseAGI) ?? 0.2;
|
||||
private double 平衡系数 => 0.5 + 0.1 * (Skill.Level - 1);
|
||||
private double 本次提升的敏捷 = 0;
|
||||
private double 本次提升的力量 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double pastHP = character.HP;
|
||||
double pastMaxHP = character.MaxHP;
|
||||
double pastMP = character.MP;
|
||||
double pastMaxMP = character.MaxMP;
|
||||
本次提升的敏捷 = character.BaseAGI * 0.2;
|
||||
character.ExAGI += 本次提升的敏捷;
|
||||
本次提升的力量 = 0;
|
||||
double 平衡敏捷 = character.AGI * 平衡系数;
|
||||
if (character.STR < 平衡敏捷)
|
||||
{
|
||||
本次提升的力量 = 平衡敏捷 - character.STR;
|
||||
character.ExSTR += 本次提升的力量;
|
||||
}
|
||||
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
WriteLine($"[ {character} ] 敏捷提升了 {本次提升的敏捷:0.##} 点,力量提升了 {本次提升的力量:0.##} 点!");
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
double pastHP = character.HP;
|
||||
double pastMaxHP = character.MaxHP;
|
||||
double pastMP = character.MP;
|
||||
double pastMaxMP = character.MaxMP;
|
||||
character.ExAGI -= character.BaseAGI * 0.2;
|
||||
character.ExSTR -= 本次提升的力量;
|
||||
character.Recovery(pastHP, pastMP, pastMaxHP, pastMaxMP);
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(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;
|
||||
RemainDuration = Duration;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
本次提升的敏捷 = 0;
|
||||
本次提升的力量 = 0;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost, EffectType.Lifesteal);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 银隼之赐 : Skill
|
||||
{
|
||||
public override long Id => (long)PassiveID.银隼之赐;
|
||||
public override string Name => "银隼之赐";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double CD => 5;
|
||||
|
||||
public 银隼之赐(Character? character = null) : base(SkillType.Passive, character)
|
||||
{
|
||||
Effects.Add(new 银隼之赐特效(this));
|
||||
}
|
||||
|
||||
public override IEnumerable<Effect> AddPassiveEffectToCharacter()
|
||||
{
|
||||
return Effects;
|
||||
}
|
||||
}
|
||||
|
||||
public class 银隼之赐特效(Skill skill) : Effect(skill)
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"{Skill.SkillOwner()}的「银隼」正如其名,优雅而致命。普通攻击命中后,附带基于 {敏捷系数 * 100:0.##}% 敏捷 [ {敏捷伤害:0.##} ] 点魔法伤害,可叠加普攻特效。每 {Skill.CD:0.##} {GameplayEquilibriumConstant.InGameTime}仅能触发一次。";
|
||||
|
||||
private double 敏捷伤害 => 敏捷系数 * Skill.Character?.AGI ?? 0;
|
||||
|
||||
private readonly double 敏捷系数 = 2;
|
||||
private bool 是否是嵌套伤害 = false;
|
||||
|
||||
public override void AfterDamageCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return;
|
||||
double damage = ctx.Damage;
|
||||
double actualDamage = ctx.ActualDamage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
if (Skill.CurrentCD == 0 && character == Skill.Character && isNormalAttack && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && !是否是嵌套伤害 && enemy.HP > 0)
|
||||
{
|
||||
Skill.CurrentCD = Skill.CD;
|
||||
WriteLine($"[ {character} ] 发动了银隼之赐!将造成额外伤害!");
|
||||
是否是嵌套伤害 = true;
|
||||
DamageToEnemy(character, enemy, DamageType.Magical, magicType, 敏捷伤害, new(character)
|
||||
{
|
||||
TriggerEffects = false
|
||||
});
|
||||
}
|
||||
|
||||
if (character == Skill.Character && 是否是嵌套伤害)
|
||||
{
|
||||
是否是嵌套伤害 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.乱心安魂曲;
|
||||
public override string Name => "乱心安魂曲";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 75;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override int CanSelectTargetCount => 4;
|
||||
|
||||
public 乱心安魂曲(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 45, 0.075, 0.04, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.光破斩;
|
||||
public override string Name => "光破斩";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 65;
|
||||
public override double CD => 24;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 光破斩(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 60, 55, 0.09, 0.045, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.光鬼斩;
|
||||
public override string Name => "光鬼斩";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 70;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 光鬼斩(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 75, 60, 0.1, 0.05, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 5, 0, 1, 0.45, 0.03, false, 12.0, 0.0, 6.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 公牛之怒 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.公牛之怒;
|
||||
public override string Name => "公牛之怒";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 30;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 4;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 公牛之怒(Character? character = null) : base(SkillType.Skill, 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 => $"扣除自身 {生命扣除比例 * 100:0.##}% 最大生命值 [ {Skill.Character?.MaxHP * 生命扣除比例:0.##} ],并回复 {能量回复:0.##} 点能量值。";
|
||||
|
||||
private double 生命扣除比例 => 0.12;
|
||||
private double 能量回复 => Skill.Level > 0 ? 50 + 15 * (Skill.Level - 1) : 50;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
double cost = caster.MaxHP * 生命扣除比例;
|
||||
double actual = Math.Min(cost, Math.Max(0, caster.HP - 1));
|
||||
if (actual > 0)
|
||||
{
|
||||
caster.HP -= actual;
|
||||
WriteLine($"[ {caster} ] 燃烧了 {actual:0.##} 点生命值,发动了公牛之怒!");
|
||||
}
|
||||
double ep = 能量回复;
|
||||
caster.EP = Math.Min(caster.EP + ep, 200);
|
||||
WriteLine($"[ {caster} ] 回复了 {ep:0.##} 点能量值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.养命功;
|
||||
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 double EPCost => 40;
|
||||
public override double CD => 35;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 养命功(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 施加持续性弱驱散(this, durationTurn: 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.剑风闪;
|
||||
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 EPCost => 70;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override int CanSelectTargetRange => 2;
|
||||
|
||||
public 剑风闪(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 55, 50, 0.1, 0.035, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
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)SkillID.助威;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 35;
|
||||
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 => 3;
|
||||
|
||||
public 助威(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 助威特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 助威特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"提升目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}友方角色 {ATK * 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 = false;
|
||||
private readonly double _duration = 0;
|
||||
private readonly int _durationTurn = 3;
|
||||
private readonly double _levelGrowth = 0;
|
||||
|
||||
private double ATK => Level > 0 ? 0.07 + 0.03 * (Level - 1) : 0.03;
|
||||
|
||||
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;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
WriteLine($"[ {target} ] 的攻击力提升了 {ATK * 100:0.##}% [ {target.BaseATK * ATK:0.##} ] 点!持续时间:{持续时间}!");
|
||||
ExATK2 e = new(Skill, new()
|
||||
{
|
||||
{ "exatk", ATK }
|
||||
}, 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;
|
||||
e.Source = caster;
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.千剑之雨;
|
||||
public override string Name => "千剑之雨";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 80;
|
||||
public override double CD => 32;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override int CanSelectTargetCount => 5;
|
||||
|
||||
public 千剑之雨(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 45, 40, 0.07, 0.035, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 双连击 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.双连击;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => Character?.NormalAttack.CanSelectSelf ?? false;
|
||||
public override bool CanSelectTeammate => Character?.NormalAttack.CanSelectTeammate ?? false;
|
||||
public override bool CanSelectEnemy => Character?.NormalAttack.CanSelectEnemy ?? true;
|
||||
public override int CanSelectTargetCount => Character?.NormalAttack.CanSelectTargetCount ?? 1;
|
||||
|
||||
public 双连击(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 双连击特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 双连击特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"基于普通攻击的目标选择器对目标发起 2 次普通攻击。双连击会占用 1 次普通攻击的决策点配额,当配额不足时,仅能发起 1 次普通攻击。伤害特效可叠加;不受 [ 攻击受限 ] 状态的限制。";
|
||||
|
||||
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;
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
bool checkQuota = true;
|
||||
if (GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
checkQuota = dp.CheckActionTypeQuota(CharacterActionType.NormalAttack);
|
||||
dp.AddActionType(CharacterActionType.NormalAttack, null, false);
|
||||
}
|
||||
caster.NormalAttack.Attack(GamingQueue, caster, null, targets);
|
||||
if (checkQuota)
|
||||
{
|
||||
caster.NormalAttack.Attack(GamingQueue, caster, null, targets);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 号令 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.号令;
|
||||
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 EPCost => 50;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 号令(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
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} 个友方角色 {ATK * 100:0.##}% 攻击力,持续 {持续回合} 回合。";
|
||||
public override string DispelDescription => "被驱散性:可弱驱散";
|
||||
public override EffectType EffectType => EffectType.DamageBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private double ATK => Level > 0 ? 0.12 + 0.05 * (Level - 1) : 0.12;
|
||||
private int 持续回合 => 2;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
foreach (Character target in ctx.Targets)
|
||||
{
|
||||
if (target == caster || target.HP <= 0) continue;
|
||||
WriteLine($"[ {caster} ] 发号施令,[ {target} ] 的攻击力提升了 {ATK * 100:0.##}% [ {target.BaseATK * ATK:0.##} ] 点!");
|
||||
ExATK2 e = new(Skill, new() { { "exatk", ATK } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 持续回合,
|
||||
EffectType = EffectType.DamageBoost,
|
||||
DispelledType = DispelledType.Weak
|
||||
};
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.DamageBoost);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 命运之赐:由 <see cref="命运馈赠"/> 绑定到友方未来行动回合的【回合奖励】内容
|
||||
/// <para/>· 作为主动奖励被发放时,由队列立即释放(<see cref="FunGame.Core.Model.Queue.GamingQueue"/> 的 <c>BindAndRelease</c>)
|
||||
/// <para/>· 效果:回复自身最大生命值,并获得一段时间的攻击力提升
|
||||
/// </summary>
|
||||
public class 命运之赐 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.命运之赐;
|
||||
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 命运之赐(Character? character = null) : base(SkillType.Skill, 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 =>
|
||||
$"立即回复自身 {回复比例 * 100:0.##}% 最大生命值,并获得 {攻击提升 * 100:0.##}% 攻击力,持续 {持续回合} 回合。";
|
||||
public override string DispelDescription => "被驱散性:不可驱散";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
private double 回复比例 => 0.15;
|
||||
private double 攻击提升 => 0.15;
|
||||
private int 持续回合 => 2;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character owner) return;
|
||||
|
||||
double heal = owner.MaxHP * 回复比例;
|
||||
HealToTarget(owner, owner, heal);
|
||||
|
||||
ExATK2 攻击加成 = new(Skill, new() { { "exatk", 攻击提升 } }, owner)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
DurationTurn = 持续回合,
|
||||
EffectType = EffectType.DamageBoost
|
||||
};
|
||||
攻击加成.AddToCharacter(owner);
|
||||
GamingQueue?.AddApplyEffects(owner, EffectType.DamageBoost);
|
||||
|
||||
WriteLine($"[ {owner} ] 获得了命运之赐:回复了 {heal:0.##} 点生命值,攻击力提升 {攻击提升 * 100:0.##}% ,持续 {持续回合} 回合!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 命运剥夺:应用【回合奖励】系统的「一次性移除」能力
|
||||
/// <para/>· 摧毁目标未来第 1 个行动回合的全部回合奖励(<see cref="FunGame.Core.Interface.Base.IGamingQueue.RemoveRoundRewards"/>)
|
||||
/// <para/>· 无论是否剥夺到奖励,都会造成魔法伤害,属于稳定的输出 + 反制手段
|
||||
/// </summary>
|
||||
public class 命运剥夺 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.命运剥夺;
|
||||
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 EPCost => 55;
|
||||
public override double CD => 40;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectEnemy => true;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 命运剥夺(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
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.TargetDescription()}未来第 1 个行动回合的全部回合奖励,并对其造成 " +
|
||||
$"{伤害系数 * 100:0.##}% 攻击力 [ {Skill.Character?.BaseATK * 伤害系数:0.##} ] 点魔法伤害。";
|
||||
public override string DispelDescription => "被驱散性:不可驱散";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
/// <summary>
|
||||
/// 摧毁奖励时的稳定魔法伤害系数(基于攻击力,无基础伤害)
|
||||
/// <para/>· 平衡调整(2026-09-22):L6 由 200% 降至 125%,对齐战技单体上限「≤1.2×普攻」。
|
||||
/// 实测:原 1.47×普攻(超上限 23%),目标 ≤1.20×普攻。
|
||||
/// </summary>
|
||||
// 调整(二轮):L6 125% → 110%(留 ±5% 测量噪声余量)
|
||||
private double 伤害系数 => Level > 0 ? 0.9 + 0.04 * (Level - 1) : 0.9;
|
||||
|
||||
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 (GamingQueue is not null
|
||||
&& GamingQueue.RemoveRoundRewards(target, 1, out List<Skill> removed)
|
||||
&& removed.Count > 0)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 剥夺了 [ {target} ] 下个行动回合的回合奖励!");
|
||||
foreach (Skill reward in removed)
|
||||
{
|
||||
WriteLine($" └ 已摧毁 [ {reward.Name} ]");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteLine($"[ {caster} ] 未能在 [ {target} ] 身上找到可剥夺的回合奖励。");
|
||||
}
|
||||
|
||||
DamageToEnemy(caster, target, DamageType.Magical, MagicType.None, caster.ATK * 伤害系数);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 命运馈赠:应用【回合奖励】系统的「绑定角色的回合奖励」能力
|
||||
/// <para/>· 为一名友方绑定一份其未来第 1 个行动回合的奖励(<see cref="FunGame.Core.Interface.Base.IGamingQueue.AddRoundReward"/>)
|
||||
/// <para/>· 奖励内容由模块自定义(<see cref="命运之赐"/>),在目标行动回合开始时自动发放
|
||||
/// <para/>· 仅在启用「角色绑定的回合奖励」时生效
|
||||
/// </summary>
|
||||
public class 命运馈赠 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.命运馈赠;
|
||||
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 EPCost => 45;
|
||||
public override double CD => 30;
|
||||
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 命运馈赠(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
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.TargetDescription()}绑定一份其未来第 1 个行动回合的回合奖励 [ {nameof(命运之赐)} ]:该奖励会在其行动回合开始时自动发放。";
|
||||
public override string DispelDescription => "被驱散性:不可驱散";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
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;
|
||||
|
||||
// 每次赠予都构造新实例:AddRoundReward 以实例引用去重,重复使用同一实例会被拒绝
|
||||
命运之赐 reward = new(target);
|
||||
if (GamingQueue is not null && GamingQueue.AddRoundReward(target, 1, reward))
|
||||
{
|
||||
WriteLine($"[ {caster} ] 为 [ {target} ] 的下一行动回合绑定了一份命运的馈赠!");
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteLine($"[ {caster} ] 对 [ {target} ] 的命运馈赠未能生效(未启用角色绑定的回合奖励)。");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 回复原状 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.回复原状;
|
||||
public override string Name => "回复原状";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 15;
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 回复原状(Character? character = null) : base(SkillType.Skill, 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 => "解除自身的导力装甲状态,并恢复到通常的战斗姿态。";
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
// 增益与封技的移除、导力装甲可用性的恢复、本技能的移除,统一交给导力装甲特效处理,避免效果被重复移除导致属性重复结算
|
||||
List<导力装甲特效> armored = [.. caster.Effects.OfType<导力装甲特效>()];
|
||||
if (armored.Count == 0)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 当前并未处于导力装甲状态。");
|
||||
return;
|
||||
}
|
||||
foreach (导力装甲特效 e in armored)
|
||||
{
|
||||
e.解除装甲(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.回复弹;
|
||||
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 double EPCost => 50;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 回复弹(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 纯数值回复生命(this, 200, 150));
|
||||
Effects.Add(new 弱驱散特效(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.天堂之吻;
|
||||
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 EPCost => 75;
|
||||
public override double CD => 40;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 2;
|
||||
|
||||
public 天堂之吻(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 提升友方行动速度(this, 90, 30, duration: 20));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 导力装甲 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.导力装甲;
|
||||
public override string Name => "导力装甲";
|
||||
public override string Description => Effects.Count > 0 ? ((导力装甲特效)Effects.First()).通用描述 : "";
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override double EPCost => 80;
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 导力装甲(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 导力装甲特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 导力装甲特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string DispelDescription => "被驱散性:不可驱散";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
public override EffectType EffectType => EffectType.DefenseBoost;
|
||||
|
||||
// 必须声明持续回合,否则队列不会递减 RemainDurationTurn,装甲状态将永不自然到期
|
||||
public override bool Durative => false;
|
||||
public override int DurationTurn => 持续回合;
|
||||
|
||||
/// <summary>
|
||||
/// 状态栏描述,随装甲状态动态切换:生效中为 <see cref="装甲状态描述"/>,未启动/已解除为 <see cref="通用描述"/>
|
||||
/// </summary>
|
||||
public override string Description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 技能卡描述,固定为释放前景文案
|
||||
/// </summary>
|
||||
public string 通用描述 => $"启动导力装甲:提升自身 {攻击提升 * 100:0.##}% 攻击力、{护甲提升 * 100:0.##}% 物理护甲和{魔抗提升 * 100:0.##}% 魔法抗性,并立即缩短自身 35% 的行动等待时间,持续 {持续回合} 回合。装甲期间自身的行动硬直大幅缩短。";
|
||||
|
||||
/// <summary>
|
||||
/// 装甲生效期间的状态栏描述
|
||||
/// </summary>
|
||||
public string 装甲状态描述 => $"该角色处于导力装甲状态:提升自身 {攻击提升 * 100:0.##}% 攻击力、{护甲提升 * 100:0.##}% 物理护甲和{魔抗提升 * 100:0.##}% 魔法抗性,持续 {持续回合} 回合,行动硬直大幅缩短。";
|
||||
|
||||
private double 攻击提升 => Level > 0 ? 0.35 + 0.05 * (Level - 1) : 0.35;
|
||||
private double 护甲提升 => Level > 0 ? 0.35 + 0.05 * (Level - 1) : 0.35;
|
||||
private double 魔抗提升 => Level > 0 ? 0.35 + 0.05 * (Level - 1) : 0.35;
|
||||
private int 持续回合 => 4;
|
||||
|
||||
/// <summary>
|
||||
/// 属性加成由本特效自行结算,不使用 ExATK2 / ExDEF2 / ExMDF 等外部效果:
|
||||
/// 那些效果的 OnEffectLost 是直接扣减常量、非幂等,一旦被重复触发就会把属性多扣一份。
|
||||
/// 这里记录实际生效的数值并配合标志位,保证重复触发时增减都只结算一次。
|
||||
/// </summary>
|
||||
private bool 加成已应用 = false;
|
||||
private double 已应用攻击提升 = 0;
|
||||
private double 已应用护甲提升 = 0;
|
||||
private double 已应用魔抗提升 = 0;
|
||||
|
||||
public 导力装甲特效(Skill skill) : base(skill)
|
||||
{
|
||||
Description = 通用描述;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应用属性加成,重复调用只生效一次
|
||||
/// </summary>
|
||||
private void 应用加成(Character caster)
|
||||
{
|
||||
if (加成已应用) return;
|
||||
已应用攻击提升 = 攻击提升;
|
||||
已应用护甲提升 = 护甲提升;
|
||||
已应用魔抗提升 = 魔抗提升;
|
||||
caster.ExATKPercentage += 已应用攻击提升;
|
||||
caster.ExDEFPercentage += 已应用护甲提升;
|
||||
caster.MDF[MagicType.None] += 已应用魔抗提升;
|
||||
加成已应用 = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 还原属性加成,重复调用只生效一次
|
||||
/// </summary>
|
||||
private void 还原加成(Character caster)
|
||||
{
|
||||
if (!加成已应用) return;
|
||||
caster.ExATKPercentage -= 已应用攻击提升;
|
||||
caster.ExDEFPercentage -= 已应用护甲提升;
|
||||
caster.MDF[MagicType.None] -= 已应用魔抗提升;
|
||||
已应用攻击提升 = 0;
|
||||
已应用护甲提升 = 0;
|
||||
已应用魔抗提升 = 0;
|
||||
加成已应用 = false;
|
||||
}
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
if (!caster.Skills.Any(s => s is 回复原状))
|
||||
{
|
||||
caster.Skills.Add(new 回复原状(caster)
|
||||
{
|
||||
Level = Skill.Level,
|
||||
Source = SkillSource.Reward
|
||||
});
|
||||
}
|
||||
foreach (Skill dlzj in caster.Skills.Where(s => s is 导力装甲))
|
||||
{
|
||||
dlzj.Enable = false;
|
||||
dlzj.IsInEffect = true;
|
||||
}
|
||||
// 封技是标准的控制状态效果,仍交给框架效果处理
|
||||
造成封技 e = new(Skill, durationTurn: 持续回合)
|
||||
{
|
||||
DurativeWithoutDuration = true,
|
||||
DispelledType = DispelledType.CannotBeDispelled
|
||||
};
|
||||
e.Activate(caster, [caster]);
|
||||
WriteLine($"[ {caster} ] 启动了导力装甲!");
|
||||
应用加成(caster);
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost, EffectType.DefenseBoost);
|
||||
GamingQueue?.ChangeCharacterHardnessTime(caster, -0.35, true, false);
|
||||
Description = 装甲状态描述;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提前解除装甲:移除封技状态,属性还原与技能状态恢复由 <see cref="OnEffectLost"/> 统一处理
|
||||
/// </summary>
|
||||
public void 解除装甲(Character caster)
|
||||
{
|
||||
List<Effect> armored = [.. caster.Effects.Where(e => e != this && e is 封技 fj && fj.Skill is 导力装甲 && fj.Source == caster)];
|
||||
foreach (Effect e in armored)
|
||||
{
|
||||
e.RemoveFromCharacter(caster);
|
||||
}
|
||||
RemoveFromCharacter(caster);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
还原加成(caster);
|
||||
foreach (Skill dlzj in caster.Skills.Where(s => s is 导力装甲))
|
||||
{
|
||||
if (dlzj.CurrentCD == 0)
|
||||
{
|
||||
dlzj.Enable = true;
|
||||
}
|
||||
dlzj.IsInEffect = false;
|
||||
}
|
||||
// 注意:此处不能移除导力装甲技能本体,否则角色将永久失去该技能
|
||||
caster.Skills.RemoveWhere(s => s is 回复原状);
|
||||
Description = 通用描述;
|
||||
WriteLine($"[ {caster} ] 解除了导力装甲,恢复了通常的战斗姿态!");
|
||||
}
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
RemainDurationTurn = 持续回合;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
AddToCharacter(caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.岚;
|
||||
public override string Name => "岚";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 80;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override int CanSelectTargetCount => 4;
|
||||
|
||||
public 岚(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 45, 45, 0.07, 0.035, DamageType.Physical));
|
||||
Effects.Add(new 打断施法(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.弓刃交错;
|
||||
public override string Name => "弓刃交错";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 65;
|
||||
public override double CD => 22;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 弓刃交错(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 60, 55, 0.09, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Delay, true, 8, 0, 1.5, 0.8, 0.03, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.强打;
|
||||
public override string Name => "强打";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 65;
|
||||
public override double CD => 26;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 强打(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 70, 60, 0.095, 0.05, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 5, 0, 1, 0.4, 0.03, false, 10.0, 0.0, 5.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 快速狙击 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.快速狙击;
|
||||
public override string Name => "快速狙击";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 60;
|
||||
public override double CD => 18;
|
||||
// 平衡调整(2026-09-22):硬直 6 → 7(战技区间 7–10)
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 快速狙击(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 9;
|
||||
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.TargetDescription()}造成 {BaseDamage:0.##} + {ATKCoefficient * 100:0.##}% 攻击力 [ {Damage:0.##} ] 点物理伤害。";
|
||||
|
||||
// 调整:L6 基础值 410→375,实测 1.26×普攻 压至 ≤1.20
|
||||
// 调整:L6 基础值 410→325(留噪声余量,目标 ≤1.13×普攻)
|
||||
private double BaseDamage => Skill.Level > 0 ? 85 + 48 * (Skill.Level - 1) : 85;
|
||||
private double ATKCoefficient => Skill.Level > 0 ? 0.12 + 0.06 * (Skill.Level - 1) : 0.12;
|
||||
private double Damage => BaseDamage + ATKCoefficient * (Skill.Character?.ATK ?? 0);
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
List<Character> enemies = [];
|
||||
if (GamingQueue != null)
|
||||
{
|
||||
enemies.AddRange(GamingQueue.GetEnemies(caster).Where(c => c.HP > 0));
|
||||
}
|
||||
if (enemies.Count == 0)
|
||||
{
|
||||
enemies.AddRange(ctx.Targets.Where(c => c.HP > 0));
|
||||
}
|
||||
if (enemies.Count == 0) return;
|
||||
Character target = enemies[Random.Next(enemies.Count)];
|
||||
WriteLine($"[ {caster} ] 使用[快速狙击],命中了随机的 [ {target} ]!");
|
||||
DamageToEnemy(caster, target, DamageType.Physical, MagicType.None, Damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 战技 · 辅助型【战术部署】—— 把「节奏」转移给队友
|
||||
/// <para/>设计意图:本项目此前的技能只作用于「生命 / 能量 / 属性 / 位置」,
|
||||
/// 从未触碰**决策点**这一层。而实测(2759 回合)显示每回合行动数中位仅 **1.00**,
|
||||
/// 且 AI 的行动循环会持续到 `CurrentDecisionPoints` 耗尽
|
||||
/// (`GamingQueue.cs:1201`)⇒ **决策点才是硬约束**,配额只是软约束。
|
||||
/// 因此"给人多做事"的正确做法是**给决策点**,而非给配额。
|
||||
/// <para/>效果:目标 +2 决策点;若目标不是自己,额外给自己 +1 决策点(保证施法者不完全亏)。
|
||||
/// <para/>标尺:战技(支援类)EP 40–80 / CD 55–60 → 取 EP 60 / CD 45(本技能无伤害,
|
||||
/// 不占"控制点预算";决策点补充按 §5.1 的团队折算,单次团队净 +3 点 ≈ 3 次普攻)。
|
||||
/// <para/>⚠ 决策点补充**必须封顶到 `MaxDecisionPoints`**:超出部分会在下一回合恢复时
|
||||
/// 被 `Math.Min(Current + pointsToAdd, Max)` 截掉,属于无效溢出。
|
||||
/// </summary>
|
||||
public class 战术部署 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.战术部署;
|
||||
public override string Name => "战术部署";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double EPCost => 60;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 战术部署(Character? character = null) : base(SkillType.Skill, 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.TargetDescription()}补充 {队友补充量} 点决策点;若目标不是自己,施法者额外获得 {自身补充量} 点决策点。";
|
||||
|
||||
/// <summary>给目标补充的决策点(≈ 让目标多做 1–2 件事)</summary>
|
||||
private const int 队友补充量 = 2;
|
||||
|
||||
/// <summary>给施法者自己的补偿(仅当目标不是自己时生效,避免"自己给自己"重复计算)</summary>
|
||||
private const int 自身补充量 = 1;
|
||||
|
||||
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;
|
||||
补充决策点(caster, target, 队友补充量);
|
||||
if (target != caster)
|
||||
{
|
||||
补充决策点(caster, caster, 自身补充量);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为角色补充决策点。<para/>
|
||||
/// ⚠ 必须封顶到 <see cref="DecisionPoints.MaxDecisionPoints"/> —— 超出的部分会在
|
||||
/// 下一回合恢复时被截掉(`GamingQueue.cs:4243/4249` 的 `Math.Min`),属于无效溢出。
|
||||
/// </summary>
|
||||
private void 补充决策点(Character caster, Character target, int amount)
|
||||
{
|
||||
if (GamingQueue is null) return;
|
||||
if (!GamingQueue.CharacterDecisionPoints.TryGetValue(target, out DecisionPoints? dp) || dp is null) return;
|
||||
int before = dp.CurrentDecisionPoints;
|
||||
dp.CurrentDecisionPoints = Math.Min(before + amount, dp.MaxDecisionPoints);
|
||||
int actual = dp.CurrentDecisionPoints - before;
|
||||
string tail = actual < amount ? $"(上限 {dp.MaxDecisionPoints},溢出 {amount - actual} 点未生效)" : "";
|
||||
WriteLine($"[ {caster} ] 实施了战术部署:[ {target} ] 获得 {actual} 点决策点({before} → {dp.CurrentDecisionPoints} / {dp.MaxDecisionPoints}){tail}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 抢夺命运:应用【回合奖励】系统的「角色可相互抢夺」能力
|
||||
/// <para/>· 夺取目标未来第 1 个行动回合的全部回合奖励,并入自身未来第 1 个行动回合
|
||||
/// <para/>· 调用 <see cref="FunGame.Core.Interface.Base.IGamingQueue.StealRoundReward"/>,被夺取项会连同归属一起改写为夺取者
|
||||
/// <para/>· 目标身上没有可夺取的奖励时,改为对其造成魔法伤害,保证技能不空放
|
||||
/// <para/>· 仅在启用「角色绑定的回合奖励」(<c>InitRoundRewards(..., bindToCharacter: true, ...)</c>)时才能夺取
|
||||
/// </summary>
|
||||
public class 抢夺命运 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.抢夺命运;
|
||||
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 EPCost => 50;
|
||||
public override double CD => 35;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectEnemy => true;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 抢夺命运(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
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.TargetDescription()}未来第 1 个行动回合的全部回合奖励,并入自身未来第 1 个行动回合;" +
|
||||
$"若目标没有可夺取的回合奖励,则对其造成 {伤害系数 * 100:0.##}% 攻击力 [ {Skill.Character?.BaseATK * 伤害系数:0.##} ] 点魔法伤害。";
|
||||
public override string DispelDescription => "被驱散性:不可驱散";
|
||||
public override DispelledType DispelledType => DispelledType.CannotBeDispelled;
|
||||
|
||||
/// <summary>
|
||||
/// 夺取失败时的补偿伤害系数(基于攻击力,无基础伤害)
|
||||
/// <para/>· 平衡调整(2026-09-22):L6 由 245% 降至 125%,对齐战技单体上限「≤1.2×普攻」。
|
||||
/// 实测:原 1.47×普攻(超上限 23%),目标 ≤1.20×普攻。
|
||||
/// </summary>
|
||||
// 调整(二轮):L6 125% → 110%(留 ±5% 测量噪声余量)
|
||||
private double 伤害系数 => Level > 0 ? 0.9 + 0.04 * (Level - 1) : 0.9;
|
||||
|
||||
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;
|
||||
|
||||
List<Skill> stolenItems = [];
|
||||
if (GamingQueue is not null
|
||||
&& GamingQueue.StealRoundReward(target, 1, caster, 1, out stolenItems)
|
||||
&& stolenItems.Count > 0)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 夺取了 [ {target} ] 下个行动回合的回合奖励!");
|
||||
foreach (Skill reward in stolenItems)
|
||||
{
|
||||
WriteLine($" └ 已将 [ {reward.Name} ] 转入 [ {caster} ] 的未来回合奖励");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteLine($"[ {caster} ] 未能在 [ {target} ] 身上夺取到回合奖励,转而发动攻击!");
|
||||
DamageToEnemy(caster, target, DamageType.Magical, MagicType.None, caster.ATK * 伤害系数);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.拘束之鞭;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 22;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 拘束之鞭(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 60, 50, 0.09, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 打断施法(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using FunGame.Core.Entity;
|
||||
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)SkillID.挑拨;
|
||||
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 EPCost => 65;
|
||||
public override double CD => 40;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override bool CanSelectEnemy => true;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 挑拨(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 挑拨特效(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class 挑拨特效 : Effect
|
||||
{
|
||||
public override long Id => Skill.Id;
|
||||
public override string Name => Skill.Name;
|
||||
public override string Description => $"对目标{(Skill.CanSelectTargetCount > 1 ? $"至多 {Skill.CanSelectTargetCount} 个" : "")}敌方角色施加愤怒状态。愤怒:行动受限且失控,行动回合中无法自主行动,仅能对施法者发起普通攻击。持续 {持续时间}。";
|
||||
public override EffectType EffectType => EffectType.Taunt;
|
||||
public override DispelledType DispelledType => DispelledType.Strong;
|
||||
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 = false;
|
||||
private readonly double _duration = 0;
|
||||
private readonly int _durationTurn = 2;
|
||||
private readonly double _levelGrowth = 0;
|
||||
|
||||
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;
|
||||
foreach (Character target in targets)
|
||||
{
|
||||
愤怒 e = new(Skill, caster, caster);
|
||||
if (!CheckExemption(caster, target, e))
|
||||
{
|
||||
WriteLine($"[ {caster} ] 嘲讽了 [ {target} ] ,[ {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,76 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 斗魂 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.斗魂;
|
||||
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 EPCost => 45;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 斗魂(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
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.TargetDescription()}的攻击力降低 {ATKDown * 100:0.##}%、物理护甲降低 {DEFDown * 100:0.##}%,持续 2 回合。";
|
||||
public override string DispelDescription => "被驱散性:可弱驱散";
|
||||
public override EffectType EffectType => EffectType.Weaken;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool IsDebuff => true;
|
||||
|
||||
private double ATKDown => Level > 0 ? 0.15 + 0.05 * (Level - 1) : 0.15;
|
||||
private double DEFDown => Level > 0 ? 0.25 + 0.05 * (Level - 1) : 0.25;
|
||||
|
||||
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;
|
||||
WriteLine($"[ {target} ] 的攻击力和物理护甲降低了!");
|
||||
ExATK2 atk = new(Skill, new() { { "exatk", -ATKDown } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 2,
|
||||
IsDebuff = true,
|
||||
EffectType = EffectType.Weaken,
|
||||
DispelledType = DispelledType.Weak
|
||||
};
|
||||
target.Effects.Add(atk);
|
||||
atk.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Weaken);
|
||||
ExDEF2 def = new(Skill, new() { { "exdef", -DEFDown } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 2,
|
||||
IsDebuff = true,
|
||||
EffectType = EffectType.Weaken,
|
||||
DispelledType = DispelledType.Weak
|
||||
};
|
||||
target.Effects.Add(def);
|
||||
def.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Weaken);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 【技能制作示范】断罪斩 —— 单目标物理战技
|
||||
/// <para>制作一个技能只需三步:
|
||||
/// ① 在 <see cref="SkillID"/> 分配一个 Id;
|
||||
/// ② 继承 <see cref="Skill"/>,按需 override Id/Name/消耗/冷却/硬直等数值属性;
|
||||
/// ③ 在构造里把效果(Effect 子类)加入 <see cref="Skill.Effects"/>,技能的效果与描述即生效。
|
||||
/// 数值公式沿用 Oshima 惯例:随 <see cref="Skill.Level"/> 成长(Level 为 0 时视为未学习,用基础值)。</para>
|
||||
/// <para>【战技规范】消耗使用 <see cref="Skill.EPCost"/>(能量);
|
||||
/// <b>不要</b> override <see cref="Skill.CastTime"/>——吟唱是魔法专属,<see cref="Skill.RealCastTime"/> 注释明确标注「[ 魔法 ]」,
|
||||
/// 战技设置咏唱会违背 GamingQueue 的行动结算流程;魔法才使用 MPCost + CastTime + MagicBottleneck。</para>
|
||||
/// </summary>
|
||||
public class 断罪斩 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.断罪斩;
|
||||
public override string Name => "断罪斩";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
// 战技使用能量(EP)作为消耗;咏唱(CastTime)与魔法消耗(MPCost)属于魔法,战技不使用
|
||||
public override double EPCost => 50;
|
||||
public override double CD => 25;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
/// <summary>
|
||||
/// 继承此构造:传入角色后即可 AddSkillToCharacter 加入战斗
|
||||
/// </summary>
|
||||
/// <param name="character"></param>
|
||||
public 断罪斩(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
// 复用现成的「基于攻击力的伤害」效果(带基础伤害 + 攻击力系数,物理伤害型)
|
||||
// 攻击力系数对齐同批战技:0.075 + 0.055×(L-1)(L6 = 35%)
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 120, 60, 0.075, 0.055, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.旋风轮;
|
||||
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 EPCost => 80;
|
||||
public override double CD => 25;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override int CanSelectTargetCount => 5;
|
||||
|
||||
public 旋风轮(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 40, 55, 0.1, 0.03, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.无尽剑制;
|
||||
public override string Name => "无尽剑制";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 90;
|
||||
public override double CD => 40;
|
||||
// 调整:硬直 12 → 10(战技区间 7–10)
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool SelectAllEnemies => true;
|
||||
|
||||
public 无尽剑制(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 55, 50, 0.08, 0.04, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.无相飞刀;
|
||||
public override string Name => "无相飞刀";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 45;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
|
||||
public 无相飞刀(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Silence, false, 0, 2, 0, 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.月华掌;
|
||||
public override string Name => "月华掌";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 70;
|
||||
public override double CD => 26;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 月华掌(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 60, 50, 0.09, 0.045, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Confusion, false, 0, 2, 0, 0.3, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.欢乐激发;
|
||||
public override string Name => "欢乐激发";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 70;
|
||||
public override double CD => 55;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 4;
|
||||
|
||||
public 欢乐激发(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 纯数值回复生命(this, 170, 130));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.死亡制裁;
|
||||
public override string Name => "死亡制裁";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 80;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override int CanSelectTargetCount => 4;
|
||||
|
||||
public 死亡制裁(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 50, 0.08, 0.04, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.火焰碎击;
|
||||
public override string Name => "火焰碎击";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 75;
|
||||
public override double CD => 30;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
|
||||
public 火焰碎击(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 80, 60, 0.1, 0.05, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 6, 0, 1.5, 1, 0, false, 12.0, 0.0, 6.0));
|
||||
Effects.Add(new 打断施法(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.灾难一掷;
|
||||
public override string Name => "灾难一掷";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 70;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 灾难一掷(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
// 调整:L6 基础值 405→350(留噪声余量,目标 ≤1.13×普攻)
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 80, 54, 0.11, 0.055, DamageType.Physical));
|
||||
// 调整:战斗不能概率 L6 50% → 40%(强控上限 40%)
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Cripple, false, 0, 1, 0, 0.30, 0.02));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 牺牲之箭 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.牺牲之箭;
|
||||
public override string Name => "牺牲之箭";
|
||||
public override string Description => Effects.Count > 0 ? Effects.First().Description : "";
|
||||
public override double EPCost => 40;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 牺牲之箭(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
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} 个友方角色回复 {能量回复:0.##} 点能量值。";
|
||||
|
||||
private double 能量回复 => Skill.Level > 0 ? 40 + 20 * (Skill.Level - 1) : 40;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
foreach (Character target in ctx.Targets)
|
||||
{
|
||||
if (target == caster || target.HP <= 0) continue;
|
||||
double ep = 能量回复;
|
||||
target.EP = Math.Min(target.EP + ep, 200);
|
||||
WriteLine($"[ {caster} ] 向 [ {target} ] 射出了牺牲之箭,回复了 {ep:0.##} 点能量值!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.狂刃剑舞;
|
||||
public override string Name => "狂刃剑舞";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 70;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 狂刃剑舞(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 70, 60, 0.1, 0.05, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Confusion, false, 0, 2, 0, 0.35, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
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)SkillID.狐媚暗随;
|
||||
public override string Name => "狐媚暗随";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 55;
|
||||
public override double CD => 22;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 狐媚暗随(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 75, 65, 0.1, 0.05, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 疾走 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.疾走;
|
||||
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 EPCost => 25;
|
||||
// 调整:CD 15 → 18(战技区间 18–45)
|
||||
public override double CD => 18;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 疾走(Character? character = null) : base(SkillType.Skill, 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 => $"本回合内大幅提升移动距离,并附赠一次战技的决策点配额。移动距离提升:{移动距离提升} 格。";
|
||||
public override string DispelDescription => "";
|
||||
public override EffectType EffectType => EffectType.Haste;
|
||||
public override bool Durative => false;
|
||||
public override double Duration => 0;
|
||||
public override int DurationTurn => 1;
|
||||
|
||||
private int 移动距离提升
|
||||
{
|
||||
get
|
||||
{
|
||||
return Skill.Level switch
|
||||
{
|
||||
2 or 3 => 2,
|
||||
4 or 5 => 3,
|
||||
6 => 4,
|
||||
_ => 1,
|
||||
};
|
||||
}
|
||||
}
|
||||
private int 本次提升 = 0;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
Skill.IsInEffect = true;
|
||||
本次提升 = 移动距离提升;
|
||||
character.ExMOV += 本次提升;
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
Skill.IsInEffect = false;
|
||||
character.ExMOV -= 本次提升;
|
||||
}
|
||||
|
||||
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;
|
||||
本次提升 = 0;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType);
|
||||
RemainDurationTurn = DurationTurn;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
dp.AddTempActionQuota(this, CharacterActionType.CastSkill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.EffectResult;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 疾风步 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.疾风步;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 5;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
|
||||
public 疾风步(Character? character = null) : base(SkillType.Skill, 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 => $"进入不可选中状态,获得 100 行动速度,提高 8% 暴击率,持续 {Duration:0.##} {GameplayEquilibriumConstant.InGameTime}。不可选中:无法成为任何目标且免疫场地伤害。破隐一击:在持续时间内,首次造成伤害会附加 {系数 * 100:0.##}% 敏捷 [ {伤害加成:0.##} ] 的强化伤害,并解除不可选中状态。";
|
||||
public override string DispelDescription => "被驱散性:不可选中状态生效期间,此技能不可驱散,否则可弱驱散";
|
||||
public override EffectType EffectType => EffectType.Unselectable;
|
||||
public override bool Durative => true;
|
||||
public override double Duration => 12 + (1 * (Level - 1));
|
||||
|
||||
private double 系数 => 0.5 + 0.5 * (Skill.Level - 1);
|
||||
private double 伤害加成 => 系数 * Skill.Character?.AGI ?? 0;
|
||||
private bool 首次伤害 { get; set; } = true;
|
||||
private bool 破隐一击 { get; set; } = false;
|
||||
|
||||
public override void OnEffectGained(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
DispelledType = DispelledType.CannotBeDispelled;
|
||||
Skill.IsInEffect = true;
|
||||
AddEffectTypeToCharacter(character, [EffectType]);
|
||||
character.ExSPD += 100;
|
||||
character.ExCritRate += 0.08;
|
||||
GamingQueue?.InterruptCasting(character);
|
||||
}
|
||||
|
||||
public override void OnEffectLost(HookContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character) return;
|
||||
Skill.IsInEffect = false;
|
||||
if (!破隐一击)
|
||||
{
|
||||
// 在没有打出破隐一击的情况下,恢复角色状态
|
||||
RemoveEffectTypesFromCharacter(character);
|
||||
DispelledType = DispelledType.Weak;
|
||||
}
|
||||
character.ExSPD -= 100;
|
||||
character.ExCritRate -= 0.08;
|
||||
}
|
||||
|
||||
public override AlterActualDamageResult AlterActualDamageAfterCalculation(DamageContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character character || ctx.Enemy is not Character enemy) return default;
|
||||
double damage = ctx.Damage;
|
||||
bool isNormalAttack = ctx.IsNormalAttack;
|
||||
DamageType damageType = ctx.DamageType;
|
||||
MagicType magicType = ctx.MagicType;
|
||||
DamageResult damageResult = ctx.DamageResult;
|
||||
Dictionary<Effect, double> totalDamageBonus = ctx.TotalDamageBonus;
|
||||
if (character == Skill.Character && (damageResult == DamageResult.Normal || damageResult == DamageResult.Critical) && 首次伤害)
|
||||
{
|
||||
首次伤害 = false;
|
||||
破隐一击 = true;
|
||||
RemoveEffectTypesFromCharacter(character);
|
||||
double d = 伤害加成;
|
||||
WriteLine($"[ {character} ] 触发了疾风步破隐一击,获得了 [ {d:0.##} ] 点伤害加成!");
|
||||
DispelledType = DispelledType.Weak;
|
||||
return new AlterActualDamageResult { DamageDelta = d };
|
||||
|
||||
}
|
||||
return default;
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
if (!caster.Effects.Contains(this))
|
||||
{
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType);
|
||||
首次伤害 = true;
|
||||
破隐一击 = false;
|
||||
RemainDuration = Duration;
|
||||
caster.Effects.Add(this);
|
||||
OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.石化之矢;
|
||||
public override string Name => "石化之矢";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 80;
|
||||
public override double CD => 35;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
|
||||
public 石化之矢(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 45, 0.075, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Petrify, true, 4, 0, 1, 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.破邪显正;
|
||||
public override string Name => "破邪显正";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 70;
|
||||
public override double CD => 26;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override int CanSelectTargetCount => 5;
|
||||
|
||||
public 破邪显正(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 40, 40, 0.065, 0.03, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.神圣祈祷;
|
||||
public override string Name => "神圣祈祷";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 70;
|
||||
public override double CD => 60;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 2;
|
||||
|
||||
public 神圣祈祷(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 施加持续性强驱散(this, durative: true, duration: 12, levelGrowth: 3));
|
||||
Effects.Add(new 施加概率增益(this, EffectType.HealOverTime, true, 12, 0, 3, 1, 0, false, 10.0, 0.0, 8.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.精准射击;
|
||||
public override string Name => "精准射击";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 65;
|
||||
public override double CD => 24;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 精准射击(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 70, 55, 0.095, 0.045, DamageType.Physical));
|
||||
Effects.Add(new 打断施法(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.绝影;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 18;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override int CanSelectTargetRange => 1;
|
||||
public override SkillRangeType SkillRangeType => SkillRangeType.LinePass;
|
||||
|
||||
public 绝影(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 70, 55, 0.095, 0.045, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Delay, true, 15, 0, 0, 1, 0, 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)SkillID.绞丝棍;
|
||||
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 EPCost => 45;
|
||||
// 平衡调整(2026-09-22):CD 12 → 20(战技区间 18–45)
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 绞丝棍(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
// 调整:L6 基础值 425→385、系数 35%→32%,实测 1.28×普攻 压至 ≤1.20
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 70, 63, 0.07, 0.05, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.胧;
|
||||
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 EPCost => 60;
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 胧(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 60, 45, 0.065, 0.035, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Cripple, false, 0, 1, 0, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.落叶;
|
||||
public override string Name => "落叶";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 55;
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
|
||||
public 落叶(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 45, 0.08, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Delay, true, 10, 0, 1.5, 0.85, 0.03, 0.3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.PassiveEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 螺旋之刃 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.螺旋之刃;
|
||||
public override string Name => "螺旋之刃";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 40;
|
||||
public override double CD => 25;
|
||||
public override double HardnessTime { get; set; } = 6;
|
||||
|
||||
public 螺旋之刃(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
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.TargetDescription()}的普通攻击和技能的硬直时间、当前行动等待时间延长 {基础迟滞 * 100:0.##}%;" +
|
||||
$"{额外概率 * 100:0.##}% 概率额外再延长 {额外迟滞 * 100:0.##}%(合计最高 {(基础迟滞 + 额外迟滞) * 100:0.##}%)。持续时间:{持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}。";
|
||||
public override string DispelDescription => "被驱散性:需弱驱散";
|
||||
public override string ExemptionDescription => $"迟滞{SkillSet.GetExemptionDescription(EffectType.Slow)}";
|
||||
public override EffectType EffectType => EffectType.Slow;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
public override bool IsDebuff => true;
|
||||
public override bool ExemptDuration => true;
|
||||
|
||||
/// <summary>
|
||||
/// 必定命中的迟滞比例:10% + 2%/级(Lv1 10% → Lv6 20%)
|
||||
/// </summary>
|
||||
private double 基础迟滞 => Level > 0 ? 0.1 + 0.02 * (Level - 1) : 0.1;
|
||||
|
||||
/// <summary>
|
||||
/// 额外迟滞的触发概率:20% + 5%/级(Lv1 20% → Lv6 45%)
|
||||
/// </summary>
|
||||
private double 额外概率 => Level > 0 ? 0.2 + 0.05 * (Level - 1) : 0.2;
|
||||
|
||||
/// <summary>
|
||||
/// 额外迟滞的固定比例:20%(Lv6 合计最高 40%)
|
||||
/// </summary>
|
||||
private double 额外迟滞 => 0.2;
|
||||
|
||||
private double 持续时间 => Level > 0 ? 12 + 2 * (Level - 1) : 12;
|
||||
|
||||
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;
|
||||
|
||||
double percent = 基础迟滞;
|
||||
bool extra = Random.NextDouble() < 额外概率;
|
||||
if (extra) percent += 额外迟滞;
|
||||
|
||||
迟滞 e = new(Skill, caster, true, 持续时间, 0, percent);
|
||||
if (CheckExemption(caster, target, e)) continue;
|
||||
|
||||
WriteLine($"[ {caster} ] 对 [ {target} ] 造成了迟滞!普通攻击和技能的硬直时间、当前行动等待时间延长了 {percent * 100:0.##}%!" +
|
||||
(extra ? $"(额外触发 {额外迟滞 * 100:0.##}%)" : "") +
|
||||
$"持续时间:{持续时间:0.##} {GameplayEquilibriumConstant.InGameTime}!");
|
||||
|
||||
target.Effects.Add(e);
|
||||
e.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, e.EffectType);
|
||||
e.ApplyChange(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.血腥旋转;
|
||||
public override string Name => "血腥旋转";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 75;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 血腥旋转(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 50, 45, 0.08, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Cripple, false, 0, 1, 0, 0.3, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
using OshimaBot.Content.Effects.SkillEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 跳跃点射 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.跳跃点射;
|
||||
public override string Name => "跳跃点射";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 70;
|
||||
public override double CD => 26;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 跳跃点射(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 65, 55, 0.095, 0.045, DamageType.Physical));
|
||||
Effects.Add(new 跳跃点射破甲特效(this));
|
||||
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.TargetDescription()}的物理护甲降低 {破甲比例 * 100:0.##}%,持续 2 回合。";
|
||||
public override string DispelDescription => "被驱散性:需强驱散";
|
||||
public override string ExemptionDescription => $"物理护甲降低{SkillSet.GetExemptionDescription(EffectType.Weaken)}";
|
||||
public override EffectType EffectType => EffectType.Weaken;
|
||||
public override DispelledType DispelledType => DispelledType.Strong;
|
||||
public override bool IsDebuff => true;
|
||||
|
||||
private double 破甲比例 => Level > 0 ? 0.7 + 0.1 * (Level - 1) : 0.7;
|
||||
|
||||
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;
|
||||
WriteLine($"[ {target} ] 的物理护甲降低了 {破甲比例 * 100:0.##}%!");
|
||||
ExDEF2 def = new(Skill, new() { { "exdef", -破甲比例 } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 2,
|
||||
IsDebuff = true,
|
||||
EffectType = EffectType.Weaken,
|
||||
DispelledType = DispelledType.Strong
|
||||
};
|
||||
target.Effects.Add(def);
|
||||
def.OnEffectGained(new HookContext(GamingQueue, target));
|
||||
GamingQueue?.AddApplyEffects(target, EffectType.Weaken);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.PrefabricatedEntity;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 【转换战斗天赋】战技:战斗内切换到另一已学战斗天赋
|
||||
/// <para>继承核心库预制基类 <see cref="SwitchCombatTalentSkill"/>,本类只提供编号与表现参数;
|
||||
/// 技能类型(战技)与决策点 / 配额行为沿用核心库既有逻辑,不做改动</para>
|
||||
/// </summary>
|
||||
public class 转换战斗天赋 : SwitchCombatTalentSkill
|
||||
{
|
||||
public override long Id => (long)SkillID.转换战斗天赋;
|
||||
public override string Name => "转换战斗天赋";
|
||||
public override string Description => "战斗内切换到另一已学的战斗天赋,取消当前生效的天赋;目标定位未指定时自动切到当前未激活的第一个已学天赋。";
|
||||
public override double EPCost => 0;
|
||||
public override double CD => 3;
|
||||
public override double HardnessTime { get; set; } = 2;
|
||||
|
||||
/// <summary>
|
||||
/// 创建【转换战斗天赋】战技实例
|
||||
/// </summary>
|
||||
/// <param name="character">所属角色(装配时由挂载流程赋值)</param>
|
||||
/// <param name="targetRoleType">目标定位;null 时由内核自动选择当前未激活的已学天赋</param>
|
||||
public 转换战斗天赋(Character? character = null, RoleType? targetRoleType = null) : base(character)
|
||||
{
|
||||
TargetRoleType = targetRoleType;
|
||||
CanSelectSelf = true;
|
||||
CanSelectEnemy = false;
|
||||
CanSelectTeammate = false;
|
||||
CanSelectTargetRange = 0;
|
||||
IsNonDirectional = true;
|
||||
SelectIncludeCharacterGrid = false;
|
||||
AllowSelectNoCharacterGrid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using FunGame.Core.Api;
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
/// <summary>
|
||||
/// 战技 · 节奏型【过载】—— 用生命换决策点
|
||||
/// <para/>设计意图:本项目首次把「续航」换算成「节奏」。决策点的常规来源只有每回合恢复
|
||||
/// (`max(1, Max/2)`),本技能给出一条**主动透支**的获取途径:立刻用当前生命换一次行动机会。
|
||||
/// <para/>效果:消耗自身当前生命的 {生命消耗比例}(**保底至少剩 1 点生命,不会自杀**),自身 +3 决策点。
|
||||
/// <para/>标尺(战技):EP 40–80 → 50|CD 18–45 → 45|硬直 7–10 → 8;无伤害、无控制,不占控制点预算。
|
||||
/// <para/>强度依据:+3 决策点按 DP→行动转换率(约 1:5)折算 ≈ +0.6 次行动 —— 代价是 15% 当前生命。
|
||||
/// </summary>
|
||||
public class 过载 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.过载;
|
||||
public override string Name => "过载";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override double EPCost => 50;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override int CanSelectTargetCount => 1;
|
||||
|
||||
public 过载(Character? character = null) : base(SkillType.Skill, 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 => $"消耗自身当前生命值的 {生命消耗比例 * 100:0.##}%(至少保留 1 点生命),立即获得 {补充量} 点决策点。";
|
||||
|
||||
private const double 生命消耗比例 = 0.15;
|
||||
private const int 补充量 = 3;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
if (GamingQueue is null) return;
|
||||
// 保底:本次消耗不会把施法者打死(最多扣到剩 1 点)
|
||||
double cost = Math.Min(caster.HP * 生命消耗比例, Math.Max(0, caster.HP - 1));
|
||||
if (cost > 0) caster.HP -= cost;
|
||||
if (!GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) || dp is null)
|
||||
{
|
||||
WriteLine($"[ {caster} ] 发动过载,消耗了 {cost:0.##} 点生命,但决策点未就绪。");
|
||||
return;
|
||||
}
|
||||
int before = dp.CurrentDecisionPoints;
|
||||
dp.CurrentDecisionPoints = Math.Min(before + 补充量, dp.MaxDecisionPoints);
|
||||
int actual = dp.CurrentDecisionPoints - before;
|
||||
string tail = actual < 补充量 ? $"(决策点接近上限,溢出 {补充量 - actual} 点未生效)" : "";
|
||||
WriteLine($"[ {caster} ] 发动过载,消耗 {cost:0.##} 点生命换取 {actual} 点决策点({before} → {dp.CurrentDecisionPoints} / {dp.MaxDecisionPoints}){tail}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.金刚击;
|
||||
public override string Name => "金刚击";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => Effects.Count > 0 ? Effects.First().DispelDescription : "";
|
||||
public override string ExemptionDescription => Effects.Count > 0 ? Effects.First(e => e is 打断施法).ExemptionDescription : "";
|
||||
public override double EPCost => 60;
|
||||
public override double CD => 20;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 金刚击(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 65, 65, 0.09, 0.04, DamageType.Physical));
|
||||
Effects.Add(new 打断施法(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.镜花水月;
|
||||
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 double EPCost => 70;
|
||||
public override double CD => 40;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 镜花水月(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
Effects.Add(new 施加免疫(this, ImmuneType.All, false, 0, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using FunGame.Core.Model.Framework;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 闪现 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.闪现;
|
||||
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 EPCost => 25;
|
||||
public override double CD => 35 - 1.5 * Level;
|
||||
public override double HardnessTime { get; set; } = 3;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override int CanSelectTargetRange => 0;
|
||||
public override bool SelectIncludeCharacterGrid => false;
|
||||
public override bool AllowSelectNoCharacterGrid => true;
|
||||
|
||||
public 闪现(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
IsNonDirectional = true;
|
||||
CastRange = 9;
|
||||
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 => $"立即将角色传送到范围内的任意一个没有被角色占据的指定地点,并附赠一次战技的决策点配额。";
|
||||
public override string DispelDescription => "";
|
||||
|
||||
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;
|
||||
if (GamingQueue?.Map is GameMap map && grids.Count > 0)
|
||||
{
|
||||
map.CharacterMove(caster, map.GetCharacterCurrentGrid(caster), grids[0]);
|
||||
}
|
||||
if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
||||
{
|
||||
dp.AddTempActionQuota(this, CharacterActionType.CastSkill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.陀螺舞;
|
||||
public override string Name => "陀螺舞";
|
||||
public override string Description => Effects.Count > 0 ? 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 EPCost => 60;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 10;
|
||||
public override bool CanSelectSelf => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
public override int CanSelectTargetCount => 3;
|
||||
|
||||
public 陀螺舞(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Taunt, false, 0, 2, 0, 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.雷神脚;
|
||||
public override string Name => "雷神脚";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 75;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
public override int CanSelectTargetCount => 4;
|
||||
|
||||
public 雷神脚(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 5;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 55, 50, 0.085, 0.04, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.雷索吸缚;
|
||||
public override string Name => "雷索吸缚";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override string DispelDescription => "被驱散性:愤怒需强驱散,气绝需强驱散";
|
||||
public override double EPCost => 55;
|
||||
public override double CD => 28;
|
||||
public override double HardnessTime { get; set; } = 9;
|
||||
|
||||
public 雷索吸缚(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
ExemptionDescription = $"愤怒{SkillSet.GetExemptionDescription(EffectType.Taunt)}\r\n气绝{SkillSet.GetExemptionDescription(EffectType.Bleed)}";
|
||||
CastRange = 4;
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Taunt, false, 0, 2, 0, 1, 0));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Bleed, true, 6, 0, 1.5, 0.3, 0.03, false, 10.0, 0.0, 6.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.霸王疾风;
|
||||
public override string Name => "霸王疾风";
|
||||
public override string Description => Effects.Count > 0 ? string.Join("", Effects.Select(e => e.Description)) : "";
|
||||
public override double EPCost => 60;
|
||||
public override double CD => 22;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 霸王疾风(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 4;
|
||||
// 调整:L6 基础值 435→385(同时解除「基础值顶格 + 系数顶格」的双顶格)
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 85, 60, 0.12, 0.06, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)SkillID.风之鞭;
|
||||
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 EPCost => 80;
|
||||
public override double CD => 25;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
public override int CanSelectTargetCount => 5;
|
||||
|
||||
public 风之鞭(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
CastRange = 6;
|
||||
Effects.Add(new 基于攻击力的伤害_带基础伤害(this, 45, 50, 0.09, 0.03, DamageType.Physical));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using FunGame.Core.Entity;
|
||||
using FunGame.Core.Library.Constant;
|
||||
using FunGame.Core.Model.EffectContext;
|
||||
using OshimaBot.Content.Effects.OpenEffects;
|
||||
|
||||
namespace OshimaBot.Content.Skills
|
||||
{
|
||||
public class 风花阵 : Skill
|
||||
{
|
||||
public override long Id => (long)SkillID.风花阵;
|
||||
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 EPCost => 55;
|
||||
public override double CD => 45;
|
||||
public override double HardnessTime { get; set; } = 7;
|
||||
public override bool CanSelectSelf => true;
|
||||
public override bool CanSelectEnemy => false;
|
||||
public override bool CanSelectTeammate => false;
|
||||
|
||||
public 风花阵(Character? character = null) : base(SkillType.Skill, 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 => $"进入风花阵:提升自身 {攻击提升 * 100:0.##}% 攻击力,但物理护甲降低 {护甲降低 * 100:0.##}%,持续 {持续回合} 回合。";
|
||||
public override string DispelDescription => "被驱散性:可弱驱散";
|
||||
public override EffectType EffectType => EffectType.DamageBoost;
|
||||
public override DispelledType DispelledType => DispelledType.Weak;
|
||||
|
||||
private double 攻击提升 => Level > 0 ? 0.45 + 0.08 * (Level - 1) : 0.45;
|
||||
private double 护甲降低 => Level > 0 ? 0.3 + 0.05 * (Level - 1) : 0.3;
|
||||
private int 持续回合 => 3;
|
||||
|
||||
public override void OnSkillCasted(SkillCastContext ctx)
|
||||
{
|
||||
if (ctx.Trigger is not Character caster) return;
|
||||
WriteLine($"[ {caster} ] 摆出了风花阵,攻击力提升但物理护甲降低了!");
|
||||
ExATK2 atk = new(Skill, new() { { "exatk", 攻击提升 } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 持续回合,
|
||||
EffectType = EffectType.DamageBoost,
|
||||
DispelledType = DispelledType.Weak
|
||||
};
|
||||
caster.Effects.Add(atk);
|
||||
atk.OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.DamageBoost);
|
||||
ExDEF2 def = new(Skill, new() { { "exdef", -护甲降低 } }, caster)
|
||||
{
|
||||
Name = Name,
|
||||
Durative = false,
|
||||
Duration = 0,
|
||||
DurationTurn = 持续回合,
|
||||
IsDebuff = true,
|
||||
EffectType = EffectType.Weaken,
|
||||
DispelledType = DispelledType.Weak
|
||||
};
|
||||
caster.Effects.Add(def);
|
||||
def.OnEffectGained(new HookContext(GamingQueue, caster));
|
||||
GamingQueue?.AddApplyEffects(caster, EffectType.Weaken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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)SkillID.魔眼;
|
||||
public override string Name => "魔眼";
|
||||
public override string Description => string.Join("", Effects.Select(e => e.Description));
|
||||
public override string DispelDescription => "被驱散性:迟滞可弱驱散,混乱需强驱散";
|
||||
public override double EPCost => 65;
|
||||
public override double CD => 24;
|
||||
public override double HardnessTime { get; set; } = 8;
|
||||
|
||||
public 魔眼(Character? character = null) : base(SkillType.Skill, character)
|
||||
{
|
||||
ExemptionDescription = $"迟滞{SkillSet.GetExemptionDescription(EffectType.Delay)}\r\n混乱{SkillSet.GetExemptionDescription(EffectType.Confusion)}";
|
||||
CastRange = 4;
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Delay, false, 0, 3, 0, 1, 0, 0.5));
|
||||
Effects.Add(new 施加概率负面(this, EffectType.Confusion, false, 0, 2, 0, 0.2, 0.03));
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user