diff --git a/assets/images/challenger.png b/assets/images/challenger.png index 769204be..7b64a5ed 100644 Binary files a/assets/images/challenger.png and b/assets/images/challenger.png differ diff --git a/commands/avatar-edit/card.js b/commands/avatar-edit/card.js index 8c6b23c6..475d412e 100644 --- a/commands/avatar-edit/card.js +++ b/commands/avatar-edit/card.js @@ -37,7 +37,7 @@ module.exports = class CardCommand extends Command { size: 256 }); try { - const cardID = Math.floor(Math.random() * (9999 - 1000 + 1)) + 1000; + const cardID = Math.floor(Math.random() * ((9999 - 1000) + 1)) + 1000; let rarity; if (cardID < 5000) rarity = 'C'; else if (cardID < 8000) rarity = 'U'; diff --git a/commands/avatar-edit/challenger.js b/commands/avatar-edit/challenger.js index 68eba95e..b7653a7b 100644 --- a/commands/avatar-edit/challenger.js +++ b/commands/avatar-edit/challenger.js @@ -33,15 +33,13 @@ module.exports = class ChallengerCommand extends Command { size: 256 }); try { - const canvas = createCanvas(500, 500); + const canvas = createCanvas(800, 450); const ctx = canvas.getContext('2d'); const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'challenger.png')); const { body } = await snekfetch.get(avatarURL); const avatar = await loadImage(body); - ctx.fillStyle = '#ff0028'; - ctx.fillRect(0, 0, 500, 500); - ctx.drawImage(avatar, 226, 155, 200, 200); ctx.drawImage(base, 0, 0); + ctx.drawImage(avatar, 484, 98, 256, 256); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] }); } catch (err) { return msg.say(`Oh no, the image generation failed: \`${err.message}\`. Try again later!`); diff --git a/commands/games/battle.js b/commands/games/battle.js index aad62b84..6b964296 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -94,7 +94,7 @@ module.exports = class BattleCommand extends Command { } else if (choice === 'special') { const hit = Math.floor(Math.random() * 4) + 1; if (hit === 1) { - const damage = Math.floor((Math.random() * ((guard ? 300 : 150) - (100 + 1))) + 100); + const damage = Math.floor(Math.random() * (((guard ? 300 : 150) - 100) + 1)) + 100; await msg.say(`${user} deals **${damage}** damage!`); dealDamage(damage); reset(); diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 89963f7e..520c0065 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -39,7 +39,7 @@ module.exports = class GunfightCommand extends Command { return msg.say('Looks like they declined...'); } await msg.say('Get Ready...'); - const length = Math.floor((Math.random() * ((30000 - 1000) + 1)) + 1000); + const length = Math.floor(Math.random() * ((30000 - 1000) + 1)) + 1000; this.client.setTimeout(async () => { const word = words[Math.floor(Math.random() * words.length)]; await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`); diff --git a/package.json b/package.json index 134433d1..3ee9e9e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "29.1.1", + "version": "29.1.2", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {