[Ryuutama]: Add spell rolltemplate (#5728)

* [Ryuutama] adding spell template

* [Ryuutama]: spacing fixes

* [Ryuutama]: tiny css format fix

* [Ryuutama]: fix caps
This commit is contained in:
Jose Velazquez
2019-12-16 10:33:12 -06:00
committed by Cassie Levett
parent c34c7f69d5
commit 681497791e
2 changed files with 113 additions and 32 deletions
+45 -10
View File
@@ -1,6 +1,6 @@
@font-face {
font-family: Charm;
src: url(url(https://fonts.gstatic.com/s/charm/v4/7cHmv4oii5K0MdYoK-4.woff2), url(https://fonts.gstatic.com/s/tinos/v13/buE4poGnedXvwjX7fmQ.woff2), ;
font-family: Charm;
src: url(url(https://fonts.gstatic.com/s/charm/v4/7cHmv4oii5K0MdYoK-4.woff2), url(https://fonts.gstatic.com/s/tinos/v13/buE4poGnedXvwjX7fmQ.woff2) ;
}
* {
@@ -105,9 +105,8 @@ hr {
}
.sheet-spellEffect {
margin-top: 5px;
width:47%;
height: 60px;
margin: 0 5px;
height: 75px;
}
.sheet-spellTypes {
@@ -510,13 +509,49 @@ input.sheet-tab5:checked ~ span.sheet-characterEquipment {
margin-left: 5px;
}
.sheet-rolltemplate-spellContainer {
border: 1px solid gray;
}
.sheet-rolltemplate-spellCard {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
background-color: #d0d2e4;
}
.sheet-rolltemplate-spellTitle,
.sheet-rolltemplate-spellAttrText{
background-color: #45619e;
font-family: Helvetica, Arial;
font-weight: bold;
font-size: 12px;
justify-content: center;
color: white;
padding: 1px 3px;
}
.sheet-rolltemplate-spellAttr {
flex: 1;
}
.sheet-rolltemplate-spellAttrText,
.sheet-rolltemplate-spellEffect {
background-color: #d0d2e4;
color: black;
font-weight: normal;
}
.sheet-rolltemplate-spellEffect {
background-color: #fff;
padding: 3px;
}
/* Styling that removes the box around roll buttons
============================= */
button[type=roll].sheet-skill-check-button::before { content: ''; }
button[type=roll].sheet-skill-check-button:hover {
color: #229999;
}
button[type=roll].sheet-skill-check-button:hover { color: #229999; }
button[type=roll].sheet-skill-check-button {
background-color: transparent;
@@ -595,8 +630,8 @@ button[type=roll].sheet-skill-check-button {
}
.sheet-npc-sheet-container
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
+68 -22
View File
@@ -90,10 +90,10 @@
});
});
});
on("change:magicPoints", function() {
getAttrs(["magicPoints"], function(values) {
on("change:mentalPoints", function() {
getAttrs(["mentalPoints"], function(values) {
setAttrs({
mpUnconscious: parseInt(values.magicPoints) <= 0 ? 1 : 0
mpUnconscious: parseInt(values.mentalPoints) <= 0 ? 1 : 0
});
});
});
@@ -650,20 +650,29 @@
<label class='headerLabel spellsLabel'>Spells/Music/Other Abilities</label>
</div>
<fieldset class='repeating_spells'>
<div class="sheet-row sheet-spellRow">
<input type="text" name="attr_spellName" class="sheet-spellName" placeholder="Name">
Duration:
<input type="text" name="attr_spellDuration" class="sheet-spellDuration">
Target:
<input type="text" name="attr_spellTarget" class="sheet-spellTarget">
Range:
<input type="text" name="attr_spellRange" class="sheet-spellRange">
</div>
<div class="sheet-row sheet-spellRow">
<textarea name="attr_spellEffect" class="sheet-spellEffect" placeholder="Effect"></textarea>
<div class='spellDetails'>
<span>Type:</span>
<div class="sheet-spellRow flex">
<div class='flex-column'>
Name:
<input type="text" name="attr_spellName" class="sheet-spellName" placeholder="Hold Hands">
</div>
<div class='flex-column'>
MP:
<input type="number" name="attr_spellCost" value="0" min="0">
</div>
<div class='flex-column'>
Duration:
<input type="text" name="attr_spellDuration" class="sheet-spellDuration" placeholder="Instant">
</div>
<div class='flex-column'>
Target:
<input type="text" name="attr_spellTarget" class="sheet-spellTarget" placeholder="1 Target">
</div>
<div class='flex-column'>
Range:
<input type="text" name="attr_spellRange" class="sheet-spellRange" placeholder="Touch">
</div>
<div class='flex-column'>
Type:
<select name="attr_spellType" class="sheet-spellTypes">
<option value=""></option>
<option value="Incantation">Incantation</option>
@@ -674,11 +683,14 @@
<option value="Winter">Seasonal (Winter)</option>
<option value="Other">Other</option>
</select>
<span>MP:</span>
<input type="number" name="attr_spellCost" value="0" min="0">
</div>
<hr>
</div>
<div class="flex">
<button type='roll' value='&{template:spell} {{name=@{spellName}}} {{cost=@{spellCost}}} {{duration=@{spellDuration}}} {{target=@{spellTarget}}} {{range=@{spellRange}}} {{effect=@{spellEffect}}} ' name='roll_repeatingSpellCard'></button>
<textarea name="attr_spellEffect" class="sheet-spellEffect" placeholder="Effect"></textarea>
</div>
<hr>
</fieldset>
</span>
@@ -691,9 +703,9 @@
<input type='number' class='stats' name='attr_healthPoints' value='8'/> / <input type='number' class='stats' name='attr_healthPoints_max' value='8' min='1'/>
</div>
<div class='sheet-col'>
<label class='headerLabel healthLabel'>Magic Points</label>
<label class='headerLabel healthLabel'>Mental Points</label>
<input type='checkbox' class='penaltyCondition' name='attr_mpUnconscious' value='1'/>
<input type='number' class='stats' name='attr_magicPoints' value='8' min='0'/> / <input type='number' class='stats' name='attr_magicPoints_max' value='8' min='1'/>
<input type='number' class='stats' name='attr_mentalPoints' value='8' min='0'/> / <input type='number' class='stats' name='attr_mentalPoints_max' value='8' min='1'/>
</div>
<div class='sheet-col'>
<label class='headerLabel healthLabel'>Condition</label>
@@ -1651,5 +1663,39 @@
</div>
</div>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-spell">
<div class="rolltemplate-spellContainer">
<div class='rolltemplate-spellCard'>
<div class='rolltemplate-spellAttr flex-column'>
<div class="rolltemplate-spellTitle">Spell</div>
<div class='rolltemplate-spellAttrText'>{{name}}</div>
</div>
<div class='flex-column'>
<div class="rolltemplate-spellTitle">MP</div>
<div class='rolltemplate-spellAttrText'>{{cost}}</div>
</div>
</div>
<div class='rolltemplate-spellCard'>
<div class='rolltemplate-spellAttr flex-column'>
<div class="rolltemplate-spellTitle">Duration</div>
<div class='rolltemplate-spellAttrText'>{{duration}}</div>
</div>
<div class='rolltemplate-spellAttr flex-column'>
<div class="rolltemplate-spellTitle">Target</div>
<div class='rolltemplate-spellAttrText'>{{target}}</div>
</div>
<div class='flex-column'>
<div class="rolltemplate-spellTitle">Range</div>
<div class='rolltemplate-spellAttrText'>{{range}}</div>
</div>
</div>
{{#effect}}
<div class='rolltemplate-spellEffect'>{{effect}}</div>
{{/effect}}
</div>
</div>
</rolltemplate>
<!-- End Roll Templates -->
</html>