diff --git a/The Fantasy Trip/TFT.css b/The Fantasy Trip/TFT.css index 14f956a60a..1c0dc900b1 100644 --- a/The Fantasy Trip/TFT.css +++ b/The Fantasy Trip/TFT.css @@ -152,8 +152,6 @@ top:.17em; text-align: center; /* It's a fade intheinthe original */ - margin-left: .125em; - margin-right: .125em; margin-top: 0em; padding-left: .125em; padding-right: .125em; @@ -189,6 +187,7 @@ .sheet-rolltemplate-cast-spell .sheet-container, .sheet-rolltemplate-attack .sheet-container, .sheet-rolltemplate-initiative .sheet-container, +.sheet-rolltemplate-turnorder .sheet-container, .sheet-rolltemplate-description .sheet-container { background-color: #ffffff; @@ -202,6 +201,7 @@ .sheet-rolltemplate-cast-spell .sheet-container h1, .sheet-rolltemplate-attack .sheet-container h1, .sheet-rolltemplate-initiative .sheet-container h1, +.sheet-rolltemplate-turnorder .sheet-container h1, .sheet-rolltemplate-description .sheet-container h1 { color: rgb(126, 45, 64); @@ -216,6 +216,7 @@ .sheet-rolltemplate-cast-spell .sheet-container h2, .sheet-rolltemplate-attack .sheet-container h2, .sheet-rolltemplate-initiative .sheet-container h2, +.sheet-rolltemplate-turnorder .sheet-container h2, .sheet-rolltemplate-description .sheet-container h2 { color: rgb(126, 45, 64); @@ -225,7 +226,6 @@ letter-spacing: -.01em; } - .sheet-rolltemplate-description .sheet-container h1 { font-style: normal; @@ -236,6 +236,7 @@ .sheet-rolltemplate-cast-spell div, .sheet-rolltemplate-attack div, .sheet-rolltemplate-initiative div, +.sheet-rolltemplate-turnorder div, .sheet-rolltemplate-description div { padding: 2.5px; @@ -248,6 +249,7 @@ .sheet-rolltemplate-cast-spell span, .sheet-rolltemplate-attack span, .sheet-rolltemplate-initiative span, +.sheet-rolltemplate-turnorder span, .sheet-rolltemplate-description span { color: rgb(126, 45, 64); @@ -264,6 +266,7 @@ .sheet-rolltemplate-cast-spell .sheet-arrow-right, .sheet-rolltemplate-attack .sheet-arrow-right, .sheet-rolltemplate-initiative .sheet-arrow-right, +.sheet-rolltemplate-turnorder .sheet-arrow-right, .sheet-rolltemplate-description .sheet-arrow-right { border-bottom: 2px solid transparent; @@ -286,7 +289,11 @@ .sheet-rolltemplate-cast-spell .inlinerollresult, .sheet-rolltemplate-cast-spell .inlinerollresult.fullcrit, .sheet-rolltemplate-cast-spell .inlinerollresult.fullfail, -.sheet-rolltemplate-cast-spell .inlinerollresult.importantroll +.sheet-rolltemplate-cast-spell .inlinerollresult.importantroll, +.sheet-rolltemplate-turnorder .inlinerollresult, +.sheet-rolltemplate-turnorder .inlinerollresult.fullcrit, +.sheet-rolltemplate-turnorder .inlinerollresult.fullfail, +.sheet-rolltemplate-turnorder .inlinerollresult.importantroll { display: inline-block; min-width: 1.5em; @@ -298,7 +305,8 @@ .sheet-rolltemplate-stat-check3 .sheet-template-dice .inlinerollresult, .sheet-rolltemplate-stat-check4 .sheet-template-dice .inlinerollresult, .sheet-rolltemplate-attack .sheet-template-dice .inlinerollresult, -.sheet-rolltemplate-cast-spell .sheet-template-dice .inlinerollresult +.sheet-rolltemplate-cast-spell .sheet-template-dice .inlinerollresult, +.sheet-rolltemplate-initiative .sheet-template-dice .inlinerollresult { font-family: dicefontd6; font-size: 2.5em; @@ -330,14 +338,17 @@ .sheet-rolltemplate-attack .sheet-keyvalue span:first-child, .sheet-rolltemplate-cast-spell .sheet-keyvalue span:first-child, .sheet-rolltemplate-description .sheet-keyvalue span:first-child, -.sheet-rolltemplate-initiative .sheet-keyvalue span:first-child +.sheet-rolltemplate-initiative .sheet-keyvalue span:first-child, +.sheet-rolltemplate-turnorder .sheet-keyvalue span:first-child { font-weight: 550; } .sheet-rolltemplate-attack .sheet-description, .sheet-rolltemplate-cast-spell .sheet-description, -.sheet-rolltemplate-description .sheet-description { +.sheet-rolltemplate-description .sheet-description, +.sheet-rolltemplate-turnorder .sheet-description +{ font-style: italic; } @@ -345,7 +356,9 @@ .sheet-rolltemplate-stat-check4 .sheet-capitalize, .sheet-rolltemplate-attack .sheet-capitalize, .sheet-rolltemplate-cast-spell .sheet-capitalize, -.sheet-rolltemplate-description .sheet-capitalize { +.sheet-rolltemplate-turnorder .sheet-capitalize, +.sheet-rolltemplate-description .sheet-capitalize +{ text-transform: capitalize; } diff --git a/The Fantasy Trip/TFT.html b/The Fantasy Trip/TFT.html index d157d70022..ba62bc4c34 100644 --- a/The Fantasy Trip/TFT.html +++ b/The Fantasy Trip/TFT.html @@ -88,18 +88,21 @@
-
+
+
+ + +
- + + Health + +
-
- Health - -
Wounds @@ -158,12 +161,12 @@
Attack/Cast  - + - + - + @@ -731,22 +734,37 @@
- - +

{{character_name}} takes initiative!

-
- Dexterity: {{initiative}} +
+
+ {{computed::roll1}} +
- + + +
+

+ {{character_name}}'s Turn Order +

+
+
+ Dexterity: {{turnorder}} +
+
+
+ + +

@@ -831,23 +849,23 @@ const diceArrayToString = function(rolls) { let diceString = ''; - for (i = 0; i < rolls.length; ++i) { - let roll = rolls[i]; - if (roll == 1) diceString += 'a'; - else if (roll == 2) diceString += 'b'; - else if (roll == 3) diceString += 'c'; - else if (roll == 4) diceString += 'd'; - else if (roll == 5) diceString += 'e'; - else diceString += 'f'; - - if (i < rolls.length -1) - diceString += ' ' // ' ' - + if (rolls) { + for (i = 0; i < rolls.length; ++i) { + let roll = rolls[i]; + if (roll == 1) diceString += 'a'; + else if (roll == 2) diceString += 'b'; + else if (roll == 3) diceString += 'c'; + else if (roll == 4) diceString += 'd'; + else if (roll == 5) diceString += 'e'; + else diceString += 'f'; + if (i < rolls.length -1) + diceString += ' ' // ' ' + } } return diceString; } - const finishRollWithDiceString = function(rolls, rollId) { + const finishRollWithDiceString = function(rollId, rolls) { let diceString = diceArrayToString(rolls); finishRoll( rollId, @@ -860,7 +878,12 @@ const doRollWithDiceString = function(macro) { macro += ' {{character_name=@{cname}}}'; startRoll(macro, (results) => { - finishRollWithDiceString(results.results.roll1.dice, results.rollId); + if ('roll1' in results.results) { + finishRollWithDiceString(results.rollId, results.results.roll1.dice); + } + else { + finishRollWithDiceString(results.rollId); + } }); } @@ -1012,6 +1035,15 @@ doRollWithDiceString("&{template:stat-check4} {{stat_a=a}} {{stat_name=health}} {{stat=[[@{stcurrent}[HEALTH]]]}} {{roll1=[[4d6]]}}"); }); + on('clicked:initiative', (info) => { + doRollWithDiceString("&{template:initiative} {{roll1=[[1d6]]}}"); + }); + + on('clicked:turnorder', (info) => { + doRollWithDiceString("&{template:turnorder} {{character_name=@{character_name}}} {{turnorder=[[@{DX}[DEX] &{tracker}]]}}"); + }); + + /* TALENT HANDLERS */ // Expand or describe a talent. @@ -1418,7 +1450,6 @@ }); }); - // Update unspent iq points. on('sheet:opened ' + 'change:repeating_talents remove:repeating_talents '