Skip to content

Commit 68fbae3

Browse files
committed
Fix weapon skills bug: prevent casting without weapon
1 parent 7d8dc2b commit 68fbae3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/GameLogic/PlayerActions/Skills/AreaSkillAttackAction.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ private async ValueTask PerformAutomaticHitsAsync(Player player, ushort extraTar
168168
return;
169169
}
170170

171+
// Skills that move attacker to target (e.g., Twisting Slash, Death Stab) require a weapon
172+
if (skill.MovesToTarget && player.Inventory?.GetItem(InventoryConstants.RightHandSlot) is null)
173+
{
174+
return;
175+
}
176+
171177
if (player.Attributes[Stats.AmmunitionConsumptionRate] > player.Attributes[Stats.AmmunitionAmount])
172178
{
173179
return;

0 commit comments

Comments
 (0)