#16 Gestion des critiques en combat

This commit is contained in:
sladecraven 2020-11-14 21:53:46 +01:00
parent e59b793d34
commit 01fe858b8c
2 changed files with 8 additions and 3 deletions

View File

@ -189,7 +189,12 @@ export class RdDActor extends Actor {
}
} else { // This is the attack roll!
if (rolled.isSuccess) {
rollData.domArmePlusDom = this._calculBonusDommages(rollData.selectedCarac, rollData.arme, rollData.particuliereAttaque == "force" );
// Message spécial pour la rapidité, qui reste difficile à gérer automatiquement
if ( rollData.particuliereAttaque == 'rapidite') {
ChatMessage.create( { contet: "Vous avez attaqué en Rapidité. Ce cas n'est pas géré autmatiquement, donc suivez les directives de votre MJ pour gérer ce cas.",
whisper: ChatMessage.getWhisperRecipients( this.name ) } );
}
rollData.domArmePlusDom = this._calculBonusDommages(rollData.selectedCarac, rollData.arme, rollData.particuliereAttaque == 'force' );
rollData.degats = new Roll("2d10").roll().total + rollData.domArmePlusDom;
rollData.loc = RdDUtility.getLocalisation();
for (let target of game.user.targets) {

View File

@ -549,7 +549,7 @@ export class RdDUtility {
event.preventDefault();
let defenderActor = game.actors.get(event.currentTarget.attributes['data-defenderid'].value );
let rollData = defenderActor.currentRollData;
console.log("Esquive !", rollData, defenderActor);
//console.log("Esquive !", rollData, defenderActor);
defenderActor.esquiverAttaque( rollData );
});
@ -558,7 +558,7 @@ export class RdDUtility {
let attackerActor = game.actors.get(event.currentTarget.attributes['data-attackerid'].value );
let rollData = attackerActor.currentRollData;
rollData.particuliereAttaque = game.actors.get(event.currentTarget.attributes['data-mode'].value );
console.log("Particulère !", rollData);
//console.log("Particulère !", rollData);
attackerActor.continueRoll( rollData );
});