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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user