From e9f6d5f4b9ada62a0f9592686f0ae65d91bda6e3 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Mon, 28 Jun 2021 18:31:46 +0200 Subject: [PATCH] #206 : Message si l'attaquant = defenser --- module/rdd-combat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 3f67425d..34ca5ec0 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -417,7 +417,11 @@ export class RdDCombat { else { const defender = target?.actor; const defenderTokenId = target?.data._id; - return this.create(attacker, defender, defenderTokenId, target) + if ( defender.data._id == attacker.data._id) { + ui.notifications.warn("Vous vous attaquez vous-même !!!!"); + } else { + return this.create(attacker, defender, defenderTokenId, target) + } } }