添加易伤

This commit is contained in:
milimoe 2025-07-03 22:37:59 +08:00
parent 03457b2244
commit e9ac754f6c
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
22 changed files with 579 additions and 149 deletions

View File

@ -220,4 +220,35 @@
/// </summary> /// </summary>
Active_End = 8999 Active_End = 8999
} }
public enum PassiveEffectID : long
{
= 4101,
= 4102,
= 4103,
= 4104,
= 4105,
= 4106,
= 4107,
= 4108,
= 4109,
= 4110,
= 4111,
= 4112,
= 4113,
= 4114,
= 4115,
= 4116,
= 4117,
= 4118,
= 4119,
= 4120,
= 4121,
= 4122,
= 4123,
= 4124,
= 4125,
= 4126,
= 4127
}
} }

View File

@ -0,0 +1,11 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : (nameof(), EffectType.Petrify, skill, sourceCharacter, durative, duration, durationTurn)
{
public override long Id => (long)PassiveEffectID.;
}
}

View File

@ -1,12 +1,13 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity; using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4113; public override long Id => (long)PassiveEffectID.;
public override string Name => "完全免疫"; public override string Name => "完全免疫";
public override string Description => $"此角色处于完全免疫状态,无法选中其作为普通攻击和技能的目标(自释放技能除外),免疫物理伤害和魔法伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于完全免疫状态,无法选中其作为普通攻击和技能的目标(自释放技能除外),免疫物理伤害和魔法伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.PhysicalImmune; public override EffectType EffectType => EffectType.PhysicalImmune;

View File

@ -0,0 +1,57 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => _name;
public override string Description => $"此角色被{Name}了,不能行动。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => _type;
public override DispelledType DispelledType => DispelledType.Strong;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly string _name;
private readonly EffectType _type;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (string name, EffectType type, Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
_name = name;
_type = type;
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectStatesToCharacter(character, [CharacterState.NotActionable]);
InterruptCasting(character, Source);
}
public override void OnEffectLost(Character character)
{
RemoveEffectStatesFromCharacter(character);
}
}
}

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4103; public override long Id => (long)PassiveEffectID.;
public override string Name => "封技"; public override string Name => "封技";
public override string Description => $"此角色被封技了,不能使用技能(魔法、战技和爆发技)。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色被封技了,不能使用技能(魔法、战技和爆发技)。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Silence; public override EffectType EffectType => EffectType.Silence;

View File

@ -0,0 +1,103 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "愤怒";
public override string Description => $"此角色处于愤怒状态,行动受限且失控,行动回合中无法自主行动,仅能对 [ {_targetCharacter} ] 发起普通攻击。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Taunt;
public override DispelledType DispelledType => DispelledType.Strong;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly Character _targetCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, Character targetCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_targetCharacter = targetCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void AlterSelectListBeforeAction(Character character, List<Character> enemys, List<Character> teammates, List<Skill> skills, Dictionary<Character, int> continuousKilling, Dictionary<Character, int> earnedMoney)
{
// 为了确保角色能够自动化行动,这里需要将角色设置为可行动
if (character.CharacterState == CharacterState.ActionRestricted)
{
GamingQueue?.SetCharactersToAIControl(true, false, character);
character.CharacterState = CharacterState.Actionable;
}
enemys.Clear();
teammates.Clear();
if (_targetCharacter.HP > 0)
{
enemys.Add(_targetCharacter);
}
}
public override CharacterActionType AlterActionTypeBeforeAction(Character character, CharacterState state, ref bool canUseItem, ref bool canCastSkill, ref double pUseItem, ref double pCastSkill, ref double pNormalAttack, ref bool forceAction)
{
forceAction = true;
if (_targetCharacter.HP > 0)
{
return CharacterActionType.NormalAttack;
}
// 如果目标已死亡,则放弃本回合行动,并在回合结束后自动移除愤怒状态
RemainDuration = 0;
RemainDurationTurn = 0;
return CharacterActionType.EndTurn;
}
public override void AfterDeathCalculation(Character death, Character? killer, Dictionary<Character, int> continuousKilling, Dictionary<Character, int> earnedMoney)
{
if (death == _targetCharacter)
{
// 如果目标死亡,则在下次时间流逝时自动移除愤怒状态
RemainDuration = 0;
RemainDurationTurn = 0;
}
}
public override void OnTurnEnd(Character character)
{
character.UpdateCharacterState();
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
GamingQueue?.SetCharactersToAIControl(true, false, character);
AddEffectStatesToCharacter(character, [CharacterState.ActionRestricted]);
AddEffectTypeToCharacter(character, [EffectType.Taunt]);
InterruptCasting(character, Source);
}
public override void OnEffectLost(Character character)
{
GamingQueue?.SetCharactersToAIControl(true, true, character);
RemoveEffectStatesFromCharacter(character);
RemoveEffectTypesFromCharacter(character);
}
}
}

