Initialization

This commit is contained in:
Sebastian Fischlmayr 2022-09-14 12:16:36 +02:00
commit 3458f39973
Signed by: Maverick
GPG key ID: 6379E413924A4E77
28 changed files with 6780 additions and 0 deletions

View file

@ -0,0 +1,36 @@
.abilityBox {
display: grid;
grid-template-columns: repeat(6, auto);
grid-auto-flow: row;
justify-content: start;
gap: 0.7em 4px;
align-items: center;
height: fit-content;
width: 100%;
> {
* {
grid-column: span 1;
}
span {
color: #aaaaee;
font-size: 13pt;
margin-right: 20px;
}
p {
color: #aaaaee;
font-size: 10pt;
text-align: center;
vertical-align: middle;
margin-bottom: 0px;
&.abilityLabel {
margin-bottom: -0.5em;
}
}
}
}

View file

@ -0,0 +1,6 @@
.abilityBox
include ./_abilityBoxLabels.pug
include ./_abilityBoxRows.pug
each val in abilities
+abilityRow(val)

View file

@ -0,0 +1,6 @@
p.abilityLabel
p.abilityLabel Rating
p.abilityLabel
p.abilityLabel Mod
p.abilityLabel
p.abilityLabel Pool

View file

@ -0,0 +1,9 @@
mixin abilityRow(name)
input(type="hidden" name=`attr_abilityname_${name.substring(0,3)}` value=`${name}`)
- name = name.toLowerCase()
span(name=`attr_abilityname_${name.substring(0,3)}`)
input(type="number" name=`attr_abilityrtg_${name.substring(0,3)}` value="1")
p +
input(type="number" name=`attr_abilitymod_${name.substring(0,3)}` value="0")
p =
input(type="number" name=`attr_abilitypool_${name.substring(0,3)}` value=`@{abilityrtg_${name.substring(0,3)}}+@{abilitymod_${name.substring(0,3)}}` disabled="true")

62
components/_healthBox.css Normal file
View file

@ -0,0 +1,62 @@
.healthWrapper {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
> {
.healthContainer {
display: grid;
grid-template-columns: repeat(3, auto);
justify-items: center;
gap: 0px;
justify-content: start;
> {
* {
margin: -1px;
}
/* TODO: Refactor to use Labels !!!! */
label {
&.healthTrackerBox {
cursor: pointer;
order: 1;
background-color: red;
z-index: 1;
position: relative;
border: 2px solid #550000;
border-radius: 0px;
appearance: none;
width: 6rem;
height: 6rem;
border-radius: 3px;
&.reset {
order: 2;
background-color: brown;
}
&:after {
position: absolute;
content: "-1";
top: 2px;
right: 4px;
}
&:checked {
position: absolute;
opacity: 0;
z-index: 0;
}
&:checked ~ .healthTrackerBox {
order: 3;
background-color: #444444;
}
&:focus {
outline: none;
}
}
}
}
}
}
}

0
components/_skillRow.css Normal file
View file

28
components/_skillRow.pug Normal file
View file

