added related messages, added skillcheck for spells (cast)
This commit is contained in:
171
commands/Cast.js
171
commands/Cast.js
@ -1,101 +1,88 @@
|
||||
const globals = require('../globals');
|
||||
const Discord = require('discord.js');
|
||||
const db = globals.db;
|
||||
const { roll } = require('@dsabot/Roll');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
const { getSkill } = require('@dsabot/getSkill');
|
||||
const { roll } = require('@dsabot/Roll');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
const { getSpell } = require('@dsabot/getSpell');
|
||||
const { CalculateQuality } = require('@dsabot/CalculateQuality');
|
||||
const { CompareResults } = require('@dsabot/CompareResults');
|
||||
const { CreateResultTable } = require('@dsabot/CreateResultTable');
|
||||
module.exports = {
|
||||
name: 'cast',
|
||||
description: ' Du machst eine Fertigkeitsprobe auf Magietalente.\n' +
|
||||
' Es werden drei Würfel auf deine Eigenschaftswerte geworfen. Deine Boni werden in' +
|
||||
' die Berechnung einbezogen.',
|
||||
aliases: ['zaubern'],
|
||||
usage: '<Zaubern> [<-Erschwernis> / <+Erleichterung>]',
|
||||
needs_args: true,
|
||||
async exec(message, args) {
|
||||
try {
|
||||
db.find({
|
||||
user: message.author.tag,
|
||||
}, function (err, docs) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
if (!isNaN(args[0])) {
|
||||
return message.reply(findMessage('WRONG_ARGUMENTS'));
|
||||
} else {
|
||||
name: 'cast',
|
||||
description:
|
||||
' Du machst eine Fertigkeitsprobe auf Magietalente.\n' +
|
||||
' Es werden drei Würfel auf deine Eigenschaftswerte geworfen. Deine Boni werden in' +
|
||||
' die Berechnung einbezogen.',
|
||||
aliases: ['zaubern'],
|
||||
usage: '<Zaubern> [<-Erschwernis> / <+Erleichterung>]',
|
||||
needs_args: true,
|
||||
async exec(message, args) {
|
||||
db.find({ user: message.author.tag }, (err, docs) => {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
if (!isNaN(args[0])) {
|
||||
return message.reply(findMessage('WRONG_ARGUMENTS'));
|
||||
}
|
||||
|
||||
const Skill = getSkill({Character: docs[0].character, args: args});
|
||||
if(!Skill) { return message.reply(findMessage('TALENT_UNKNOWN'));}
|
||||
console.log(args[0]);
|
||||
const Spell = getSpell({ Character: docs[0].character, spell_name: args[0] });
|
||||
if (!Spell) {
|
||||
return message.reply(findMessage('SPELL_UNKNOWN'));
|
||||
}
|
||||
if (!Spell.Level || !Spell.Attributes) {
|
||||
return;
|
||||
}
|
||||
const Attributes = Spell.Attributes;
|
||||
const DiceThrow = roll(3, 20, message.author.tag).dice;
|
||||
const Bonus = parseInt(args[1]) || 0;
|
||||
let { Passed, CriticalHit, Fumbles, PointsUsed, PointsRemaining } = CompareResults(
|
||||
DiceThrow,
|
||||
Attributes.map(attr => attr.Level),
|
||||
Bonus,
|
||||
Spell.Level
|
||||
);
|
||||
const Reply = new Discord.MessageEmbed();
|
||||
Reply.addFields({
|
||||
name: `Du würfelst auf das Talent **${Spell.Name}** (Stufe ${Spell.Level} + ${Bonus})`,
|
||||
value: CreateResultTable({
|
||||
Attributes: Attributes,
|
||||
Throws: DiceThrow,
|
||||
PointsUsed: PointsUsed,
|
||||
}),
|
||||
inline: false,
|
||||
});
|
||||
if (Fumbles >= 2) {
|
||||
Reply.setColor('#900c3f');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_FAILURE'),
|
||||
value: findMessage('MSG_CRIT_FAILURE'),
|
||||
inline: false,
|
||||
});
|
||||
} else if (CriticalHit >= 2) {
|
||||
Reply.setColor('#1E8449');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_SUCCESS'),
|
||||
value: findMessage('MSG_CRIT_SUCCESS'),
|
||||
inline: false,
|
||||
});
|
||||
} else if (Passed < 3) {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_FAILURE'),
|
||||
value: `${Passed === 0 ? 'Keine Probe' : `nur ${Passed}/3 Proben`} erfolgreich. 😪`,
|
||||
inline: false,
|
||||
});
|
||||
} else {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_SUCCESS'),
|
||||
value: `Dein verbleibender Bonus: ${PointsRemaining}/${Spell.Level} (QS${CalculateQuality(
|
||||
PointsRemaining
|
||||
)})`,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
|
||||
const Attributes = Skill.Attributes;
|
||||
const DiceThrow = roll(3, 20, message.author.tag).dice;
|
||||
const Bonus = parseInt(args[1]) || 0;
|
||||
let { Passed,
|
||||
CriticalHit,
|
||||
Fumbles,
|
||||
PointsUsed,
|
||||
PointsRemaining } = CompareResults(
|
||||
DiceThrow,
|
||||
Attributes.map(attr => attr.Level),
|
||||
Bonus,
|
||||
Skill.Level);
|
||||
const Reply = new Discord.MessageEmbed();
|
||||
Reply.addFields({
|
||||
name: `Du würfelst auf das Talent **${Skill.Name}** (Stufe ${Skill.Level} + ${Bonus})`,
|
||||
value: CreateTable({Attributes: Attributes, Throws: DiceThrow, PointsUsed: PointsUsed}),
|
||||
inline: false
|
||||
});
|
||||
if (Fumbles >= 2) {
|
||||
Reply.setColor('#900c3f');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_FAILURE'),
|
||||
value: findMessage('MSG_CRIT_FAILURE'),
|
||||
inline: false
|
||||
});
|
||||
} else if (CriticalHit >= 2) {
|
||||
Reply.setColor('#1E8449');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_SUCCESS'),
|
||||
value: findMessage('MSG_CRIT_SUCCESS'),
|
||||
inline: false
|
||||
});
|
||||
} else if (Passed < 3) {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_FAILURE'),
|
||||
value: `${(Passed === 0) ? 'Keine Probe' : `nur ${Passed}/3 Proben`} erfolgreich. 😪`,
|
||||
inline: false
|
||||
});
|
||||
} else {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_SUCCESS'),
|
||||
value: `Dein verbleibender Bonus: ${PointsRemaining}/${Skill.Level} (QS${CalculateQuality(PointsRemaining)})`,
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
message.reply(Reply);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function Pad(Number = 0) {
|
||||
return Number.toString().padStart(1, ' ');
|
||||
}
|
||||
|
||||
const CreateTable = ({Attributes: Attributes, Throws: Throws, PointsUsed: PointsUsed}) => {
|
||||
return `
|
||||
\`\`\`
|
||||
${' '.padEnd(15)} ${Attributes.map(attr => `${attr.Name}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Dein Wert'.padEnd(15)} ${Attributes.map(attr => `${attr.Level}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Dein Wurf'.padEnd(15)} ${Throws.map(Throw => `${Throw}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Abzüge'.padEnd(15)} ${PointsUsed.map(Points => `${Points}`.replace(0,'--').padStart(5)).join('\t|\t')}\t|
|
||||
${'Gesamt'.padEnd(15)} ${PointsUsed.reduce((acc,cur) => acc+cur).toString().padStart(5)}
|
||||
\`\`\`
|
||||
`;
|
||||
message.reply(Reply);
|
||||
});
|
||||
},
|
||||
};
|
@ -11,73 +11,45 @@ module.exports = {
|
||||
needs_args: true,
|
||||
|
||||
async exec(message, args) {
|
||||
try {
|
||||
console.log(message.author.tag);
|
||||
db.find(
|
||||
{
|
||||
user: message.author.tag,
|
||||
},
|
||||
function (err, docs) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
} else {
|
||||
Character = docs[0].character;
|
||||
if (args.length === 0) {
|
||||
//console.log(ReplySpellList(createSpellList(Character)));
|
||||
return message.reply(ReplyChantList(createChantList(Character))); //?+
|
||||
} else {
|
||||
const Spell = getChant({
|
||||
Character: Character,
|
||||
spell_name: args[0],
|
||||
});
|
||||
if (!Spell) {
|
||||
return message.reply(findMessage('SPELL_UNKNOWN'));
|
||||
}
|
||||
return message.reply(ReplyChant(Spell));
|
||||
// `Du hast folgenden Wert in **${Spell.Name}**: ${Spell.Level}`
|
||||
//);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
console.log(message.author.tag);
|
||||
db.find({ user: message.author.tag }, (err, docs) => {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
Character = docs[0].character;
|
||||
if (args.length === 0) {
|
||||
return message.reply(ReplyChantList(createChantList(Character))); //?+
|
||||
}
|
||||
const Spell = getChant({
|
||||
Character: Character,
|
||||
chant_name: args[0],
|
||||
});
|
||||
if (!Spell) {
|
||||
return message.reply(findMessage('SPELL_UNKNOWN'));
|
||||
}
|
||||
return message.reply(ReplyChant(Spell));
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
const createChantList = (Character = {}) => {
|
||||
if (!Character || !Character.hasOwnProperty('chants')) return;
|
||||
let ChantList = [];
|
||||
|
||||
// todo: send 'chant' to getChant() so we can filter out blessings.
|
||||
Character.chants.forEach(chant => ChantList.push(getChant({ Character: Character, chant_name: chant.id })));
|
||||
return ChantList.filter(value => value !== undefined); //?+
|
||||
};
|
||||
|
||||
const ReplyChantList = (ChantList = []) => {
|
||||
if (!ChantList) return;
|
||||
|
||||
return `${ChantList.map(s => `${s.Name} (${s.Level})`).join('\n')}`;
|
||||
return `${ChantList.map(chant => `${chant.name} ${chant.level ? `(${chant.level})` : ''}`).join('\n')}`;
|
||||
};
|
||||
|
||||
const ReplyChant = (Chant = {}) => {
|
||||
if (!Chant) return;
|
||||
return `Deine Werte für ${Chant.name} ${Chant.level ? '(' + Chant.level + ')' : ''} sind:
|
||||
|
||||
return `Deine Werte für ${Chant.Name} (${Chant.Level}) sind:
|
||||
${Chant.Attributes.map(attribute => `${attribute.Name}: ${attribute.Level}`).join(' ')}
|
||||
`;
|
||||
};
|
||||
|
||||
const createChantList = (Character = {}) => {
|
||||
if (!Character || !Character.hasOwnProperty('spells')) return;
|
||||
let ChantList = [];
|
||||
Character.spells.forEach(chant =>
|
||||
ChantList.push(getChant({ Character: Character, spell_name: chant.id }))
|
||||
);
|
||||
return ChantList.filter(value => value !== undefined); //?+
|
||||
};
|
||||
|
||||
const s = require('./Spells');
|
||||
const user = 'hmpf1992#1074';
|
||||
//const user = 'Jens#5449';
|
||||
const message = {
|
||||
author: {
|
||||
tag: user,
|
||||
},
|
||||
reply: function (e) {
|
||||
console.log(e);
|
||||
},
|
||||
};
|
||||
const args = ['armatrutz'];
|
||||
s.exec(message, args);
|
||||
|
@ -1,31 +1,24 @@
|
||||
const globals = require('../globals');
|
||||
const db = globals.db;
|
||||
const { findMessage }= require('@dsabot/findMessage');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
const { getSkill } = require('@dsabot/getSkill');
|
||||
module.exports = {
|
||||
name: 'skill',
|
||||
description: 'Zeigt dir deinen Fertigkeitswert im jeweiligen Talent.',
|
||||
aliases: [],
|
||||
usage: '<Fertigkeit>',
|
||||
needs_args: true,
|
||||
name: 'skill',
|
||||
description: 'Zeigt dir deinen Fertigkeitswert im jeweiligen Talent.',
|
||||
aliases: [],
|
||||
usage: '<Fertigkeit>',
|
||||
needs_args: true,
|
||||
|
||||
async exec(message, args) {
|
||||
try {
|
||||
db.find({
|
||||
user: message.author.tag,
|
||||
}, function(err, docs) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
else {
|
||||
const Skill = getSkill({Character: docs[0].character, args: args});
|
||||
if(!Skill) { return message.reply(findMessage('TALENT_UNKNOWN'));}
|
||||
return message.reply(`Du hast folgenden Wert in **${Skill.Name}**: ${Skill.Level}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
async exec(message, args) {
|
||||
db.find({ user: message.author.tag }, (err, docs) => {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
const Skill = getSkill({ Character: docs[0].character, args: args });
|
||||
if (!Skill) {
|
||||
return message.reply(findMessage('TALENT_UNKNOWN'));
|
||||
}
|
||||
return message.reply(`Du hast folgenden Wert in **${Skill.Name}**: ${Skill.Level}`);
|
||||
});
|
||||
},
|
||||
};
|
@ -11,50 +11,33 @@ module.exports = {
|
||||
needs_args: true,
|
||||
|
||||
async exec(message, args) {
|
||||
try {
|
||||
console.log(message.author.tag);
|
||||
db.find(
|
||||
{
|
||||
user: message.author.tag,
|
||||
},
|
||||
function (err, docs) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
} else {
|
||||
Character = docs[0].character;
|
||||
if (args.length === 0) {
|
||||
//console.log(ReplySpellList(createSpellList(Character)));
|
||||
return message.reply(ReplySpellList(createSpellList(Character))); //?+
|
||||
} else {
|
||||
const Spell = getSpell({
|
||||
Character: Character,
|
||||
spell_name: args[0],
|
||||
});
|
||||
if (!Spell) {
|
||||
return message.reply(findMessage('SPELL_UNKNOWN'));
|
||||
}
|
||||
return message.reply(ReplySpell(Spell));
|
||||
// `Du hast folgenden Wert in **${Spell.Name}**: ${Spell.Level}`
|
||||
//);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
db.find({ user: message.author.tag }, (err, docs) => {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
Character = docs[0].character;
|
||||
if (args.length === 0) {
|
||||
return message.reply(ReplySpellList(createSpellList(Character)));
|
||||
}
|
||||
const Spell = getSpell({
|
||||
Character: Character,
|
||||
spell_name: args[0],
|
||||
});
|
||||
if (!Spell) return message.reply(findMessage('SPELL_UNKNOWN'));
|
||||
return message.reply(ReplySpell(Spell));
|
||||
});
|
||||
},
|
||||
};
|
||||
const ReplySpellList = (SpellList = []) => {
|
||||
if (!SpellList) return;
|
||||
|
||||
const ReplySpellList = (SpellList = []) => {
|
||||
if (!SpellList) return findMessage('NO_SPELLS');
|
||||
return `${SpellList.map(s => `${s.Name} (${s.Level})`).join('\n')}`;
|
||||
};
|
||||
|
||||
const ReplySpell = (Spell = {}) => {
|
||||
if (!Spell) return;
|
||||
|
||||
return `Deine Werte für ${Spell.Name} (${Spell.Level}) sind:
|
||||
|
||||
${Spell.Attributes.map(attribute => `${attribute.Name}: ${attribute.Level}`).join(' ')}
|
||||
`;
|
||||
};
|
||||
@ -62,31 +45,21 @@ const ReplySpell = (Spell = {}) => {
|
||||
const createSpellList = (Character = {}) => {
|
||||
if (!Character || !Character.hasOwnProperty('spells')) return;
|
||||
let SpellList = [];
|
||||
Character.spells.forEach(spell =>
|
||||
SpellList.push(getSpell({ Character: Character, spell_name: spell.id }))
|
||||
);
|
||||
Character.spells.forEach(spell => SpellList.push(getSpell({ Character: Character, spell_name: spell.id })));
|
||||
return SpellList.filter(value => value !== undefined); //?+
|
||||
};
|
||||
|
||||
const s = require('./Spells');
|
||||
/*
|
||||
//const s = require('./Spells');
|
||||
const c = require('./Cast');
|
||||
const user = 'hmpf1992#1074';
|
||||
//const user = 'Jens#5449';
|
||||
const message = {
|
||||
author: {
|
||||
tag: user,
|
||||
},
|
||||
author: { tag: user },
|
||||
reply: function (e) {
|
||||
console.log(e);
|
||||
},
|
||||
};
|
||||
const args = ['armatrutz'];
|
||||
s.exec(message, args);
|
||||
|
||||
const createChantList = (Character = {}) => {
|
||||
if (!Character || !Character.hasOwnProperty('chants')) return;
|
||||
let ChantList = [];
|
||||
Character.chants.forEach(chant =>
|
||||
ChantList.push(getChant({ Character: Character, spell_name: chant.id }))
|
||||
);
|
||||
return ChantList.filter(value => value !== undefined); //?+
|
||||
};
|
||||
const args = ['fulminictus'];
|
||||
//s.exec(message, args);
|
||||
c.exec(message, args);
|
||||
*/
|
||||
|
@ -1,101 +1,85 @@
|
||||
const globals = require('../globals');
|
||||
const Discord = require('discord.js');
|
||||
const db = globals.db;
|
||||
const { roll } = require('@dsabot/Roll');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
const { roll } = require('@dsabot/Roll');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
const { getSkill } = require('@dsabot/getSkill');
|
||||
const { CalculateQuality } = require('@dsabot/CalculateQuality');
|
||||
const { CompareResults } = require('@dsabot/CompareResults');
|
||||
const { CreateResultTable } = require('@dsabot/CreateResultTable');
|
||||
module.exports = {
|
||||
name: 'talent',
|
||||
description: ' Du machst eine Fertigkeitsprobe.\n' +
|
||||
' Es werden drei Würfel auf deine Eigenschaftswerte geworfen. Hast du Boni auf dein Talent und/oder' +
|
||||
' ist der Wurf erleichtert oder erschwert, wird dies in die Berechnung einbezogen.',
|
||||
aliases: ['t'],
|
||||
usage: '<Talent> [<-Erschwernis> / <+Erleichterung>]',
|
||||
needs_args: true,
|
||||
async exec(message, args) {
|
||||
try {
|
||||
db.find({
|
||||
user: message.author.tag,
|
||||
}, function (err, docs) {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
if (!isNaN(args[0])) {
|
||||
return message.reply(findMessage('WRONG_ARGUMENTS'));
|
||||
} else {
|
||||
name: 'talent',
|
||||
description:
|
||||
' Du machst eine Fertigkeitsprobe.\n' +
|
||||
' Es werden drei Würfel auf deine Eigenschaftswerte geworfen. Hast du Boni auf dein Talent und/oder' +
|
||||
' ist der Wurf erleichtert oder erschwert, wird dies in die Berechnung einbezogen.',
|
||||
aliases: ['t'],
|
||||
usage: '<Talent> [<-Erschwernis> / <+Erleichterung>]',
|
||||
needs_args: true,
|
||||
async exec(message, args) {
|
||||
db.find({ user: message.author.tag }, (err, docs) => {
|
||||
if (docs.length === 0) {
|
||||
return message.reply(findMessage('NOENTRY'));
|
||||
}
|
||||
if (!isNaN(args[0])) {
|
||||
return message.reply(findMessage('WRONG_ARGUMENTS'));
|
||||
}
|
||||
|
||||
const Skill = getSkill({Character: docs[0].character, args: args});
|
||||
if(!Skill) { return message.reply(findMessage('TALENT_UNKNOWN'));}
|
||||
const Skill = getSkill({ Character: docs[0].character, args: args });
|
||||
if (!Skill) {
|
||||
return message.reply(findMessage('TALENT_UNKNOWN'));
|
||||
}
|
||||
|
||||
const Attributes = Skill.Attributes;
|
||||
const DiceThrow = roll(3, 20, message.author.tag).dice;
|
||||
const Bonus = parseInt(args[1]) || 0;
|
||||
let { Passed,
|
||||
CriticalHit,
|
||||
Fumbles,
|
||||
PointsUsed,
|
||||
PointsRemaining } = CompareResults(
|
||||
DiceThrow,
|
||||
Attributes.map(attr => attr.Level),
|
||||
Bonus,
|
||||
Skill.Level);
|
||||
const Reply = new Discord.MessageEmbed();
|
||||
Reply.addFields({
|
||||
name: `Du würfelst auf das Talent **${Skill.Name}** (Stufe ${Skill.Level} + ${Bonus})`,
|
||||
value: CreateTable({Attributes: Attributes, Throws: DiceThrow, PointsUsed: PointsUsed}),
|
||||
inline: false
|
||||
});
|
||||
if (Fumbles >= 2) {
|
||||
Reply.setColor('#900c3f');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_FAILURE'),
|
||||
value: findMessage('MSG_CRIT_FAILURE'),
|
||||
inline: false
|
||||
});
|
||||
} else if (CriticalHit >= 2) {
|
||||
Reply.setColor('#1E8449');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_SUCCESS'),
|
||||
value: findMessage('MSG_CRIT_SUCCESS'),
|
||||
inline: false
|
||||
});
|
||||
} else if (Passed < 3) {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_FAILURE'),
|
||||
value: `${(Passed === 0) ? 'Keine Probe' : `nur ${Passed}/3 Proben`} erfolgreich. 😪`,
|
||||
inline: false
|
||||
});
|
||||
} else {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_SUCCESS'),
|
||||
value: `Dein verbleibender Bonus: ${PointsRemaining}/${Skill.Level} (QS${CalculateQuality(PointsRemaining)})`,
|
||||
inline: false
|
||||
});
|
||||
}
|
||||
|
||||
message.reply(Reply);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function Pad(Number = 0) {
|
||||
return Number.toString().padStart(1, ' ');
|
||||
}
|
||||
|
||||
const CreateTable = ({Attributes: Attributes, Throws: Throws, PointsUsed: PointsUsed}) => {
|
||||
return `
|
||||
\`\`\`
|
||||
${' '.padEnd(15)} ${Attributes.map(attr => `${attr.Name}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Dein Wert'.padEnd(15)} ${Attributes.map(attr => `${attr.Level}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Dein Wurf'.padEnd(15)} ${Throws.map(Throw => `${Throw}`.padStart(5)).join('\t|\t')}\t|
|
||||
${'Abzüge'.padEnd(15)} ${PointsUsed.map(Points => `${Points}`.replace(0,'--').padStart(5)).join('\t|\t')}\t|
|
||||
${'Gesamt'.padEnd(15)} ${PointsUsed.reduce((acc,cur) => acc+cur).toString().padStart(5)}
|
||||
\`\`\`
|
||||
`;
|
||||
const Attributes = Skill.Attributes;
|
||||
const DiceThrow = roll(3, 20, message.author.tag).dice;
|
||||
const Bonus = parseInt(args[1]) || 0;
|
||||
let { Passed, CriticalHit, Fumbles, PointsUsed, PointsRemaining } = CompareResults(
|
||||
DiceThrow,
|
||||
Attributes.map(attr => attr.Level),
|
||||
Bonus,
|
||||
Skill.Level
|
||||
);
|
||||
const Reply = new Discord.MessageEmbed();
|
||||
Reply.addFields({
|
||||
name: `Du würfelst auf das Talent **${Skill.Name}** (Stufe ${Skill.Level} + ${Bonus})`,
|
||||
value: CreateResultTable({
|
||||
Attributes: Attributes,
|
||||
Throws: DiceThrow,
|
||||
PointsUsed: PointsUsed,
|
||||
Bonus: Bonus,
|
||||
}),
|
||||
inline: false,
|
||||
});
|
||||
if (Fumbles >= 2) {
|
||||
Reply.setColor('#900c3f');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_FAILURE'),
|
||||
value: findMessage('MSG_CRIT_FAILURE'),
|
||||
inline: false,
|
||||
});
|
||||
} else if (CriticalHit >= 2) {
|
||||
Reply.setColor('#1E8449');
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_CRIT_SUCCESS'),
|
||||
value: findMessage('MSG_CRIT_SUCCESS'),
|
||||
inline: false,
|
||||
});
|
||||
} else if (Passed < 3) {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_FAILURE'),
|
||||
value: `${Passed === 0 ? 'Keine Probe' : `nur ${Passed}/3 Proben`} erfolgreich. 😪`,
|
||||
inline: false,
|
||||
});
|
||||
} else {
|
||||
Reply.addFields({
|
||||
name: findMessage('TITLE_SUCCESS'),
|
||||
value: `Dein verbleibender Bonus: ${PointsRemaining}/${Skill.Level} (QS${CalculateQuality(
|
||||
PointsRemaining
|
||||
)})`,
|
||||
inline: false,
|
||||
});
|
||||
}
|
||||
message.reply(Reply);
|
||||
});
|
||||
},
|
||||
};
|
522
data/Chants.js
522
data/Chants.js
@ -3,666 +3,474 @@ module.exports = [
|
||||
id: 'bannderdunkelheit',
|
||||
name: 'Bann der Dunkelheit',
|
||||
attributes: ['MU', 'KL', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: { amount: 2, interval: 1, unit: 'Minute' },
|
||||
},
|
||||
cost: { initial: 4, additional: { amount: 2, interval: 1, unit: 'Minute' } },
|
||||
effect: {
|
||||
description:
|
||||
'Aus der Hand des Geweihten strahlt ein helles Licht. Das Licht zählt regeltechnisch als Sonnenlicht.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
duration: {},
|
||||
instant: false,
|
||||
pulse: true,
|
||||
},
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'bannderfurcht',
|
||||
name: 'Bann der Furcht',
|
||||
attributes: ['IN', 'CH', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Durch diese Liturgie wird pro QS eine Stufe des Zustands Furcht aufgehoben.',
|
||||
duration: {},
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: true,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 2, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'banndeslichts',
|
||||
name: 'Bann des Lichts',
|
||||
attributes: ['MU', 'KL', 'CH'],
|
||||
cost: {
|
||||
initial: 16,
|
||||
additional: { amount: 8, interval: 5, unit: 'Minuten' },
|
||||
},
|
||||
cost: { initial: 16, additional: { amount: 8, interval: 5, unit: 'Minuten' } },
|
||||
effect: {
|
||||
description:
|
||||
'Um den Geweihten herum bildet sich eine Kugel aus Dunkelheit mit einem Durchmesser von QS x 3 Schritt. Pro QS erschweren sich die Sichtverhältnisse um eine Stufe. Natürliche und magische Lichtquellen können die Dunkelheit nicht erhellen. Bei karmalen Lichtquellen entscheidet die höhere QS (wie bei einer Vergleichsprobe), ob das Licht zu sehen ist oder nicht. Hierbei gilt alles oder nichts Das Licht wird nicht um die QS der Liturgie gedämpft, sondern die höhere QS entscheidet darüber ob Licht zu sehen ist oder nicht. Für den Geweihten werden die Sichtverhältnisse durch die Liturgie nicht erschwert. Der Geweihte muss vor dem Wirken der Liturgie entscheiden, ob die Zone der Dunkelheit an Ort und Stelle verbleiben oder sich mit ihm als Zentrum bewegen soll.',
|
||||
duration: { amount: 5, modifier: null, unit: 'Minuten' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
duration: {},
|
||||
instant: false,
|
||||
pulse: true,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'blendstrahl',
|
||||
name: 'Blendstrahl',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Betroffene wird geblendet. Es erhält eine Stufe des Zustands Verwirrung.',
|
||||
duration: { amount: 1, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'ehrenhaftigkeit',
|
||||
name: 'Ehrenhaftigkeit',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Ehrenhaft bedeutet in diesem Fall, dass der Betroffene sich an die Gebote des Geweihten hält. Dies kann je nach Auslegung und Kultur bedeuten, dass der Betroffene bei Patzern des Gegners auf weitere Angriffe verzichtet, nicht von hinten angreift, dem Gegner die Chance gibt, eine verlorene Waffe wieder aufzusammeln, auf Waffengifte verzichtet usw.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'entzifferung',
|
||||
name: 'Entzifferung',
|
||||
attributes: ['KL', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Die Textmenge richtet sich nach der QS. Für jede QS kann er fünf Foliantenseiten in normaler Schriftgröße entziffern.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 8, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 8, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'ermutigung',
|
||||
name: 'Ermutigung',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Das Ziel wird zuversichtlicher und mutiger. Je nach QS erhält es verschiedene Boni. Die Boni sind kumulativ, d.h. bei QS 3 hat das Ziel insgesamt MU +2 und AT +1.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 8, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 8, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'fallinsnichts',
|
||||
name: 'Fall ins Nichts',
|
||||
attributes: ['MU', 'IN', 'GE'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description: 'Für jede QS kann der Geweihte drei Schritt Fallschaden ignorieren.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'friedvolleaura',
|
||||
name: 'Friedvolle Aura',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Um den Geweihten anzugreifen, ist eine Probe auf Willenskraft (Bedrohungen standhalten) des Gegners notwendig, bei der er mehr QS haben muss als der Geweihte. Ist diese Probe nicht erfolgreich, kann der Angriff nicht ausgeführt werden. Gelingt sie, so ist die Attacke gegen den Geweihten dennoch um QS der Liturgie erschwert. Die Wirkung der Liturgie bezieht sich nur auf den Geweihten. Während der Wirkung der Liturgie kann der Geweihte keine Angriffe (Attacke, Fernkampf) oder sonstige offensive Handlungen gegen seine Feinde ausführen, wohl aber seine Kampfgefährten mit Handlungen unterstützen.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'giftbann',
|
||||
name: 'Giftbann',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 2,
|
||||
additional: { amount: 2, interval: 1, unit: 'Giftstufe(n)' },
|
||||
},
|
||||
cost: { initial: 2, additional: { amount: 2, interval: 1, unit: 'Giftstufe(n)' } },
|
||||
effect: {
|
||||
description:
|
||||
'Der Giftbann neutralisiert ein Gift. Die maximale Giftstufe darf die QS nicht übersteigen, sonst wirkt die Liturgie nicht und gilt als misslungen.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'goettlicherfingerzeig',
|
||||
name: 'Göttlicher Fingerzeig',
|
||||
attributes: ['KL', 'IN', 'IN'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Voraussetzung ist, dass ein solcher Gegenstand überhaupt in Reichweite liegt. Dies kann z. B. ein verborgener Schlüssel für eine Truhe, ein Zettel mit Hinweisen oder ein benötigtes improvisiertes Werkzeug sein. Ist der Gegenstand durch Magie oder karmales Wirken verborgen, kann der Geweihte das Objekt nicht mittels dieser Liturgie entdecken. Der Gegenstand darf sich maximal QS Schritt vom Geweihten entfernt.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'goettlicheszeichen',
|
||||
name: 'Göttliches Zeichen',
|
||||
attributes: ['IN', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Das Zeichen äußert sich z. B. als Donnergrollen, obwohl keine Wolken am Himmel zu sehen sind (Rondra), das Schnattern eines Storches (Peraine) oder als kurzer Moment der Stille (Boron). Innerhalb der Zone der Liturgie können Personen das göttliche Zeichen wahrnehmen. Der Radius der Zone beträgt QS x 10 in Schritt. Bei Proben auf Bekehren & Überzeugen kann der Meister eine Erleichterung von 1 gewähren, wenn der Geweihte das Zeichen bei der Anwendung miteinbezieht.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'heilsegen',
|
||||
name: 'Heilsegen',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: { amount: 1, interval: 1, unit: 'LeP' },
|
||||
},
|
||||
cost: { initial: 4, additional: { amount: 1, interval: 1, unit: 'LeP' } },
|
||||
effect: {
|
||||
description:
|
||||
'Der Betroffene erhält innerhalb von 5 Minuten nach dem Wirken der Liturgie verlorene LeP in Höhe der verwendeten KaP zurück. Der Geweihte kann maximal so viele KaP einsetzen, wie er FW hat. Wird die Liturgie vor dem Ablauf der durch den Konstitutionswert angegebenen Frist für den Tod eines Helden begonnen, kann er gerettet werden. Wird die Liturgie jedoch unterbrochen, überlebt der Patient danach nur noch die verbliebenen Kampfrunden.',
|
||||
duration: {},
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 16, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: true,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 16, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'kleinerbannwideruntote',
|
||||
name: 'Kleiner Bann wider Untote',
|
||||
attributes: ['MU', 'MU', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Bann verursacht 2W6+(QS x2) SP gegen ein untotes Wesen. Der Bann trifft automatisch sein Ziel und dieses kann sich dagegen nicht verteidigen.',
|
||||
duration: {},
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: true,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'kleinerbannstrahl',
|
||||
name: 'Kleiner Bannstrahl',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Bannstrahl richtet gegen einen Dämon 2W6+(QS x2) SP an. Gegen Dämonen aus Blakharaz’ Domäne wird der Schaden verdoppelt. Der Bannstrahl trifft automatisch sein Ziel und dieses kann sich dagegen nicht verteidigen. Der kleine Bannstrahl ist nicht davon abhängig, ob der Himmel zu sehen ist. Der Strahl entsteht direkt beim Dämon, auf den der Strahl wirken soll.',
|
||||
duration: {},
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: true,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 2, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'krankheitsbann',
|
||||
name: 'Krankheitsbann',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 2,
|
||||
additional: { amount: 2, interval: 1, unit: 'Krankheitsstufe(n)' },
|
||||
},
|
||||
cost: { initial: 2, additional: { amount: 2, interval: 1, unit: 'Krankheitsstufe(n)' } },
|
||||
effect: {
|
||||
description:
|
||||
'Diese Liturgie heilt Krankheiten (die bisher erlittenen Auswirkungen werden nicht geheilt). Die maximale Krankheitsstufe darf die QS nicht übersteigen, sonst wirkt die Liturgie nicht und gilt als misslungen. Die Liturgie heilt auch alle Symptome der Krankheit, aber keine bis dahin entstandenen Schäden (LeP-Verlust, Narben usw.).',
|
||||
duration: {},
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 16, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: true,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 16, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'lautlos',
|
||||
name: 'Lautlos',
|
||||
attributes: ['IN', 'IN', 'GE'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: { amount: 2, interval: 1, unit: 'Minute' },
|
||||
},
|
||||
cost: { initial: 4, additional: { amount: 2, interval: 1, unit: 'Minute' } },
|
||||
effect: {
|
||||
description: 'Proben auf Verbergen (Schleichen) sind um QS erleichtert.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
duration: {},
|
||||
instant: false,
|
||||
pulse: true,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'magieschutz',
|
||||
name: 'Magieschutz',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: { amount: 4, interval: 10, unit: 'Minuten' },
|
||||
},
|
||||
cost: { initial: 8, additional: { amount: 4, interval: 10, unit: 'Minuten' } },
|
||||
effect: {
|
||||
description:
|
||||
'Er erhält einen Bonus von QS –1 auf SK und ZK (mindestens jedoch 1 Punkt) gegen magische Effekte.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
duration: {},
|
||||
instant: false,
|
||||
pulse: true,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'magiesicht',
|
||||
name: 'Magiesicht',
|
||||
attributes: ['KL', 'IN', 'IN'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Mit dieser Liturgie lässt sich aktives magisches Wirken auf Gegenständen und Personen erkennen. Je nach Stärke der astralen Kräfte im Objekt kann die Probe erleichtert oder erschwert werden. Je nach QS können dabei nachfolgende Analysen mittels des Zaubers ANALYS oder entsprechenden Liturgien beeinflusst werden. Der Geweihte kann nur ein ausgewähltes Wesen oder Objekt in Reichweite untersuchen. Er hat keine Rundumsicht.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 2, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'mondsicht',
|
||||
name: 'Mondsicht',
|
||||
attributes: ['KL', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 2,
|
||||
additional: { amount: 1, interval: 10, unit: 'Minuten' },
|
||||
},
|
||||
cost: { initial: 2, additional: { amount: 1, interval: 10, unit: 'Minuten' } },
|
||||
effect: {
|
||||
description:
|
||||
'Erschwernisse der Sichtverhältnisse durch Dunkelheit werden um QS –1 Stufen gesenkt (mindestens jedoch 1',
|
||||
duration: { amount: 1, modifier: null, unit: 'Minute' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
duration: {},
|
||||
instant: false,
|
||||
pulse: true,
|
||||
},
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'mondsilberzunge',
|
||||
name: 'Mondsilberzunge',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Held wirkt vertrauenerweckend. Er erhält eine Erleichterung von QS auf die Fertigkeiten Überreden und Handel (Feilschen).',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minute' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
}, {
|
||||
chant: { duration: { amount: 1, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'objektsegen',
|
||||
name: 'Objektsegen',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Mit dieser Liturgie werden für Götterdienste benötigte Materialien (z. B. Salbungsöl eines Borongeweihten, das Saatgut eines Perainegeweihten oder Sternenstaub bei Phexgeweihten) gesegnet. Der Gegenstand zählt nicht als geweiht, sondern nur als gesegnet.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Stunden' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 4, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 4, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'ortderruhe',
|
||||
name: 'Ort der Ruhe',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 4,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 4, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Innerhalb der Zone werden Geräusche gedämpft. Der Radius der Zone beträgt QS x 3 Schritt. Proben gegen Sinnesschärfe (Wahrnehmen), um leise Geräusche wie Flüstern zu hören, sind innerhalb der Zone um QS erschwert. Die Zone verbleibt an Ort und Stelle. Geräusche, die aus der Zone dringen, bleiben gedämpft, Geräusche, die in die Zone eindringen, werden gedämpft.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Stunden' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 8, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 8, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'pflanzenwuchs',
|
||||
name: 'Pflanzenwuchs',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Die Liturgie lässt eine maximal buschgroße Pflanze übernatürlich schnell wachsen. Pro QS wächst die Pflanze 30 % schneller als für die Gattung typisch.',
|
||||
duration: { amount: 1, modifier: null, unit: 'Jahr' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 16, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 16, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'rabenruf',
|
||||
name: 'Rabenruf',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Geweihte ruft bis zu QS x 3 Raben aus einem Radius von QS x 3 Meilen herbei. Die Vögel verhalten sich ihm gegenüber zutraulich. Der Geweihte kann einen der Raben dazu benutzen, einen kleinen Gegenstand wie einen Ring zu transportieren, maximal bis zu einer Reichweite von QS x 3 Meile. Der Rabe findet den Zielort in der Regel automatisch. Es können maximal so viele Raben zum Geweihten fliegen, wie sich zu diesem Zeitpunkt in der Reichweite der Liturgie befinden.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Stunden' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 16, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 16, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'schlaf',
|
||||
name: 'Schlaf',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Geweihte betäubt den Betroffenen. Erreicht dieser so Betäubung Stufe IV, schläft er ein und ist vor Ablauf der Wirkungsdauer nur durch großen Lärm, kräftiges Anstoßen oder Ähnliches zu wecken. Ungestört schläft er, bis er auf natürlichem Wege erwacht.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 2, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'schlangenstab',
|
||||
name: 'Schlangenstab',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Die Schlange beschützt den Geweihten mit den ihr zur Verfügung stehenden Mitteln und folgt ihm. Stirbt die Schlange, verwandelt sie sich wieder zurück in das Objekt. Die Schlange gilt als gesegnet wie durch einen Objektsegen.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 2, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'schlangenzunge',
|
||||
name: 'Schlangenzunge',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Für Umstehende klingt dies wie zischende Laute. Bei der Darstellung eines solchen Gespräches sollte bedacht werden, dass Schlangen einen tierischen Verstand haben und die Welt anders wahrnehmen als Menschen.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 8, unit: 'Aktionen' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 8, unit: 'Aktionen' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'schmerzresistenz',
|
||||
name: 'Schmerzresistenz',
|
||||
attributes: ['MU', 'IN', 'KO'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Alle Effekte der Stufen des Zustands Schmerz können ignoriert werden, bis auf Stufe IV (ab Stufe IV wird der Geweihe von den ganz normalen Auswirkungen des Zustands betroffen).',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Kampfrunden' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'schutzderwehrlosen',
|
||||
name: 'Schutz der Wehrlosen',
|
||||
attributes: ['MU', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Geweihte kann einen Kämpfer, der eine wehr- oder schutzlose Person angreift oder angreifen will, herausfordern. Der Herausgeforderte lässt von seinem Opfer ab und greift stattdessen den Rondrageweihten an.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 1, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 1, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'sternenglanz',
|
||||
name: 'Sternenglanz',
|
||||
attributes: ['KL', 'IN', 'CH'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Es kann so einen um QS x 10 % höheren Preis erzielen. Misstrauische Käufer können diese Täuschung durchschauen, wenn ihnen eine vergleichende Probe auf Sinnesschärfe (Suchen) erschwert um QS +2 gelingt.',
|
||||
duration: { amount: 15, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 2, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'wahrheit',
|
||||
name: 'Wahrheit',
|
||||
attributes: ['MU', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 16,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 16, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Betroffene muss dem Geweihten (und nur ihm) wahrheitsgemäß auf jede seiner Frage antworten, so lange die Wirkungsdauer der Liturgie anhält. Das Opfer der Liturgie weiß, was es sagt.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 8, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
},
|
||||
},{
|
||||
chant: { duration: { amount: 8, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'wieselflink',
|
||||
name: 'Wieselflink',
|
||||
attributes: ['IN', 'IN', 'GE'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Geweihte wird flinker und schneller. Je nach QS erhält er verschiedene Boni. Die Boni sind kumulativ, d.h. bei QS 5 hat der Geweihte insgesamt GE +3, GS + 1 und AW +1. Durch die Steigerung der GE können auch die Schadensschwellen bei Kampftechniken mit GE betroffen sein. Der Geweihte macht also eventuell mehr Schaden mit einigen Waffen.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Minuten' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 2, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
{
|
||||
id: 'wundersameverstaendigung',
|
||||
name: 'Wundersame Verständigung',
|
||||
attributes: ['KL', 'KL', 'IN'],
|
||||
cost: {
|
||||
initial: 8,
|
||||
additional: {},
|
||||
},
|
||||
cost: { initial: 8, additional: {} },
|
||||
effect: {
|
||||
description:
|
||||
'Der Geweihte erhält die Stufen in der Sprache, die er gerade für seine Kommunikation benötigt. Es ist nicht notwendig, dass der Geweihte schon einmal etwas von der Sprache gehört oder gelesen hat.',
|
||||
duration: { amount: 3, modifier: 'QS', unit: 'Stunden' },
|
||||
unit: null,
|
||||
},
|
||||
chant: {
|
||||
duration: { amount: 2, unit: 'Aktion' },
|
||||
type: 'Chant',
|
||||
property: '',
|
||||
instant: false,
|
||||
pulse: false,
|
||||
},
|
||||
chant: { duration: { amount: 2, unit: 'Aktion' }, type: 'Chant', property: '' },
|
||||
},
|
||||
];
|
||||
|
767
data/Spells.js
767
data/Spells.js
File diff suppressed because it is too large
Load Diff
@ -7,38 +7,45 @@
|
||||
* @param {BigInt} Bonus=0
|
||||
* @param {BigInt} PointsRemaining=0
|
||||
*/
|
||||
const CompareResults = (Throws = [], AttributeLevels = [8, 8, 8], Bonus = 0, PointsRemaining = 0) => {
|
||||
const CompareResults = (
|
||||
Throws = [],
|
||||
AttributeLevels = [8, 8, 8],
|
||||
Bonus = 0,
|
||||
PointsRemaining = 0
|
||||
) => {
|
||||
let Passed = 0;
|
||||
let Fumbles = 0;
|
||||
let CriticalHit = 0;
|
||||
let AllPointsUsed = [];
|
||||
|
||||
let Passed = 0;
|
||||
let Fumbles = 0;
|
||||
let CriticalHit = 0;
|
||||
let AllPointsUsed = [];
|
||||
|
||||
for (let i = 0; i < Throws.length; i++) {
|
||||
let PointsUsed = 0;
|
||||
if (Math.floor(AttributeLevels[i] + Bonus) >= Throws[i]) {
|
||||
Passed++;
|
||||
} else if (Math.floor(AttributeLevels[i] + PointsRemaining + Bonus) >= Throws[i]) {
|
||||
Passed++;
|
||||
PointsUsed = (Throws[i] - Bonus - AttributeLevels[i]);
|
||||
PointsRemaining -= PointsUsed;
|
||||
}
|
||||
else {
|
||||
// We need to use all our points, so that next die/dice
|
||||
// would not return a 'Passed'.
|
||||
PointsUsed = PointsRemaining;
|
||||
PointsRemaining -= PointsUsed;
|
||||
}
|
||||
if (Throws[i] == 1) { CriticalHit++; }
|
||||
if (Throws[i] == 20) { Fumbles++; }
|
||||
AllPointsUsed.push(PointsUsed);
|
||||
}
|
||||
return {
|
||||
Passed: Passed,
|
||||
CriticalHit: CriticalHit,
|
||||
Fumbles: Fumbles,
|
||||
PointsUsed: AllPointsUsed,
|
||||
PointsRemaining: PointsRemaining
|
||||
};
|
||||
for (let i = 0; i < Throws.length; i++) {
|
||||
let PointsUsed = 0;
|
||||
if (Math.floor(AttributeLevels[i] + Bonus) >= Throws[i]) {
|
||||
Passed++;
|
||||
} else if (Math.floor(AttributeLevels[i] + PointsRemaining + Bonus) >= Throws[i]) {
|
||||
Passed++;
|
||||
PointsUsed = Throws[i] - Bonus - AttributeLevels[i];
|
||||
PointsRemaining -= PointsUsed;
|
||||
} else {
|
||||
// We need to use all our points, so that next die/dice
|
||||
// would not return a 'Passed'.
|
||||
PointsUsed = PointsRemaining;
|
||||
PointsRemaining -= PointsUsed;
|
||||
}
|
||||
if (Throws[i] == 1) {
|
||||
CriticalHit++;
|
||||
}
|
||||
if (Throws[i] == 20) {
|
||||
Fumbles++;
|
||||
}
|
||||
AllPointsUsed.push(PointsUsed);
|
||||
}
|
||||
return {
|
||||
Passed: Passed,
|
||||
CriticalHit: CriticalHit,
|
||||
Fumbles: Fumbles,
|
||||
PointsUsed: AllPointsUsed,
|
||||
PointsRemaining: PointsRemaining,
|
||||
};
|
||||
};
|
||||
module.exports = { CompareResults };
|
||||
|
21
functions/CreateResultTable.js
Normal file
21
functions/CreateResultTable.js
Normal file
@ -0,0 +1,21 @@
|
||||
const CreateResultTable = ({ Attributes: Attributes, Throws: Throws, PointsUsed: PointsUsed, Bonus: Bonus = 0 }) => {
|
||||
return `
|
||||
\`\`\`
|
||||
${''.padEnd(15)} ${Attributes.map(attr => `${attr.Name}`.padStart(6)).join('\t|\t')}\t|
|
||||
${'Dein Wert'.padEnd(15)} ${Attributes.map(attr => `${attr.Level}${Bonus ? `(${f(Bonus)})` : ``}`.padStart(6)).join(
|
||||
'\t|\t'
|
||||
)}\t|
|
||||
${'Dein Wurf'.padEnd(15)} ${Throws.map(Throw => `${Throw}`.padStart(6)).join('\t|\t')}\t|
|
||||
${'Abzüge'.padEnd(15)} ${PointsUsed.map(Points => `${Points}`.replace(0, '--').padStart(6)).join('\t|\t')}\t|
|
||||
${'Gesamt'.padEnd(15)} ${PointsUsed.reduce((acc, cur) => acc + cur)
|
||||
.toString()
|
||||
.padStart(6)}
|
||||
\`\`\`
|
||||
`;
|
||||
};
|
||||
|
||||
const f = n => {
|
||||
return (n > 0 ? '+' : '') + n;
|
||||
};
|
||||
|
||||
module.exports = { CreateResultTable };
|
@ -1,50 +1,28 @@
|
||||
const { getAttributeLevels } = require('@dsabot/getAttributeLevels');
|
||||
|
||||
//JSON.parse(require('fs').readFileSync('../data/Spells.json'))
|
||||
const Chants = require('../data/Chants');
|
||||
|
||||
/* definition of attributes in chant database
|
||||
|
||||
{
|
||||
id: 'adlerauge', // the id of the chant inside characters database.
|
||||
name: 'Adlerauge', // the well-known name of the chant.
|
||||
attributes: [ 'KL', 'IN', 'FF' ], // needed attribute checks when casting the chant
|
||||
chantduration: 2, // the player needs this many actions to cast the chant.
|
||||
modified_by: [], // the chant is modified by this character's attribute
|
||||
cost: null, // how many units does the chant cost? (when activated)
|
||||
cost_type: 'asp', // what kind of points does the character need?
|
||||
// AsP = Astral Points, KaP = Karmal Points
|
||||
effect: '', // What is the desired effect of this chant?
|
||||
effectduration: '' // How long does the effect last?
|
||||
talent: null //
|
||||
},
|
||||
|
||||
*/
|
||||
|
||||
const getChant = ({ Character: Character = [], chant_name: chant_name = '' } = {}) => {
|
||||
let chant_entry =
|
||||
Chants.find(chant => chant.id.toLowerCase() === chant_name.toLowerCase()) ||
|
||||
Chants.find(chant => chant.name.toLowerCase() === chant_name.toLowerCase());
|
||||
|
||||
if (!chant_entry) {
|
||||
console.log(`getchant did not find entry for ${chant_name}`);
|
||||
console.log(`getChant() Did not find entry for ${chant_name}`);
|
||||
return;
|
||||
}
|
||||
|
||||
let Level = 0; // This is the minimum attributes value.
|
||||
let Chant = Character.chants.find(chant => chant.id === chant_entry.id) || {};
|
||||
if (Chant) {
|
||||
if (Chant && Chant.hasOwnProperty('level')) {
|
||||
Level = Chant.level || 0;
|
||||
}
|
||||
let Name = Chant.name;
|
||||
//let ModifiedBy = Chant.modified_by;
|
||||
|
||||
let Attributes = getAttributeLevels(chant_entry.attributes, Character);
|
||||
|
||||
return {
|
||||
Name: Name,
|
||||
Name: chant_entry.name,
|
||||
Level: Level,
|
||||
Attributes: Attributes,
|
||||
//ModifiedBy: ModifiedBy,
|
||||
};
|
||||
};
|
||||
module.exports = { getChant };
|
||||
|
@ -30,15 +30,14 @@ const getSpell = ({ Character: Character = [], spell_name: spell_name = '' } = {
|
||||
|
||||
let Level = 0; // This is the minimum attributes value.
|
||||
let Spell = Character.spells.find(spell => spell.id === spell_entry.id) || {}; //?+
|
||||
if (Spell) {
|
||||
if (Spell && Spell.hasOwnProperty('level')) {
|
||||
Level = Spell.level || 0;
|
||||
}
|
||||
let Name = spell_entry.name;
|
||||
let ModifiedBy = spell_entry.modified_by;
|
||||
let Attributes = getAttributeLevels(spell_entry.attributes, Character);
|
||||
|
||||
return {
|
||||
Name: Name,
|
||||
Name: spell_entry.name,
|
||||
Level: Level,
|
||||
Attributes: Attributes,
|
||||
ModifiedBy: ModifiedBy,
|
||||
|
@ -140,7 +140,8 @@ const Replies = [
|
||||
{ id: 'PARRY_CRIT_SUCCESS', string: 'Kritischer Erfolg! Du darfst einen Passierschlag ausführen!'},
|
||||
{ id: 'ROLL', string: 'Du würfelst:'},
|
||||
{ id: 'HEADS_OR_TAILS', string: 'Die Münze landet auf ' },
|
||||
{ id: 'SPELL_UNKNOWN', string: 'Diesen Zauber kenne ich nicht.'}
|
||||
{ id: 'SPELL_UNKNOWN', string: 'Diesen Zauber kenne ich nicht.' },
|
||||
{ id: 'NO_SPELLS', string: 'Du kennst keine Zaubersprüche.'}
|
||||
];
|
||||
const Declination = ['dem', 'der', 'dem', '']; // Maskulinum, Feminimum, Neutrum, None
|
||||
const Articles = ['Der','Die','Das',''];
|
||||
|
Reference in New Issue
Block a user