add speak language
This commit is contained in:
parent
b646524a97
commit
ac70a99b99
@ -54,6 +54,7 @@ import { SlothSpeedEffect } from './slothSpeed.js';
|
||||
import { SlumberEffect } from './slumber.js';
|
||||
import { SmiteEffect } from './smite.js';
|
||||
import { SoundSilenceEffect } from './soundSilence.js';
|
||||
import { SpeakLanguageEffect } from './speakLanguage.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -128,6 +129,7 @@ const PowerClasses = {
|
||||
soundsilence: SoundSilenceEffect,
|
||||
'sound-silence': SoundSilenceEffect,
|
||||
sound: SoundSilenceEffect,
|
||||
'speak-language': SpeakLanguageEffect,
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
@ -81,25 +81,22 @@ export class SoundSilenceEffect extends PowerEffect {
|
||||
|
||||
get description() {
|
||||
let desc = super.description;
|
||||
if (this.data.direction === 'Sound') {
|
||||
desc += `<p>Mimic any known sound from a point within ranage. If used as
|
||||
a test, resist with Smarts${this.data.greater ? ' -2' : ''}.</p>`;
|
||||
} else if (this.data.targeted) {
|
||||
desc += `<p>Silence an individual, causing
|
||||
${this.data.raise ? 'complete silence' : '-4 to auditory Notice rolls'}
|
||||
for that individual. Resisted with Spirit, -2 if a raise and -2 if Greater.</p>`;
|
||||
} else {
|
||||
desc += `<p>Silence a Large Blast Template, causing
|
||||
${this.data.raise ? 'complete silence' : '-4 t auditory Notice rolls'}
|
||||
within the area.</p>`;
|
||||
}
|
||||
if (!this.data.targete && this.data.mobile) {
|
||||
desc += `<p>The caster can move the area up to his arcane skill die
|
||||
type each round.</p>`;
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
||||
get primaryEffectButtons() {
|
||||
const buttons = super.primaryEffectButtons;
|
||||
if (this.data.direction === 'Silence' && this.data.targeted) {
|
||||
const mods = [];
|
||||
if (this.data.greater) {
|
||||
mods.push({ label: 'Greater Silence', value: -2 });
|
||||
}
|
||||
buttons.push({
|
||||
label: `Shake off (Smarts${this.data.greater ? ' -2' : ''})`,
|
||||
type: 'trait',
|
||||
rollType: 'attribute',
|
||||
rollDesc: 'Smarts',
|
||||
flavor: 'Success shakes off the effects of silence',
|
||||
mods,
|
||||
});
|
||||
}
|
||||
return buttons;
|
||||
}
|
||||
}
|
||||
|
||||
66
src/module/powers/speakLanguage.js
Normal file
66
src/module/powers/speakLanguage.js
Normal file
@ -0,0 +1,66 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class SpeakLanguageEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Speak Language';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/sonic/scream-wail-shout-teal.webp';
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
const mods = super.modifiers;
|
||||
mods.push({
|
||||
name: 'Greater Speak Language',
|
||||
type: 'checkbox',
|
||||
id: 'greater',
|
||||
value: 2,
|
||||
epic: true,
|
||||
effect: false,
|
||||
});
|
||||
mods.push({
|
||||
name: 'Mass Understanding',
|
||||
type: 'checkbox',
|
||||
id: 'mass',
|
||||
value: 5,
|
||||
epic: true,
|
||||
effect: false,
|
||||
});
|
||||
return mods;
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
return `${this.data.raise ? 'major' : 'minor'} ${this.name}${this.data.mass ? ' [Mass Understanding]' : this.data.greater ? ' [Greater]' : ''}`;
|
||||
}
|
||||
|
||||
get description() {
|
||||
let text = super.description;
|
||||
if (this.data.mass) {
|
||||
text += `<p>All creatures within Smarts ×2 of the recipient can understand one another.</p>`;
|
||||
} else {
|
||||
text += `<p>Speak, read, and write ${this.data.greater ? 'all sapient languages' : 'a sapient language other than your own'}. ${this.data.raise ? 'Understand and use dialect and slang as well.' : ''}</p>`;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user