diff --git a/src/server/fixes/fixes.js b/src/server/fixes/fixes.js index 1b2357be..171eaab1 100644 --- a/src/server/fixes/fixes.js +++ b/src/server/fixes/fixes.js @@ -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) {