View File

@ -1,12 +1,13 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity; using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4110; public override long Id => (long)PassiveEffectID.;
public override string Name => "技能免疫"; public override string Name => "技能免疫";
public override string Description => $"此角色处于技能免疫状态,无法选中其作为技能目标(自释放技能除外),并免疫来自技能的伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于技能免疫状态,无法选中其作为技能目标(自释放技能除外),并免疫来自技能的伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.SkilledImmune; public override EffectType EffectType => EffectType.SkilledImmune;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4104; public override long Id => (long)PassiveEffectID.;
public override string Name => "持续性弱驱散"; public override string Name => "持续性弱驱散";
public override string Description => $"此角色正在被持续性弱驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色正在被持续性弱驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.WeakDispelling; public override EffectType EffectType => EffectType.WeakDispelling;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4105; public override long Id => (long)PassiveEffectID.;
public override string Name => "持续性强驱散"; public override string Name => "持续性强驱散";
public override string Description => $"此角色正在被持续性强驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色正在被持续性强驱散。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.StrongDispelling; public override EffectType EffectType => EffectType.StrongDispelling;

View File

@ -0,0 +1,67 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "易伤";
public override string Description => $"此角色处于易伤状态,额外受到 {_exDamagePercent * 100:0.##}% {CharacterSet.GetDamageTypeName(_damageType)}。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Vulnerable;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly DamageType _damageType;
private readonly Character _targetCharacter;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly double _exDamagePercent;
public (Skill skill, Character targetCharacter, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1,
DamageType damageType = DamageType.Magical, double exDamagePercent = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_targetCharacter = targetCharacter;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_damageType = damageType;
_exDamagePercent = exDamagePercent;
}
public override double AlterActualDamageAfterCalculation(Character character, Character enemy, double damage, bool isNormalAttack, DamageType damageType, MagicType magicType, DamageResult damageResult, ref bool isEvaded, Dictionary<Effect, double> totalDamageBonus)
{
if (enemy == _targetCharacter && damageType == _damageType)
{
return damage * _exDamagePercent;
}
return 0;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectTypeToCharacter(character, [EffectType.Vulnerable]);
}
public override void OnEffectLost(Character character)
{
RemoveEffectTypesFromCharacter(character);
}
}
}

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4109; public override long Id => (long)PassiveEffectID.;
public override string Name => "气绝"; public override string Name => "气绝";
public override string Description => $"此角色处于气绝状态,行动受限并且每{GameplayEquilibriumConstant.InGameTime}流失 {(_isPercentage ? $"{_durationDamagePercent * 100:0.##}% [ {Damage:0.##} ]" : Damage.ToString("0.##"))} 点当前生命值,此生命流失效果不会导致角色死亡。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于气绝状态,行动受限并且每{GameplayEquilibriumConstant.InGameTime}流失 {(_isPercentage ? $"{_durationDamagePercent * 100:0.##}% [ {Damage:0.##} ]" : Damage.ToString("0.##"))} 点当前生命值,此生命流失效果不会导致角色死亡。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Bleed; public override EffectType EffectType => EffectType.Bleed;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4114; public override long Id => (long)PassiveEffectID.;
public override string Name => "混乱"; public override string Name => "混乱";
public override string Description => $"此角色处于混乱状态,行动受限且失控,行动回合中无法自主行动而是随机行动,在进行攻击指令时,可能会选取友方角色为目标。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于混乱状态,行动受限且失控,行动回合中无法自主行动而是随机行动,在进行攻击指令时,可能会选取友方角色为目标。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Confusion; public override EffectType EffectType => EffectType.Confusion;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4112; public override long Id => (long)PassiveEffectID.;
public override string Name => "物理免疫"; public override string Name => "物理免疫";
public override string Description => $"此角色处于物理免疫状态,免疫物理伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于物理免疫状态,免疫物理伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.PhysicalImmune; public override EffectType EffectType => EffectType.PhysicalImmune;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4106; public override long Id => (long)PassiveEffectID.;
public override string Name => "物理护盾"; public override string Name => "物理护盾";
public override string Description => $"此角色拥有物理护盾{CurrentShield}。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色拥有物理护盾{CurrentShield}。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Shield; public override EffectType EffectType => EffectType.Shield;

View File

@ -1,52 +1,11 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : (nameof(), EffectType.Stun, skill, sourceCharacter, durative, duration, durationTurn)
{ {
public override long Id => 4101; public override long Id => (long)PassiveEffectID.;
public override string Name => "眩晕";
public override string Description => $"此角色被眩晕了,不能行动。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Stun;
public override DispelledType DispelledType => DispelledType.Strong;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
public (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
AddEffectStatesToCharacter(character, [CharacterState.NotActionable]);
InterruptCasting(character, Source);
}
public override void OnEffectLost(Character character)
{
RemoveEffectStatesFromCharacter(character);
}
} }
} }

