{{log "roll-sr6.html this=" this}} {{log "roll-sr6.html data=" data}} {{log "roll-sr6.html prepared=" prepared}} {{log "roll-sr6.html configured=" configured}} {{#if configured.extended}}

{{localize 'shadowrun6.label.extended_test'}}

{{/if}}

{{actionText}}

{{#if (or (or edge_use edge_use_opponent) isOpposed)}}
{{#if isOpposed}}
{{edge_message}}
{{/if}} {{#if edge_use}}
{{edge_use}}
{{/if}} {{#if edge_use_opponent}}
{{edge_use_opponent}}
{{/if}}

{{/if}} {{#if publicRoll}}
{{#if (not configured.rollType)}}/r {{/if}}{{formula}}

{{#if system.extended}}
{{ localize 'shadowrun6.roll.accumulated' }}: {{system.extendedAccumulate}} / {{system.threshold}}
{{else}} {{#if (eq rollType "initiative")}}
{{localize 'shadowrun6.section.karma.total'}}: {{total}}
{{else}} {{#if (and configured.extended (not configured.threshold))}}
{{total}} {{localize 'shadowrun6.roll.hits'}}
{{else}} {{#if (not configured.rollType)}} {{!-- Manual FoundryVTT /r --}}
{{localize 'shadowrun6.roll.manualResult'}}: {{total}}
{{else}} {{#if success}}
{{localize 'shadowrun6.roll.success'}}: {{total}} {{localize 'shadowrun6.roll.successes'}}{{#if netHits}}, {{netHits}} {{localize 'shadowrun6.roll.netHits'}}{{/if}}
{{else}}
{{ localize 'shadowrun6.roll.failure'}}: {{total}} {{localize 'shadowrun6.roll.hits'}}
{{/if}} {{/if}} {{/if}} {{/if}} {{/if}}
{{#if criticalglitch}} {{localize 'shadowrun6.roll.criticalglitch'}}
{{else glitch}} {{localize 'shadowrun6.roll.glitch'}}
{{/if}}
{{{tooltip}}}
{{#if configured.extended}}

{{#if configured.threshold}}
{{extendedResultMsg}}
{{else}}
{{extendedResultMsg}}
{{/if}}
{{/if}} {{#if (eq configured.skillSpec "sprinting")}}

{{ configured.sprintingResult }}

{{/if}} {{#if (eq rollType "legwork")}}

{{ configured.checkText }}

{{#if configured.legwork.loyalty}}
{{else}} {{#iff legwork.legworkResult ">" total}}
{{localize 'shadowrun6.legwork.payformore' }}
{{/iff}} {{/if}}
{{/if}} {{#if (eq rollType "weapon")}}
{{#if configured.fireMode}} {{/if}} {{#if configured.fireMode}} {{/if}} {{#if configured.fireMode}} {{/if}} {{#if configured.fireMode}} {{/if}}
{{localize 'shadowrun6.weapon.damage'}}{{localize 'shadowrun6.weapon.firemodes'}}{{localize 'shadowrun6.weapon.attackRating'}}{{localize 'shadowrun6.item.ammunition'}}
{{configured.calcDamage}}{{#if (eq configured.monitor "stun")}}S{{else}}P{{/if}}{{localize (concat "shadowrun6.item.firemode." configured.fireMode)}}{{{attackrating configured.calcAttackRating}}}{{configured.calcRounds}}
{{/if}} {{#if system.matrixAction}}
{{localize 'shadowrun6.roll.damage'}} To Do
{{/if}} {{#if (eq rollType "spell")}}
{{#if (or threshold configured.spell.withEssence)}} {{#unless (or configured.calcDamage (eq defendWith "spells_direct"))}} {{/unless}} {{/if}} {{#if (or configured.calcDamage (eq defendWith "spells_direct"))}} {{/if}} {{#if (or threshold configured.spell.withEssence)}} {{#unless (or configured.calcDamage (eq defendWith "spells_direct"))}} {{/unless}} {{/if}} {{#if (or configured.calcDamage (eq defendWith "spells_direct"))}} {{/if}}
{{localize 'shadowrun6.spell.range'}} {{localize 'shadowrun6.spell.type'}} {{localize 'shadowrun6.spell.duration_short'}} {{localize 'shadowrun6.spell.drain'}}{{localize 'shadowrun6.roll.threshold'}}{{localize 'shadowrun6.spell.damage_short'}}
{{localize (concat (concat 'shadowrun6.spell.range_' configured.spell.range) "_short")}} {{localize (concat (concat 'shadowrun6.spell.type_' configured.spell.type) "_short")}} {{localize (concat (concat 'shadowrun6.spell.duration_' configured.spell.duration) "_short")}} {{configured.calcDrain}}{{threshold}}{{configured.calcDamage}}{{#if (or (eq configured.spell.damage "stun") (eq configured.spell.damage "stun_special"))}}S{{else}}P{{/if}}

{{/if}} {{#if (eq rollType "complexform")}}
{{#if threshold}} {{/if}} {{#if threshold}} {{/if}}
{{localize 'shadowrun6.roll.threshold'}}{{localize 'shadowrun6.complexform.fading'}} {{localize 'shadowrun6.complexform.duration'}}
{{threshold}}{{configured.calcFade}} {{localize (concat (concat 'shadowrun6.spell.duration_' configured.form.duration) "_short")}}
{{/if}} {{#if success}} {{#if (and defendWith (not cantDodgeBullets))}} {{log "************************Defense" this}}
{{log "**Defense targets " targetIds}} {{log "**Defense targets " targetIds.length}} {{#iff targets.length ">" 0}} {{#each targets as |token id|}}
{{log "Token" id " = " token }}
{{/each}} {{else}}
{{/iff}} {{/if}} {{/if}} {{#if (or (eq rollType "defense") cantDodgeBullets)}} {{#if actorTraits.hardenedArmor}} {{#if (not actorTraits.immunityNormalWeapons)}}
{{ localize 'shadowrun6.roll.hardenedArmor'}}
{{else}} {{#if (ne configured.defendedWith 'spells_indirect')}}
{{ localize 'shadowrun6.roll.hardenedArmor'}}
{{/if}} {{/if}} {{/if}} {{#if cantDodgeBullets}} {{#if success}} {{#iff targets.length ">" 0}} {{#each targets as |target|}}
{{ localize 'shadowrun6.roll.succesfulHit'}}
{{/each}} {{else}}
{{ localize 'shadowrun6.roll.succesfulHit'}}
{{/iff}} {{else}}
{{ localize 'shadowrun6.roll.missedAttack'}}
{{/if}} {{else}} {{#if success}}
{{#if (eq configured.defendedWith "item_defined")}} {{ localize 'shadowrun6.roll.successfulDefenseGeneral'}} {{else}} {{ localize 'shadowrun6.roll.successfulDefense'}} {{/if}}
{{else}}
{{#if (eq configured.defendedWith "item_defined")}} {{ localize 'shadowrun6.roll.failedDefenseGeneral'}} {{else}} {{ localize 'shadowrun6.roll.failedDefense'}} {{nettoDamage}} {{/if}}
{{#if monitor}} {{/if}} {{/if}} {{/if}} {{/if}} {{#if (eq rollType "soak")}} {{log "************************Soak" this}} {{#if monitor}}
{{#if success}}
{{ localize 'shadowrun6.roll.successfulSoak'}}
{{else}}
{{ localize 'shadowrun6.roll.failedSoak'}}

{{#if (eq monitor 'physical')}}
{{damage}} {{localize (concat 'shadowrun6.monitor.' monitor)}} {{#if damageConvertedStun}} {{damageConvertedStun}} {{localize 'shadowrun6.monitor.stun'}} {{/if}}
{{else}}
{{damage}} {{localize (concat 'shadowrun6.monitor.' monitor)}}
{{/if}}

{{#if (or (eq actor.type "Spirit") (eq actor.type "Vehicle"))}} {{localize 'shadowrun6.ui.notifications.apply_manually'}} {{else}} {{#if damageConvertedStun}} {{/if}} {{/if}} {{/if}}
{{/if}} {{/if}} {{/if}}