Merge pull request #122 from Dumbgenius/feature-22-temp-hp, requires migration

Feature - TempHP as a character attribute,
This commit is contained in:
Stefan Zermatten
2017-09-07 16:29:55 +02:00
committed by GitHub
11 changed files with 198 additions and 113 deletions

View File

@@ -36,3 +36,21 @@ Migrations.add({
return;
},
});
Migrations.add({
version: 2,
name: "Adds TempHP as a character attribute",
up: function() {
//update characters
Characters.find({}).forEach(function(char){
if (char.tempHP) return;
Characters.update(char._id, {$set: {
"tempHP.adjustment": 0,
"tempHP.reset": "longRest",
}});
});
},
down: function(){
return;
},
});