Skip to content

Commit

Permalink
Revert spell icon changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyorl committed Nov 18, 2021
1 parent 11f8125 commit 4edd897
Show file tree
Hide file tree
Showing 422 changed files with 1,596 additions and 1,587 deletions.
2 changes: 1 addition & 1 deletion dnd5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Hooks.once("ready", function() {
// Determine whether a system migration is required and feasible
if ( !game.user.isGM ) return;
const currentVersion = game.settings.get("dnd5e", "systemMigrationVersion");
const NEEDS_MIGRATION_VERSION = "1.5.4";
const NEEDS_MIGRATION_VERSION = "1.5.5";
const COMPATIBLE_MIGRATION_VERSION = 0.80;
const totalDocuments = game.actors.size + game.scenes.size + game.items.size;
if ( !currentVersion && totalDocuments === 0 ) return game.settings.set("dnd5e", "systemMigrationVersion", game.system.data.version);
Expand Down
407 changes: 2 additions & 405 deletions json/icon-migration.json

Large diffs are not rendered by default.

404 changes: 404 additions & 0 deletions json/undo-icons.json

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions module/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,10 @@ export const migrateSceneData = function(scene, migrationData) {
export const getMigrationData = async function() {
const data = {};
try {
const res = await fetch("systems/dnd5e/json/icon-migration.json");
let res = await fetch("systems/dnd5e/json/icon-migration.json");
data.iconMap = await res.json();
res = await fetch("systems/dnd5e/json/undo-icons.json");
data.undoMap = await res.json();
} catch(err) {
console.warn(`Failed to retrieve icon migration data: ${err.message}`);
}
Expand Down Expand Up @@ -677,10 +679,16 @@ function _migrateItemCriticalData(item, updateData) {
* @returns {object} The updateData to apply
* @private
*/
function _migrateItemIcon(item, updateData, {iconMap}={}) {
if ( !iconMap || !item.img?.startsWith("systems/dnd5e/icons/") ) return updateData;
const rename = iconMap[item.img];
if ( rename ) updateData.img = rename;
function _migrateItemIcon(item, updateData, {iconMap, undoMap}={}) {
if ( iconMap && item.img?.startsWith("systems/dnd5e/icons/") ) {
const rename = iconMap[item.img];
if ( rename ) updateData.img = rename;
}

if ( undoMap ) {
const rename = undoMap[item.img];
if ( rename ) updateData.img = rename;
}
return updateData;
}

Expand Down
2 changes: 1 addition & 1 deletion packs/classfeatures.db
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
{"_id":"l7W6JB9yWLLLtQKP","name":"Multiattack: Volley","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>You can use your action to make a ranged attack against any number of creatures within 10 feet of a point you can see within your weapon's range. You must have ammunition for each target, as normal, and you make a separate attack roll for each target.</p>","chat":"","unidentified":""},"source":"PHB pg. 93","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":null,"units":""},"target":{"value":20,"units":"ft","type":"square"},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":0,"per":""},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Hunter 11","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/skills/ranged/target-bullseye-arrow-white.webp","effects":[]}
{"_id":"l8tUhZ5Pecm9wz7I","name":"Persistent Rage","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>Beginning at 15th level, your @Compendium[dnd5e.classfeatures.VoR0SUrNX5EJVPIO]{Rage} is so fierce that it ends early only if you fall unconscious or if you choose to end it.</p>","chat":"","unidentified":""},"source":"PHB pg. 49","activation":{"type":"","cost":0,"condition":""},"duration":{"value":"","units":""},"target":{"value":"","units":"","type":""},"range":{"value":"","long":null,"units":""},"uses":{"value":0,"max":0,"per":null,"type":""},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"value":"","scaling":"spell"},"requirements":"Barbarian 15","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/skills/social/intimidation-impressing.webp","effects":[]}
{"_id":"lEZKbWaVrSljRa9n","name":"Invocation: Eyes of the Rune Keeper","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>You can read all writing.</p>","chat":"","unidentified":""},"source":"PHB pg. 111","activation":{"type":"","cost":0,"condition":""},"duration":{"value":"","units":""},"target":{"value":"","units":"","type":""},"range":{"value":"","long":null,"units":""},"uses":{"value":0,"max":0,"per":null,"type":""},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"value":"","scaling":"spell"},"requirements":"Warlock 2","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/sundries/documents/document-torn-diagram-tan.webp","effects":[]}
{"_id":"lT8GsPOPgRzDC3QJ","name":"Bonus Cantrip (Druid)","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>When you choose this circle at 2nd level, you learn one additional druid cantrip of your choice.</p>","chat":"","unidentified":""},"source":"","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":0,"per":null},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Circle of the Land 2","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/magic/nature/vines-thorned-glow-green.webp","effects":[]}
{"_id":"lT8GsPOPgRzDC3QJ","name":"Bonus Cantrip (Druid)","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>When you choose this circle at 2nd level, you learn one additional druid cantrip of your choice.</p>","chat":"","unidentified":""},"source":"","activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":0,"per":null},"consume":{"type":"","target":null,"amount":null},"ability":null,"actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"requirements":"Circle of the Land 2","recharge":{"value":null,"charged":false}},"flags":{},"img":"systems/dnd5e/icons/spells/vines-acid-1.jpg","effects":[]}
{"_id":"laVHAIOKIsUeezWd","name":"Superior Hunter's Defense: Evasion","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>When you are subjected to an effect, such as a red dragon's fiery breath or a lightning bolt spell, that allows you to make a Dexterity saving throw to take only half damage, you instead take no damage if you succeed on the saving throw, and only half damage if you fail.</p>","chat":"","unidentified":""},"source":"PHB pg. 93","activation":{"type":"","cost":0,"condition":""},"duration":{"value":"","units":""},"target":{"value":"","units":"","type":""},"range":{"value":"","long":null,"units":""},"uses":{"value":0,"max":0,"per":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"value":"","scaling":"spell"},"requirements":"Hunter 15","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/magic/air/air-wave-gust-smoke-yellow.webp","effects":[]}
{"_id":"lxfdjLer3uKjyZqU","name":"Invocation: Master of Myriad Forms","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>You can cast @Compendium[dnd5e.spells.8RTDOt80u8aBv9qx]{Alter Self} at will, without expending a spell slot.</p>","chat":"","unidentified":""},"source":"PHB pg. 111","activation":{"type":"action","cost":1,"condition":""},"duration":{"value":1,"units":"hour"},"target":{"value":null,"units":null,"type":"self"},"range":{"value":null,"long":null,"units":"self"},"uses":{"value":0,"max":0,"per":"","type":""},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"value":"","scaling":"spell"},"requirements":"Warlock 15","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/creatures/abilities/cougar-pounce-stalk-black.webp","effects":[]}
{"_id":"mHcSjcHJ8oZu3hkb","name":"Fighting Style: Two-Weapon Fighting","permission":{"default":0},"type":"feat","data":{"description":{"value":"<p>When you engage in two-weapon fighting, you can add your ability modifier to the damage of the second attack.</p>","chat":"","unidentified":""},"source":"PHB pg. 72; 73; 91","activation":{"type":"","cost":0,"condition":""},"duration":{"value":"","units":""},"target":{"value":"","units":"","type":""},"range":{"value":"","long":null,"units":""},"uses":{"value":0,"max":0,"per":null,"type":""},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":{"threshold":null,"damage":""},"damage":{"parts":[],"versatile":"","value":""},"formula":"","save":{"ability":"","dc":null,"value":"","scaling":"spell"},"requirements":"Fighter 1, Champion 10, Ranger 2","recharge":{"value":null,"charged":false}},"flags":{},"img":"icons/skills/melee/weapons-crossed-swords-white-blue.webp","effects":[]}
Expand Down
22 changes: 11 additions & 11 deletions packs/heroes.db

Large diffs are not rendered by default.

Loading

0 comments on commit 4edd897

Please sign in to comment.