mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
551 lines
24 KiB
HTML
551 lines
24 KiB
HTML
<div class="main">
|
|
<div class="header tab">
|
|
<div>
|
|
<h1>Windrose Everlasting</h1>
|
|
<span class="normal" name='attr_character_name'><</span>
|
|
</div>
|
|
<div>
|
|
<button type="action" name="act_character" >Character</button>
|
|
<button type="action" name="act_configuration" >Configuration</button>
|
|
</div>
|
|
</div>
|
|
<input type='hidden' class='sheet-tabstoggle' name='attr_sheetTab' value='character' />
|
|
<div class="sheet-buttons">
|
|
<button type="action" name="act_calc_do" class="d6-dice">Calculate Roll to Do</button>
|
|
<input type="hidden" value='&{template:roll} {{title=Please Pres Calculate Button}}' name="attr_do_formula" />
|
|
<button type="roll" name="roll_do" value="@{do_formula}" class="d6-dice">Show Roll to Do</button>
|
|
|
|
<button type="action" name="act_calc_dye" class="d6-dice">Calculate Roll to Dye</button>
|
|
<input type="hidden" value='&{template:roll} {{title=Please Press Calculate Button}}' name="attr_dye_formula"/>
|
|
<button type="roll" name="roll_dye" value="@{dye_formula}" class="d6-dice">Show Roll to Dye</button>
|
|
</div>
|
|
<div class="sheet-attribute-values inset">
|
|
<div>
|
|
Swing Color: <select name='attr_swing_color'>
|
|
<option value="" selected>None</option>
|
|
<option value="red">Red</option>
|
|
<option value="yellow">Yellow</option>
|
|
<option value="blue">Blue</option>
|
|
<option value="green">Green</option>
|
|
<option value="orange">Orange</option>
|
|
<option value="purple">Purple</option>
|
|
<option value="white">White</option>
|
|
<option value="grey">Grey</option>
|
|
<option value="black">Black</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
Swing Value: <select name='attr_swing_value'>
|
|
<option value=0 selected>NA</option>
|
|
<option value=1>1</option>
|
|
<option value=2>2</option>
|
|
<option value=3>3</option>
|
|
<option value=4>4</option>
|
|
<option value=5>5</option>
|
|
<option value=6>6</option>
|
|
</select>
|
|
</div>
|
|
<div>d6s:<input name="attr_d6s" type="number" value="0"></div>
|
|
<div>Bonus:<input name="attr_bonus" type="number" value="0"></div>
|
|
<input type='hidden' name="attr_red_value" value="1"/>
|
|
<input type='hidden' name="attr_yellow_value" value="1"/>
|
|
<input type='hidden' name="attr_blue_value" value="1"/>
|
|
<input type='hidden' name="attr_green_value" value="1"/>
|
|
<input type='hidden' name="attr_orange_value" value="1"/>
|
|
<input type='hidden' name="attr_purple_value" value="1"/>
|
|
<input type='hidden' name="attr_white_value" value="1"/>
|
|
<input type='hidden' name="attr_grey_value" value="1"/>
|
|
<input type='hidden' name="attr_black_value" value="1"/>
|
|
<input type='hidden' name="attr_total" value="1"/>
|
|
</div>
|
|
<div class="sheet-attribute-settings inset">
|
|
<div class='small left'>Red</div>
|
|
<div>Lvl:<input name="attr_red_level" type="number" value="0"></div>
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_red_wounded" />
|
|
<button type="action" name="act_red_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_red_lockedout" />
|
|
<button type="action" name="act_red_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_red_enabled" />
|
|
<button type="action" name="act_red_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class='small left'>Yellow</div>
|
|
<div>Lvl:<input name="attr_yellow_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_yellow_wounded" />
|
|
<button type="action" name="act_yellow_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_yellow_lockedout" />
|
|
<button type="action" name="act_yellow_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_yellow_enabled" />
|
|
<button type="action" name="act_yellow_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class='small left'>Blue</div>
|
|
<div>Lvl:<input name="attr_blue_level" type="number" value="0"></div>
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_blue_wounded" />
|
|
<button type="action" name="act_blue_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_blue_lockedout" />
|
|
<button type="action" name="act_blue_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_blue_enabled" />
|
|
<button type="action" name="act_blue_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class='small left'>Green</div>
|
|
<div> Lvl:<input name="attr_green_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_green_wounded" />
|
|
<button type="action" name="act_green_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_green_lockedout" />
|
|
<button type="action" name="act_green_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_green_enabled" />
|
|
<button type="action" name="act_green_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class='small left'>Purple</div>
|
|
<div>Lvl:<input name="attr_purple_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_purple_wounded" />
|
|
<button type="action" name="act_purple_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_purple_lockedout" />
|
|
<button type="action" name="act_purple_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_purple_enabled" />
|
|
<button type="action" name="act_purple_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class='small left'>Orange</div>
|
|
<div>Lvl:<input name="attr_orange_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_orange_wounded" />
|
|
<button type="action" name="act_orange_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_orange_lockedout" />
|
|
<button type="action" name="act_orange_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_orange_enabled" />
|
|
<button type="action" name="act_orange_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="small left">Black</div>
|
|
<div>Lvl:<input name="attr_black_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_black_wounded" />
|
|
<button type="action" name="act_black_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_black_lockedout" />
|
|
<button type="action" name="act_black_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_black_enabled" />
|
|
<button type="action" name="act_black_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="small left">Grey</div>
|
|
<div>Lvl:<input name="attr_grey_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_grey_wounded" />
|
|
<button type="action" name="act_grey_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_grey_lockedout" />
|
|
<button type="action" name="act_grey_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_grey_enabled" />
|
|
<button type="action" name="act_grey_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="small left">White</div>
|
|
<div>Lvl:<input name="attr_white_level" type="number" value="0"></div>
|
|
|
|
<div class="sheet-grid-column">
|
|
<div class="toggle-container">
|
|
W:<input type="hidden" class="toggle" name="attr_white_wounded" />
|
|
<button type="action" name="act_white_wounded" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
L:<input type="hidden" class="toggle" name="attr_white_lockedout" />
|
|
<button type="action" name="act_white_lockedout" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
<div class="toggle-container">
|
|
E:<input type="hidden" class="toggle" name="attr_white_enabled" />
|
|
<button type="action" name="act_white_enabled" class="toggle">
|
|
<span class="checked">✓</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer inset">
|
|
<label>Health:
|
|
<input name="attr_health" type="number" value="10">
|
|
</label>
|
|
<label>EXP:
|
|
<input name="attr_exp" type="number" value="0">
|
|
</label>
|
|
<label>Speed:
|
|
<input name="attr_speed" type="number" value="30">
|
|
</label>
|
|
</div>
|
|
<div class="footer-2">Find full character sheet with API at https://github.com/Ozarke/windrose</div>
|
|
<div class="swing">
|
|
<input type='hidden' value='' class='color-swing' name='attr_swing_color'/>
|
|
<div class="color-swing-receiver attr-icon black">
|
|
Swing
|
|
<span class="big" name="attr_swing_value" type="number" value="0" minvalue="0"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/worker">
|
|
const buttonList = ["character","configuration"];
|
|
buttonList.forEach(button => {
|
|
on(`clicked:${button}`, function() {
|
|
setAttrs({
|
|
sheetTab: button
|
|
});
|
|
});
|
|
});
|
|
|
|
on('clicked:calc_do', function() {
|
|
let colors = ["red","yellow","blue","green","orange","purple","black","white","grey"];
|
|
let attributes = ["d6s","bonus","swing_color","swing_value"];
|
|
colors.forEach(color=>{
|
|
attributes.push(color+"_level");
|
|
});
|
|
getAttrs(attributes,function(values){
|
|
let header_url = 'https://raw.githubusercontent.com/Ozarke/windrose/main/assets/Roll-to-do-clear.png';
|
|
let background_color = '';
|
|
if(values.swing_color !== "")
|
|
{
|
|
background_color = values.swing_color;
|
|
}
|
|
let total = 0;
|
|
let outstr = "";
|
|
let roll_val = 0;
|
|
outstr +='&{template:roll}{{color='+ background_color + '}}{{title=[Dye](' + header_url + ')}}';
|
|
roll_val = Math.floor( Math.random() * 20 ) +1;
|
|
outstr += '{{d20='+roll_val+'}}';
|
|
total += parseInt(roll_val);
|
|
|
|
roll_val = 0;
|
|
if(values.swing_color !== "")
|
|
{
|
|
if("0" !== values.swing_value)
|
|
{
|
|
roll_val = values.swing_value;
|
|
}
|
|
else
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
}
|
|
if(values[values.swing_color+"_level"] !== "0")
|
|
{
|
|
total += parseInt(values[values.swing_color+"_level"]);
|
|
outstr += '{{swing=+ [['+ values[values.swing_color+"_level"] +']] **Attribute Level**}}';
|
|
}
|
|
total += parseInt(roll_val);
|
|
outstr += "{{"+values.swing_color+'='+roll_val+'}}';
|
|
}
|
|
|
|
let d6 = parseInt(values.d6s);
|
|
if(d6 !== 0)
|
|
{
|
|
outstr += '{{d6s= ';
|
|
if(d6 > 0)
|
|
{
|
|
for(i = 0; i<parseInt(d6);i++)
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
|
|
outstr += '+ [[' + roll_val + ']] ';
|
|
total += parseInt(roll_val);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for(i = 0; i<-parseInt(d6);i++)
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
|
|
outstr += '+ [[-' + roll_val + ']] ';
|
|
total -= parseInt(roll_val);
|
|
}
|
|
}
|
|
outstr += '}}';
|
|
}
|
|
let bonus = parseInt(values.bonus);
|
|
if (bonus !== 0)
|
|
{
|
|
outstr += '{{bonus=+ [['+bonus+']] ** Bonus **}}';
|
|
total += bonus;
|
|
}
|
|
|
|
outstr += "{{total="+total+"}}";
|
|
setAttrs({"do_formula":outstr});
|
|
});
|
|
});
|
|
|
|
on('clicked:calc_dye', function() {
|
|
// Header
|
|
let colors = ["red","yellow","blue","green","orange","purple","black","white","grey"];
|
|
let attributes = ["d6s","bonus","swing_color","swing_value"];
|
|
colors.forEach(color=>{
|
|
attributes.push(color+"_enabled");
|
|
attributes.push(color+"_wounded");
|
|
attributes.push(color+"_lockedout");
|
|
attributes.push(color+"_level");
|
|
});
|
|
getAttrs(attributes,function(values){
|
|
let header_url = 'https://raw.githubusercontent.com/Ozarke/windrose/main/assets/Roll-to-dye.jpg';
|
|
let background_color = '';
|
|
if(values.swing_color !== "" && values.swing_value !== "0")
|
|
{
|
|
background_color = values.swing_color;
|
|
header_url = 'https://raw.githubusercontent.com/Ozarke/windrose/main/assets/Roll-to-dye-clear.png';
|
|
}
|
|
let total = 0;
|
|
let outstr = "";
|
|
let roll_val = 0;
|
|
outstr +='&{template:roll}{{color='+ background_color + '}}{{title=[Dye](' + header_url + ')}}';
|
|
colors.forEach(color =>{
|
|
if(values[color + "_enabled"] === "true")
|
|
{
|
|
if(values[color + "_wounded"] === "true")
|
|
{
|
|
outstr += "{{"+color+'=W}}';
|
|
}
|
|
else
|
|
{
|
|
if(values[color + "_lockedout"] === "true")
|
|
{
|
|
outstr += "{{"+color+'=L}}';
|
|
}
|
|
else
|
|
{
|
|
roll_val = 0;
|
|
if(color === values.swing_color && values.swing_value !== "0")
|
|
{
|
|
roll_val = values.swing_value;
|
|
if(values[color+"_level"] !== "0")
|
|
{
|
|
total += parseInt(values[color+"_level"]);
|
|
outstr += '{{swing=+ [['+ values[color+"_level"] +']] **Attribute Level**}}';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
}
|
|
total += parseInt(roll_val);
|
|
outstr += "{{"+color+'='+roll_val+'}}';
|
|
}
|
|
}
|
|
}
|
|
});
|
|
let d6 = parseInt(values.d6s);
|
|
if(d6 !== 0)
|
|
{
|
|
outstr += '{{d6s= ';
|
|
if(d6 > 0)
|
|
{
|
|
for(i = 0; i<parseInt(d6);i++)
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
|
|
outstr += '+ [[' + roll_val + ']] ';
|
|
total += parseInt(roll_val);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
for(i = 0; i<-parseInt(d6);i++)
|
|
{
|
|
roll_val = Math.floor( Math.random() * 6 ) +1;
|
|
|
|
outstr += '+ [[-' + roll_val + ']] ';
|
|
total -= parseInt(roll_val);
|
|
}
|
|
}
|
|
outstr += '}}';
|
|
}
|
|
let bonus = parseInt(values.bonus);
|
|
if (bonus !== 0)
|
|
{
|
|
outstr += '{{bonus=+ [['+bonus+']] ** Bonus **}}';
|
|
total += bonus;
|
|
}
|
|
|
|
outstr += "{{total="+total+"}}";
|
|
setAttrs({"dye_formula":outstr});
|
|
});
|
|
});
|
|
|
|
const toggleList = ["red_wounded","red_lockedout","red_enabled",
|
|
"blue_wounded","blue_lockedout","blue_enabled",
|
|
"yellow_wounded","yellow_lockedout","yellow_enabled",
|
|
"green_wounded","green_lockedout","green_enabled",
|
|
"orange_wounded","orange_lockedout","orange_enabled",
|
|
"purple_wounded","purple_lockedout","purple_enabled",
|
|
"black_wounded","black_lockedout","black_enabled",
|
|
"grey_wounded","grey_lockedout","grey_enabled",
|
|
"white_wounded","white_lockedout","white_enabled"];
|
|
toggleList.forEach(function(button) {
|
|
on(`clicked:${button}`, function() {
|
|
const flag = `${button}`;
|
|
// Check the current value of the hidden flag.
|
|
getAttrs([flag], function(v) {
|
|
// Update the value of the hidden flag to "1" for checked or "0" for unchecked.
|
|
setAttrs({
|
|
[flag]: v[flag] !== "false" ? "false" : "true"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<rolltemplate class="sheet-rolltemplate-roll">
|
|
<div class="sheet-container sheet-color-{{color}}">
|
|
<div class="sheet-header">
|
|
{{#title}}<div class="sheet-title">{{title}}</div>{{/title}}
|
|
{{#subtitle}}<div class="sheet-subtitle">{{subtitle}}</div>{{/subtitle}}
|
|
</div>
|
|
<div class="sheet-roll">
|
|
<div class="sheet-total">
|
|
{{#total}}<div>Total</div><div>{{total}}</div><div>=</div>{{/total}}
|
|
</div>
|
|
<div class="sheet-sum">
|
|
<div class="sheet-sum-color">
|
|
{{#d20}}<div class="sheet-d20">
|
|
<div class="sheet-d20-first">{{d20}}</div>
|
|
<div class="sheet-d20-second">0</div>
|
|
</div>{{/d20}}
|
|
{{#red}}<div>+</div><div class="sheet-color-roll sheet-red-roll">{{red}}</div>{{/red}}
|
|
{{#yellow}}<div>+</div><div class="sheet-color-roll sheet-yellow-roll">{{yellow}}</div>{{/yellow}}
|
|
{{#blue}}<div>+</div><div class="sheet-color-roll sheet-blue-roll">{{blue}}</div>{{/blue}}
|
|
{{#green}}<div>+</div><div class="sheet-color-roll sheet-green-roll">{{green}}</div>{{/green}}
|
|
{{#orange}}<div>+</div><div class="sheet-color-roll sheet-orange-roll">{{orange}}</div>{{/orange}}
|
|
{{#purple}}<div>+</div><div class="sheet-color-roll sheet-purple-roll">{{purple}}</div>{{/purple}}
|
|
{{#black}}<div>+</div><div class="sheet-color-roll sheet-black-roll">{{black}}</div>{{/black}}
|
|
{{#grey}}<div>+</div><div class="sheet-color-roll sheet-grey-roll">{{grey}}</div>{{/grey}}
|
|
{{#white}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{white}}</div>{{/white}}
|
|
{{#H}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{H}}</div>{{/H}}
|
|
{{#HH}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{HH}}</div>{{/HH}}
|
|
{{#HHH}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{HHH}}</div>{{/HHH}}
|
|
{{#HHHH}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{HHHH}}</div>{{/HHHH}}
|
|
{{#HHHHH}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{HHHHH}}</div>{{/HHHHH}}
|
|
{{#HHHHHH}}<div>+</div><div class="sheet-color-roll sheet-white-roll">{{HHHHHH}}</div>{{/HHHHHH}}
|
|
</div>
|
|
{{#swing}}<div>
|
|
{{swing}}
|
|
</div>{{/swing}}
|
|
{{#d6s}}<div class="sheet-d6">
|
|
{{d6s}}
|
|
</div>{{/d6s}}
|
|
{{#bonus}}<div>
|
|
{{bonus}}
|
|
</div>{{/bonus}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</rolltemplate>
|
|
|
|
|
|
|
|
|