From 030ef179e8f2159242cf3d65c02befc29825ff4b Mon Sep 17 00:00:00 2001 From: milimoe Date: Sat, 6 Sep 2025 19:34:20 +0800 Subject: [PATCH] =?UTF-8?q?ISkill=20=E6=B7=BB=E5=8A=A0=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=8F=96=E7=9A=84=E7=9B=AE=E6=A0=87=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=9B=E9=A1=BA=E5=BA=8F=E8=A1=A8=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=92=8C=E7=A1=AC=E7=9B=B4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Skill/NormalAttack.cs | 16 ++++++++++++++++ Entity/Skill/Skill.cs | 17 +++++++++++++++++ Interface/Entity/Typical/ISkill.cs | 8 ++++++++ Model/GamingQueue.cs | 24 +++++++++--------------- 4 files changed, 50 insertions(+), 15 deletions(-) diff --git a/Entity/Skill/NormalAttack.cs b/Entity/Skill/NormalAttack.cs index 1cf8c98..25f3af3 100644 --- a/Entity/Skill/NormalAttack.cs +++ b/Entity/Skill/NormalAttack.cs @@ -273,6 +273,22 @@ namespace Milimoe.FunGame.Core.Entity return selectable; } + /// + /// 实际可选取的目标数量 + /// + public int RealCanSelectTargetCount(List enemys, List teammates) + { + int count = CanSelectTargetCount; + if (SelectAllTeammates) + { + return teammates.Count + 1; + } + if (SelectAllEnemies) + { + return enemys.Count; + } + return count; + } /// /// 选取普攻目标 diff --git a/Entity/Skill/Skill.cs b/Entity/Skill/Skill.cs index 01c8675..65c315c 100644 --- a/Entity/Skill/Skill.cs +++ b/Entity/Skill/Skill.cs @@ -377,6 +377,23 @@ namespace Milimoe.FunGame.Core.Entity return selectable; } + /// + /// 实际可选取的目标数量 + /// + public int RealCanSelectTargetCount(List enemys, List teammates) + { + int count = CanSelectTargetCount; + if (SelectAllTeammates) + { + return teammates.Count + 1; + } + if (SelectAllEnemies) + { + return enemys.Count; + } + return count; + } + /// /// 选取技能目标 /// diff --git a/Interface/Entity/Typical/ISkill.cs b/Interface/Entity/Typical/ISkill.cs index 4ac6619..8d1ce21 100644 --- a/Interface/Entity/Typical/ISkill.cs +++ b/Interface/Entity/Typical/ISkill.cs @@ -110,5 +110,13 @@ namespace Milimoe.FunGame.Core.Interface.Entity /// /// public List GetSelectableTargets(Character caster, List enemys, List teammates); + + /// + /// 实际可选取的目标数量 + /// + /// + /// + /// + public int RealCanSelectTargetCount(List enemys, List teammates); } } diff --git a/Model/GamingQueue.cs b/Model/GamingQueue.cs index c063a88..575a064 100644 --- a/Model/GamingQueue.cs +++ b/Model/GamingQueue.cs @@ -580,19 +580,12 @@ namespace Milimoe.FunGame.Core.Model { if (_queue.Count == 0) return null; - // 硬直时间为 0 的角色或预释放爆发技的角色先行动,取第一个 - Character? character = _queue.FirstOrDefault(c => c.CharacterState == CharacterState.PreCastSuperSkill); - if (character is null) + // 硬直时间为 0 的角色 + Character? character = null; + Character temp = _queue[0]; + if (_hardnessTimes[temp] == 0) { - Character temp = _queue[0]; - if (_hardnessTimes[temp] == 0) - { - character = temp; - } - } - else - { - _hardnessTimes[character] = 0; + character = temp; } if (character != null) @@ -1282,8 +1275,8 @@ namespace Milimoe.FunGame.Core.Model character.CharacterState == CharacterState.ActionRestricted || character.CharacterState == CharacterState.BattleRestricted) { - baseTime += 5; - WriteLine($"[ {character} ] {CharacterSet.GetCharacterState(character.CharacterState)},放弃行动将额外获得 5 {GameplayEquilibriumConstant.InGameTime}硬直时间!"); + baseTime += 3; + WriteLine($"[ {character} ] {CharacterSet.GetCharacterState(character.CharacterState)},放弃行动将额外获得 3 {GameplayEquilibriumConstant.InGameTime}硬直时间!"); } decided = true; WriteLine($"[ {character} ] 结束了回合!"); @@ -1305,7 +1298,7 @@ namespace Milimoe.FunGame.Core.Model } else { - if (baseTime == 0) baseTime += 10; + if (baseTime == 0) baseTime += 8; decided = true; WriteLine($"[ {character} ] 完全行动不能!"); } @@ -2228,6 +2221,7 @@ namespace Milimoe.FunGame.Core.Model Skill? skill = item.Skills.Active; if (skill != null) { + skill.GamingQueue = this; List targets = await SelectTargetsAsync(character, skill, enemys, teammates); if (targets.Count > 0) {