Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f1376a666 | ||
|
|
78b1d71b9d | ||
|
|
1323d8006c | ||
|
|
87d722adaf | ||
|
|
90e511eb00 | ||
|
|
5b8c25f5de |
@@ -159,6 +159,7 @@ Schemas.Character = new SimpleSchema({
|
|||||||
deathSave: {type: Schemas.DeathSave},
|
deathSave: {type: Schemas.DeathSave},
|
||||||
|
|
||||||
//permissions
|
//permissions
|
||||||
|
party: {type: String, regEx: SimpleSchema.RegEx.Id, optional: true},
|
||||||
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
|
owner: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||||
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
readers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||||
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
writers: {type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: []},
|
||||||
@@ -173,6 +174,8 @@ Schemas.Character = new SimpleSchema({
|
|||||||
//slowed down by carrying too much?
|
//slowed down by carrying too much?
|
||||||
"settings.useVariantEncumbrance": {type: Boolean, defaultValue: false},
|
"settings.useVariantEncumbrance": {type: Boolean, defaultValue: false},
|
||||||
"settings.useStandardEncumbrance": {type: Boolean, defaultValue: true},
|
"settings.useStandardEncumbrance": {type: Boolean, defaultValue: true},
|
||||||
|
//hide spellcasting
|
||||||
|
"settings.hideSpellcasting": {type: Boolean, defaultValue: false},
|
||||||
});
|
});
|
||||||
|
|
||||||
Characters.attachSchema(Schemas.Character);
|
Characters.attachSchema(Schemas.Character);
|
||||||
|
|||||||
@@ -46,6 +46,12 @@ Meteor.methods({
|
|||||||
});
|
});
|
||||||
report.owner = this.userId;
|
report.owner = this.userId;
|
||||||
Reports.insert(report);
|
Reports.insert(report);
|
||||||
|
Email.send({
|
||||||
|
from: "reports@dicecloud.com",
|
||||||
|
to: "stefan.zermatten@gmail.com",
|
||||||
|
subject: "DiceCloud feedback - " + report.title,
|
||||||
|
text: JSON.stringify(_.omit(report, "metaData"), null, '\t'),
|
||||||
|
});
|
||||||
},
|
},
|
||||||
deleteReport: function(id) {
|
deleteReport: function(id) {
|
||||||
var user = Meteor.users.findOne(this.userId);
|
var user = Meteor.users.findOne(this.userId);
|
||||||
|
|||||||
@@ -1,13 +1,26 @@
|
|||||||
<template name="characterSettings">
|
<template name="characterSettings">
|
||||||
{{#with character}}
|
{{#with character}}
|
||||||
<div>
|
<div>
|
||||||
<div layout horizontal>
|
<table>
|
||||||
<div>Use variant encumbrance </div>
|
<tr>
|
||||||
<paper-toggle-button id="variantEncumbrance"
|
<td>Hide Spells tab</td>
|
||||||
checked={{settings.useVariantEncumbrance}}
|
<td>
|
||||||
touch-action="pan-y">
|
<paper-toggle-button id="hideSpellcasting"
|
||||||
</paper-toggle-button>
|
checked={{settings.hideSpellcasting}}
|
||||||
</div>
|
touch-action="pan-y">
|
||||||
|
</paper-toggle-button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Use variant encumbrance</td>
|
||||||
|
<td>
|
||||||
|
<paper-toggle-button id="variantEncumbrance"
|
||||||
|
checked={{settings.useVariantEncumbrance}}
|
||||||
|
touch-action="pan-y">
|
||||||
|
</paper-toggle-button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -14,4 +14,13 @@ Template.characterSettings.events({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"change #hideSpellcasting": function(event, instance){
|
||||||
|
var value = instance.find("#hideSpellcasting").checked;
|
||||||
|
if (this.settings.hideSpellcasting !== value){
|
||||||
|
Characters.update(
|
||||||
|
this._id,
|
||||||
|
{$set: {"settings.hideSpellcasting": value}}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
<paper-tab name="stats">Stats</paper-tab>
|
<paper-tab name="stats">Stats</paper-tab>
|
||||||
<paper-tab name="features">Features</paper-tab>
|
<paper-tab name="features">Features</paper-tab>
|
||||||
<paper-tab name="inventory">Inventory</paper-tab>
|
<paper-tab name="inventory">Inventory</paper-tab>
|
||||||
|
{{#unless hideSpellcasting}}
|
||||||
<paper-tab name="spells">Spells</paper-tab>
|
<paper-tab name="spells">Spells</paper-tab>
|
||||||
|
{{/unless}}
|
||||||
<paper-tab name="persona">Persona</paper-tab>
|
<paper-tab name="persona">Persona</paper-tab>
|
||||||
<paper-tab name="journal">Journal</paper-tab>
|
<paper-tab name="journal">Journal</paper-tab>
|
||||||
</paper-tabs>
|
</paper-tabs>
|
||||||
@@ -42,7 +44,9 @@
|
|||||||
<section flex name="stats">{{> stats}}</section>
|
<section flex name="stats">{{> stats}}</section>
|
||||||
<section flex name="features">{{> features}}</section>
|
<section flex name="features">{{> features}}</section>
|
||||||
<section flex name="inventory">{{> inventory}}</section>
|
<section flex name="inventory">{{> inventory}}</section>
|
||||||
|
{{#unless hideSpellcasting}}
|
||||||
<section flex name="spells">{{> spells}}</section>
|
<section flex name="spells">{{> spells}}</section>
|
||||||
|
{{/unless}}
|
||||||
<section flex name="persona">{{> persona}}</section>
|
<section flex name="persona">{{> persona}}</section>
|
||||||
<section flex name="journal">{{> journal}}</section>
|
<section flex name="journal">{{> journal}}</section>
|
||||||
</core-animated-pages>
|
</core-animated-pages>
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ Template.characterSheet.helpers({
|
|||||||
selectedTab: function(){
|
selectedTab: function(){
|
||||||
return getTab(this._id);
|
return getTab(this._id);
|
||||||
},
|
},
|
||||||
|
hideSpellcasting: function() {
|
||||||
|
var char = Characters.findOne(this._id);
|
||||||
|
return char && char.settings.hideSpellcasting;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.characterSheet.events({
|
Template.characterSheet.events({
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
body /deep/ #statGroupDropDown {
|
html /deep/ .operationDropDown {
|
||||||
width: 120px;
|
width: 152px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body /deep/ #statDropDown {
|
html /deep/ .statDropDown {
|
||||||
width: 120px;
|
width: 152px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body /deep/ #operationDropDown {
|
html /deep/ .damageMultiplierDropDown {
|
||||||
width: 100px;
|
width: 152px;
|
||||||
}
|
|
||||||
|
|
||||||
body /deep/ #damageMultiplierDropDown {
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body /deep/ #proficiencyDropDown {
|
|
||||||
width: 120px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html /deep/ .effectEdit paper-input {
|
html /deep/ .effectEdit paper-input {
|
||||||
@@ -24,6 +16,7 @@ html /deep/ .effectEdit paper-input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
html /deep/ .effectEdit {
|
html /deep/ .effectEdit {
|
||||||
|
height: 64px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,23 @@
|
|||||||
<template name="effectEdit">
|
<template name="effectEdit">
|
||||||
<div class="effectEdit" layout horizontal center>
|
<div class="effectEdit" layout horizontal center>
|
||||||
<paper-dropdown-menu class="statGroupDropDown" label="Stat Group" flex>
|
<paper-dropdown-menu class="statDropDown"
|
||||||
<paper-dropdown layered class="dropdown">
|
label="Stat">
|
||||||
<core-menu class="menu statGroupMenu" selected={{selectedStatGroup}}>
|
<paper-dropdown layered
|
||||||
{{#each statGroups}}
|
class="dropdown">
|
||||||
<paper-item class="statGroupSelect" name={{this}}>{{this}}</paper-item>
|
<core-menu class="menu statMenu" selected={{stat}}>
|
||||||
{{/each}}
|
{{#each statGroups}}
|
||||||
</core-menu>
|
<div style="font-weight: bold;
|
||||||
</paper-dropdown>
|
margin-top: 16px;">{{this}}</div>
|
||||||
</paper-dropdown-menu>
|
{{#each stats}}
|
||||||
{{#if stats}}
|
<paper-item name={{stat}}>{{name}}</paper-item>
|
||||||
<paper-dropdown-menu class="statDropDown" label="Stat" flex>
|
{{/each}}
|
||||||
<paper-dropdown layered class="dropdown">
|
|
||||||
<core-menu class="menu statMenu" selected={{stat}} on-tap="onStatMenuTap">
|
|
||||||
{{#each stats}}
|
|
||||||
<paper-item name={{stat}}>{{name}}</paper-item>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</core-menu>
|
</core-menu>
|
||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
{{/if}}
|
|
||||||
{{#if operations}}
|
{{#if operations}}
|
||||||
<paper-dropdown-menu class="operationDropDown" label="Operation" flex>
|
<paper-dropdown-menu class="operationDropDown"
|
||||||
|
label="Operation">
|
||||||
<paper-dropdown layered class="dropdown">
|
<paper-dropdown layered class="dropdown">
|
||||||
<core-menu class="menu operationMenu" selected={{operation}}>
|
<core-menu class="menu operationMenu" selected={{operation}}>
|
||||||
{{#each operations}}
|
{{#each operations}}
|
||||||
@@ -31,24 +27,39 @@
|
|||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{> Template.dynamic template=effectValueTemplate}}
|
{{#if effectValueTemplate}}
|
||||||
<paper-icon-button class="deleteEffect" role="button" tabindex="0" icon="delete" aria-label="Delete"></paper-icon-button>
|
{{> Template.dynamic template=effectValueTemplate}}
|
||||||
|
{{else}}
|
||||||
|
<div flex></div>
|
||||||
|
{{/if}}
|
||||||
|
<paper-icon-button class="deleteEffect"
|
||||||
|
icon="delete">
|
||||||
|
</paper-icon-button>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="regularEffectValue">
|
<template name="regularEffectValue">
|
||||||
<paper-input class="effectValueInput" label="Value" floatinglabel value={{effectValue}} flex></paper-input>
|
<paper-input class="effectValueInput"
|
||||||
|
label="Value"
|
||||||
|
floatinglabel
|
||||||
|
value={{effectValue}}
|
||||||
|
flex>
|
||||||
|
</paper-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="multiplierEffectValue">
|
<template name="multiplierEffectValue">
|
||||||
<paper-dropdown-menu class="damageMultiplierDropDown" label="Damage Multiplier" flex>
|
<paper-dropdown-menu class="damageMultiplierDropDown"
|
||||||
<paper-dropdown layered class="dropdown">
|
label="Damage Multiplier">
|
||||||
<core-menu class="menu multiplierMenu" selected={{value}}>
|
<paper-dropdown layered
|
||||||
|
class="dropdown">
|
||||||
|
<core-menu class="menu multiplierMenu"
|
||||||
|
selected={{value}}>
|
||||||
<paper-item name="0.5">Resistance</paper-item>
|
<paper-item name="0.5">Resistance</paper-item>
|
||||||
<paper-item name="2">Vulnerability</paper-item>
|
<paper-item name="2">Vulnerability</paper-item>
|
||||||
<paper-item name="0">Immunity</paper-item>
|
<paper-item name="0">Immunity</paper-item>
|
||||||
</core-menu>
|
</core-menu>
|
||||||
</paper-dropdown>
|
</paper-dropdown>
|
||||||
</paper-dropdown-menu>
|
</paper-dropdown-menu>
|
||||||
|
<div flex></div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -93,24 +93,17 @@ var skillOperations = [
|
|||||||
{name: "Conditional Benefit", operation: "conditional"}
|
{name: "Conditional Benefit", operation: "conditional"}
|
||||||
];
|
];
|
||||||
|
|
||||||
Template.effectEdit.created = function(){
|
|
||||||
var statGroup = statsDict[this.data.stat] && statsDict[this.data.stat].group;
|
|
||||||
this.selectedStatGroup = new ReactiveVar(statGroup);
|
|
||||||
};
|
|
||||||
|
|
||||||
Template.effectEdit.helpers({
|
Template.effectEdit.helpers({
|
||||||
selectedStatGroup: function(){
|
|
||||||
return Template.instance().selectedStatGroup.get();
|
|
||||||
},
|
|
||||||
statGroups: function(){
|
statGroups: function(){
|
||||||
return statGroupNames;
|
return statGroupNames;
|
||||||
},
|
},
|
||||||
stats: function(){
|
stats: function(){
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var group = this;
|
||||||
return statGroups[group];
|
return statGroups[group];
|
||||||
},
|
},
|
||||||
operations: function(){
|
operations: function(){
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var stat = statsDict[this.stat];
|
||||||
|
var group = stat && stat.group;
|
||||||
if (group === "Weakness/Resistance") return null;
|
if (group === "Weakness/Resistance") return null;
|
||||||
if (group === "Saving Throws" || group === "Skills"){
|
if (group === "Saving Throws" || group === "Skills"){
|
||||||
return skillOperations;
|
return skillOperations;
|
||||||
@@ -120,7 +113,8 @@ Template.effectEdit.helpers({
|
|||||||
},
|
},
|
||||||
effectValueTemplate: function(){
|
effectValueTemplate: function(){
|
||||||
//resistance/vulnerability template
|
//resistance/vulnerability template
|
||||||
var group = Template.instance().selectedStatGroup.get();
|
var stat = statsDict[this.stat];
|
||||||
|
var group = stat && stat.group;
|
||||||
if (group === "Weakness/Resistance") return "multiplierEffectValue";
|
if (group === "Weakness/Resistance") return "multiplierEffectValue";
|
||||||
|
|
||||||
var op = this.operation;
|
var op = this.operation;
|
||||||
@@ -144,25 +138,6 @@ Template.effectEdit.events({
|
|||||||
Effects.softRemoveNode(this._id);
|
Effects.softRemoveNode(this._id);
|
||||||
GlobalUI.deletedToast(this._id, "Effects", "Effect");
|
GlobalUI.deletedToast(this._id, "Effects", "Effect");
|
||||||
},
|
},
|
||||||
"core-select .statGroupDropDown": function(event, instance){
|
|
||||||
var detail = event.originalEvent.detail;
|
|
||||||
if (!detail.isSelected) return;
|
|
||||||
var groupName = detail.item.getAttribute("name");
|
|
||||||
var oldName = Template.instance().selectedStatGroup.get();
|
|
||||||
if (oldName != groupName){
|
|
||||||
instance.selectedStatGroup.set(groupName);
|
|
||||||
if (groupName === "Weakness/Resistance"){
|
|
||||||
Effects.update(this._id, {$set: {
|
|
||||||
value: 0.5,
|
|
||||||
calculation: "",
|
|
||||||
operation: "mul"}, $unset: {stat: ""}});
|
|
||||||
} else {
|
|
||||||
Effects.update(this._id,
|
|
||||||
{$set: {operation: "add"},
|
|
||||||
$unset: {stat: "", value: "", calculation: ""}});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"core-select .statDropDown": function(event){
|
"core-select .statDropDown": function(event){
|
||||||
var detail = event.originalEvent.detail;
|
var detail = event.originalEvent.detail;
|
||||||
if (!detail.isSelected) return;
|
if (!detail.isSelected) return;
|
||||||
|
|||||||
@@ -57,40 +57,40 @@ var stats = {
|
|||||||
"d12HitDice":{"name":"d12 Hit Dice"},
|
"d12HitDice":{"name":"d12 Hit Dice"},
|
||||||
"acidMultiplier":{"name":"Acid damage", "group": "Weakness/Resistance"},
|
"acidMultiplier":{"name":"Acid damage", "group": "Weakness/Resistance"},
|
||||||
"bludgeoningMultiplier":{
|
"bludgeoningMultiplier":{
|
||||||
"name":"Bludgeoning damage", "group": "Weakness/Resistance"
|
"name":"Bludgeoning damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"coldMultiplier":{
|
"coldMultiplier":{
|
||||||
"name":"Cold damage", "group": "Weakness/Resistance"
|
"name":"Cold damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"fireMultiplier":{
|
"fireMultiplier":{
|
||||||
"name":"Fire damage", "group": "Weakness/Resistance"
|
"name":"Fire damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"forceMultiplier":{
|
"forceMultiplier":{
|
||||||
"name":"Force damage", "group": "Weakness/Resistance"
|
"name":"Force damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"lightningMultiplier":{
|
"lightningMultiplier":{
|
||||||
"name":"Lightning damage", "group": "Weakness/Resistance"
|
"name":"Lightning damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"necroticMultiplier":{
|
"necroticMultiplier":{
|
||||||
"name":"Necrotic damage", "group": "Weakness/Resistance"
|
"name":"Necrotic damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"piercingMultiplier":{
|
"piercingMultiplier":{
|
||||||
"name":"Piercing damage", "group": "Weakness/Resistance"
|
"name":"Piercing damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"poisonMultiplier":{
|
"poisonMultiplier":{
|
||||||
"name":"Poison damage", "group": "Weakness/Resistance"
|
"name":"Poison damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"psychicMultiplier":{
|
"psychicMultiplier":{
|
||||||
"name":"Psychic damage", "group": "Weakness/Resistance"
|
"name":"Psychic damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"radiantMultiplier":{
|
"radiantMultiplier":{
|
||||||
"name":"Radiant damage", "group": "Weakness/Resistance"
|
"name":"Radiant damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"slashingMultiplier":{
|
"slashingMultiplier":{
|
||||||
"name":"Slashing damage", "group": "Weakness/Resistance"
|
"name":"Slashing damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
"thunderMultiplier":{
|
"thunderMultiplier":{
|
||||||
"name":"Thunder damage", "group": "Weakness/Resistance"
|
"name":"Thunder damage", "group": "Weakness/Resistance",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -110,8 +110,8 @@ var operations = {
|
|||||||
Template.effectView.helpers({
|
Template.effectView.helpers({
|
||||||
sourceName: function(){
|
sourceName: function(){
|
||||||
var id = this.parent.id;
|
var id = this.parent.id;
|
||||||
if(!id) return;
|
if (!id) return;
|
||||||
switch(this.parent.collection){
|
switch (this.parent.collection){
|
||||||
case "Features":
|
case "Features":
|
||||||
return "Feature - " + Features.findOne(id, {fields: {name: 1}}).name;
|
return "Feature - " + Features.findOne(id, {fields: {name: 1}}).name;
|
||||||
case "Classes":
|
case "Classes":
|
||||||
@@ -130,33 +130,39 @@ Template.effectView.helpers({
|
|||||||
return stats[this.stat] && stats[this.stat].name || "No Stat";
|
return stats[this.stat] && stats[this.stat].name || "No Stat";
|
||||||
},
|
},
|
||||||
operationName: function(){
|
operationName: function(){
|
||||||
if(this.operation === "proficiency" ||
|
if (this.operation === "proficiency" ||
|
||||||
this.operation === "conditional") return null;
|
this.operation === "conditional") return null;
|
||||||
if(stats[this.stat].group === "Weakness/Resistance") return null;
|
if (stats[this.stat] && stats[this.stat].group === "Weakness/Resistance")
|
||||||
if(this.operation === "add" && evaluateEffect(this.charId, this) < 0) return null;
|
return null;
|
||||||
return operations[this.operation] && operations[this.operation].name || "No Operation";
|
if (this.operation === "add" && evaluateEffect(this.charId, this) < 0)
|
||||||
|
return null;
|
||||||
|
return operations[this.operation] &&
|
||||||
|
operations[this.operation].name || "No Operation";
|
||||||
},
|
},
|
||||||
statValue: function(){
|
statValue: function(){
|
||||||
if(this.operation === "advantage" ||
|
if (this.operation === "advantage" ||
|
||||||
this.operation === "disadvantage" ||
|
this.operation === "disadvantage" ||
|
||||||
this.operation === "fail"){
|
this.operation === "fail"){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if(this.operation === "proficiency"){
|
if (this.operation === "proficiency"){
|
||||||
if(this.value == 0.5 || this.calculation == 0.5) return "Half Proficiency";
|
if (this.value == 0.5 || this.calculation == 0.5)
|
||||||
if(this.value == 1 || this.calculation == 1) return "Proficiency";
|
return "Half Proficiency";
|
||||||
if(this.value == 2 || this.calculation == 2) return "Double Proficiency";
|
if (this.value == 1 || this.calculation == 1)
|
||||||
|
return "Proficiency";
|
||||||
|
if (this.value == 2 || this.calculation == 2)
|
||||||
|
return "Double Proficiency";
|
||||||
}
|
}
|
||||||
if(this.operation === "conditional"){
|
if (this.operation === "conditional"){
|
||||||
return this.calculation || this.value;
|
return this.calculation || this.value;
|
||||||
}
|
}
|
||||||
if(stats[this.stat].group === "Weakness/Resistance"){
|
if (stats[this.stat] && stats[this.stat].group === "Weakness/Resistance"){
|
||||||
if(this.value === 0.5) return "Resistance";
|
if (this.value === 0.5) return "Resistance";
|
||||||
if(this.value === 2) return "Vulnerability";
|
if (this.value === 2) return "Vulnerability";
|
||||||
if(this.value === 0) return "Immunity";
|
if (this.value === 0) return "Immunity";
|
||||||
}
|
}
|
||||||
var value = evaluateEffect(this.charId, this);
|
var value = evaluateEffect(this.charId, this);
|
||||||
if(_.isNumber(value)) return value;
|
if (_.isNumber(value)) return value;
|
||||||
return this.calculation || this.value;
|
return this.calculation || this.value;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,6 +25,13 @@
|
|||||||
</paper-autogrow-textarea>
|
</paper-autogrow-textarea>
|
||||||
</paper-input-decorator>
|
</paper-input-decorator>
|
||||||
</div>
|
</div>
|
||||||
<paper-button id="cancelButton" affirmative>Cancel</paper-button>
|
<paper-button id="cancelButton"
|
||||||
<paper-button id="sendButton" affirmative>Send </paper-button>
|
affirmative>
|
||||||
|
Cancel
|
||||||
|
</paper-button>
|
||||||
|
<paper-button id="sendButton"
|
||||||
|
affirmative
|
||||||
|
disabled={{invalid}}>
|
||||||
|
Send
|
||||||
|
</paper-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -1,4 +1,23 @@
|
|||||||
|
Template.feedback.onCreated(function() {
|
||||||
|
this.title = new ReactiveVar("");
|
||||||
|
this.description = new ReactiveVar("");
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.feedback.helpers({
|
||||||
|
invalid: function() {
|
||||||
|
var inst = Template.instance();
|
||||||
|
return !inst.title.get() ||
|
||||||
|
!inst.description.get();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.feedback.events({
|
Template.feedback.events({
|
||||||
|
"input #feedbackTitle": function(event, instance) {
|
||||||
|
instance.title.set(instance.find("#feedbackTitle").value);
|
||||||
|
},
|
||||||
|
"input #feedbackDescription": function(event, instance) {
|
||||||
|
instance.description.set(instance.find("#feedbackDescription").value);
|
||||||
|
},
|
||||||
"tap #sendButton": function(event, instance) {
|
"tap #sendButton": function(event, instance) {
|
||||||
var report = {};
|
var report = {};
|
||||||
report.title = instance.find("#feedbackTitle").value;
|
report.title = instance.find("#feedbackTitle").value;
|
||||||
|
|||||||
@@ -133,3 +133,14 @@ ChangeLogs.insert({
|
|||||||
"Added performance monitoring",
|
"Added performance monitoring",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ChangeLogs.insert({
|
||||||
|
version: "0.5.2",
|
||||||
|
changes: [
|
||||||
|
"Prevented a harmless error caused by effects which have no stat set",
|
||||||
|
"Added the ability to hide the spells tab",
|
||||||
|
"Feedback forms now give me push notifications",
|
||||||
|
"Feedback forms now won't send unless properly filled out",
|
||||||
|
"Overhauled how effects' stats are chosen",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user