More tests againts rolls
This commit is contained in:
+21
-18
@@ -4,27 +4,34 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.TypeLabel"}}</label>
|
||||
{{formField systemFields.abilityType value=system.abilityType localize=true}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.CostLabel"}}</label>
|
||||
{{formField systemFields.cost value=system.cost localize=true}}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.TypeLabel"}}</label>
|
||||
{{formField systemFields.abilityType value=system.abilityType localize=true}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.CostLabel"}}</label>
|
||||
{{formField systemFields.cost value=system.cost localize=true}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.Frequency"}}</label>
|
||||
{{formInput systemFields.frequency value=system.frequency}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.Requirements"}}</label>
|
||||
{{formInput systemFields.requirements value=system.requirements}}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Ability.Trigger"}}</label>
|
||||
{{formInput systemFields.trigger value=system.trigger}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-group-tags">
|
||||
<label>{{localize "AWEMMY.Ability.Traits"}}</label>
|
||||
<div class="tags-list">
|
||||
{{#each system.traits}}
|
||||
@@ -33,15 +40,11 @@
|
||||
<input type="text" class="new-tag" data-action="addTrait" placeholder="{{localize 'AWEMMY.Ability.AddTrait'}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
+7
-10
@@ -4,19 +4,16 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Archetype.PrerequisiteLevel"}}</label>
|
||||
{{formInput systemFields.prerequisiteLevel value=system.prerequisiteLevel}}
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
@@ -4,19 +4,16 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Background.Bonus"}}</label>
|
||||
{{formInput systemFields.bonus value=system.bonus}}
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
@@ -1,14 +1,48 @@
|
||||
<div class="awemmy-chat">
|
||||
|
||||
{{!-- Header: portrait + actor name + attribute --}}
|
||||
<div class="chat-roll-header">
|
||||
<div class="chat-roll-label">{{flavor}}</div>
|
||||
{{#if actorImage}}
|
||||
<img class="chat-actor-img" src="{{actorImage}}" alt="{{actorName}}" />
|
||||
{{/if}}
|
||||
<div class="chat-roll-info">
|
||||
{{#if actorName}}<div class="chat-actor-name">{{actorName}}</div>{{/if}}
|
||||
<div class="chat-roll-label">{{flavor}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#unless isPrivate}}
|
||||
<div class="roll-result">
|
||||
{{total}}
|
||||
|
||||
{{!-- Dice breakdown --}}
|
||||
<div class="roll-breakdown">
|
||||
{{#each dice}}
|
||||
{{#each results}}
|
||||
<span class="die-result {{#if (eq result ../faces)}}max{{else if (eq result 1)}}min{{/if}}">
|
||||
<i class="fa-solid fa-dice-d{{../faces}}"></i> {{result}}
|
||||
</span>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
{{#if modifier}}
|
||||
<span class="roll-mod">
|
||||
{{#if (gt modifier 0)}}+ {{modifier}}{{else if (lt modifier 0)}}− {{abs modifier}}{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{#if bonus}}
|
||||
<span class="roll-mod situational">
|
||||
{{#if (gt bonus 0)}}+ {{bonus}}{{else if (lt bonus 0)}}− {{abs bonus}}{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{#if knowledgeBonus}}
|
||||
<span class="roll-mod knowledge">
|
||||
{{#if (gt knowledgeBonus 0)}}+ {{knowledgeBonus}}{{else if (lt knowledgeBonus 0)}}− {{abs knowledgeBonus}}{{/if}}
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="roll-equals">=</span>
|
||||
<span class="roll-total">{{total}}</span>
|
||||
{{#if dc}}<span class="roll-dc">/ DC {{dc}}</span>{{/if}}
|
||||
</div>
|
||||
|
||||
{{!-- Outcome badge --}}
|
||||
{{#if outcome}}
|
||||
<div class="outcome-badge {{outcome}}">
|
||||
{{#if (eq outcome "criticalSuccess")}}
|
||||
@@ -22,9 +56,11 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
<div class="private-result">
|
||||
<i class="fa-solid fa-eye-slash"></i> {{localize "AWEMMY.Roll.Private"}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
</div>
|
||||
|
||||
+16
-17
@@ -4,23 +4,22 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Equipment.Quantity"}}</label>
|
||||
{{formInput systemFields.quantity value=system.quantity}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Equipment.Weight"}}</label>
|
||||
{{formInput systemFields.weight value=system.weight}}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Equipment.Quantity"}}</label>
|
||||
{{formInput systemFields.quantity value=system.quantity}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Equipment.Weight"}}</label>
|
||||
{{formInput systemFields.weight value=system.weight}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
+19
-18
@@ -4,19 +4,24 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Field.KeyAttribute"}}</label>
|
||||
{{formField systemFields.keyAttribute value=system.keyAttribute localize=true}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Field.KeyAttribute2"}}</label>
|
||||
{{formField systemFields.keyAttribute2 value=system.keyAttribute2 localize=true}}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Field.KeyAttribute"}}</label>
|
||||
{{formField systemFields.keyAttribute value=system.keyAttribute localize=true}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Field.KeyAttribute2"}}</label>
|
||||
{{formField systemFields.keyAttribute2 value=system.keyAttribute2 localize=true}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Field.KnowledgeBonus"}}</label>
|
||||
{{formInput systemFields.knowledgeBonus value=system.knowledgeBonus}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-group-tags">
|
||||
<label>{{localize "AWEMMY.Field.Specializations"}}</label>
|
||||
<div class="tags-list">
|
||||
{{#each system.specializations}}
|
||||
@@ -25,15 +30,11 @@
|
||||
<input type="text" class="new-tag" data-action="addSpecialization" placeholder="{{localize 'AWEMMY.Field.AddSpecialization'}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
+10
-12
@@ -4,25 +4,23 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Kit.Field"}}</label>
|
||||
{{formInput systemFields.fieldName value=system.fieldName}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="charges-group">
|
||||
<label>{{localize "AWEMMY.Kit.Charges"}}</label>
|
||||
{{formInput systemFields.charges.fields.value value=system.charges.value}}
|
||||
<span>/</span>
|
||||
<span class="separator">/</span>
|
||||
{{formInput systemFields.charges.fields.max value=system.charges.max}}
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
+50
-10
@@ -1,26 +1,65 @@
|
||||
<form class="awemmy-roll-dialog">
|
||||
|
||||
{{! Attribute name + base modifier (read-only) }}
|
||||
<div class="dialog-row check-label">
|
||||
<span class="attr-name">{{attrLabel}}</span>
|
||||
<span class="base-modifier">
|
||||
{{#if (gt modifier 0)}}+{{modifier}}{{else}}{{modifier}}{{/if}}
|
||||
{{!-- Attribute name + modifier breakdown --}}
|
||||
<div class="roll-header">
|
||||
<span class="roll-attr-name">{{attrLabel}}</span>
|
||||
<span class="roll-formula-summary">
|
||||
1d20
|
||||
{{#if (gt modifier 0)}} + {{modifier}}{{else if (lt modifier 0)}} − {{abs modifier}}{{/if}}
|
||||
{{#if (gt attributeBonus 0)}} + <em>{{attributeBonus}}</em>{{else if (lt attributeBonus 0)}} − <em>{{abs attributeBonus}}</em>{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{! Situational bonus / penalty }}
|
||||
{{!-- Attribute persistent bonus/penalty (read-only if non-zero) --}}
|
||||
{{#if attributeBonus}}
|
||||
<div class="dialog-row hint-row">
|
||||
<span class="hint-label">{{localize "AWEMMY.Roll.AttributeBonus"}}</span>
|
||||
<span class="hint-value {{#if (gt attributeBonus 0)}}positive{{else}}negative{{/if}}">
|
||||
{{#if (gt attributeBonus 0)}}+{{/if}}{{attributeBonus}}
|
||||
</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- Situational bonus / penalty --}}
|
||||
<div class="dialog-row">
|
||||
<label for="awe-bonus">{{localize "AWEMMY.Roll.SituationalBonus"}}</label>
|
||||
<input type="number" id="awe-bonus" name="bonus" value="0" />
|
||||
<select id="awe-bonus" name="bonus">
|
||||
{{#each bonusChoices}}
|
||||
<option value="{{this.value}}"{{#if this.selected}} selected{{/if}}>{{this.label}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{! DC (optional) }}
|
||||
{{!-- Knowledge bonus (field items) --}}
|
||||
{{#if knowledgeBonuses.length}}
|
||||
<div class="dialog-row">
|
||||
<label for="awe-knowledge">{{localize "AWEMMY.Roll.KnowledgeBonus"}}</label>
|
||||
<select id="awe-knowledge" name="knowledgeBonus">
|
||||
<option value="0">—</option>
|
||||
{{#each knowledgeBonuses}}
|
||||
<option value="{{this.bonus}}">{{this.label}} (+{{this.bonus}})</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- DC --}}
|
||||
<div class="dialog-row">
|
||||
<label for="awe-dc">{{localize "AWEMMY.Roll.DC"}}</label>
|
||||
<input type="number" id="awe-dc" name="dc" value="{{dc}}" placeholder="—" />
|
||||
<select id="awe-dc" name="dc">
|
||||
{{#each dcChoices}}
|
||||
<option value="{{this.value}}"{{#if this.selected}} selected{{/if}}>{{this.label}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{! Roll visibility }}
|
||||
{{!-- Formula preview --}}
|
||||
<div class="dialog-row formula-preview">
|
||||
<span class="formula-label">{{localize "AWEMMY.Roll.Formula"}}</span>
|
||||
<span class="formula-text" id="awe-formula-preview">1d20 + {{totalMod}}</span>
|
||||
</div>
|
||||
|
||||
{{!-- Roll visibility --}}
|
||||
<div class="dialog-row">
|
||||
<label for="awe-visibility">{{localize "AWEMMY.Roll.Visibility"}}</label>
|
||||
<select id="awe-visibility" name="visibility">
|
||||
@@ -29,3 +68,4 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+20
-18
@@ -4,23 +4,29 @@
|
||||
{{formInput fields.name value=source.name}}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.AttackAttribute"}}</label>
|
||||
{{formField systemFields.attackAttribute value=system.attackAttribute localize=true}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.Damage"}}</label>
|
||||
{{formInput systemFields.damageFormula value=system.damageFormula}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.DamageType"}}</label>
|
||||
{{formInput systemFields.damageType value=system.damageType}}
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.Damage"}}</label>
|
||||
{{formInput systemFields.damageFormula value=system.damageFormula}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.DamageType"}}</label>
|
||||
{{formInput systemFields.damageType value=system.damageType}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>{{localize "AWEMMY.Weapon.Range"}}</label>
|
||||
{{formInput systemFields.range value=system.range}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-group-tags">
|
||||
<label>{{localize "AWEMMY.Ability.Traits"}}</label>
|
||||
<div class="tags-list">
|
||||
{{#each system.traits}}
|
||||
@@ -29,15 +35,11 @@
|
||||
<input type="text" class="new-tag" data-action="addTrait" placeholder="{{localize 'AWEMMY.Ability.AddTrait'}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Description</legend>
|
||||
{{formInput
|
||||
systemFields.description
|
||||
enriched=enrichedDescription
|
||||
value=system.description
|
||||
name="system.description"
|
||||
toggled=true
|
||||
}}
|
||||
</fieldset>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user