Files
roll20-character-sheets-tester/Delta Green 2/deltagreen.pug
T
marcom 6ecc9d725a changelog
- fixed small bug that affected critical damage
- added record of last skill update
2021-03-08 02:59:45 -08:00

240 lines
18 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
// =============================
.datahide
input(data-i18n-value='accounting' name='attr_accounting_name' value='accounting')
input(data-i18n-value='alertness' name='attr_alertness_name' value='alertness')
input(data-i18n-value='anthropology' name='attr_anthropology_name' value='anthropology')
input(data-i18n-value='archeology' name='attr_archeology_name' value='archeology')
input(data-i18n-value='art' name='attr_art_name' value='art')
input(data-i18n-value='artillery' name='attr_artillery_name' value='artillery')
input(data-i18n-value='athletics' name='attr_athletics_name' value='athletics')
input(data-i18n-value='bureaucracy' name='attr_bureaucracy_name' value='bureaucracy')
input(data-i18n-value='computer science' name='attr_computer_science_name' value='computer science')
input(data-i18n-value='craft' name='attr_craft_name' value='craft')
input(data-i18n-value='criminology' name='attr_criminology_name' value='criminology')
input(data-i18n-value='demolitions' name='attr_demolitions_name' value='demolitions')
input(data-i18n-value='disguise' name='attr_disguise_name' value='disguise')
input(data-i18n-value='dodge' name='attr_dodge_name' value='dodge')
input(data-i18n-value='drive' name='attr_drive_name' value='drive')
input(data-i18n-value='firearms' name='attr_firearms_name' value='firearms')
input(data-i18n-value='first aid' name='attr_first_aid_name' value='first aid')
input(data-i18n-value='forensics' name='attr_forensics_name' value='forensics')
input(data-i18n-value='heavy machinery' name='attr_heavy_machinery_name' value='heavy machinery')
input(data-i18n-value='heavy weapons' name='attr_heavy_weapons_name' value='heavy weapons')
input(data-i18n-value='history' name='attr_history_name' value='history')
input(data-i18n-value='humint' name='attr_humint_name' value='humint')
input(data-i18n-value='law' name='attr_law_name' value='law')
input(data-i18n-value='medicine' name='attr_medicine_name' value='medicine')
input(data-i18n-value='melee weapons' name='attr_melee_weapons_name' value='melee weapons')
input(data-i18n-value='military science' name='attr_military_science_name' value='military science')
input(data-i18n-value='navigate' name='attr_navigate_name' value='navigate')
input(data-i18n-value='occult' name='attr_occult_name' value='occult')
input(data-i18n-value='persuade' name='attr_persuade_name' value='persuade')
input(data-i18n-value='pharmacy' name='attr_pharmacy_name' value='pharmacy')
input(data-i18n-value='pilot' name='attr_pilot_name' value='pilot')
input(data-i18n-value='psychotherapy' name='attr_psychotherapy_name' value='psychotherapy')
input(data-i18n-value='ride' name='attr_ride_name' value='ride')
input(data-i18n-value='science' name='attr_science_name' value='science')
input(data-i18n-value='search' name='attr_search_name' value='search')
input(data-i18n-value='sigint' name='attr_sigint_name' value='sigint')
input(data-i18n-value='stealth' name='attr_stealth_name' value='stealth')
input(data-i18n-value='surgery' name='attr_surgery_name' value='surgery')
input(data-i18n-value='survival' name='attr_survival_name' value='survival')
input(data-i18n-value='swim' name='attr_swim_name' value='swim')
input(data-i18n-value='unarmed combat' name='attr_unarmed_combat_name' value='unarmed combat')
.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
//without modifiers - const statRollValue = `@{gm_toggle} &{template:stats} {{header=^{${key}}}} {{subheader=@{${key}}}} {{dice=[[1d100]]}} {{stat=[[@{${key+'_score'}}]]}} {{score=[[@{${key}}]]}}`;
- const statRollValue = `@{gm_toggle} &{template:stats} {{header=^{${key}}}} {{subheader=@{${key}}}} {{dice=[[1d100]]}} {{modifier=[[?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{stat=[[@{${key+'_score'}}+round(?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}})]]}} {{score=[[@{${key}}+?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}}`;
button(name=key data-i18n-title=key + ' roll' title=key + ' roll' type='roll' value!=statRollValue)
h1.align-left(data-i18n=val)=val
if (val === 'POW' || val === 'STR' || val === 'CON' )
label(data-i18n-title=key + ' score' title=key + ' score')
input.text-align-left.short( min=0 name='attr_' + key + '_score' style='width:40%' placeholder='-' title='@{' + key + '_score' + '}' type='number' value=' ')
span.slash [
span.center(name='attr_' + key title='@{' + key + '}')
span.slash %]
else
label(data-i18n-title=key + ' score' title=key + ' score')
input.text-align-left.short(data-i18n-placeholder='-' style='width:40%' min=0 name='attr_' + key + '_score' placeholder='10' title='@{' + key + '_score' + '}' type='number' value=' ')
span.slash [
span.center(name='attr_' + key title='@{' + key + '}')
span.slash %]
h1(data-i18n='HP') HP
label(data-i18n-title='enter hit points' title='enter hit points')
span.center(name='attr_hit_points_max' title='@{' + key + '}')
span.slash /
input.text-align-left.short(data-i18n-placeholder='-' style='width:50%' 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')
span.center(name='attr_willpower_points_max' title='@{' + key + '}')
span.slash /
input.text-align-left.short(data-i18n-placeholder='-' style='width:50%' name='attr_willpower_points' placeholder='-' title='@{willpower_points}' type='number' value='')
h1(data-i18n='SAN') SAN
label(data-i18n-title='enter sanity points' title='enter sanity points')
span.center(name='attr_sanity_points_max' title='@{' + key + '}')
span.slash /
input.text-align-left.short(data-i18n-placeholder='-' style='width:50%' name='attr_sanity_points' placeholder='-' title='@{willpower_points}' type='number' value='')
h1(data-i18n='BP') BP
label(data-i18n-title='enter breaking points' title='enter breaking point')
span.center(name='attr_breaking_point_max' title='@{' + key + '}')
span.slash /
input.text-align-left.short(data-i18n-placeholder='-' style='width:50%' name='attr_breaking_point' placeholder='-' title='@{willpower_points}' type='number' value='')
.grid.section.sanloss
input.switchblock.none( name='attr_whatsanroll' title='@{target_san_loss}' type='checkbox' value='target')
span.switch-a
- 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
span.switch-b
//without modifiers - const statRollValue2 = `@{gm_toggle} &{template:sanloss1} {{minloss=@{minsanloss}}} {{maxloss=@{maxsanloss}}} {{name=@{target|name} }} {{dice=[[1d100]]}} {{subheader=@{target|sanity_points}}} {{rating=[[@{target|sanity_points}]]}} {{type=^{@{san_type}}}} {{success=@{san_success}}} {{failure=@{san_failure}}} {{rsuccess=[@{san_success}](~rsuccess)}} {{rfailure=[@{san_failure}](~rfailure)}} {{hasminsan=[[@{has_san_success}]]}} {{hasmaxsan=[[@{has_san_failure}]]}}`;
- const statRollValue2 = `@{gm_toggle} &{template:sanloss1} {{minloss=@{minsanloss}}} {{maxloss=@{maxsanloss}}} {{name=@{target|name} }} {{dice=[[1d100]]}} {{subheader=@{target|sanity_points}}} {{modifier=[[?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{rating=[[@{target|sanity_points}+?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{type=^{@{san_type}}}} {{success=@{san_success}}} {{failure=@{san_failure}}} {{rsuccess=[@{san_success}](~rsuccess)}} {{rfailure=[@{san_failure}](~rfailure)}} {{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!=statRollValue2)
h1(data-i18n='SAN LOSS') SAN LOSS
button.none(name='roll_rsuccess' type='roll' value='@{gm_toggle} &{template:damage} {{header=Success}} {{subheader=@{san_success}}} {{damage=[[@{san_success}+0]]}} ')
button.none(name='roll_rfailure' type='roll' value='@{gm_toggle} &{template:damage} {{header=Failure}} {{subheader=@{san_failure}}} {{damage=[[@{san_failure}+0]]}} ')
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')
input(name='attr_minsanloss' type='hidden' value='0')
input(name='attr_maxsanloss' 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
input.center( name='attr_whatsanroll' title='@{target_san_loss}' type='checkbox' value='target')
span.slash Target the selected token
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
//without modifiers - const npcSkillRollValue = `@{gm_toggle} &{template:rolls} {{header=@{name}}} {{subheader=@{rank}}} {{rating=[[@{rank}]]}} {{dice=[[1d100]]}}`;
- const npcSkillRollValue = `@{gm_toggle} &{template:rolls} {{header=@{name}}} {{subheader=@{rank}}} {{modifier=[[?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{rating=[[@{rank}+?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{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
//without modifiers- 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)}} {{AP=[[@{armor_piercing}+0]]}}`;
- const attackRollValue = `@{gm_toggle} &{template:rolls} {{name=@{name}}} {{header=@{weapons}}} {{subheader=@{skill_percent}}} {{modifier=[[?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{rating=[[@{skill_percent}+?{Modifier|,0|+20%,20|+40%,40|-20%,-20|-40%,-40|custom (%),?{custom (%)}}]]}} {{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)}} {{AP=[[@{armor_piercing}+0]]}}`;
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}]]}} {{AP=[[@{armor_piercing}+0]]}}')
button.none(name='roll_lethality' type='roll' value='@{gm_toggle} &{template:lethality} {{header=@{weapons}}} {{subheader=@{lethality_percent}}}{{lethality_rating=[[@{lethality_percent}]]}} {{lethality=[[1d100]]}} {{AP=[[@{armor_piercing}+0]]}}')
button.none(name='roll_damage_critical' type='roll' value='@{gm_toggle} &{template:damage} {{header=@{weapons}}} {{subheader=@{damage}}} {{damage=[[(@{damage})*2]]}} {{AP=[[@{armor_piercing}+0]]}}')
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]]}} {{AP=[[@{armor_piercing}+0]]}}')
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