#206 : Message si l'attaquant = defenser

This commit is contained in:
sladecraven 2021-06-28 18:31:46 +02:00
parent f27a73ef66
commit e9f6d5f4b9

View File

@ -417,7 +417,11 @@ export class RdDCombat {
else { else {
const defender = target?.actor; const defender = target?.actor;
const defenderTokenId = target?.data._id; 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)
}
} }
} }