Fix combat depuis joueur

This commit is contained in:
2021-04-18 18:14:31 +02:00
parent 01465d6fa5
commit 4c1640bb31
3 changed files with 3 additions and 2 deletions

View File

@ -380,7 +380,7 @@ export class VadentisActor extends Actor {
if (game.user.isGM) {
VadentisUtility.performAttack( combatData);
} else {
game.socket.emit("system.foundryvtt-vadentis", { name: "msg_attack", data: { combatData } } );
game.socket.emit("system.foundryvtt-vadentis", { name: "msg_attack", data: combatData } );
}
}
} else {

View File

@ -85,6 +85,7 @@ export class VadentisUtility extends Entity {
static async performAttack( combatData) {
let attacker = game.actors.get(combatData.attackerActorId);
let defender = game.actors.get(combatData.targetActorId);
console.log("ATTACK !!", attacker, defender);
if( attacker && defender) {
let defense = defender.getDefenseScore();
let attaque = attacker.getAttaqueScore();