mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2026-01-19 22:18:25 +00:00
技能改动;修复BUG
This commit is contained in:
parent
326449345b
commit
f2dad7f1b7
@ -26,8 +26,8 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"造成伤害时会标记目标,攻击具有标记的敌人将对其造成眩晕 1 回合,并回收标记,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。";
|
public override string Description => $"造成伤害时会标记目标,攻击具有标记的敌人将对其造成战斗不能 1 回合,并回收标记,额外对该角色造成 {系数 * 100:0.##}% 最大生命值的物理伤害。";
|
||||||
public override string DispelDescription => "被驱散性:眩晕需强驱散,标记可弱驱散";
|
public override string DispelDescription => "被驱散性:战斗不能需强驱散,标记可弱驱散";
|
||||||
|
|
||||||
public double 系数 { get; set; } = 0.12;
|
public double 系数 { get; set; } = 0.12;
|
||||||
private bool 是否是嵌套伤害 = false;
|
private bool 是否是嵌套伤害 = false;
|
||||||
@ -45,23 +45,19 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记 && e.Source == character);
|
IEnumerable<Effect> effects = enemy.Effects.Where(e => e is 累积之压标记 && e.Source == character);
|
||||||
if (effects.FirstOrDefault() is 累积之压标记 e)
|
if (effects.FirstOrDefault() is 累积之压标记 e)
|
||||||
{
|
{
|
||||||
IEnumerable<Effect> effects2 = character.Effects.Where(e => e is 嗜血本能特效);
|
// 移除标记
|
||||||
if (effects2.FirstOrDefault() is 嗜血本能特效 e2)
|
enemy.Effects.Remove(e);
|
||||||
{
|
|
||||||
// 移除标记
|
|
||||||
enemy.Effects.Remove(e);
|
|
||||||
}
|
|
||||||
double 额外伤害 = enemy.MaxHP * 系数;
|
double 额外伤害 = enemy.MaxHP * 系数;
|
||||||
WriteLine($"[ {character} ] 发动了累积之压!将对 [ {enemy} ] 造成眩晕和额外伤害!");
|
WriteLine($"[ {character} ] 发动了累积之压!将对 [ {enemy} ] 造成战斗不能和额外伤害!");
|
||||||
// 眩晕
|
// 战斗不能
|
||||||
IEnumerable<Effect> effects3 = enemy.Effects.Where(e => e is 眩晕 && e.Skill == Skill);
|
IEnumerable<Effect> effects3 = enemy.Effects.Where(e => e is 战斗不能 && e.Skill == Skill);
|
||||||
if (effects3.Any())
|
if (effects3.Any())
|
||||||
{
|
{
|
||||||
effects3.First().RemainDurationTurn++;
|
effects3.First().RemainDurationTurn++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
眩晕 e3 = new(Skill, character, false, 0, 1);
|
战斗不能 e3 = new(Skill, character, false, 0, 1);
|
||||||
enemy.Effects.Add(e3);
|
enemy.Effects.Add(e3);
|
||||||
e3.OnEffectGained(enemy);
|
e3.OnEffectGained(enemy);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,8 +34,9 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"最大生命值减少 20%。破釜沉舟:生命值高于 40% 时,受到额外的 [ {高于40额外伤害下限}~{高于40额外伤害上限}% ] 伤害,获得 [ 累计所受伤害的 {高于40的加成下限}~{高于40的加成上限}% ] 伤害加成;生命值低于等于 40% 时,不会受到额外的伤害,并且获得 [ 累计受到的伤害 {低于40的加成下限}~{低于40的加成上限}% ] 的伤害加成。" +
|
public override string Description => $"最大生命值减少 20%。破釜沉舟:生命值高于 40% 时,受到额外的 [ {高于40额外伤害下限}~{高于40额外伤害上限}% ] 伤害,获得 [ 累计所受伤害的 {高于40的加成下限}~{高于40的加成上限}% ] 伤害加成;生命值低于等于 40% 时,不会受到额外的伤害,并且获得 [ 累计受到的伤害 {低于40的加成下限}~{低于40的加成上限}% ] 的伤害加成。" +
|
||||||
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##})" : "");
|
$"在没有受到任何伤害的时候,将获得 {常规伤害加成 * 100:0.##}% 伤害加成。通过累计受到伤害发动破釜沉舟时,目标的闪避检定获得 40% 的减值。" + (累计受到的伤害 > 0 ? $"(当前累计受到伤害:{累计受到的伤害:0.##})" : "");
|
||||||
|
|
||||||
|
private bool 已通过累计受到伤害发动破釜沉舟 = false;
|
||||||
private double 累计受到的伤害 = 0;
|
private double 累计受到的伤害 = 0;
|
||||||
private double 这次的伤害加成 = 0;
|
private double 这次的伤害加成 = 0;
|
||||||
private double 受到伤害之前的HP = 0;
|
private double 受到伤害之前的HP = 0;
|
||||||
@ -71,6 +72,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
if (character == Skill.Character)
|
if (character == Skill.Character)
|
||||||
{
|
{
|
||||||
|
已通过累计受到伤害发动破釜沉舟 = 累计受到的伤害 != 0;
|
||||||
这次的伤害加成 = 伤害加成(damage);
|
这次的伤害加成 = 伤害加成(damage);
|
||||||
WriteLine($"[ {character} ] 发动了破釜沉舟,获得了 {这次的伤害加成:0.##} 点伤害加成!");
|
WriteLine($"[ {character} ] 发动了破釜沉舟,获得了 {这次的伤害加成:0.##} 点伤害加成!");
|
||||||
累计受到的伤害 = 0;
|
累计受到的伤害 = 0;
|
||||||
@ -106,5 +108,20 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool BeforeEvadeCheck(Character actor, Character enemy, ref double throwingBonus)
|
||||||
|
{
|
||||||
|
if (已通过累计受到伤害发动破釜沉舟 && actor == Skill.Character)
|
||||||
|
{
|
||||||
|
已通过累计受到伤害发动破釜沉舟 = false;
|
||||||
|
throwingBonus -= 0.4;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnTurnEnd(Character character)
|
||||||
|
{
|
||||||
|
已通过累计受到伤害发动破釜沉舟 = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"基于普通攻击的目标选择器对目标发起 2 次普通攻击。若该回合已使用过普通攻击,则只会发起 1 次普通攻击;使用该技能后,该回合不再允许普通攻击。伤害特效可叠加;不受 [ 攻击受限 ] 状态的限制。";
|
public override string Description => $"基于普通攻击的目标选择器对目标发起 2 次普通攻击。双连击会占用 1 次普通攻击的决策点配额,当配额不足时,仅能发起 1 次普通攻击。伤害特效可叠加;不受 [ 攻击受限 ] 状态的限制。";
|
||||||
|
|
||||||
public 双连击特效(Skill skill) : base(skill)
|
public 双连击特效(Skill skill) : base(skill)
|
||||||
{
|
{
|
||||||
@ -39,14 +39,14 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
if (GamingQueue != null)
|
if (GamingQueue != null)
|
||||||
{
|
{
|
||||||
bool hasAttacked = false;
|
bool checkQuota = true;
|
||||||
if (GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
if (GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
||||||
{
|
{
|
||||||
hasAttacked = dp.ActionTypes.Contains(CharacterActionType.NormalAttack);
|
checkQuota = dp.CheckActionTypeQuota(CharacterActionType.NormalAttack);
|
||||||
dp.ActionTypes.Add(CharacterActionType.NormalAttack);
|
dp.AddActionType(CharacterActionType.NormalAttack, false);
|
||||||
}
|
}
|
||||||
caster.NormalAttack.Attack(GamingQueue, caster, targets);
|
caster.NormalAttack.Attack(GamingQueue, caster, targets);
|
||||||
if (!hasAttacked)
|
if (checkQuota)
|
||||||
{
|
{
|
||||||
caster.NormalAttack.Attack(GamingQueue, caster, targets);
|
caster.NormalAttack.Attack(GamingQueue, caster, targets);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using Milimoe.FunGame.Core.Entity;
|
using Milimoe.FunGame.Core.Entity;
|
||||||
using Milimoe.FunGame.Core.Library.Constant;
|
using Milimoe.FunGame.Core.Library.Constant;
|
||||||
|
using Milimoe.FunGame.Core.Model;
|
||||||
|
|
||||||
namespace Oshima.FunGame.OshimaModules.Skills
|
namespace Oshima.FunGame.OshimaModules.Skills
|
||||||
{
|
{
|
||||||
@ -25,7 +26,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
{
|
{
|
||||||
public override long Id => Skill.Id;
|
public override long Id => Skill.Id;
|
||||||
public override string Name => Skill.Name;
|
public override string Name => Skill.Name;
|
||||||
public override string Description => $"本回合内大幅提升移动距离。";
|
public override string Description => $"本回合内大幅提升移动距离,并附赠一次战技的决策点配额。移动距离提升:{移动距离提升} 格。";
|
||||||
public override string DispelDescription => "";
|
public override string DispelDescription => "";
|
||||||
public override EffectType EffectType => EffectType.Haste;
|
public override EffectType EffectType => EffectType.Haste;
|
||||||
public override bool Durative => false;
|
public override bool Durative => false;
|
||||||
@ -45,21 +46,24 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private int 本次提升 = 0;
|
||||||
|
|
||||||
public override void OnEffectGained(Character character)
|
public override void OnEffectGained(Character character)
|
||||||
{
|
{
|
||||||
Skill.IsInEffect = true;
|
Skill.IsInEffect = true;
|
||||||
character.ExMOV += 移动距离提升;
|
本次提升 = 移动距离提升;
|
||||||
|
character.ExMOV += 本次提升;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnEffectLost(Character character)
|
public override void OnEffectLost(Character character)
|
||||||
{
|
{
|
||||||
Skill.IsInEffect = false;
|
Skill.IsInEffect = false;
|
||||||
character.ExMOV -= 移动距离提升;
|
character.ExMOV -= 本次提升;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
public override void OnSkillCasted(Character caster, List<Character> targets, Dictionary<string, object> others)
|
||||||
{
|
{
|
||||||
|
本次提升 = 0;
|
||||||
if (!caster.Effects.Contains(this))
|
if (!caster.Effects.Contains(this))
|
||||||
{
|
{
|
||||||
GamingQueue?.LastRound.AddApplyEffects(caster, EffectType);
|
GamingQueue?.LastRound.AddApplyEffects(caster, EffectType);
|
||||||
@ -67,6 +71,10 @@ namespace Oshima.FunGame.OshimaModules.Skills
|
|||||||
caster.Effects.Add(this);
|
caster.Effects.Add(this);
|
||||||
OnEffectGained(caster);
|
OnEffectGained(caster);
|
||||||
}
|
}
|
||||||
|
if (GamingQueue != null && GamingQueue.CharacterDecisionPoints.TryGetValue(caster, out DecisionPoints? dp) && dp != null)
|
||||||
|
{
|
||||||
|
dp.AddTempActionQuota(CharacterActionType.CastSkill);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1378,7 +1378,6 @@ namespace Oshima.FunGame.OshimaServers.Service
|
|||||||
Item newItem = new 魔法卡礼包(type, box.Gifts[name]);
|
Item newItem = new 魔法卡礼包(type, box.Gifts[name]);
|
||||||
AddItemToUserInventory(user, newItem, false, true);
|
AddItemToUserInventory(user, newItem, false, true);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user