Files
roll20-character-sheets-tester/Delta Green 2/deltagreen.pug
T
uriele c2d983fd60 final rebased version (#7085)
Deleted old repository and reforked
2020-08-03 13:46:00 -04:00

161 lines
9.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//- VERSION
//- =============================
input(name='attr_version' type='hidden' value='1.05')
//- MIXINS
include src/pug/_mixins.pug
//- SETUP INITIAL SAN, STR,CON, AND HP FLAGS THE FIRST TIME THE PLAYER INPUT POW
input(name='attr_initial_san' type='hidden' value=1)
input(name='attr_initial_con' type='hidden' value=1)
input(name='attr_initial_str' type='hidden' value=1)
input(name='attr_initial_hp' type='hidden' value=1)
// TABS
// =============================
input.type(name='attr_sheet_type' type='hidden' value='pc')
input.display_string(name='attr_toggles' type='hidden' value='')
//TABS & LOGO
// =============================
.tabs.grid
// Buttons to toggle on GM whisper
span(data-i18n-title='GM Whisper') GM Whisper
label.switch(data-i18-titlen='whisper rolls to gm' title='whisper rolls to gm')
input.whisper-toggle(name='attr_gm_toggle' type='checkbox' value='/w gm')
span.slider
// LOGO
img(alt='Delta Green' src='https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/Delta%20Green%202/img/deltagreenlogo.jpg')
// CHARACTER SHEETS
span(data-i18n='Sheet Type') Sheet Type
select(name='attr_sheet_type')
optgroup(label='Sheet Type')
option(data-i18n='pc' value='pc') pc
option(data-i18n='npc' value='npc') npc
//- OBJECTS
//- ============================={{/damage}}
include src/pug/_objects.pug
// NPC SHEET
// =============================
.npc
.grid
.section-header
label(data-i18n-title='enter a name for non-player character' title='enter a name for non-player character')
input(data-i18n-placeholder='character name' name='attr_name' placeholder='Character name' title='@{name}' type='text' value='')
.grid.section-body
label.row(data-i18n-title='enter npc description' title='enter npc description')
textarea(name='attr_npc_description' placeholder='description')
each val, key in statsObject
- const statRollValue = `@{gm_toggle} &{template:stats} {{header=^{${key}}}} {{subheader=@{${key}}}} {{dice=[[1d100]]}} {{stat=[[@{${key+'_score'}}]]}} {{score=[[@{${key}}]]}}`;
button(name=key data-i18n-title=key + ' roll' title=key + ' roll' type='roll' value!=statRollValue)
h1(data-i18n=val)=val
if (val === 'POW' || val === 'STR' || val === 'CON' )
label(data-i18n-title=key + ' score' title=key + ' score')
input( min=0 name='attr_' + key + '_score' placeholder='-' title='@{' + key + '_score' + '}' type='number' value=' ')
else
label(data-i18n-title=key + ' score' title=key + ' score')
input(data-i18n-placeholder='10' min=0 name='attr_' + key + '_score' placeholder='10' title='@{' + key + '_score' + '}' type='number' value='10')
h1(data-i18n='HP') HP
label(data-i18n-title='enter hit points' title='enter hit points')
input.text-align-left(data-i18n-placeholder='-' name='attr_hit_points' placeholder='-' title='@{hit_points}' type='number' value='')
h1(data-i18n='WP') WP
label(data-i18n-title='enter willpower points' title='enter willpower points')
input.text-align-left(data-i18n-placeholder='-' name='attr_willpower_points' placeholder='-' title='@{willpower_points}' type='number' value='')
.grid.section.sanloss
- const statRollValue = `@{gm_toggle} &{template:sanloss} {{type=^{@{san_type}}}} {{success=@{san_success}}} {{failure=@{san_failure}}} {{roll1=[[@{san_success}]]}} {{roll2=[[@{san_failure}]]}} {{hasminsan=[[@{has_san_success}]]}} {{hasmaxsan=[[@{has_san_failure}]]}}`;
button(name='san loss roll' data-i18n-title='san loss roll' title='san loss roll' type='roll' value!=statRollValue)
h1(data-i18n='SAN LOSS') SAN LOSS
input.text-align-left(data-i18n-placeholder='0' name='attr_san_success' placeholder='0' title='@{san_success}' type='text' value='0')
input.text-align-left(name='attr_has_san_success' type='hidden' value='1')
span.slash /
input.text-align-left(data-i18n-placeholder='1' name='attr_san_failure' placeholder='1' title='@{san_failure}' type='text' value='1')
input.text-align-left(name='attr_has_san_failure' type='hidden' value='1')
select(name='attr_san_type')
optgroup(label='Sanity Type')
option(data-i18n='unnatural' value='unnatural') unnatural
option(data-i18n='violence' value='violence') violence
option(data-i18n='helplessness' value='helplessness') helplessness
h1(data-i18n='armor') ARMOR
label(data-i18n-title='enter armor text' title='enter armor text')
input(data-i18n-placeholder='8 points of thick hide' name='attr_armor' placeholder='8 points of thick hide' title='@{armor}' type='text' value='')
h1(data-i18n='skills') skills
.repeating-container.skills
.grid.section-header
h2(data-i18n='skill') name
h2(data-i18n='rank') skill %
h2(data-i18n='roll') roll
fieldset.repeating_skills
.grid.section-skills.border-bottom
- const npcSkillRollValue = `@{gm_toggle} &{template:rolls} {{header=@{name}}} {{subheader=@{rank}}} {{rating=[[@{rank}]]}} {{dice=[[1d100]]}}`;
label(data-i18n-title='skill name' title='skill name')
input.center(data-i18n-placeholder='skill name' name='attr_name' placeholder='skill name' title='@{repeating_skills_${x}_name}' type='text' value='')
label(data-i18n-title='skill rank' title='skill rank')
input(data-i18n-placeholder='0' name='attr_rank' title='@{repeating_skills_${x}_rank}' placeholder='0' type='number' value='')
button.dicefontd10(data-i18n-title='skill roll' name='skill roll' title='skill roll' type='roll' value=npcSkillRollValue) k
h1(data-i18n='attacks') attacks
.repeating-container.attacks
//- const attackAttrs = ['weapons', 'skill %', 'damage', 'notes']
- const attackAttrs = ['weapons', 'skill %', 'base range', 'damage', 'armor piercing', 'lethality %', 'kill radius', 'ammo', 'notes']
.grid.section-header
each attack in attackAttrs
if (attack==='weapons')
h2(data-i18n='attack')='attack'
else
h2(data-i18n=attack)=attack
h2(data-i18n='roll') roll
fieldset.repeating_weapons
.grid.section-weapons.border-bottom
//- const attackRollValue = `@{gm_toggle} &{template:rolls} {{header=@{name}+'|'+@{weapons}}} {{subheader=@{skill_percent}}} {{dice=[[1d100]]}} {{damage=^{damage} [@{damage}](~repeating_weapons_damage)}}`;
- const attackRollValue = `@{gm_toggle} &{template:rolls} {{name=@{name}}} {{header=@{weapons}}} {{subheader=@{skill_percent}}} {{rating=[[@{skill_percent}]]}} {{dice=[[1d100]]}} {{hasdamage=[[@{hasdamage}]]}} {{damage=^{damage} [@{damage}](~repeating_weapons_damage)}} {{damage_critical=^{damage (×2)} [@{damage}](~repeating_weapons_damage_critical)}} {{haslethality=[[@{haslethality}]]}} {{lethality=^{lethality} [@{lethality_percent}%](~repeating_weapons_lethality)}} {{lethality_critical=^{lethality (×2)} [@{lethality_percent}%](~repeating_weapons_lethality_critical)}}`;
each attack in attackAttrs
- const attrName = attack.replace(' ', '_').replace('%', 'percent')
- const type = attack.includes('%') || attack === 'ammo' ? 'number' : 'text';
if (attrName==='lethality_percent')
label(data-i18n-title=attack + ' input' title=attack + ' input')
input(data-i18n-placeholder=attack name='attr_' + attrName placeholder=attack title='@{repeating_weapons_${x}_' + attrName + '}' type=type value='')
input( name='attr_haslethality' type='hidden' value='0')
else if (attrName==='damage')
label(data-i18n-title=attack + ' input' title=attack + ' input')
input(data-i18n-placeholder=attack name='attr_' + attrName placeholder=attack title='@{repeating_weapons_${x}_' + attrName + '}' type=type value='')
input( name='attr_hasdamage' type='hidden' value='0')
else if (attrName==='weapons')
label(data-i18n-title=attack + ' input' title=attack + ' input')
input(data-i18n-placeholder='attack' name='attr_' + attrName placeholder='attack' title='@{repeating_weapons_${x}_' + attrName + '}' type=type value='')
else
label(data-i18n-title=attack + ' input' title=attack + ' input')
input(data-i18n-placeholder=attack name='attr_' + attrName placeholder=attack title='@{repeating_weapons_${x}_' + attrName + '}' type=type value='')
button.dicefontd10(name='weapon' type='roll' title='weapon roll' value=attackRollValue) k
button.none(name='roll_damage' type='roll' value='@{gm_toggle} &{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}]]}}')
button.none(name='roll_lethality' type='roll' value='@{gm_toggle} &{template:lethality} {{header=@{weapons}}} {{subheader=@{lethality_percent}}}{{lethality_rating=[[@{lethality_percent}]]}} {{lethality=[[1d100]]}}')
button.none(name='roll_damage_critical' type='roll' value='@{gm_toggle} &{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[@{damage}*2]]}}')
button.none(name='roll_lethality_critical' type='roll' value='@{gm_toggle} &{template:lethality_critical} {{header=@{weapons}}} {{subheader=@{lethality_percent}}} {{lethality_rating=[[@{lethality_percent}*2]]}} {{lethality=[[1d100]]}}')
h1(data-i18n='other notes') other notes
.repeating-container.notes
.grid.section-header
h2(data-i18n='name') name
h2(data-i18n='notes') notes
fieldset.repeating_other
.grid.section.border-bottom
label(data-i18n-title='other notes name' title='other notes name')
input(data-i18n-placeholder='name' name='attr_name' placeholder='name' title='@{repeating_other_${x}_name}' type='text')
label(data-i18n-title='other notes' title='other notes')
input(data-i18n-placeholder='notes' name='attr_notes' placeholder='notes' title='@{repeating_other_${x}_notes}' type='text')
// PC SHEET
// =============================
include src/pug/_pc.pug
// ROLL TEMPLATE
// =============================
include src/pug/rolltemplate.pug
//SHEETWORKERS
// =============================
script(type='text/worker')
include src/pug/sheetworkers.js