empathy
This commit is contained in:
parent
caee516d48
commit
2dda9d76a4
@ -422,6 +422,18 @@ export class PowerEffect {
|
||||
return changes;
|
||||
}
|
||||
|
||||
getMaintainEffectChanges() {
|
||||
const changes = [
|
||||
{
|
||||
key: 'flags.swade-mb-helpers.powerMaintained',
|
||||
value: 1,
|
||||
priority: 0,
|
||||
mode: foundry.CONST.ACTIVE_EFFECT_MODES.OVERRIDE,
|
||||
},
|
||||
];
|
||||
return changes;
|
||||
}
|
||||
|
||||
get description() {
|
||||
return '';
|
||||
}
|
||||
@ -473,7 +485,7 @@ export class PowerEffect {
|
||||
if (!this.usePrimaryEffect) {
|
||||
icon = this.icon;
|
||||
}
|
||||
const doc = this.createEffectDocument(icon, `Maintaining ${this.effectName}`, []);
|
||||
const doc = this.createEffectDocument(icon, `Maintaining ${this.effectName}`, this.getMaintainEffectChanges());
|
||||
doc.duration.rounds = this.duration;
|
||||
if (moduleHelpers.useVAE) {
|
||||
doc.flags['visual-active-effects'] = { data: { content: this.description } };
|
||||
|
||||
105
src/module/powers/empathy.js
Normal file
105
src/module/powers/empathy.js
Normal file
@ -0,0 +1,105 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class EmpathyEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Empathy';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 5 * (this?.data?.duration ?? false ? 10 : 1);
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/skills/social/diplomacy-handshake-yellow.webp';
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return [
|
||||
...super.modifiers,
|
||||
{
|
||||
name: 'Charm',
|
||||
type: 'checkbox',
|
||||
id: 'charm',
|
||||
value: 2,
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Duration',
|
||||
type: 'checkbox',
|
||||
id: 'duration',
|
||||
value: 1,
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Truth',
|
||||
type: 'checkbox',
|
||||
id: 'truth',
|
||||
value: 2,
|
||||
epic: true,
|
||||
effect: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
const extra = [];
|
||||
if (this.data.charm) {
|
||||
extra.push('Charm');
|
||||
}
|
||||
if (this.data.truth) {
|
||||
extra.push('Truth');
|
||||
}
|
||||
const extraText = extra.length ? ` (${extra.join(', ')})` : '';
|
||||
return this.name + extraText;
|
||||
}
|
||||
|
||||
getMaintainEffectChanges() {
|
||||
const mode = foundry.CONST.ACTIVE_EFFECT_MODES.ADD;
|
||||
const value = this.data.raise ? 2 : 1;
|
||||
return ['Intimidation', 'Persuasion', 'Performance', 'Taunt', 'Riding'].map(function (skill) {
|
||||
return {
|
||||
key: `@Skill{${skill}}[system.die.modifier]`,
|
||||
priority: 0,
|
||||
mode,
|
||||
value,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
get description() {
|
||||
let text = super.description;
|
||||
text += `
|
||||
<p>Opposed by Spirit. If the target fails, caster gets
|
||||
+${this.data.raise ? 2 : 1} to Intimidation, Persuasion, Performance,
|
||||
Taunt or Riding (if target is an animal) rolls vs the target, except for
|
||||
rolls to activate powers.</p>`;
|
||||
if (this.data.charm) {
|
||||
text += `<p>an Uncooperative target is made
|
||||
${this.data.raise ? 'Friendly' : 'Cooperative'}.
|
||||
The spell ends instantly if the caster's group attacks the victim's group.</p>`;
|
||||
}
|
||||
if (this.data.truth) {
|
||||
text += '<p>The caster knows if the targets believe they are telling the truth.</p>';
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
@ -22,6 +22,7 @@ import { DispelEffect } from './dispel.js';
|
||||
import { DivinationEffect } from './divination.js';
|
||||
import { DrainPowerPointsEffect } from './drainPowerPoints.js';
|
||||
import { ElementalManipulationEffect } from './elementalManipulation.js';
|
||||
import { EmpathyEffect } from './empathy.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -51,6 +52,7 @@ const PowerClasses = {
|
||||
divination: DivinationEffect,
|
||||
'drain-power-points': DrainPowerPointsEffect,
|
||||
'elemental-manipulation': ElementalManipulationEffect,
|
||||
empathy: EmpathyEffect,
|
||||
'lower-trait': BoostLowerTraitEffect,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user