Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e180595dcd | ||
|
|
ed708bdde0 | ||
|
|
d7852d640f | ||
|
|
a2fdee88b6 | ||
|
|
af070b1578 | ||
|
|
83a8eeef0f | ||
|
|
34f8e7402b | ||
|
|
1b7e2cd850 | ||
|
|
16b16ce6c6 | ||
|
|
da8b91594e | ||
|
|
fc26f5a73e | ||
|
|
d2cc2833a9 |
@@ -345,8 +345,8 @@ Characters.calculate = {
|
|||||||
var value;
|
var value;
|
||||||
var add = 0;
|
var add = 0;
|
||||||
var mul = 1;
|
var mul = 1;
|
||||||
var min = Math.NEGATIVE_INFINITY;
|
var min = Number.NEGATIVE_INFINITY;
|
||||||
var max = Math.POSITIVE_INFINITY;
|
var max = Number.POSITIVE_INFINITY;
|
||||||
|
|
||||||
Effects.find({
|
Effects.find({
|
||||||
charId: charId,
|
charId: charId,
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ Spells.attachSchema(Schemas.Spell);
|
|||||||
|
|
||||||
Spells.attachBehaviour("softRemovable");
|
Spells.attachBehaviour("softRemovable");
|
||||||
makeChild(Spells); //children of spell lists
|
makeChild(Spells); //children of spell lists
|
||||||
|
makeParent(Spells, ["name", "enabled"]); //parents of attacks
|
||||||
|
|
||||||
Spells.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
Spells.allow(CHARACTER_SUBSCHEMA_ALLOW);
|
||||||
Spells.deny(CHARACTER_SUBSCHEMA_DENY);
|
Spells.deny(CHARACTER_SUBSCHEMA_DENY);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Router.map(function() {
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
characters: function(){
|
characters: function(){
|
||||||
return Characters.find({}, {fields: {_id: 1}});
|
return Characters.find({}, {fields: {_id: 1}, sort: {name: 1}});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onAfterAction: function() {
|
onAfterAction: function() {
|
||||||
|
|||||||
@@ -3,26 +3,26 @@
|
|||||||
<div layout vertical flex>
|
<div layout vertical flex>
|
||||||
<div layout horizontal>
|
<div layout horizontal>
|
||||||
<!--attackBonus-->
|
<!--attackBonus-->
|
||||||
<paper-input id="attackBonusInput"
|
<paper-input class="attackBonusInput"
|
||||||
label="Attack Bonus"
|
label="Attack Bonus"
|
||||||
floatinglabel
|
floatinglabel
|
||||||
value={{attackBonus}}
|
value={{attackBonus}}
|
||||||
flex></paper-input>
|
flex></paper-input>
|
||||||
<!--details-->
|
<!--details-->
|
||||||
<paper-input id="detailInput"
|
<paper-input class="detailInput"
|
||||||
label="Details"
|
label="Details"
|
||||||
floatinglabel
|
floatinglabel
|
||||||
value={{details}}></paper-input>
|
value={{details}}></paper-input>
|
||||||
</div>
|
</div>
|
||||||
<div layout horizontal>
|
<div layout horizontal>
|
||||||
<!--damageBonus-->
|
<!--damageBonus-->
|
||||||
<paper-input id="damageInput"
|
<paper-input class="damageInput"
|
||||||
label="Damage"
|
label="Damage"
|
||||||
floatinglabel
|
floatinglabel
|
||||||
value={{damage}}
|
value={{damage}}
|
||||||
flex></paper-input>
|
flex></paper-input>
|
||||||
<!--DamageType-->
|
<!--DamageType-->
|
||||||
<paper-dropdown-menu id="damageTypeDropdown" label="Damage Type">
|
<paper-dropdown-menu class="damageTypeDropdown" label="Damage Type">
|
||||||
<paper-dropdown layered class="dropdown">
|
<paper-dropdown layered class="dropdown">
|
||||||
<core-menu class="menu" selected={{damageType}}>
|
<core-menu class="menu" selected={{damageType}}>
|
||||||
{{#each damageTypes}}
|
{{#each damageTypes}}
|
||||||
@@ -34,6 +34,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--Delete Button-->
|
<!--Delete Button-->
|
||||||
<paper-icon-button id="deleteAttack" role="button" tabindex="0" icon="delete" aria-label="Delete"></paper-icon-button>
|
<paper-icon-button class="deleteAttack" role="button" tabindex="0" icon="delete" aria-label="Delete"></paper-icon-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -15,23 +15,23 @@ var damageTypes = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
Template.attackEdit.events({
|
Template.attackEdit.events({
|
||||||
"tap #deleteAttack": function(event, instance) {
|
"tap .deleteAttack": function(event, instance) {
|
||||||
Attacks.softRemoveNode(this._id);
|
Attacks.softRemoveNode(this._id);
|
||||||
GlobalUI.deletedToast(this._id, "Attacks", "Attack");
|
GlobalUI.deletedToast(this._id, "Attacks", "Attack");
|
||||||
},
|
},
|
||||||
"change #attackBonusInput": function(event) {
|
"change .attackBonusInput": function(event) {
|
||||||
var value = event.currentTarget.value;
|
var value = event.currentTarget.value;
|
||||||
Attacks.update(this._id, {$set: {attackBonus: value}});
|
Attacks.update(this._id, {$set: {attackBonus: value}});
|
||||||
},
|
},
|
||||||
"change #damageInput": function(event) {
|
"change .damageInput": function(event) {
|
||||||
var value = event.currentTarget.value;
|
var value = event.currentTarget.value;
|
||||||
Attacks.update(this._id, {$set: {damage: value}});
|
Attacks.update(this._id, {$set: {damage: value}});
|
||||||
},
|
},
|
||||||
"change #detailInput": function(event) {
|
"change .detailInput": function(event) {
|
||||||
var value = event.currentTarget.value;
|
var value = event.currentTarget.value;
|
||||||
Attacks.update(this._id, {$set: {details: value}});
|
Attacks.update(this._id, {$set: {details: value}});
|
||||||
},
|
},
|
||||||
"core-select #damageTypeDropdown": function(event) {
|
"core-select .damageTypeDropdown": function(event) {
|
||||||
var detail = event.originalEvent.detail;
|
var detail = event.originalEvent.detail;
|
||||||
if (!detail.isSelected) return;
|
if (!detail.isSelected) return;
|
||||||
var value = detail.item.getAttribute("name");
|
var value = detail.item.getAttribute("name");
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ Template.resource.helpers({
|
|||||||
return !valuePositive;
|
return !valuePositive;
|
||||||
},
|
},
|
||||||
getColor: function(){
|
getColor: function(){
|
||||||
if (this.char.attributeValue(this.name) > 0){
|
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
||||||
|
if (value > 0){
|
||||||
return this.color;
|
return this.color;
|
||||||
} else {
|
} else {
|
||||||
return "grey";
|
return "grey";
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
{{characterCalculate "attributeValue" ../_id name}}
|
{{characterCalculate "attributeValue" ../_id name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="title white-text">
|
<div class="title white-text">
|
||||||
d{{diceNum}} {{characterCalculate "abilityMod" ../_id "constitution"}}
|
d{{diceNum}} {{conMod}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ Template.hitDice.helpers({
|
|||||||
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
||||||
return value <= 0;
|
return value <= 0;
|
||||||
},
|
},
|
||||||
|
conMod: function(){
|
||||||
|
return signedString(
|
||||||
|
Characters.calculate.abilityMod(this.char._id, "constitution")
|
||||||
|
);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.hitDice.events({
|
Template.hitDice.events({
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ Template.characterSideList.helpers({
|
|||||||
{owner: userId},
|
{owner: userId},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{fields: {name: 1}}
|
{
|
||||||
|
fields: {name: 1},
|
||||||
|
sort: {name: 1},
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -208,3 +208,14 @@ ChangeLogs.insert({
|
|||||||
"Made dependency loops return NaN immediately, rather than looping indefinitely until a page refresh. Adding an effect that adds \"strength\" to Strength, won't cause Strength to constantly increase or freeze the browser, Strength just becomes NaN",
|
"Made dependency loops return NaN immediately, rather than looping indefinitely until a page refresh. Adding an effect that adds \"strength\" to Strength, won't cause Strength to constantly increase or freeze the browser, Strength just becomes NaN",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.6.4",
|
||||||
|
changes: [
|
||||||
|
"Hit dice now has a \"+\" between the dice and the constitution modifier",
|
||||||
|
"Items with multiple attacks should have the damage type editable on all attacks now",
|
||||||
|
"Spell attacks should now correctly inherit changes to their spell's name",
|
||||||
|
"Character lists should now be ordered alphabetically",
|
||||||
|
"Skills should have correct min and max effects applied again",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user