@ -0,0 +1,28 @@
.skillcontainerrow
input.newSrCheckbox(type="checkbox" name=`attr_hideskill${index + 1}` title="Hide Skill", value="true")
input(type='text' name=`attr_skillname${index + 1}` title='Skill Name' disabled='true' value=val.name)
select.min-width(type='text' name='attr_skillattr1' title='Attribute')
option(value='@{bod' selected= (val.attribute == SRAttributes.body)) BOD
option(value='@{agi' selected= (val.attribute == SRAttributes.agility)) AGI
option(value='@{rea' selected= (val.attribute == SRAttributes.reaction)) REA
option(value='@{str' selected= (val.attribute == SRAttributes.strength)) STR
option(value='@{wil' selected= (val.attribute == SRAttributes.willpower)) WIL
option(value='@{log' selected= (val.attribute == SRAttributes.logic)) LOG
option(value='@{int' selected= (val.attribute == SRAttributes.intuition)) INT
option(value='@{cha' selected= (val.attribute == SRAttributes.charisma)) CHA
option(value='@{mag' selected= (val.attribute == SRAttributes.magic)) MAG
option(value='@{res' selected= (val.attribute == SRAttributes.resonance)) RES
option(value='@{ess' selected= (val.attribute == SRAttributes.essence)) ESS
input(type='hidden' name=`attr_skillattr${index + 1}_name` value='@{bod_name}')
input(type='hidden' name=`attr_skillattr${index + 1}_value` value='@{bod_total}')
input(type='number' name=`attr_skillrating${index + 1}` value='-1' title='Skill-Rating without Attribute')
input(type='number' name=`attr_skillbonus${index + 1}` value='0' title='Bonuses from Magic or Gear')
input(type='text' name=`attr_skillspec${index + 1}` placeholder='Specialization ...')
input(type='text' name=`attr_skillexp${index + 1}` placeholder='Expertise ...')
input.newSrCheckbox(type='checkbox' name=`attr_skilltognotes${index + 1}` title='Show Notes' value="false")
input(type='number' name=`attr_skilldicepool${index + 1}` value=`@{skillattr${index + 1}_value}+@{skillrating${index + 1}}+@{skillbonus${index + 1}}` title='Base Dicepool' disabled='true')
button.rollbuttonspec(type='roll' name='roll_skillrollspec' title='Click to Roll' value=`@{gmroll}&{template:shadowrun}{{name=@{character_name}}}{{roll_name=@{skillname${index + 1}}}}{{val1=@{skillattr${index + 1}_name}}}{{val1_num=[[@{skillattr${index + 1}_value}]]}}{{val2=@{skillname${index + 1}}}}{{val2_num=[[@{skillrating${index + 1}}+@{skillbonus${index + 1}}]]}}{{val3=@{skillspec${index + 1}}}}{{val3_num=[[(?{Specialization|None,0|@{skillspec${index + 1}} +2,2|@{skillexp${index + 1}} +3,3})]]}}{{mod_num=[[?{Situational Modifiers|0}]]}}{{edge=@{edgeroll}}}{{edge_num=[[@{edg_total}]]}}{{wounds_num=[[@{wound_total}]]}}{{result=[[(@{skilldicepool${index + 1}}+(?{Specialization})-[[@{wound_total}]]+?{Situational Modifiers|0}+[[@{edgn}*@{edg_total}]])@{standardroll}@{edgeroll}]]}}{{description=@{skillnotes${index + 1}}}}`).
button.rollbuttonnospec(type='roll' name='roll_skillroll' title='Click to Roll' value=`@{gmroll}&{template:shadowrun}{{name=@{character_name}}}{{roll_name=@{skillname${index + 1}}}}{{val1=@{skillattr${index + 1}_name}}}{{val1_num=[[@{skillattr${index + 1}_value}]]}}{{val2=@{skillname${index + 1}}}}{{val2_num=[[@{skillrating${index + 1}}+@{skillbonus${index + 1}}]]}}{{mod_num=[[?{Situational Modifiers|0}]]}}{{edge=@{edgeroll}}}{{edge_num=[[@{edg_total}]]}}{{wounds_num=[[@{wound_total}]]}}{{result=[[(@{skilldicepool${index + 1}}-[[@{wound_total}]]+?{Situational Modifiers|0}+[[@{edgn}*@{edg_total}]])@{standardroll}@{edgeroll}]]}}{{description=@{skillnotes${index + 1}}}}`).
input(type="hidden" name=`attr_skillnotes${index + 1}` value='')
textarea(type='text' name=`attr_skillnotes${index + 1}` placeholder="Short Description ..." title='Description...')

View file

@ -0,0 +1,2 @@
.skillcontainerrow
button

View file

@ -0,0 +1,11 @@
.skillcontainerrow
p.skillLabel Hide
p.skillLabel Skill Name
p.skillLabel Attribute
p.skillLabel Rating
p.skillLabel Bonus
p.skillLabel Specialization
p.skillLabel Expertise
p.skillLabel Notes
p.skillLabel Dice
p.skillLabel Roll