Small fixes for effects, health, permissions and formatting
This commit is contained in:
@@ -57,6 +57,13 @@ Template.healthCard.events({
|
||||
var value = event.currentTarget.value;
|
||||
var adjustment = value - this.attributeBase("hitPoints");
|
||||
Characters.update(this._id, {$set: {"hitPoints.adjustment": adjustment}});
|
||||
//reset the death saves if we are gaining HP
|
||||
if(value > 0)
|
||||
Characters.update(this._id, { $set: {
|
||||
"deathSave.pass": 0,
|
||||
"deathSave.fail": 0,
|
||||
"deathSave.stable": false
|
||||
} });
|
||||
},
|
||||
"change .tempHitPointSlider": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
@@ -68,9 +75,9 @@ Template.healthCard.events({
|
||||
},
|
||||
"tap #addTempHP": function(event){
|
||||
GlobalUI.showDialog({
|
||||
template: "addTHPDialog",
|
||||
data: {charId: this._id}
|
||||
});
|
||||
template: "addTHPDialog",
|
||||
data: {charId: this._id}
|
||||
});
|
||||
},
|
||||
"tap .failBubble": function(event){
|
||||
if(event.currentTarget.disabled) return;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.summaryNumber{
|
||||
width: 50px;
|
||||
}
|
||||
@@ -15,46 +15,46 @@
|
||||
<!--numerical value-->
|
||||
<div>
|
||||
<!--Ability Mod-->
|
||||
<div>
|
||||
<div>{{abilityName}}</div>
|
||||
<div>{{char.abilityMod ability}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{abilityName}}</div>
|
||||
<div class="summaryNumber">{{char.abilityMod ability}}</div>
|
||||
</div>
|
||||
<!--Prof bonus-->
|
||||
{{#if char.proficiency skillName}}
|
||||
<div>
|
||||
<div>{{#with profSource}}{{statValue}}{{/with}}</div>
|
||||
<div>+{{profBonus}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{#with profSource}}{{statValue}}{{/with}}</div>
|
||||
<div class="summaryNumber">{{signedString profBonus}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<!--numerical effects-->
|
||||
{{#each addEffects}}
|
||||
<div>
|
||||
<div>{{sourceName}}</div>
|
||||
<div>+{{statValue}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{sourceName}}</div>
|
||||
<div class="summaryNumber">{{signedString statValue}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#each mulEffects}}
|
||||
<div>
|
||||
<div>{{sourceName}}</div>
|
||||
<div>×{{statValue}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{sourceName}}</div>
|
||||
<div class="summaryNumber">×{{statValue}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#each minEffects}}
|
||||
<div>
|
||||
<div>{{sourceName}}</div>
|
||||
<div>Min: {{statValue}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{sourceName}}</div>
|
||||
<div class="summaryNumber">Min: {{statValue}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#each maxEffects}}
|
||||
<div>
|
||||
<div>{{sourceName}}</div>
|
||||
<div>Max: {{statValue}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>{{sourceName}}</div>
|
||||
<div class="summaryNumber">Max: {{statValue}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
<!--Total-->
|
||||
<div>
|
||||
<div>Total</div>
|
||||
<div>{{char.skillMod skillName}}</div>
|
||||
<div horizontal center-justified layout>
|
||||
<div flex>Total</div>
|
||||
<div class="summaryNumber">{{char.skillMod skillName}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--Advantage effects-->
|
||||
@@ -78,4 +78,4 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/baseDialog}}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user