Template:CorruptionsTable/doc: Difference between revisions

From Melvor Idle
(Created doc)
 
m (Fix copy to clipboard not working)
Line 7: Line 7:
});
});
let output = ``;results.forEach(alias => output += alias + '\n|-\n');console.log(output);
let output = ``;results.forEach(alias => output += alias + '\n|-\n');console.log(output);
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(outputString, 'text') : copy(outputString);
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(output, 'text') : copy(output);
</syntaxhighlight>
</syntaxhighlight>

Revision as of 15:13, 19 July 2024

The insides of this table was created using the following script. To use, open the game and paste the below into the console. The outputs will be copied to your clipboard automatically. Links to the effects have to be added manually.

let results = [];
game.corruption.corruptionEffects.allRows.sort((a,b) => a.minMonsterLevel - b.minMonsterLevel).forEach(row => {
	results.push(`|${numberWithCommas(row.minMonsterLevel)} || <span style="color:green">${row.customDescription}</span>`);
});
let output = ``;results.forEach(alias => output += alias + '\n|-\n');console.log(output);
self.nw?.Clipboard.get().set ? self.nw?.Clipboard?.get().set(output, 'text') : copy(output);