#3 Améliorations fiche
This commit is contained in:
parent
ba66f79f63
commit
d3111f6d28
@ -72,7 +72,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
|
||||
// To avoid armour and so on...
|
||||
data.data.combat = duplicate( RdDUtility.checkNull(data.itemsByType['arme']));
|
||||
data.data.combat = RdDUtility.finalizeArmeList( data.data.combat )
|
||||
data.data.combat = RdDUtility.finalizeArmeList( data.data.combat, data.competenceByCategory );
|
||||
|
||||
if (data.competenceByCategory && data.competenceByCategory.melee) {
|
||||
//Specific case for Esquive and Corps à Corps
|
||||
|
@ -28,10 +28,10 @@ export class RdDDice {
|
||||
case "blindroll": //GM only
|
||||
blind = true;
|
||||
case "gmroll": //GM + rolling player
|
||||
whisper = ChatUtility.getUsersIds(user => user.isGM);
|
||||
whisper = ChatUtility.getUsers(user => user.isGM);
|
||||
break;
|
||||
case "roll": //everybody
|
||||
whisper = ChatUtility.getUsersIds(user => user.active);
|
||||
whisper = ChatUtility.getUsers(user => user.active);
|
||||
break;
|
||||
case "selfroll":
|
||||
whisper = [game.user._id];
|
||||
|
@ -339,7 +339,7 @@ export class RdDUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */
|
||||
static finalizeArmeList( armeList ) {
|
||||
static finalizeArmeList( armeList, competenceByCategory ) {
|
||||
// Gestion des armes 1/2 mains
|
||||
let arme2mains = []; // Tableau contenant la duplication des armes 1m/2m
|
||||
for (const arme of armeList) {
|
||||
@ -348,7 +348,7 @@ export class RdDUtility {
|
||||
let arme2main = duplicate(arme);
|
||||
arme2main.data.dommages = arme2main.data.dommages.split("/")[1]; // Existence temporaire uniquement dans la liste des armes, donc OK
|
||||
arme2main.data.competence = arme2main.data.competence.replace(" 1 main", " 2 mains"); // Replace !
|
||||
for ( const melee of data.competenceByCategory.melee ) {
|
||||
for ( const melee of competenceByCategory.melee ) {
|
||||
if (melee.name == arme2main.data.competence )
|
||||
arme2main.data.niveau = melee.data.niveau
|
||||
}
|
||||
|
@ -463,22 +463,23 @@ section.sheet-body:after, section.sheet-body div:after {
|
||||
/* Global UI elements */
|
||||
|
||||
/* ======================================== */
|
||||
.inventory-list > .list-combat:nth-child(even) {
|
||||
background-color: #7b733b29;
|
||||
.alterne-list > .list-item:nth-child(even) {
|
||||
background-color:#7b733b29;
|
||||
background: #7b733b29;
|
||||
}
|
||||
.inventory-list > .list-combat:nth-child(odd) {
|
||||
.alterne-list > .list-item:nth-child(odd) {
|
||||
background-color: #9e856a0d;
|
||||
background: #9e856a0d;
|
||||
}
|
||||
|
||||
.list-combat {
|
||||
.carac-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.list-item {
|
||||
margin: 2px 2px 2px 2px;
|
||||
box-shadow: inset 0px 0px 1px #00000096;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.sheet-competence-img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "foundryvtt-reve-de-dragon",
|
||||
"title": "Rêve de Dragon",
|
||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||
"version": "0.9.84",
|
||||
"version": "0.9.85",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.6",
|
||||
"templateVersion": 48,
|
||||
|
@ -109,9 +109,9 @@
|
||||
<div class="tab items" data-group="primary" data-tab="carac">
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left flexcol">
|
||||
<ol class="carac-list">
|
||||
<ol class="carac-list alterne-list">
|
||||
{{#each data.carac as |carac key|}}
|
||||
<li class="competence flexrow" data-attribute="{{key}}">
|
||||
<li class="competence flexrow list-item" data-attribute="{{key}}">
|
||||
{{#if carac.isTaille}}
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span>
|
||||
{{else}}
|
||||
@ -155,9 +155,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences de base</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.generale as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.generale[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.generale[{{key}}].data.value" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -173,9 +173,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences Particulières</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.particuliere as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.particuliere[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.particuliere[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -190,9 +190,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences Spécialisées</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.specialisee as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.specialisee[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.specialisee[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -210,9 +210,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences De Mêlée</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.melee as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.melee[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.melee[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -228,9 +228,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences De Tir</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.tir as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.tir[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.tir[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -246,9 +246,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Compétences De Lancer</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.lancer as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.lancer[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.lancer[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -264,9 +264,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Connaissances</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.connaissance as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.connaissance[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -282,9 +282,9 @@
|
||||
<header class="competence-header flexrow">
|
||||
<span class="competence-title">Draconic</span>
|
||||
</header>
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.draconic as |comp key|}}
|
||||
<li class="item flexrow" data-item-id="{{comp._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}"/>
|
||||
<span class="competence-label" name="data.competenceByCategory.draconic[{{key}}].name"><a>{{comp.name}}</a></span>
|
||||
<input class="competence-value" type="text" name="data.competenceByCategory.draconic[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
@ -311,7 +311,7 @@
|
||||
|
||||
{{!-- Combat Tab --}}
|
||||
<div class="tab combat" data-group="primary" data-tab="combat">
|
||||
<ol class="item-list inventory-list">
|
||||
<ol class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title competence-label">Armes</span>
|
||||
<span class="competence-title competence-label">Comp.</span>
|
||||
@ -319,7 +319,7 @@
|
||||
<span class="competence-title competence-value">+dom</span>
|
||||
</li>
|
||||
{{#each data.combat as |arme key|}}
|
||||
<li class="item flexrow list-combat" data-item-id="{{arme._id}}">
|
||||
<li class="item flexrow list-item" data-item-id="{{arme._id}}">
|
||||
<span class="arme-label competence-label" name="data.armes[{{key}}].name"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span>
|
||||
<span class="competence-label" name="data.armes[{{key}}].data.competence">{{arme.data.competence}}</span>
|
||||
<span class="competence-value" name="data.armes[{{key}}].data.niveau">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
|
||||
@ -332,9 +332,9 @@
|
||||
{{!-- Compteurs/Blessures Tab --}}
|
||||
<div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs">
|
||||
<div class="flex-group-left flexrow">
|
||||
<ol class="item-list">
|
||||
<ol class="item-list alterne-list">
|
||||
{{#each data.compteurs as |compteur key|}}
|
||||
<li class="item flexrow">
|
||||
<li class="item flexrow list-item">
|
||||
<span class="arme-label">{{compteur.label}}</span>
|
||||
{{#if compteur.isInput}}
|
||||
<input class="stress-value stress-style compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
|
||||
@ -353,9 +353,9 @@
|
||||
</div>
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
<span class="blessures-title">Blessures Légeres :</span>
|
||||
<div class="blessure-data">
|
||||
<div class="blessure-data alterne-list">
|
||||
{{#each data.blessures.legeres.liste as |bless key|}}
|
||||
<li class="item flexrow blessure-data" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}">
|
||||
<li class="item flexrow blessure-data list-item" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}">
|
||||
<a class="item-control blessure-control" title="Blessure Légère" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
|
||||
Premiers soins <input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{this.premiers_soins}}"/> -
|
||||
Soins complets <input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{this.soins_complets}}"/> -
|
||||
|
Loading…
Reference in New Issue
Block a user