Méthode rollPossession pour attaque possession

- Ajout d'une méthode pour ouvrir le dialogue en mode possession
- gestion des information de possession
- fenêtre défense possession
- préparation des messages de tchat
This commit is contained in:
2025-12-01 00:51:44 +01:00
parent fd3f988a4f
commit 706aa657b1
15 changed files with 270 additions and 55 deletions

View File

@@ -53,19 +53,19 @@ export default class ChatRollResult {
prepareDisplay(roll) {
roll.done = roll.done ?? {}
roll.show = roll.show ?? {}
roll.show.chance = this.isAppelChancePossible(roll)
roll.show.encaissement = this.isShowEncaissement(roll)
roll.show.recul = this.getRecul(roll)
roll.show.maladresse = this.getMaladresse(roll)
roll.show.chance = this.$isAppelChancePossible(roll)
roll.show.encaissement = this.$isShowEncaissement(roll)
roll.show.recul = this.$getRecul(roll)
roll.show.maladresse = this.$getMaladresse(roll)
}
isAppelChancePossible(roll) {
$isAppelChancePossible(roll) {
return roll.active.actor.isPersonnage() &&
roll.rolled.isEchec &&
RdDCarac.isActionPhysique(roll.current.carac?.key)
}
isShowEncaissement(roll) {
$isShowEncaissement(roll) {
switch (roll.type.current) {
case ROLL_TYPE_DEFENSE:
return roll.rolled.isEchec
@@ -73,7 +73,7 @@ export default class ChatRollResult {
return false
}
getMaladresse(roll) {
$getMaladresse(roll) {
switch (roll.type.current) {
case ROLL_TYPE_DEFENSE:
if (roll.rolled.isETotal) {
@@ -91,7 +91,7 @@ export default class ChatRollResult {
return undefined
}
getRecul(roll, defender = roll.active.actor, attacker = roll.opponent?.actor) {
$getRecul(roll, defender = roll.active.actor, attacker = roll.opponent?.actor) {
switch (roll.type.current) {
case ROLL_TYPE_DEFENSE:
{
@@ -195,7 +195,6 @@ export default class ChatRollResult {
this.getCombat(reRoll)?.doRollDefense(reRoll, callbacks)
break
case ROLL_TYPE_ATTAQUE:
// TODO
this.getCombat(reRoll)?.doRollAttaque(reRoll, callbacks)
break
default: {