Merge v1.5
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";
|
||||
@ -320,7 +320,7 @@ export class RdDCombatManager extends Combat {
|
||||
initOffset = 10;
|
||||
caracForInit = combatant.actor.getReveActuel();
|
||||
initInfo = "Possession"
|
||||
} else if (action.name == 'autre') {
|
||||
} else if (action.action == 'autre') {
|
||||
initOffset = 2;
|
||||
initInfo = "Autre Action"
|
||||
} else if (action.action == 'haut-reve') {
|
||||
@ -455,9 +455,9 @@ export class RdDCombat {
|
||||
: "Vous devez choisir une cible à attaquer!");
|
||||
}
|
||||
else {
|
||||
const defender = target?.actor
|
||||
const defenderTokenId = target?.id
|
||||
if ( defender.type == 'entite' && defender.system.definition.typeentite == 'nonincarne') {
|
||||
const defender = target?.actor;
|
||||
const defenderTokenId = target?.id;
|
||||
if ( defender.type == 'entite' && defender.system.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.system.name : 'la cible',
|
||||
@ -1248,8 +1248,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