Merge pull request #9364 from memethief/psi-run-migration

Legacy Psi*Run sheet migration
This commit is contained in:
Nic Bradley
2021-08-16 12:19:01 -07:00
committed by GitHub
4 changed files with 198 additions and 218 deletions
+69 -85
View File
@@ -1,109 +1,93 @@
.charsheet {
background-color:#F8BE49;
background-color:#F9BE49;
}
table
{
width:100%;
border:0px;
.sheet-runner {
display: grid;
grid-template-columns: 1fr 2fr 2fr;
grid-gap: 10px;
grid-template-areas:
"name name age "
"power power power "
"roll appearance appearance"
"harm appearance appearance"
"questions questions questions "
"endgame endgame endgame "
;
}
td
{
border:0px;
background-color:#F9D181;
border-radius:25px;
.sheet-runner .sheet-block {
display: grid;
background-color:#F9D080;
border-start-start-radius: 16px 100%;
border-end-end-radius: 16px 100%;
padding: 8px 16px;
}
th
{
font-weight:bold;
border:0px;
font-size:small;
.sheet-runner .sheet-name {
grid-area: name;
}
tr
{
.sheet-runner .sheet-age {
grid-area: age;
}
.sheet-runner .sheet-power {
grid-area: power;
}
.sheet-runner .sheet-appearance {
grid-area: appearance;
}
.sheet-runner .sheet-roll {
grid-area: roll;
}
.sheet-runner .sheet-harm {
grid-area: harm;
justify-self: end;
justify-items: stretch;
align-self: center;
text-align: center;
}
input
{
width:90%;
.sheet-runner .sheet-questions {
grid-area: questions;
}
.sheet-runner .sheet-endgame {
grid-area: endgame;
}
input[type=checkbox]
{
width:100%;
.sheet-block label {
width: inherit;
display: grid;
align-items: center;
white-space: nowrap;
}
input[type=number]
{
-moz-appearance:textfield;
text-align: center;
.sheet-block label input[type=text],
.sheet-block label input[type=number],
.sheet-block label textarea,
.sheet-block label select {
width: inherit;
}
textarea
{
width:calc(90% - 10px);
padding:4px;
/* Hide the radio button and style the label span */
.sheet-harm input[type=radio] {
display: none;
}
.repcontrol_add,
.repcontrol_move
.sheet-harm input[type=radio] + span
{
float:left;
}
.repcontrol_add
{
border-bottom-left-radius:25px;
}
.repcontrol_edit
{
border-bottom-right-radius:25px;
}
input.sheet-etatSante
{
width: 210px;
height: 22px;
position: relative;
left: 8px;
margin: -1.5px;
cursor: pointer;
z-index: 1;
opacity: 0;
}
input.sheet-etatSante + span::before
{
content: attr(title);
text-align: center;
display: inline-block;
margin-left:-200px;
width: 205px;
height: 22px;
font-size: 14px;
font-weight:bold;
border:1px solid black;
border-top-left-radius: 3em 3em;
border-top-right-radius: 3em 3em;
border-bottom-right-radius: 3em 3em;
border-bottom-left-radius: 3em 3em;
box-shadow: 3px 3px 6px black;
position: relative;
background: #F9D080;
border-top-left-radius: 3em 100%;
border-top-right-radius: 3em 100%;
border-bottom-right-radius: 3em 100%;
border-bottom-left-radius: 3em 100%;
padding: 0.25em 1.5em;
text-align: center;
background: #F9D080;
box-shadow: 3px 3px 6px black;
}
input.sheet-etatSante:checked + span::before
.sheet-harm input[type=radio]:checked + span
{
background: #F9BE4A;
box-shadow: 0px 0px 7px 0px #000000 inset;
background: #F9BE4A;
box-shadow: 0px 0px 7px 0px #000000 inset;
}
+100 -118
View File
@@ -1,120 +1,102 @@
<table>
<tr>
<td style="background:none" Rowspan="3">
<center>
<img src="https://img4.hostingpics.net/pics/540346TitrePsiRun3.png">
</center>
</td>
<td style="background:none;" width="50%"><!-- NOM -->
<table>
<tr>
<td>
<h4><span data-i18n="runner-name">Nom du Fugitif</span> :</h4>
<INPUT type="text" name="attr_character_name"
title="Nom de votre personnage" data-i18n-title="runner-name-title"
placeholder="Nom de votre personnage" data-i18n-placeholder="runner-name-placeholder"></INPUT> <!-- FIN NOM -->
<br><br>
</td>
</tr>
<tr style="height:20px">
</tr>
<tr>
<td>
<h4><span data-i18n="apparent-age">Age Apparent</span> :</h4>
<INPUT type="number" name="attr_AGE" title="Age" value="6" min="6"></INPUT><br><br>
</td>
</tr>
<tr style="height:20px">
</tr>
<tr>
<td>
<h4><span data-i18n="psi-power">Pouvoir Psi</span> :</h4>
<input type="text" name = "attr_psi" /><br><br>
</td>
</tr>
</table>
</td>
</tr>
</table><br>
<script type="text/worker">
<table>
<tr>
<td width="65%"><br>
<h4><span data-i18n="appearance">Quand je me regarde dans le Miroir, je vois</span> :</h4>
<textarea name="description miroir"></textarea>
</td>
<td style="background:none; width:40px">
</td>
<td width="30%"><br><!-- ETAT -->
<h4><span data-i18n="harm">Etat</span> : </h4>
<table>
<tr>
<td style="background:none">
<input type="radio" name="attr_etatSante" class="etatSante" value="0" checked />
<span title="Je suis en Forme" data-i18n-title="unimpaired" class="etatSante"></span>
</td>
</tr>
<tr style="height:5px">
</tr>
<tr>
<td style="background:none">
<input type="radio" name="attr_etatSante" class="etatSante" value="1" checked />
<span title="Je suis Blessé" data-i18n-title="impaired" class="etatSante"></span>
</td>
</tr>
<tr style="height:5px">
</tr>
<tr>
<td style="background:none">
<input type="radio" name="attr_etatSante" class="etatSante" value="2" checked />
<span title="Je suis doublement Blessé" data-i18n-title="doubly-impaired" class="etatSante"></span>
</td>
</tr>
</table><!-- FIN ETAT --><br>
<DIV> <!-- FORCE -->
<BUTTON type="roll" name="JetEtat" value="[[(4+?{pouvoir|0}-@{ETATSANTE})d6]]" title="Jet" data-i18n-title="roll" /></BUTTON>
</DIV> <!-- FIN FORCE --><br>
</td>
</tr>
</table><br>
on("sheet:opened", function(eventInfo){
setAttrs({
psiprompt: getTranslationByKey("ask-using-psi-power"),
harmprompt: getTranslationByKey("ask-risking-harm"),
yesanswer: getTranslationByKey("yes"),
noanswer: getTranslationByKey("no"),
rollquery: "(([[@{baseroll}]])+?{@{psiprompt}|@{yesanswer},1|@{noanswer},0}+?{@{harmprompt}|@{yesanswer},1|@{noanswer},0})d6kl[[([[@{baseroll}]])+?{@{psiprompt}}+?{@{harmprompt}}+(@{drophigh})]]dl[[@{droplow}]]sd"
});
});
<table>
<tr>
<td><!--QUESTIONS-->
<h4><span data-i18n="i-have-questions">J'ai des Questions</span> ...</h4>
<fieldset class="repeating_questions">
<span data-i18n="question">Question</span>
<input type="text" name="attr_ques_nom"
placeholder="description de la question" data-i18n-placeholder="question-placeholder"
title="description de la question"/><br>
<span data-i18n="answer">Réponse</span>
<textarea name="attr_ques_descr"
placeholder="description de la réponse" data-i18n-placeholder="answer-placeholder"
title="description de la réponse"></textarea>
</fieldset><!--fin de questions-->
</td>
</tr>
</table><br>
<table>
<tr>
<td> <!-- EPILOGUE -->
<h4><span data-i18n="endgame">Epilogue</span> : </h4>
<SELECT name="attr_CLASSE">
<OPTION selected data-i18n="your-character-endgame">Quelle fin à votre personnage ?</OPTION>
<OPTION data-i18n="trapped">Piégé</OPTION>
<OPTION data-i18n="home">A la Maison</OPTION>
<OPTION data-i18n="hidden">Caché</OPTION>
<OPTION data-i18n="on-a-quest">En Quête</OPTION>
<OPTION data-i18n="lost">Perdu</OPTION>
<OPTION data-i18n="turning-the-tables">Retourne la Situation</OPTION>
<OPTION data-i18n="making-a-discovery">Fait une Découverte</OPTION>
</SELECT><!-- FIN EPILOGUE -->
</td>
</tr>
</table>
</script>
<div class="sheet-runner">
<div class="sheet-block sheet-name">
<label>
<span data-i18n="runner-name">Runner's Name</span>
<input type="text" name="attr_character_name"
placeholder="Your character's name"
data-i18n-placeholder="runner-name-placeholder"/>
</label>
</div>
<div class="sheet-block sheet-age">
<label>
<span data-i18n="apparent-age">Apparent Age</span>
<input type="number" name="attr_age" min="0"/>
</label>
</div>
<div class="sheet-block sheet-power">
<label>
<span data-i18n="psi-power">Psi Power</span>
<input type="text" name="attr_psi_power"
placeholder="Your character's psi power"
data-i18n-placeholder="psi-power-placeholder"/>
</label>
</div>
<div class="sheet-block sheet-appearance">
<label>
<span><span data-i18n="in-the-mirror...">When I look in the mirror, I see...</span></span>
<textarea name="attr_appearance"></textarea>
</label>
</div>
<div class="sheet-block sheet-roll">
<div>
<input type="hidden" name="attr_baseroll" value="4 - {@{harm},0}kh1" disabled="true"/>
<input type="hidden" name="attr_droplow" value="1 - {(@{harm}*@{harm}),0}kh1" disabled="true"/>
<input type="hidden" name="attr_drophigh" value="{@{harm},0}kl1" disabled="true"/>
<span style="display: none" data-i18n="ask-using-psi-power">Are you using your psi power?</span>
<span style="display: none" data-i18n="ask-risking-harm">Are you risking harm to anyone?</span>
<span style="display: none" data-i18n="yes">Yes</span>
<span style="display: none" data-i18n="no">No</span>
<button type="roll" name="roll_risk" value="/roll @{rollquery}" data-i18n="take-a-risk">Take a Risk</button>
</div>
</div>
<div class="sheet-block sheet-harm">
<strong><span data-i18n="harm">Harm</span></strong>
<label>
<input type="radio" name="attr_harm" value="0" checked />
<span data-i18n="unimpaired">I'm unimpaired</span>
</label>
<label>
<input type="radio" name="attr_harm" value="1"/>
<span data-i18n="impaired">I'm impaired!</span>
</label>
<label>
<input type="radio" name="attr_harm" value="-1" />
<span data-i18n="doubly-impaired">I'm doubly impaired!</span>
</label>
</div>
<div class="sheet-block sheet-questions">
<strong><span data-i18n="i-have-questions...">I Have Questions...</span></strong>
<fieldset class="repeating_question">
<label>
<span data-i18n="question">Question</span>
<input type="text" name="attr_question"
placeholder="your question"
data-i18n-placeholder="question-placeholder"/>
</label>
<label>
<span data-i18n="answer">Answer</span>
<textarea name="attr_answer"
placeholder="the question's answer"
data-i18n-placeholder="answer-placeholder"></textarea>
</label>
</fieldset>
</div>
<div class="sheet-block sheet-endgame">
<label>
<span data-i18n="endgame">Endgame</span>
<select name="attr_endgame">
<option selected data-i18n="your-character-endgame">What is your character's endgame?</option>
<option data-i18n="trapped">Trapped</option>
<option data-i18n="home">Home</option>
<option data-i18n="hidden">Hidden</option>
<option data-i18n="on-a-quest">On a quest</option>
<option data-i18n="lost">Lost</option>
<option data-i18n="turning-the-tables">Turning the tables</option>
<option data-i18n="making-a-discovery">Making a discovery</option>
</select>
</label>
</div>
</div>
+1 -2
View File
@@ -4,6 +4,5 @@
"authors": "Lyra S.",
"roll20userID": "1492292",
"preview": "PsirunPreview.png",
"instructions": "Feuille de personnage pour Psi*Run.",
"legacy": true
"instructions": "Feuille de personnage pour Psi*Run."
}
+28 -13
View File
@@ -1,16 +1,31 @@
{
"runner-name":"Nom du Fugitif",
"apparent-age":"Age Apparent",
"psi-power":"Pouvoir Psi",
"appearance":"Quand je me regarde dans le Miroir, je vois",
"harm":"Etat",
"unimpaired":"Je suis en Forme",
"impaired":"Je suis Blessé",
"doubly-impaired":"Je suis doublement Blessé",
"i-have-questions":"J'ai des Questions",
"runner-name":"Runner's Name",
"runner-name-placeholder":"your character's name (as far as you know)",
"apparent-age":"Apparent Age",
"psi-power":"Psi Power",
"psi-power-placeholder":"your character's psi power",
"in-the-mirror...":"When I look in the mirror, I see...",
"harm":"Harm",
"unimpaired":"I'm unimpaired",
"impaired":"I'm impaired!",
"doubly-impaired":"I'm doubly impaired!",
"i-have-questions...":"I have questions...",
"question":"Question",
"question-placeholder":"description de la question",
"answer":"Réponse",
"answer-placeholder":"description de la réponse",
"endgame":"Epilogue"
"question-placeholder":"your question",
"answer":"Answer",
"answer-placeholder":"the question's answer",
"take-a-risk":"Take a Risk",
"endgame":"Endgame",
"your-character-endgame":"What is your character's endgame?",
"trapped":"Trapped",
"home":"Home",
"hidden":"Hidden",
"on-a-quest":"On a quest",
"lost":"Lost",
"turning-the-tables":"Turning the tables",
"making-a-discovery":"Making a discovery",
"ask-using-psi-power": "Are you using your psi power?",
"ask-risking-harm":"Are you risking harm to anyone?",
"yes":"Yes",
"no":"No"
}