forked from public/foundryvtt-reve-de-dragon
Empoignade V2
This commit is contained in:
@@ -54,13 +54,27 @@ export class RollBasicParts {
|
||||
}
|
||||
}
|
||||
|
||||
static prepareDefense(attackerRoll) {
|
||||
if (!attackerRoll.passeArme) {
|
||||
attackerRoll.passeArme = foundry.utils.randomID(16);
|
||||
}
|
||||
return {
|
||||
ids: RollBasicParts.reverseIds(attackerRoll),
|
||||
active: attackerRoll.opponent,
|
||||
opponent: attackerRoll.active,
|
||||
attackerRoll: attackerRoll,
|
||||
passeArme: attackerRoll.passeArme,
|
||||
show: { encaissement: true }
|
||||
}
|
||||
}
|
||||
|
||||
static reverseIds(rollData) {
|
||||
return {
|
||||
sceneId: rollData.ids.sceneId,
|
||||
actorId: rollData.ids.opponentId,
|
||||
actorTokenId: rollData.ids.opponentTokenId,
|
||||
opponentId: rollData.ids.actorId,
|
||||
opponentTokenId: rollData.actorTokenId
|
||||
opponentTokenId: rollData.ids.actorTokenId
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user