Files
roll20-character-sheets/Shadowrun4thEdition/src/pug/_npc.pug
T
2020-08-17 11:56:27 -05:00

339 lines
16 KiB
Plaintext

.npc
.tabs
img(alt='Shadowrun black and metallic logo' src=`${imageSource}/ShadowrunLogo.png`)
h2(data-i18n-title='/w GM') /w GM
label.switch(data-i18n-title='whisper rolls to gm' title='whisper rolls to gm')
input.whisper-toggle(name='attr_gm_toggle' type='checkbox' value='/w gm')
span.slider
each val, key in {'wounds': '@{wounds}', 'modifiers':'?{Modifiers +/-|0}', 'edge':'@{edge}'}
h2(data-i18n-title=key) #{key}
label.switch(data-i18n-title=key title=key)
input.whisper-toggle(name='attr_'+key+'_toggle' type='checkbox' value=val)
span.slider
button(name='d6' title='Roll D6s' type='roll' value='@{gm_toggle} &{template:rolls}{{header=^{d6}}}{{base=^{d6}}}{{dice=[[(?{d6s|0}d6>5)]]}}') L
select(name='attr_sheet_type' title='Sheet Type' value='pc')
each val in sheetTypes
- const attrName = val.toLowerCase();
if val === 'PC'
option(value=attrName data-i18n=attrName selected) #{val}
else
option(value=attrName data-i18n=attrName) #{val}
input(name='attr_stats_toggle' type='checkbox' value='settings' checked)
span.pictos y
input(name='attr_stats_toggle' type='hidden' value='settings')
//- ATTRIBUTES
.grunt.attribute
each val in coreAttributeArray
- const attrName = val.toLowerCase();
+npcAttributeButton(attrName, '@{'+attrName+'}+@{attribute_roll}')
span(name='attr_display_'+attrName)
label.settings(data-i18n-title=val title=val)
input(name=`attr_${attrName}`+'_base' placeholder='3' title='@{'+attrName+'_base}' type='number' value='3')
label.settings(data-i18n-title='modifier' title='modifier')
input(name=`attr_${attrName}`+'_modifier' placeholder='+' title='@{'+attrName+'_modifier}' type='number' value='')
//- EDGE
+npcAttributeButton('edge', '@{edge}+@{attribute_roll}')
span(name='attr_edge')
label.settings(data-i18n-title='edge' title='edge')
input(name='attr_edge' placeholder='3' title='@{edge}' type='number' value='3')
//- ESSENCE
h1(data-i18n='ess') ess
span(name='attr_essence')
label.settings(data-i18n-title='essence' title='essence')
input(name='attr_essence' placeholder='6' title='@{essence}' type='number' value='6')
each val, key in {'magic': 'magic', 'force': 'magic', 'resonance': 'resonance'}
- const abbreviation = key.slice(0,1);
h1(class='hide-'+val data-i18n=abbreviation) #{abbreviation}
span(class='hide-'+val name='attr_'+key)
label.settings(class='hide-'+val data-i18n-title=key title=key)
input(name='attr_'+key placeholder='6' title='@{'+key+'}' type='number' value='6')
.host.attribute
+hostSprite(hostObject, 'host_rating')
.vehicle.attribute
each val, key in {'Hand': ['handling', 'hand'], 'Hand (Off)': ['handling_offroad', 'handoff'], 'Speed': ['speed', 'speed'], 'Speed (Off)': ['speed_offroad', 'speedoff'], 'Accel': ['acceleration', 'accel'], 'Body': ['body', 'body'], 'Pilot': ['pilot', 'pilot'], 'Sensor': ['sensor', 'sensor'], 'Seat': ['seating', 'seat']}
if key === 'Pilot'
+rollButton(val[1], '^{pilot}', '@{pilot}+@{pilot}')
else
h1(data-i18n=val[1]) #{key}
span(name='attr_'+val[0])
label.settings(data-i18n-title=val[1] title=key)
input(name='attr_'+val[0] placeholder='3' title='@{'+val[0]+'}' type='number' value='')
.sprite.attribute
+hostSprite(spriteObject, 'level')
//-BODY
.mid.body
.column
h1.settings(data-i18n='bonuses') Bonuses
//- PROFESSIONAL RATINGS
input(name='attr_pr' type='hidden' value='')
.rows.grunt
h2(data-i18n='pr') Professional Rating
span(name='attr_pr' style='margin-left: 2%;')
label.settings(data-i18n-title='pr' title='Professional Rating')
input(name='attr_pr' title='@{pr}' type='number')
//- INITAITIVE
each val, key in {'Initiative': ['initiative', 'initiative', 'grunt'], 'Astral Initiative': ['astral', 'astralinitiative', 'grunt hide-magic'], 'Matrix Initiative': ['matrix', 'matrixinitiative', 'grunt vehicle sprite host']}
.rows(class=val[2])
if key == 'Initiative'
button(data-i18n=val[1] name=key type='roll' value="@{gm_toggle} &{template:rolls}{{header=^{initiative}}}{{base=^{base}}}{{dice=[[((@{reaction}+@{intuition}+@{initiative_dice_modifier})d6>5cf0)+(@{initiative})+(@{wounds_toggle}) &{tracker}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}") #{key}
else
+initiativeRoll(key, val[0], val[1])
label.settings(data-i18n-title='modifier' title='modifier')
input(name='attr_'+val[0]+'_mod_modifier' placeholder='0' title='@{'+val[0]+'_modifier}' type='number' value='0')
span.settings +
label.settings(data-i18n-title='modifierdice' title='Modifier Dice')
input(min='0' max='4' name='attr_'+val[0]+'_dice_modifier' placeholder='0' title='@{'+val[0]+'_dice_modifier}' type='number' value='0')
span.settings(data-i18n='d6') d6
//- MOVEMENT
.rows.grunt
h2(data-i18n='movement') Movement
- const movementObject = {'walk': ' / ', 'run': ' / + ', 'movement_mod': ''}
each val, key in movementObject
- const translationKey = key.includes('mod') ? 'movement' : key;
- const placeholderValue = key.includes('movement') ? '2' : '0';
label.settings(data-i18n-title=translationKey + ' modifier' title=translationKey + ' modifier')
input(name='attr_'+key+'_modifier' placeholder=placeholderValue title='@{'+key+'_modifier}' type='number' value=placeholderValue)
span.settings #{val}
span.settings.tiny-span() =
each val, key in movementObject
span(name='attr_'+key title='@{'+key+'}')
span #{val}
//- CONDITION MONITORS
.rows.grunt
button(data-i18n='conditionmonitorps' name='act_cond_reset' type='action') Condition Monitor (P/S)
+conditionMonitor(['physical', 'stun'])
.rows.vehicle
button(data-i18n='conditionmonitorpm' name='act_cond_reset' type='action') Condition Monitor (P/M)
+conditionMonitor(['physical', 'matrix'])
.rows.host.sprite
button(data-i18n='conditionmonitorm' name='act_cond_reset' type='action') Condition Monitor (M)
span(name='attr_matrix_max')
//- PAIN TOLERANCE
.grunt.pain-tolerance
.rows.settings
h2(data-i18n='high pain tolerance')
label(data-i18n-title="high pain tolerance")
input(type="number" name="attr_high_pain_tolerance" min="0" value="" placeholder="#" title="@{high_pain_tolerance}")
.rows.settings
h2(data-i18n='low pain tolerance')
label(data-i18n-title="low pain tolerance")
input(type="checkbox" name="attr_low_pain_tolerance" value="2" title="@{low_pain_tolerance}")
.rows.settings
h2(data-i18n='damage compensators')
label(data-i18n-title="damage compensators physical")
input(type="number" min="0" name="attr_damage_compensators_physical" value="" placeholder="1" title="@{damage_compensators_physical}")
span /
label(data-i18n-title="damage compensators stun")
input(type="number" min="0" name="attr_damage_compensators_stun" value="" placeholder="2" title="@{damage_compensators_stun}")
.rows
h2(data-i18n='soak') soak
label.settings(data-i18n-title='soak')
input(name=`attr_soak_modifier` placeholder='0' title=`@{soak_modifier}` type='number' value='0')
span.settings.tiny-span() =
span(name=`attr_soak_modifier`)
.rows
+rollButton('defense', 'base', '@{defense}')
label.settings(data-i18n-title='defense' title='defense')
input(name='attr_defense_modifier' placeholder='9' title='@{defense_modifier}' type='number' value='0')
//- MODIFIERS
.column
h1.settings(data-i18n='modifier') Modifier
each val in ['ballistic', 'impact']
- const attrName = val.toLowerCase();
.rows
+rollButton(attrName, 'base', `@{${attrName}}+@{soak}`)
label.settings(data-i18n-title=val)
input(name=`attr_${val}` placeholder='9' title=`@{${attrName}}` type='number' value='0')
each val in armorProtectionsInputs
.rows
- const attrName = val.toLowerCase();
+rollButton(`${val} Protection`, 'base', `(@{impact}/2)+@{${val}_modifier}+@{soak}`)
label.protections(data-i18n-title=val)
input(name=`attr_${attrName}_modifier` placeholder='0' title=`@{${armorRepeatingSection}_${attrName}_modifier}` type='number' value='0')
///- OPTIONS
.column
.rows
h1.settings(data-i18n='options') Options
.rows.grunt
each val, key in {'Mundane': ['mundane', 'mundane'], 'Awakened': ['awakened', 'magic'], 'Emerged': ['emerged', 'resonance']}
label.settings(data-i18n-title=val[0] title=val[0])
input.character-type(name='attr_flag_special' title='@{flag_special}' type='radio' value=val[1])
h2(data-i18n=val[0]) key
.rows.vehicle
label.settings(data-i18n-title=drone title='Drone')
input.character-type(name='attr_flag_drone' title='@{flag_drone}' type='checkbox' value='drone')
h2(data-i18n=drone) Drone
.end.body
//- TEXTBOXES
each val, key in {'Qualities': 'grunt', 'Augmentations': 'grunt', 'Gear': 'grunt vehicle', 'Programs': 'vehicle', 'Modifications': 'vehicle', 'Powers': 'grunt hide-magic', 'Weakness': 'grunt hide-magic'}
- const attrName = key === 'Qualities' ? 'quality' : key.toLowerCase();
input(name=`attr_${attrName}` type='hidden' value='')
.textrow(class=val)
h1(data-i18n=attrName) key
span(name=`attr_${attrName}`)
label.settings(data-i18n-title=attrName title=key)
textarea(name=`attr_${attrName}` placeholder=key title='@{'+`${attrName}}`)
each val, key in {'Initiate': ['grunt hide-magic', 'metamagic'],'Submersion': ['grunt hide-resonance', 'echos']}
- const attrName = key.toLowerCase();
.textrow(class=val[0])
input(name=`attr_${attrName}` type='hidden' value='')
h1(data-i18n=attrName) key
span(name=`attr_${attrName}`)
label.settings(data-i18n-title=attrName title=key)
input(name=`attr_${attrName}` placeholder=attrName type='number' title='@{'+`${attrName}}`)
br
span(name='attr_'+val[1])
label.settings(data-i18n-title=val[1] title=val[1])
textarea(name='attr_'+val[1] placeholder=val[1] title='@{'+val[1]+'}')
//- SKILLS
each val, key in {'active': ['skills', 'Agility', 'Physical'],'knowledge':['knowledgeskills', 'Logic', 'Mental'], 'language': ['languageskills', 'Charisma', 'Social']}
.rows.grunt.repeating.inline-repeating
h1(data-i18n=val[0]) #{val[0]}
fieldset(class=`repeating_${key}`)
input(name='attr_display_rating' type='hidden')
input(name='attr_specialization' type='hidden' value='')
input(name='attr_display_attribute' type='hidden' value=val[1])
input(name='attr_dicepool' type='hidden' value='0')
if key === 'active'
input(name='attr_display_skill' type='hidden' value='')
input.toggle(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
//- SKILL BUTTON
+skillButton(false, key)
//- SPECILIZATION BUTTON
+skillButton(true)
span(name='attr_display_rating')
.settings
h2(data-i18n='skill') Skill
h2(data-i18n='rating') Rating
h2(data-i18n='ratingmodifier') Rating Modifier
h2(data-i18n='attribute') Attribute
if key === 'active'
select.skill-select(name='attr_skill' title=`@{repeating_${key}`+'_${x}_skill}' value='Close Combat Group')
include ../html/skillselect.html
else
label(data-i18n-title='skill' title='skill')
input(name='attr_skill' placeholder=key title=`@{repeating_${key}`+'_${x}_skill}' type='text' )
label(data-i18n-title='rating' title='rating')
input(name='attr_rating' min='0' placeholder='0' title=`@{repeating_${key}`+'_${x}_rating}' type='number')
label(data-i18n-title='ratingmodifier' title='Rating Modifier')
input(name='attr_rating_modifier' min='0' placeholder='0' title=`@{repeating_${key}`+'_${x}_rating_modifier}' type='number' )
select.attribute-select(name='attr_attribute' title=`@{repeating_${key}`+'_${x}_attribute}')
+attributeSelect(val[1])
h2.full-row(data-i18n='specialization') specialization
label.full-row(data-i18n-title='specialization' title='specialization')
input(name='attr_specialization' placeholder='specializations' title=`@{repeating_${key}`+'_${x}_specialization}' type='text')
//- WEAPONS
.rows.grunt.vehicle.repeating.weapons
h1(data-i18n='weapons') Weapons
fieldset(class='repeating_weapon')
input(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
input(name='attr_weapon' type='hidden' value='')
span(name='attr_weapon_dice')
+displayRollButton(weaponButton, true)
span(name='attr_weapon')
input(name='attr_weapon_range' type='hidden' value='range')
.settings
each val, key in npcWeaponsObject
- const translationKey = key.toLowerCase();
if (key !== 'Notes')
h2(data-i18n=translationKey) #{key}
each val, key in npcWeaponsObject
- const translationKey = key.toLowerCase();
- const attrName = key === 'Dam' ? 'dv' : key === 'Modes' ? 'mode' : key === 'Notes' ? 'note' : key.toLowerCase();
- const defaultValue = key === 'Reach' ? 0 : '';
if (key === 'Range')
select(name='attr_weapon_'+attrName title='@{repeating_weapon_${x}_weapon_'+`${attrName}}` value=val['default'])
option(data-i18n='range' value='range' selected) range
option(data-i18n='melee' value='melee') melee
else
label(data-i18n-title=translationKey title=key)
input(name='attr_weapon_'+attrName placeholder=val['placeholder'] title='@{repeating_weapon_${x}_weapon_'+`${attrName}}` type=val['type'] value=defaultValue)
span (c)
//- SPELLS
.rows.grunt.repeating.spells.hide-magic
h1(data-i18n='spells') Spells
fieldset(class='repeating_NPCspell')
input(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
input(name='attr_spell' type='hidden' value='')
span(name='attr_dice')
+displayRollButton(npcSpellButton, true)
span(name='attr_spell')
.settings
input(name='attr_category' type='hidden' value='')
each val, key in npcSpellObject
- const translationKey = key.toLowerCase();
if (key !== 'Notes')
h2(data-i18n=translationKey) #{key}
each val, key in npcSpellObject
- const translationKey = key.toLowerCase();
- const attrName = key === 'Dam' ? 'damage' : key === 'Combat' ? 'combat_type' : key === 'Notes' ? 'note' : key.toLowerCase();
if val['type'] === 'select'
select(name=`attr_${attrName}` title='@{repeating_NPCspell_${x}_'+`${attrName}}` value=val['default'])
each type in val['array']
- const i18n = key === 'Combat' ? type.split(' ')[0].replace(',','').toLowerCase() : type.toLowerCase();
- const value = key === 'Type' ? type.slice(0,1) : type;
if val['default'] === i18n
option(data-i18n=i18n value=value 'selected') #{i18n}
else if i18n === 'force'
option(value=value 'selected')
else
option(data-i18n=i18n value=value) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name=`attr_${attrName}` placeholder=val['placeholder'] title='@{repeating_NPCspell_${x}_'+`${attrName}}` type=val['type'])
//- COMPLEX FORMS
.rows.grunt.repeating.forms.hide-resonance
h1(data-i18n='complex form') Complex Forms
fieldset(class='repeating_form')
input(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
input(name='attr_form' type='hidden' value='')
span(name='attr_form_dice')
+displayRollButton(formButton, true)
span(name='attr_form')
.settings
each val, key in npcComplexFormsObject
- const translationKey = key.toLowerCase();
if (key !== 'Notes')
h2(data-i18n=translationKey) #{key}
each val, key in npcComplexFormsObject
- const translationKey = key.toLowerCase();
- const attrName = key === 'Notes' ? 'form_note' : 'form_' + key.toLowerCase();
if val['type'] === 'select'
select(name=`attr_${attrName}` title='@{repeating_form_${x}_'+`${attrName}}` value=val['default'])
each type in val['array']
- const i18n = type.toLowerCase();
- const value = type;
if val['default'] === i18n
option(data-i18n=i18n value=value 'selected') #{i18n}
else
option(data-i18n=i18n value=value) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name=`attr_${attrName}` placeholder=val['placeholder'] title='@{repeating_form_${x}_'+`${attrName}}` type=val['type'])