View File

@ -0,0 +1,11 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1) : (nameof(), EffectType.Petrify, skill, sourceCharacter, durative, duration, durationTurn)
{
public override long Id => (long)PassiveEffectID.;
}
}

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4102; public override long Id => (long)PassiveEffectID.;
public override string Name => "累积之压标记"; public override string Name => "累积之压标记";
public override string Description => $"此角色持有累积之压标记。来自:[ {Source} ]"; public override string Description => $"此角色持有累积之压标记。来自:[ {Source} ]";
public override EffectType EffectType => EffectType.Mark; public override EffectType EffectType => EffectType.Mark;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4108; public override long Id => (long)PassiveEffectID.;
public override string Name => "虚弱"; public override string Name => "虚弱";
public override string Description => $"此角色处于虚弱状态,伤害降低 {_damageReductionPercent * 100:0.##}%" + public override string Description => $"此角色处于虚弱状态,伤害降低 {_damageReductionPercent * 100:0.##}%" +
$"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%,治疗效果降低 {_healingReductionPercent * 100:0.##}%。来自:[ {Source} ] 的 [ {Skill.Name} ]"; $"物理护甲降低 {_DEFReductionPercent * 100:0.##}%,魔法抗性降低 {_MDFReductionPercent * 100:0.##}%,治疗效果降低 {_healingReductionPercent * 100:0.##}%。来自:[ {Source} ] 的 [ {Skill.Name} ]";

View File

@ -0,0 +1,65 @@
using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{
public class : Effect
{
public override long Id => (long)PassiveEffectID.;
public override string Name => "迟滞";
public override string Description => $"此角色处于迟滞状态,普通攻击和技能的硬直时间、当前行动等待时间延长 {_hardnessReductionPercent * 100:0.##}%。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Slow;
public override DispelledType DispelledType => DispelledType.Weak;
public override bool IsDebuff => true;
public override Character Source => _sourceCharacter;
public override bool Durative => _durative;
public override double Duration => _duration;
public override int DurationTurn => _durationTurn;
private readonly Character _sourceCharacter;
private readonly bool _durative;
private readonly double _duration;
private readonly int _durationTurn;
private readonly double _hardnessReductionPercent;
public (Skill skill, Character sourceCharacter, bool durative = false, double duration = 0, int durationTurn = 1, double healingReductionPercent = 0) : base(skill)
{
GamingQueue = skill.GamingQueue;
_sourceCharacter = sourceCharacter;
_durative = durative;
_duration = duration;
_durationTurn = durationTurn;
_hardnessReductionPercent = healingReductionPercent;
}
public override void AlterHardnessTimeAfterCastSkill(Character character, Skill skill, ref double baseHardnessTime, ref bool isCheckProtected)
{
baseHardnessTime *= 1 + _hardnessReductionPercent;
}
public override void AlterHardnessTimeAfterNormalAttack(Character character, ref double baseHardnessTime, ref bool isCheckProtected)
{
baseHardnessTime *= 1 + _hardnessReductionPercent;
}
public override void OnEffectGained(Character character)
{
if (_durative && RemainDuration == 0)
{
RemainDuration = Duration;
}
else if (RemainDurationTurn == 0)
{
RemainDurationTurn = DurationTurn;
}
GamingQueue?.ChangeCharacterHardnessTime(character, _hardnessReductionPercent, true, false);
AddEffectTypeToCharacter(character, [EffectType.Slow]);
}
public override void OnEffectLost(Character character)
{
RemoveEffectTypesFromCharacter(character);
}
}
}

