Reject self targeting battle intents
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user