diff --git a/docs/images/emoji/CD_BLK.jpg b/docs/images/emoji/CD_BLK.jpg new file mode 100644 index 0000000..932b131 Binary files /dev/null and b/docs/images/emoji/CD_BLK.jpg differ diff --git a/docs/images/emoji/CD_EFT.jpg b/docs/images/emoji/CD_EFT.jpg new file mode 100644 index 0000000..c1a53e7 Binary files /dev/null and b/docs/images/emoji/CD_EFT.jpg differ diff --git a/docs/images/emoji/CD_ONE.jpg b/docs/images/emoji/CD_ONE.jpg new file mode 100644 index 0000000..973f1b7 Binary files /dev/null and b/docs/images/emoji/CD_ONE.jpg differ diff --git a/docs/images/emoji/CD_TWO.jpg b/docs/images/emoji/CD_TWO.jpg new file mode 100644 index 0000000..60ff9f5 Binary files /dev/null and b/docs/images/emoji/CD_TWO.jpg differ diff --git a/docs/images/emoji/LICENSE b/docs/images/emoji/LICENSE new file mode 100644 index 0000000..0aa0293 --- /dev/null +++ b/docs/images/emoji/LICENSE @@ -0,0 +1,2 @@ +© 1997-2021 Bethesda Softworks LLC, a ZeniMax Media company. Bethesda Softworks, ZeniMax and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the U.S. and/or other countries. Fallout and related logos are trademarks or registered trademarks of Bethesda Softworks LLC in the U.S. and/or other countries. All Rights Reserved. +Ownership and copyright over the images in the folder remains with the original rights holders. \ No newline at end of file diff --git a/docs/images/emoji/README.md b/docs/images/emoji/README.md new file mode 100644 index 0000000..f2ef5f4 --- /dev/null +++ b/docs/images/emoji/README.md @@ -0,0 +1,3 @@ +# Emoji Image Backup + +In the event that the custom emoji used by the dice rolling system are no longer available, the images provided can be used to recreate them and restore the references in `src/utils/rolls/combat-roll.ts`. \ No newline at end of file diff --git a/src/commands/rolls/combat.ts b/src/commands/rolls/combat.ts index 7e8a53b..5ee6ba0 100644 --- a/src/commands/rolls/combat.ts +++ b/src/commands/rolls/combat.ts @@ -53,7 +53,7 @@ class CombatRollCommand extends Command { } private getResultsText = (results: CombatRollData[]): string => - `[ ${results.map((r) => r.output).join(", ")} ]`; + `[ ${results.map((r) => r.output).join(" ")} ]`; private rerollOne = ( message: CommandoMessage, @@ -120,12 +120,12 @@ class CombatRollCommand extends Command { name: "main", content: new MessageEmbed({ ...getAuthorData(this.client), - title: success ? "Success!" : "Failure!", - color: success ? successColor : failureColor, + title: damage > 0 ? "Hit!" : "Miss!", + color: damage > 0 ? successColor : failureColor, - description: success - ? "> Your efforts will help build a better tomorrow!" - : "> Please report to your Overseer to determine remedial actions.", + description: damage > 0 + ? "> A solid hit, they are gonna feel that tomorrow!" + : "> It goes wide, better luck next time.", fields: [ { name: "Damage", diff --git a/src/commands/rolls/skill.ts b/src/commands/rolls/skill.ts index 9450b22..538c3b7 100644 --- a/src/commands/rolls/skill.ts +++ b/src/commands/rolls/skill.ts @@ -91,7 +91,7 @@ class SkillRollCommand extends Command { fields: [ { name: "Successes", - value: `${successes}${complicated ? " ⚠️" : ""}`, + value: `${successes}/${options.difficulty} ${complicated ? " ⚠️" : ""}`, inline: true, }, { @@ -179,7 +179,7 @@ class SkillRollCommand extends Command { .slice(1) .find((arg) => /^-?[\d.]+(?:e-?\d+)?$/.test(arg)); const difficulty = - (difficultyString && parseInt(difficultyString)) || undefined; + (difficultyString && parseInt(difficultyString)) || 0; let dice: number | undefined; let tag: number | undefined; diff --git a/src/utils/rolls/combat-roll.ts b/src/utils/rolls/combat-roll.ts index 491ed4a..a4b0f3b 100644 --- a/src/utils/rolls/combat-roll.ts +++ b/src/utils/rolls/combat-roll.ts @@ -49,13 +49,20 @@ export interface CombatRollResult { } const getOutput = (value: number, effect: number): string => { - let output = `${value}`; - - if (value > 0) { - output = effect ? `_**${value}**_` : `_${value}_`; + switch (value) { + case 1: + return `<:CD_ONE:889203020510933044>`; + case 2: + return `<:CD_TWO:889203051599114281>`; + case 3: + case 4: + return `<:CD_BLK:889203068091113583>`; + case 5: + case 6: + return `<:CD_EFT:889203079981957151>`; + default: + return `${value}`; } - - return output; }; const getDamage = (value: number) => {