View File

@ -1,12 +1,13 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Interface.Entity; using Milimoe.FunGame.Core.Interface.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4111; public override long Id => (long)PassiveEffectID.;
public override string Name => "魔法免疫"; public override string Name => "魔法免疫";
public override string Description => $"此角色处于魔法免疫状态,无法选中其作为魔法技能的目标(自释放魔法技能除外),并且免疫魔法伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色处于魔法免疫状态,无法选中其作为魔法技能的目标(自释放魔法技能除外),并且免疫魔法伤害。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.MagicalImmune; public override EffectType EffectType => EffectType.MagicalImmune;

View File

@ -1,11 +1,12 @@
using Milimoe.FunGame.Core.Entity; using Milimoe.FunGame.Core.Entity;
using Milimoe.FunGame.Core.Library.Constant; using Milimoe.FunGame.Core.Library.Constant;
using Oshima.FunGame.OshimaModules.Effects.OpenEffects;
namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects namespace Oshima.FunGame.OshimaModules.Effects.PassiveEffects
{ {
public class : Effect public class : Effect
{ {
public override long Id => 4107; public override long Id => (long)PassiveEffectID.;
public override string Name => "魔法护盾"; public override string Name => "魔法护盾";
public override string Description => $"此角色拥有魔法护盾{CurrentShield}。来自:[ {Source} ] 的 [ {Skill.Name} ]"; public override string Description => $"此角色拥有魔法护盾{CurrentShield}。来自:[ {Source} ] 的 [ {Skill.Name} ]";
public override EffectType EffectType => EffectType.Shield; public override EffectType EffectType => EffectType.Shield;

View File

@ -1,4 +1,9 @@
// 注:绝大多数技能名称来自《英雄传说 空之轨迹》 // 注:
// 爆发技增益效果通常不可驱散。
// 未注明友方·的增益技能均为自身,反之,可选取友方或者自身。特殊情况:友方不含自身等。
// 被动技能不可驱散,未说明作用对象时均为自身。
// 省略了作用目标的负面技能均为作用于敌方。(特殊地,减少硬直是增益)
// 技能名称来源:《英雄传说 空之轨迹》/《英雄联盟》/《DOTA2》
namespace Oshima.FunGame.OshimaModules.Skills namespace Oshima.FunGame.OshimaModules.Skills
{ {
/** /**
@ -47,7 +52,7 @@ namespace Oshima.FunGame.OshimaModules.Skills
* = · * = ·
* = · * = ·
* = · * = ·
* = MP和EP * =
* *
* · = ·() * · = ·()
* · = ·() * · = ·()
@ -130,49 +135,37 @@ namespace Oshima.FunGame.OshimaModules.Skills
* = * =
* = + * = +
* = * =
* = +
* = 2 * = 2
* = +() * = +()
* = 20%(+) * = (+)
* = ()30%(AI控制行动) * = ()(AI控制行动)
* =
* = * =
* = + * = +
* = ·() * = ·()
* = * =
* = +(++)
* = +(+)/(AI控制行动)/(+)
* = * =
* = + * = +
* = · * = ·
* = * =
* = + * = +
* = + * = +
* = ·+20%10010
* =
* = ·+ * = ·+
* = +()+ * = +()+
* = () * = ()
* = * =
* =
* = ·+ * = ·+
* = ·+++ * = ·+++
* = · * = ·
* = * = (+)
* = 20%(+)
* = ·+() * = ·+()
* = ·+() * = ·+()
* = 50%(AI控制行动) * = (AI控制行动)
* = * =
* =
* = +() * = +()
* = ·+() * = ·+()
* = · * = ·
* = +() * = +()
* = * =
* = ·100100
* =
* =
* = * =
* = +() * = +()
* = ·+ * = ·+
@ -180,21 +173,17 @@ namespace Oshima.FunGame.OshimaModules.Skills
* = * =
* = ++ * = ++
* = +(+) * = +(+)
* = 30%(+) * = (+)
* = * = ()(+)
* = ()30%(+) * = ·(AI控制行动)
* = ·20%(AI控制行动)
* = + * = +
* = * =
* = · * = ·
* = · * = ·
* = * =
* = * =
* = ·++ * =
* = * =
* = 10%
* = 10%
* = 50%
*/ */
public enum SkillID : long public enum SkillID : long
{ {
@ -204,73 +193,92 @@ namespace Oshima.FunGame.OshimaModules.Skills
= 2004, = 2004,
= 2005, = 2005,
= 2006, = 2006,
= 2007, = 2007,
= 2008, = 2008,
= 2009, = 2009,
= 2010, = 2010,
= 2011, = 2011,
= 2012, = 2012,
= 2013, = 2013,
= 2014, = 2014,
= 2015, = 2015,
= 2016, = 2016,
= 2017, = 2017,
= 2018, = 2018,
= 2019, = 2019,
= 2020, = 2020,
= 2021, = 2021,
= 2022, = 2022,
= 2023, = 2023,
= 2024, = 2024,
= 2025, = 2025,
= 2026, = 2026,
= 2027, = 2027,
= 2028, = 2028,
= 2029, = 2029,
= 2030, = 2030,
= 2031, = 2031,
= 2032, = 2032,
= 2033, = 2033,
= 2034, = 2034,
= 2035, = 2035,
= 2036, = 2036,
= 2037, = 2037,
= 2038, = 2038,
= 2039, = 2039,
= 2040, = 2040,
= 2041, = 2041,
= 2042, = 2042,
= 2043, = 2043,
= 2044, = 2044,
= 2045, = 2045,
= 2046, = 2046,
= 2047, = 2047,
= 2048, = 2048,
= 2049, = 2049,
= 2050, = 2050,
= 2051, = 2051,
= 2052, = 2052,
= 2053, = 2053,
= 2054, = 2054,
= 2055, = 2055
= 2056,
= 2057,
= 2058,
= 2059,
= 2060,
= 2061,
= 2062,
= 2063,
= 2064,
= 2065,
= 2066,
= 2067,
= 2068,
= 2069,
= 2070,
= 2071
} }
/**
* = +
* = +穿+CD
* = +CD
* =
* = +
* = 穿
* = 10010
* =
* = +
* =
* = +
* =
* = +
* =
* = +(++)
* = +(+)/(AI控制行动)/(+)
* = ·+20%10010
* = ()
* =
* =
* = (+)
* = ·100100
* = +
* =
* =
* = ·++
* =
* =
* =
* =
* =
* =
* = 100%
*/
public enum SuperSkillID : long public enum SuperSkillID : long
{ {
= 3001, = 3001,
@ -285,8 +293,78 @@ namespace Oshima.FunGame.OshimaModules.Skills
= 3010, = 3010,
= 3011, = 3011,
= 3012, = 3012,
= 3013,
= 3014,
= 3015,
= 3016,
= 3017,
= 3018,
= 3019,
= 3020,
= 3021,
= 3022,
= 3023,
= 3024,
= 3025,
= 3026,
= 3027,
= 3028,
= 3029,
= 3030,
= 3031,
= 3032,
= 3033
} }
/**
* META马 =
* =
* =
* = CD
* = ++
* =
* =
* =
* =
* =
* =
* =
* =
* =
* =
* = 3使
* = 3/
* =
* =
* =
* =
* = 3/
* =
* =
* =
* =
* =
* = 3/
* =
* =
* =
* =
* =
* =
* =
* =
* =
* =
* = 3
* =
* =
* =
* =
* = 使
* =
* =
* =
*/
public enum PassiveID : long public enum PassiveID : long
{ {
META马 = 4001, META马 = 4001,
@ -301,6 +379,41 @@ namespace Oshima.FunGame.OshimaModules.Skills
= 4010, = 4010,
= 4011, = 4011,
= 4012, = 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
} }
public enum ItemPassiveID : long public enum ItemPassiveID : long