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>
<td>Standing long jump</td>
<td>{{evaluate charId "round(strength/2)"}} feet</td>
<td>{{evaluate charId "floor(strength/2)"}} feet</td>
</tr>
<tr>
<td>Running high jump</td>
@@ -51,10 +51,10 @@
</tr>
<tr>
<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">
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
</td>
</tr>

View File

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