Browse Source

bug: Added autofixes for tridents and bites

tags/v0.14.1^2
Shaun 2 months ago
parent
commit
85a55b6b3e
1 changed files with 33 additions and 0 deletions
  1. +33
    -0
      src/server/fixes/fixes.js

+ 33
- 0
src/server/fixes/fixes.js View File

@@ -1,5 +1,8 @@
/* eslint-disable max-lines-per-function */

const itemTypes = require('../items/config/types');
const spellGenerator = require('../items/generators/spellbook');

module.exports = {
fixDb: async function () {
await io.deleteAsync({
@@ -179,6 +182,36 @@ module.exports = {
effect.rolls.castSpell.type = 'smokeBomb';
});

items
.filter(i => i.name === 'Princess Morgawsa\'s Trident' && i.type !== 'Trident')
.forEach(i => {
i.type = 'Trident';
i.requires[0].stat = 'int';

delete i.implicitStats;

const typeConfig = itemTypes.types[i.slot][i.type];
spellGenerator.generate(i, {
...typeConfig,
spellQuality: i.spell.quality
});
});

items
.filter(i => i.name === 'Steelclaw\'s Bite' && i.type !== 'Curved Dagger')
.forEach(i => {
i.type = 'Curved Dagger';
i.requires[0].stat = 'dex';

delete i.implicitStats;

const typeConfig = itemTypes.types[i.slot][i.type];
spellGenerator.generate(i, {
...typeConfig,
spellQuality: i.spell.quality
});
});

items
.filter(f => f.effects?.[0]?.factionId === 'akarei' && !f.effects[0].properties)
.forEach(function (i) {


Loading…
Cancel
Save