Rework méditation

This commit is contained in:
Vincent Vandemeulebrouck 2021-04-21 20:43:03 +02:00
parent cc2254112f
commit 8dea766540
2 changed files with 57 additions and 66 deletions

View File

@ -2482,10 +2482,14 @@ export class RdDActor extends Actor {
console.log("rollMeditation !!!", meditationData); console.log("rollMeditation !!!", meditationData);
const dialog = await RdDRoll.create(this, meditationData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html' }, { const dialog = await RdDRoll.create(this, meditationData,
{
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html',
options: { height: 575, }
},
{
name: 'jet-meditation', name: 'jet-meditation',
label: 'Jet de Meditation ' + meditation.name, label: "Jet de méditation",
height: 600,
callbacks: [ callbacks: [
this.createCallbackExperience(), this.createCallbackExperience(),
{ condition: r => r.rolled.isETotal, action: r => this._meditationETotal(r) }, { condition: r => r.rolled.isETotal, action: r => this._meditationETotal(r) },

View File

@ -1,60 +1,47 @@
<form class="dialog-roll-meditation"> <form class="dialog-roll-meditation">
<div class="form-group"> <h2>{{meditation.name}}</h2>
<ul class="item-list"> <div class="grid grid-2col">
<li class="item flexrow"> <div class="flex-group-left">
<label><strong>Thème : {{meditation.data.theme}} </strong></label> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<label>Intellect {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{competence.name}} {{numberFormat competence.data.niveau decimals=0 sign=true}}</label> <div class="flexcol">
</li> <label><strong>{{meditation.data.theme}}</strong></label>
<li class="item flexrow"> <hr>
<label>Sujet : {{competence.name}} ({{meditation.data.theme}})</label> <label>Support: <strong>{{upperFirst meditation.data.support}}</strong></label>
<label>Durée : 60 minutes</label> <label>Case TMR: <strong>{{upperFirst meditation.data.tmr}}</strong></label>
</li> <label>Durée: 60 minutes</label>
<li class="item flexrow"> <hr>
<label>Support : {{meditation.data.support}}</label> <label>Intellect / {{competence.name}}:
<label>Malus spécial : {{meditation.data.malus}}</label> {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{numberFormat competence.data.niveau decimals=0 sign=true}}</label>
</li> </div>
<li class="item flexrow"><label>Case TMR : {{meditation.data.tmr}}</label></li> </div>
</ul> <div class="flex-group-left">
</div> <div class="flexrow">
<label><strong>Conditions Optionnelles : </strong></label>
</div>
<div class="flexrow">
<label>Comportement antérieur : {{upperFirst meditation.data.comportement}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isComportement" {{#if conditionMeditation.isComportement}}checked{{/if}} />
</div>
<div class="flexrow">
<label>Heure : {{upperFirst meditation.data.heure}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isHeure" {{#if conditionMeditation.isHeure}}checked{{/if}} />
</div>
<div class="flexrow">
<label>Purification : {{upperFirst meditation.data.purification}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isPurification" {{#if conditionMeditation.isPurification}}checked{{/if}} />
</div>
<div class="flexrow">
<label>Vêture : {{upperFirst meditation.data.veture}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isVeture" {{#if conditionMeditation.isVeture}}checked{{/if}} />
</div>
<hr>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
<div id="tableAjustements"></div>
</div>
</div>
<div class="form-group"> <div id="tableResolution"></div>
<label class="h4"><strong>Conditions Optionnelles : </strong></label> <div id="tableProbaReussite"></div>
</div>
<div class="form-group">
<ul class="item-list">
<li class="item flexrow">
<label>Heure : {{meditation.data.heure}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isHeure" {{#if conditionMeditation.isHeure}}checked{{/if}}/>
</li>
<li class="item flexrow">
<label>Purification : {{meditation.data.purification}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isPurification" {{#if conditionMeditation.isPurification}}checked{{/if}}/>
</li>
<li class="item flexrow">
<label>Vêture : {{meditation.data.veture}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isVeture" {{#if conditionMeditation.isVeture}}checked{{/if}}/>
</li>
<li class="item flexrow">
<label>Comportement antérieur : {{meditation.data.comportement}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isComportement" {{#if conditionMeditation.isComportement}}checked{{/if}}/>
</li>
</ul>
</div>
<label>Conditions supplémentaires : </label>
<select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div id="tableAjustements">
</div>
<div id="tableResolution"></div>
<div id="tableProbaReussite"></div>
</form> </form>
<script> <script>