Reject self targeting battle intents

This commit is contained in:
2026-07-05 13:27:20 +09:00
parent e9dbe404ff
commit 68960d6fd7
2 changed files with 2 additions and 0 deletions

View File

@@ -210,6 +210,7 @@ function isAttackIntentArray(value: unknown, options: BattleSaveValidationOption
isRecord(intent) &&
typeof intent.attackerId === 'string' &&
typeof intent.targetId === 'string' &&
intent.attackerId !== intent.targetId &&
isKnownUnitId(intent.attackerId, options) &&
isKnownUnitId(intent.targetId, options)
)