Compare commits

...

2 Commits
0.4.0 ... 0.4.2

Author SHA1 Message Date
Stefan Zermatten
ef44f6c1a5 Fixed migration of attack data 2015-05-19 11:44:06 +02:00
Stefan Zermatten
f455cea43f Fixed maths for strength calculations rounding, rather than rounding down 2015-05-18 14:31:07 +02:00
2 changed files with 18 additions and 16 deletions

View File

@@ -38,7 +38,7 @@
</tr> </tr>
<tr> <tr>
<td>Standing long jump</td> <td>Standing long jump</td>
<td>{{evaluate charId "round(strength/2)"}} feet</td> <td>{{evaluate charId "floor(strength/2)"}} feet</td>
</tr> </tr>
<tr> <tr>
<td>Running high jump</td> <td>Running high jump</td>
@@ -51,10 +51,10 @@
</tr> </tr>
<tr> <tr>
<td>Standing high jump</td> <td>Standing high jump</td>
<td>{{evaluate charId "round((3 + strengthMod)/2)"}} feet</td> <td>{{evaluate charId "floor((3 + strengthMod)/2)"}} feet</td>
<td class="caption"> <td class="caption">
Can reach a ledge as high as Can reach a ledge as high as
{{evaluate charId "round((3 + strengthMod)/2)"}} feet {{evaluate charId "floor((3 + strengthMod)/2)"}} feet
+ 1.5&times; your height + 1.5&times; your height
</td> </td>
</tr> </tr>

View File

@@ -65,20 +65,22 @@ Migrations.add({
up: function() { up: function() {
//update attacks //update attacks
Attacks.find({}).forEach(function(attack) { Attacks.find({}).forEach(function(attack) {
var newDamage = attack.damageDice + if (!attack.damage && attack.damageDice && attack.damageBonus){
" + {" + attack.damageBonus + "}"; var newDamage = attack.damageDice +
Attacks.update( " + {" + attack.damageBonus + "}";
attack._id, Attacks.update(
{ attack._id,
$unset: { {
damageBonus: "", $unset: {
damageDice: "", damageBonus: "",
damageDice: "",
},
$set: {
damage: newDamage
},
}, },
$set: { {validate: false});
damage: newDamage }
},
},
{validate: false});
}); });
//update Items //update Items
Items.update( Items.update(