Fix combat depuis joueur

This commit is contained in:
sladecraven 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) { if (game.user.isGM) {
VadentisUtility.performAttack( combatData); VadentisUtility.performAttack( combatData);
} else { } else {
game.socket.emit("system.foundryvtt-vadentis", { name: "msg_attack", data: { combatData } } ); game.socket.emit("system.foundryvtt-vadentis", { name: "msg_attack", data: combatData } );
} }
} }
} else { } else {

View File

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

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-vadentis", "name": "foundryvtt-vadentis",
"title": "Vadentis", "title": "Vadentis",
"description": "Système Vadentis pour FoundryVTT", "description": "Système Vadentis pour FoundryVTT",
"version": "0.1.0", "version": "0.1.1",
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9", "compatibleCoreVersion": "0.7.9",