Finished upgrading stat tab to Polymer 1
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
</template>
|
||||
|
||||
<template name="attributeDialogView">
|
||||
<div layout horizontal center-justified end>
|
||||
<div class="display2">
|
||||
<div class="layout horizontal center-justified end">
|
||||
<div class="paper-font-display2">
|
||||
{{attributeValue}}
|
||||
</div>
|
||||
{{#if adjustment}}
|
||||
<div class="display1">
|
||||
<div class="paper-font-display1">
|
||||
/{{attributeBase}}
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -19,50 +19,52 @@
|
||||
|
||||
<hr class="vertMargin">
|
||||
|
||||
<table class="summaryTable">
|
||||
{{#each baseEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Base: {{statValue}}</td>
|
||||
<div class="layout vertical center">
|
||||
<table class="summaryTable">
|
||||
{{#each baseEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Base: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each addEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>{{signedString statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each mulEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>× {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each minEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Min: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each maxEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Max: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#if adjustment}}
|
||||
<tr class="paper-font-body2">
|
||||
<td>Base Value</td>
|
||||
<td>{{attributeBase}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adjustment</td>
|
||||
<td>{{signedString adjustment}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
<tr class="paper-font-body2">
|
||||
<td>Total</td>
|
||||
<td>{{attributeValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each addEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>{{signedString statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each mulEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>× {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each minEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Min: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each maxEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Max: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#if adjustment}}
|
||||
<tr class="body2">
|
||||
<td>Base Value</td>
|
||||
<td>{{attributeBase}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adjustment</td>
|
||||
<td>{{signedString adjustment}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
<tr class="body2">
|
||||
<td>Total</td>
|
||||
<td>{{attributeValue}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
{{> attributeDialogView}}
|
||||
<hr class="vertMargin">
|
||||
<div>
|
||||
<div class="title padded">Carrying</div>
|
||||
<div class="paper-font-title padded">Carrying</div>
|
||||
{{> carryCapacityTable}}
|
||||
<div class="title padded">Jumping</div>
|
||||
<div class="paper-font-title padded">Jumping</div>
|
||||
<table class="strengthTable">
|
||||
<tr>
|
||||
<td>Running long jump</td>
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td>Running high jump</td>
|
||||
<td>{{evaluate charId "3 + strengthMod"}} feet</td>
|
||||
<td class="caption">
|
||||
<td>
|
||||
Can reach a ledge as high as
|
||||
{{evaluate charId "3 + strengthMod"}} feet
|
||||
+ 1.5× your height
|
||||
@@ -27,7 +27,7 @@
|
||||
<tr>
|
||||
<td>Standing high jump</td>
|
||||
<td>{{evaluate charId "floor((3 + strengthMod)/2)"}} feet</td>
|
||||
<td class="caption">
|
||||
<td>
|
||||
Can reach a ledge as high as
|
||||
{{evaluate charId "floor((3 + strengthMod)/2)"}} feet
|
||||
+ 1.5× your height
|
||||
|
||||
@@ -3,26 +3,26 @@
|
||||
<tr>
|
||||
<td>Encumbered</td>
|
||||
<td>>{{evaluate charId "strength * 5 * carryMultiplier"}}lbs</td>
|
||||
<td class="caption">Variant rule, encumbered characters move 10 feet slower</td>
|
||||
<td>Variant rule, encumbered characters move 10 feet slower</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heavily encumbered</td>
|
||||
<td>>{{evaluate charId "strength * 10 * carryMultiplier"}}lbs</td>
|
||||
<td class="caption">
|
||||
<td>
|
||||
Variant rule, heavily encumbered characters move 20 feet slower and have disadvantage on ability checks, attack rolls, and saving thows that use Strength, Dexterity, or Constitution
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Over Encumbered</td>
|
||||
<td>>{{evaluate charId "strength * 15 * carryMultiplier"}}lbs</td>
|
||||
<td class="caption">
|
||||
<td>
|
||||
Characters that can only just lift, push or drag their current load can only move at 5 feet.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Push, drag or lift maximum</td>
|
||||
<td>{{evaluate charId "strength * 30 * carryMultiplier"}}lbs</td>
|
||||
<td class="caption"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
</template>
|
||||
|
||||
<template name="skillDialogView">
|
||||
<div layout vertical center>
|
||||
<div class="display2">
|
||||
<div class="layout vertical center">
|
||||
<div class="paper-font-display2">
|
||||
{{characterCalculate "skillMod" charId skillName}}
|
||||
</div>
|
||||
<div class="subhead">
|
||||
<div class="paper-font-subhead">
|
||||
<iron-icon icon="{{profIcon}}" class="black54"></iron-icon>
|
||||
{{#if profSource}}
|
||||
{{proficiencyValue}} - {{#with profSource}}{{sourceName}}{{/with}}
|
||||
@@ -21,55 +21,56 @@
|
||||
</div>
|
||||
|
||||
<hr class="vertMargin">
|
||||
|
||||
<table class="summaryTable">
|
||||
<tr>
|
||||
<td>{{abilityName}}</td>
|
||||
<td>{{characterCalculate "abilityMod" charId ability}}</td>
|
||||
</tr>
|
||||
{{#if characterCalculate "proficiency" charId skillName}}
|
||||
<div class="layout vertical center">
|
||||
<table class="summaryTable">
|
||||
<tr>
|
||||
<td>{{proficiencyValue}}</td>
|
||||
<td>{{signedString profBonus}}</td>
|
||||
<td>{{abilityName}}</td>
|
||||
<td>{{characterCalculate "abilityMod" charId ability}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#each addEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>{{signedString statValue}}</td>
|
||||
{{#if characterCalculate "proficiency" charId skillName}}
|
||||
<tr>
|
||||
<td>{{proficiencyValue}}</td>
|
||||
<td>{{signedString profBonus}}</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{#each addEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>{{signedString statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each mulEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>×{{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each minEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Min: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each maxEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Max: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
<tr class="paper-font-body2">
|
||||
<td>Total</td>
|
||||
<td>{{characterCalculate "skillMod" charId skillName}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each mulEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>×{{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each minEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Min: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{#each maxEffects}}
|
||||
<tr>
|
||||
<td>{{sourceName}}</td>
|
||||
<td>Max: {{statValue}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
<tr class="body2">
|
||||
<td>Total</td>
|
||||
<td>{{characterCalculate "skillMod" charId skillName}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{#if or advEffects.count dadvEffects.count conditionalEffects.count}}
|
||||
<hr class="vertMargin">
|
||||
{{/if}}
|
||||
|
||||
<div class="spaceAfter" horizontal center layout>
|
||||
<div class="spaceAfter horizontal center layout">
|
||||
{{#if advEffects.count}}
|
||||
<div class="body2" style="width: 100px;">
|
||||
<div class="paper-font-body2" style="width: 100px;">
|
||||
Advantage
|
||||
</div>
|
||||
<div flex>
|
||||
@@ -79,9 +80,9 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="spaceAfter" horizontal center layout>
|
||||
<div class="spaceAfter horizontal center layout">
|
||||
{{#if dadvEffects.count}}
|
||||
<div class="body2" style="width: 100px;">
|
||||
<div class="paper-font-body2" style="width: 100px;">
|
||||
Disadvantage
|
||||
</div>
|
||||
<div flex>
|
||||
@@ -94,7 +95,7 @@
|
||||
<!--Conditional Benefits-->
|
||||
{{#each conditionalEffects}}
|
||||
<div class="spaceAfter">
|
||||
<div class="body2">{{sourceName}}</div>
|
||||
<div class="paper-font-body2">{{sourceName}}</div>
|
||||
<div>*{{statValue}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template name="statCard">
|
||||
<div>
|
||||
<paper-material class="ability-mini-card layout horizontal">
|
||||
<paper-material class="stat-card layout horizontal">
|
||||
<div class="numbers paper-font-display1">
|
||||
{{#if isSkill}}
|
||||
{{prefix}}{{skillMod}}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Template.stats.events({
|
||||
"click .statCard": function(event, instance){
|
||||
"click .stat-card": function(event, instance){
|
||||
var charId = instance.data._id;
|
||||
if (this.isSkill){
|
||||
pushDialogStack({
|
||||
template: "skillDialog",
|
||||
data: {
|
||||
data: {
|
||||
name: this.name,
|
||||
skillName: this.stat,
|
||||
charId: charId,
|
||||
@@ -15,7 +15,7 @@ Template.stats.events({
|
||||
} else {
|
||||
pushDialogStack({
|
||||
template: "attributeDialog",
|
||||
data: {
|
||||
data: {
|
||||
name: this.name,
|
||||
statName: this.stat,
|
||||
charId: charId,
|
||||
@@ -31,7 +31,7 @@ Template.stats.events({
|
||||
if (this.ability === "strength") template = "strengthDialog";
|
||||
pushDialogStack({
|
||||
template: template,
|
||||
data: {
|
||||
data: {
|
||||
name: this.title,
|
||||
statName: this.ability,
|
||||
charId: charId,
|
||||
@@ -45,7 +45,7 @@ Template.stats.events({
|
||||
var charId = instance.data._id;
|
||||
pushDialogStack({
|
||||
template: "skillDialog",
|
||||
data: {
|
||||
data: {
|
||||
name: this.name,
|
||||
skillName: skill,
|
||||
charId: charId,
|
||||
@@ -56,7 +56,7 @@ Template.stats.events({
|
||||
"tap .hitPointTitle": function(event, instance) {
|
||||
pushDialogStack({
|
||||
template: "attributeDialog",
|
||||
data: {
|
||||
data: {
|
||||
name: "Hit Points",
|
||||
statName: "hitPoints",
|
||||
charId: this._id,
|
||||
|
||||
Reference in New Issue
Block a user