Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
5 changed files with 112 additions and 79 deletions
Showing only changes of commit 0e9bc372bf - Show all commits

View File

@ -268,7 +268,7 @@ export class RdDRoll extends Dialog {
let dmgText = Misc.toSignedString(rollData.dmg.total); let dmgText = Misc.toSignedString(rollData.dmg.total);
if (rollData.coupsNonMortels) { if (rollData.coupsNonMortels) {
dmgText = '(' + dmgText + ')'; dmgText = `(${dmgText}) non-mortel`
} }
if (rollData.selectedSort) { if (rollData.selectedSort) {
rollData.bonus = RdDItemSort.getCaseBonus(rollData.selectedSort, rollData.tmr.coord); rollData.bonus = RdDItemSort.getCaseBonus(rollData.selectedSort, rollData.tmr.coord);
@ -287,7 +287,7 @@ export class RdDRoll extends Dialog {
// Mise à jour valeurs // Mise à jour valeurs
$("#compdialogTitle").text(this._getTitle(rollData)); $("#compdialogTitle").text(this._getTitle(rollData));
$('#coupsNonMortels').prop('checked', rollData.coupsNonMortels); $('#coupsNonMortels').prop('checked', rollData.coupsNonMortels);
$("#dmg-arme-actor").text(dmgText); $(".dmg-arme-actor").text(dmgText);
$('.table-ajustement').remove(); $('.table-ajustement').remove();
$(".table-resolution").remove(); $(".table-resolution").remove();
$(".table-proba-reussite").remove(); $(".table-proba-reussite").remove();
@ -353,9 +353,9 @@ export class RdDRoll extends Dialog {
const niveau = Misc.toSignedString(rollData.competence.data.niveau); const niveau = Misc.toSignedString(rollData.competence.data.niveau);
if (compName == carac) { if (compName == carac) {
// cas des créatures // cas des créatures
return carac + " " + niveau return carac + " Niveau " + niveau
} }
const armeTitle = (rollData.arme) ? " (" + rollData.arme.name + ") " : ""; const armeTitle = (rollData.arme) ? " (" + rollData.arme.name + ") " : "";
return carac + "/" + compName + armeTitle + " " + niveau return carac + "/" + compName + armeTitle + " Niveau " + niveau
} }
} }

View File

@ -855,8 +855,7 @@ ul, li {
/* Position the tooltip text */ /* Position the tooltip text */
position: absolute; position: absolute;
z-index: 1; z-index: 1;
top: -10px; left: 25px;
left: 18%;
/* Fade in tooltip */ /* Fade in tooltip */
visibility: hidden; visibility: hidden;

View File

@ -1,82 +1,112 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2> <h2 class="compdialog" id="compdialogTitle"></h2>
<div class="form-group">
<label>Caractéristique </label>
<select name="carac" id="carac" data-dtype="String">
{{#select carac}}
{{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option>
{{/each}}
{{/select}}
</select>
<label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label> <div class="grid grid-2col">
<div class="tooltipAppelAuMoral divAppelAuMoral"> <div class="flex-group-left">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <div class="flexrow">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span> <label>Caractéristique </label>
</div> <select name="carac" id="carac" data-dtype="String">
</div> {{#select carac}}
<div class="form-group"> {{#each carac as |caracitem key|}}
{{#if attackerRoll}} <option value={{key}}>{{caracitem.label}}</option>
<label>Difficulté</label> {{/each}}
<label>{{diffLibre}}</label> {{/select}}
{{else}} </select>
<label>Difficulté libre</label> </div>
<select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}> {{#if arme}}
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
{{/if}}
<label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
{{#if arme}}
<div class="form-group">
{{#if attackerRoll}} {{#if attackerRoll}}
{{#if attackerRoll.tactique}} {{#if attackerRoll.tactique}}
<label>Tactique: {{attackerRoll.tactique}}</label> <div class="flexrow">
<label>Tactique: </label><label>{{attackerRoll.tactique}}</label>
</div>
{{/if}} {{/if}}
<label>D&eacute;gats:</label><label id="dmg-arme-actor"></label> {{else}}
<label></label> <div class="flexrow">
{{else}} <label>Tactique:</label>
<span class="tooltip"> <span class="tooltip">
<label>Tactique:</label> <select class="select-by-name" name="tactique" id="tactique-combat" data-dtype="String" {{#unless use.conditions}}disabled{{/unless}}>
<select class="select-by-name" name="tactique" id="tactique-combat" data-dtype="String" {{#unless use.conditions}}disabled{{/unless}}> <option value="Attaque normale">Attaque normale</option>
<option value="Attaque normale">Attaque normale</option> <option value="charge">Charge</option>
<option value="charge">Charge</option> <option value="feinte">Feinte</option>
<option value="feinte">Feinte</option> </select>
</select> <div class="tooltiptext ttt-ajustements">
<div class="tooltiptext ttt-ajustements"> <div>
<div> <strong>Charge</strong> : Les longueurs d'armes n'interviennent pas dans la charge, il faut gérer une initiative aléatoire dans ce cas.
<strong>Charge</strong> : Les longueurs d'armes n'interviennent pas dans la charge, il faut gérer une initiative aléatoire dans ce cas. <br><strong>Feinte</strong> : Vous devez avoir l'initative sur votre adversaire et y renoncer.
<br><strong>Feinte</strong> : Vous devez avoir l'initative sur votre adversaire et y renoncer. </div>
</div> </div>
</div> </span>
</span> </div>
<label>D&eacute;gats:</label><label id="dmg-arme-actor"></label>
<label>Non Mortel</label>
<input class="attribute-value" type="checkbox" id="coupsNonMortels" name="coupsNonMortels" {{#if coupsNonMortels}}checked{{/if}}/>
{{/if}} {{/if}}
{{#if ajustements.attaqueDefenseurSurpris.used}} {{#if ajustements.attaqueDefenseurSurpris.used}}
<label id="defenseur-surprise">{{ajustements.attaqueDefenseurSurpris.label}}</label> <div class="flexrow">
<label id="defenseur-surprise">{{ajustements.attaqueDefenseurSurpris.label}}</label>
</div>
{{/if}} {{/if}}
{{/if}}
{{#if arme}}
{{#unless attackerRoll}}
<div class="flexrow">
{{#if (eq arme.data.mortalite 'non-mortel')}}
<label>D&eacute;gats:</label><label class="dmg-arme-actor"></label>
{{else}}
<label>D&eacute;gats:
</label>
<span>
<input class="attribute-value" type="checkbox" id="coupsNonMortels" name="coupsNonMortels" {{#if coupsNonMortels}}checked{{/if}}/>
<label class="dmg-arme-actor">
</label>
</span>
{{/if}}
</div>
{{/unless}}
{{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-enctotal.html"}}
</div> </div>
{{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}} <div class="flex-group-left">
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-enctotal.html"}} <div class="flexrow">
{{#if attackerRoll}}
<div id="tableAjustements"> <label>Difficulté</label>
<label>{{diffLibre}}</label>
{{else}}
<label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}>
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
{{/if}}
</div>
<div class="flexrow">
</div>
<div class="flexrow">
<label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flexrow">
<label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div>
<div id="tableAjustements" class="flexrow">
</div>
</div>
</div> </div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">

View File

@ -1,6 +1,8 @@
{{#if ajustements.encTotal.visible}} {{#if ajustements.encTotal.visible}}
<div class="form-group"> <div class="flexrow">
<label>Appliquer l'encombrement total comme malus ({{encTotal}}) ? </label> <label>
<input class="attribute-value checkbox-by-name" type="checkbox" name="useMalusEncTotal" {{#if useMalusEncTotal}}checked{{/if}}/> <input class="attribute-value checkbox-by-name" type="checkbox" name="useMalusEncTotal" {{#if useMalusEncTotal}}checked{{/if}}/>
Appliquer l'encombrement comme malus ({{encTotal}}) ?
</label>
</div> </div>
{{/if}} {{/if}}

View File

@ -1,6 +1,8 @@
{{#if surencMalusFlag}} {{#if surencMalusFlag}}
<div class="form-group"> <div class="flexrow">
<label for="xp">Appliquer le malus de sur-encombrement ? </label> <label>
<input class="attribute-value checkbox-by-name" type="checkbox" name="useMalusSurenc" {{#if useMalusSurenc}}checked{{/if}}/> <input class="attribute-value checkbox-by-name" type="checkbox" name="useMalusSurenc" {{#if useMalusSurenc}}checked{{/if}}/>
Appliquer le sur-encombrement
</label>
</div> </div>
{{/if}} {{/if}}