Add files via upload

This commit is contained in:
jonnyggarcia
2022-02-24 15:05:13 -03:00
committed by GitHub
parent 35ab2a4603
commit d2bc188d3b
4 changed files with 676 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

+314
View File
@@ -0,0 +1,314 @@
/* Smaller margins - remove these if you want the huge default left margin */
.sheet-rolltemplate-custom {
margin-left: -37px;
}
.withoutavatars .sheet-rolltemplate-custom {
margin-left: -7px;
}
.sheet-rolltemplate-custom .sheet-container {
border: 1px solid;
/* by default, the border is the same color as the header. You can change this here, e.g. to black */
border-color: var(--header-bg-color);
}
/* Header formatting - title and subtitle */
.sheet-rolltemplate-custom .sheet-header {
background-color: var(--header-bg-color);
/* change text-align to center to center the header text */
text-align: left;
color: var(--header-text-color);
padding: 5px;
}
.sheet-rolltemplate-custom .sheet-title {
font-size:1.1em;
}
.sheet-rolltemplate-custom .sheet-subtitle {
font-size:.9em;
}
/* example colors */
.sheet-rolltemplate-custom .sheet-container {
/* this is the default color */
--header-bg-color: rgba(112,32,130,1);
--header-text-color: #FFF;
}
.sheet-rolltemplate-custom .sheet-container.sheet-color-red {
--header-bg-color: #F00;
}
.sheet-rolltemplate-custom .sheet-container.sheet-color-green {
--header-bg-color: rgb(1, 148, 1);
}
.sheet-rolltemplate-custom .sheet-container.sheet-color-blue {
--header-bg-color: rgb(83, 86, 254);
}
.sheet-rolltemplate-custom .sheet-container.sheet-color-purple {
--header-bg-color: rgb(107, 0, 174);
}
.sheet-rolltemplate-custom .sheet-color-text-red {
color: #F00;
}
.sheet-rolltemplate-custom .sheet-color-text-green {
color: rgb(1, 148, 1);
}
.sheet-rolltemplate-custom .sheet-color-text-blue {
color: rgb(83, 86, 254);
}
.sheet-rolltemplate-custom .sheet-color-text-purple {
color: rgb(107, 0, 174);
}
/* Allprops part */
.sheet-rolltemplate-custom .sheet-content {
display: grid;
background: #FFF;
/* Header formatting - modify the column layout below */
grid-template-columns: auto auto;
/* Line height to match default roll template */
line-height:1.4em;
}
.sheet-rolltemplate-custom .sheet-content > div {
padding: 5px;
}
/* Left column */
.sheet-rolltemplate-custom .sheet-content .sheet-key {
font-weight: bold;
padding-right: 10px;
text-align: right;
}
/* Empty rule, use this if you want to change the right column
.sheet-rolltemplate-custom .sheet-value {
}
*/
/* Make even-numbered rows grey */
.sheet-rolltemplate-custom .sheet-content :nth-child(2n) {
background:#EEE;
}
/* Description field */
.sheet-rolltemplate-custom .sheet-desc {
grid-column: span 2;
padding: 5px;
}
.sheet-rolltemplate-custom2 {
margin-left: -37px;
}
.withoutavatars .sheet-rolltemplate-custom2 {
margin-left: -7px;
}
.sheet-rolltemplate-custom2 .sheet-container {
border: 1px solid;
/* by default, the border is the same color as the header. You can change this here, e.g. to black */
border-color: var(--header-bg-color);
}
/* Header formatting - title and subtitle */
.sheet-rolltemplate-custom2 .sheet-header {
background-color: var(--header-bg-color);
/* change text-align to center to center the header text */
text-align: left;
color: var(--header-text-color);
padding: 5px;
}
.sheet-rolltemplate-custom2 .sheet-title {
font-size:1.1em;
}
.sheet-rolltemplate-custom2 .sheet-subtitle {
font-size:.9em;
}
/* example colors */
.sheet-rolltemplate-custom2 .sheet-container {
/* this is the default color */
--header-bg-color: rgba(112,32,130,1);
--header-text-color: #FFF;
}
.sheet-rolltemplate-custom2 .sheet-container.sheet-color-red {
--header-bg-color: #F00;
}
.sheet-rolltemplate-custom2 .sheet-container.sheet-color-green {
--header-bg-color: rgb(1, 148, 1);
}
.sheet-rolltemplate-custom2 .sheet-container.sheet-color-blue {
--header-bg-color: rgb(83, 86, 254);
}
.sheet-rolltemplate-custom2 .sheet-container.sheet-color-purple {
--header-bg-color: rgb(107, 0, 174);
}
.sheet-rolltemplate-custom2 .sheet-color-text-red {
color: #F00;
}
.sheet-rolltemplate-custom2 .sheet-color-text-green {
color: rgb(1, 148, 1);
}
.sheet-rolltemplate-custom2 .sheet-color-text-blue {
color: rgb(83, 86, 254);
}
.sheet-rolltemplate-custom2 .sheet-color-text-purple {
color: rgb(107, 0, 174);
}
/* Allprops part */
.sheet-rolltemplate-custom2 .sheet-content {
display: grid;
background: #FFF;
/* Header formatting - modify the column layout below */
grid-template-columns: auto auto;
/* Line height to match default roll template */
line-height:1.4em;
}
.sheet-rolltemplate-custom2 .sheet-content > div {
padding: 5px;
}
/* Left column */
.sheet-rolltemplate-custom2 .sheet-content .sheet-key {
font-weight: bold;
padding-right: 10px;
text-align: right;
}
/* Empty rule, use this if you want to change the right column
.sheet-rolltemplate-custom2 .sheet-value {
}
*/
/* Make even-numbered rows grey */
.sheet-rolltemplate-custom2 .sheet-content :nth-child(2n) {
background:#EEE;
}
/* Description field */
.sheet-rolltemplate-custom2 .sheet-desc {
grid-column: span 2;
padding: 5px;
}
.charsheet .width-10 { width: 10px; }
.charsheet .width-20 { width: 20px; }
.charsheet .width-30 { width: 30px; }
.charsheet .width-40 { width: 40px; }
.charsheet .width-45 { width: 45px; }
.charsheet .width-50 { width: 50px; }
.charsheet .width-60 { width: 60px; }
.charsheet .width-70 { width: 70px; }
.charsheet .width-80 { width: 80px; }
.charsheet .width-90 { width: 90px; }
.charsheet .width-100 { width: 100px; }
.charsheet .width-110 { width: 110px; }
.charsheet .width-120 { width: 120px; }
.charsheet .width-130 { width: 130px; }
.charsheet .width-140 { width: 140px; }
.charsheet .width-150 { width: 150px; }
.charsheet .width-160 { width: 160px; }
.charsheet .width-170 { width: 170px; }
.charsheet .width-180 { width: 180px; }
.charsheet .width-190 { width: 190px; }
.charsheet .width-200 { width: 200px; }
.charsheet .width-210 { width: 210px; }
.charsheet .width-220 { width: 220px; }
.charsheet .width-230 { width: 230px; }
.charsheet .width-240 { width: 240px; }
.charsheet .width-250 { width: 250px; }
.charsheet .width-260 { width: 260px; }
.charsheet .width-270 { width: 270px; }
.charsheet .width-280 { width: 280px; }
.charsheet .width-290 { width: 290px; }
.charsheet .width-295 { width: 295px; }
.charsheet .width-300 { width: 300px; }
.charsheet .width-310 { width: 310px; }
.charsheet .width-320 { width: 320px; }
.charsheet .width-350 { width: 350px; }
.charsheet .width-375 { width: 375px; }
.charsheet .width-380 { width: 380px; }
.charsheet .width-400 { width: 400px; }
.charsheet .width-420 { width: 420px; }
.charsheet .width-450 { width: 450px; }
.charsheet .width-500 { width: 500px; }
.charsheet .width-600 { width: 600px; }
.charsheet .width-630 { width: 630px; }
.charsheet .width-650 { width: 650px; }
.charsheet .width-680 { width: 680px; }
.charsheet .width-750 { width: 750px; }
.charsheet .hidden{
display: none;
}
.charsheet .line{
display: block;
}
.charsheet .cell{
display: table-cell;
}
.charsheet .valign{
vertical-align: middle;
}
.charsheet span{
font-weight: bold;
}
.charsheet .border0{
padding: 10px;
margin: 10px;
border: 1px solid rgba(208, 208, 208, 0.5);
border-radius: 5px;
}
.charsheet .border1{
border: 1px solid rgba(0, 0, 0, 0.5);
}
.charsheet .button1{
height: 25px;
width: 15px;
}
.charsheet .centre{
text-align: center;
}
button[type=action].sheet-dice::before {
font-family: 'dicefontd20';
content: '0';
}
+362
View File
@@ -0,0 +1,362 @@
<div class="cell width-375">
<img src="logo.png"/>
</div>
<input type="text" name="attr_result" class="hidden"/>
<input type="text" name="attr_resultOracle" class="hidden"/>
<div class="line">
<div class="cell width-420">
<div class="line">
<div class="cell width-110"><label>NAME</label></div>
<div class="cell"><input type="text" name="attr_name" class="width-260"/></div>
</div>
<div class="line">
<div class="cell width-110"><label>PRONOUNS</label></div>
<div class="cell width-170"><input type="text" name="attr_pronouns" class="width-160"/></div>
<div class="cell"><label>AGE</label></div>
<div class="cell"><input type="number" name="attr_age" size=3/></div>
</div>
</div>
<div class="cell">
<div class="line"><button type="action" class="width-100" name="act_roll">ROLL</button>&nbsp;&nbsp;&nbsp;<button type= "action" name="act_pushRoll">push</button></div>
<div class="line"><button type="action" class="width-100" name="act_complication">COMPLICATION</button></div>
<div class="line"><button type="action" class="width-100" name="act_oracle">ORACLE</button>&nbsp;&nbsp;&nbsp;<button type= "action" name="act_pushOracle">push</button></div>
<div class="line"><button type="action" class="width-100" name="act_oracleQuick">QUICK ORACLE</button></div>
</div>
</div>
<hr>
<div class="line">
<div class="cell width-260">
<label>GIFT</label>
<div class="cell width-240">
<fieldset class="repeating_gift">
<div class="line"><input type="text" name="attr_gift" class="width-240"></div>
</fieldset>
</div>
</div>
<div class="cell width-260">
<label>UPBRINGING</label>
<div class="cell width-240">
<fieldset class="repeating_upbringing">
<div class="line"><input type="text" name="attr_upbringing" class="width-240"></div>
</fieldset>
</div>
</div>
<div class="cell width-260">
<label>EXPERIENCE</label>
<div class="cell width-240">
<fieldset class="repeating_experience">
<div class="line"><input type="text" name="attr_experience" class="width-240"></div>
</fieldset>
</div>
</div>
</div>
<div class="line">&nbsp;</div>
<div class="line">&nbsp;</div>
<div class="line">
<div class="cell width-260">
<label>MARK</label>
<div class="cell width-240">
<fieldset class="repeating_mark">
<div class="line"><input type="text" name="attr_mark" class="width-240"></div>
</fieldset>
</div>
</div>
<div class="cell width-260">
<label>CHARM</label>
<div class="cell width-240">
<fieldset class="repeating_charm">
<div class="line"><input type="text" name="attr_charm" class="width-240"></div>
</fieldset>
</div>
</div>
<div class="cell width-260">
<label>BOND</label>
<div class="cell width-240">
<fieldset class="repeating_bond">
<div class="line"><input type="text" name="attr_bond" class="width-240"></div>
</fieldset>
</div>
</div>
</div>
<hr>
<div class="line width-750">
<label>NOTES</label>
<textarea name="attr_notes"></textarea>
</div>
<rolltemplate class="sheet-rolltemplate-custom">
<div class="sheet-container sheet-color-{{color}}">
<div class="sheet-header">
{{#name}}{{#title}}<div class="sheet-title">{{name}} - {{title}}</div> {{/title}}{{/name}}
</div>
<div class="sheet-content sheet-color-text-{{colorText}}">
{{#allprops() title color colorText name}}
<div class="sheet-desc">{{value}}</div>
{{/allprops() title color colorText name}}
</div>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-custom2">
<div class="sheet-container sheet-color-{{color}}">
<div class="sheet-header">
{{#name}}{{#title}}<div class="sheet-title">{{name}} - {{title}}</div> {{/title}}{{/name}}
</div>
<div class="sheet-content sheet-color-text-{{colorText}}">
<div class="sheet-key">DICE</div>
{{#dice}}<div class="sheet-value">{{dice}}</div>{{/dice}}
<div class="sheet-key">RESULT</div>
{{#result}}<div class="sheet-value">{{result}}</div>{{/result}}
</div>
</div>
</rolltemplate>
<script type="text/worker">
on("clicked:roll", function(eventInfo){
getAttrs(["name"], function(values){
let dado = randomInteger(6);
let result = "WEAK HIT";
let color = 'purple';
if (dado == 6 || dado == 5){
result = "STRONG HIT";
color = 'blue';
}
sendMsg(color, color, values.name.toUpperCase(), "ACTION", result, dado);
setAttrs({
result: dado
});
});
});
on("clicked:pushRoll", function(eventInfo){
getAttrs(["name", "result"], function(values){
let mod = parseInt(values.result)||0;
if (mod == 0){
sendMsg("red", "red", "", "", ["You must roll ACTION first"], '');
return;
}
let dado = randomInteger(6);
let total = dado + mod;
let diceDesc = total + " (" + mod + " + " + dado + ")";
let result = "";
let color = '';
switch(true){
case (total > 6):{
result = "MISS";
color = 'red';
break;
}
case (total > 4):{
result = "STRONG HIT";
color = 'blue';
break;
}
case (total < 5):{
result = "WEAK HIT";
color = 'purple';
break;
}
}
sendMsg(color, color, values.name.toUpperCase(), "PUSH ACTION", result, diceDesc);
setAttrs({
result: 0
});
});
});
on("clicked:complication", function(eventInfo){
getAttrs(["name"], function(values){
var comp = [];
console.log(eventInfo);
comp.push("A character is negatively affected (hurt, stressed, sick, afraid, sad)");
comp.push("A character is put in danger");
comp.push("A character loses/breaks an item/resource/opportunity");
comp.push("A current threat/obstacle is worsened/intensified");
comp.push("A new threat/obstacle appears");
comp.push("A twist or inconvenient truth is revealed");
sendMsg("black", "black", values.name.toUpperCase(), "COMPLICATION", comp, '');
});
});
on("clicked:oracle", function(eventInfo){
getAttrs(["name"], function(values){
let dado = randomInteger(6);
let result = 'LIKELY';
let color = 'blue';
if (dado == 6 || dado == 5){
result = "UNLIKELY";
color = 'purple';
}
sendMsg(color, color, values.name.toUpperCase(), "ORACLE", result, dado);
setAttrs({
resultOracle: dado
});
});
});
on("clicked:pushOracle", function(eventInfo){
getAttrs(["name", "resultOracle"], function(values){
let mod = parseInt(values.resultOracle)||0;
if (mod == 0){
sendMsg("red", "red", "", "", ["You must roll ORACLE first"], '');
return;
}
let dado = randomInteger(6);
let total = dado + mod;
let diceDesc = total + " (" + mod + " + " + dado + ")";
let result = "";
let color = '';
switch(true){
case (total > 6):{
result = "MISFORTUNE";
color = 'red';
break;
}
case (total > 4):{
result = "UNLIKELY";
color = 'purple';
break;
}
case (total < 5):{
result = "LIKELY";
color = 'blue';
break;
}
}
sendMsg(color, color, values.name.toUpperCase(), "PUSH ORACLE", result, diceDesc);
setAttrs({
resultOracle: 0
});
});
});
on("clicked:oracleQuick", function(eventInfo){
getAttrs(["name"], function(values){
let dado = randomInteger(6);
let result = 'NO';
let color = 'red';
if (dado > 3){
result = "YES";
color = 'blue';
}
sendMsg(color, color, values.name.toUpperCase(), "QUICK ORACLE", result, dado);
});
});
function sendMsg(cor, corText, name, titulo, campos, dados){
var mensagem = '';
console.log( ">>>>>>send msg<<<<<<<<");
if (dados != ''){
mensagem += "&{template:custom2} " +
"{{dice=" + dados + "}} " +
"{{result=" + campos + "}} ";
}else{
mensagem += "&{template:custom} ";
for (let i=0 ; i < campos.length ; i++){
mensagem += "{{" + i + "=" + campos[i] + "}} "
}
}
mensagem += "{{color=" + cor + "}} " +
"{{colorText=" + corText + "}} " +
"{{title=" + titulo + "}} " +
"{{name=" + name + "}} ";
console.log(mensagem);
startRoll(mensagem, (results) =>{
finishRoll(results.rollId);
});
}
function randomInteger(max){
return Math.floor(Math.random() * max) + 1;
}
</script>