Fix conflict

This commit is contained in:
Dapoolp 2025-07-31 11:54:36 +02:00
commit dbb07008f0
677 changed files with 67498 additions and 579 deletions

View file

@ -130,13 +130,7 @@ export default class D20Roll extends DHRoll {
}
applyBaseBonus() {
const modifiers = [];
if (this.options.roll.bonus)
modifiers.push({
label: 'Bonus to Hit',
value: this.options.roll.bonus
});
const modifiers = foundry.utils.deepClone(this.options.roll.baseModifiers) ?? [];
modifiers.push(...this.getBonus(`roll.${this.options.type}`, `${this.options.type?.capitalize()} Bonus`));
modifiers.push(

View file

@ -85,9 +85,9 @@ export default class DamageRoll extends DHRoll {
const modifiers = [],
type = this.options.messageType ?? (this.options.isHealing ? 'healing' : 'damage'),
options = part ?? this.options;
modifiers.push(...this.getBonus(`${type}`, `${type.capitalize()} Bonus`));
if(!this.options.isHealing) {
if (!this.options.isHealing) {
options.damageTypes?.forEach(t => {
modifiers.push(...this.getBonus(`${type}.${t}`, `${t.capitalize()} ${type.capitalize()} Bonus`));
});

View file

@ -75,6 +75,7 @@ export default class DHRoll extends Roll {
static postEvaluate(roll, config = {}) {
return {
type: config.roll.type,
total: roll.total,
formula: roll.formula,
dice: roll.dice.map(d => ({
@ -202,11 +203,12 @@ export const registerRollDiceHooks = () => {
if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1 });
if (config.rerolledRoll) {
if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) updates.push({ key: 'hope', value: -1 });
if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1)
updates.push({ key: 'hope', value: -1 });
if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1 });
if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1 });
}
if (updates.length) {
const target = actor.system.partner ?? actor;
if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) {

View file

@ -70,7 +70,7 @@ export default class DualityRoll extends D20Roll {
}
setRallyChoices() {
return this.data?.parent?.effects.reduce((a, c) => {
return this.data?.parent?.appliedEffects.reduce((a, c) => {
const change = c.changes.find(ch => ch.key === 'system.bonuses.rally');
if (change) a.push({ value: c.id, label: change.value });
return a;