Support des blurettes
On peut définir Blurette comme type d'entité. Pas de jet poour s'accorder aux blurettes.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { ChatUtility } from "./chat-utility.js";
|
||||
import { HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { ENTITE_INCARNE, ENTITE_NONINCARNE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
@ -457,7 +457,7 @@ export class RdDCombat {
|
||||
else {
|
||||
const defender = target?.actor;
|
||||
const defenderTokenId = target?.data._id;
|
||||
if ( defender.type == 'entite' && defender.data.data.definition.typeentite == 'nonincarne') {
|
||||
if ( defender.type == 'entite' && defender.data.data.definition.typeentite == ENTITE_NONINCARNE) {
|
||||
ui.notifications.warn("Vous ne pouvez pas cibler une entité non incarnée !!!!");
|
||||
} else {
|
||||
return this.create(attacker, defender, defenderTokenId, target)
|
||||
@ -799,7 +799,7 @@ export class RdDCombat {
|
||||
async _onAttaqueNormale(attackerRoll) {
|
||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||
|
||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntiteCauchemar());
|
||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntite());
|
||||
let defenderRoll = { attackerRoll: attackerRoll, passeArme: attackerRoll.passeArme, show: {} }
|
||||
attackerRoll.show = {
|
||||
cible: this.target ? this.defender.data.name : 'la cible',
|
||||
@ -1249,8 +1249,8 @@ export class RdDCombat {
|
||||
async accorderEntite(when = 'avant-encaissement') {
|
||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||
|| this.defender == undefined
|
||||
|| !this.defender.isEntiteCauchemar()
|
||||
|| this.defender.isEntiteCauchemarAccordee(this.attacker)) {
|
||||
|| !this.defender.isEntite([ENTITE_INCARNE])
|
||||
|| this.defender.isEntiteAccordee(this.attacker)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user