Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
10 changed files with 111 additions and 196 deletions
Showing only changes of commit d486fa7aff - Show all commits

View File

@ -26,6 +26,7 @@ export class RdDItemCompetenceCreature extends Item {
competence: itemData.name, competence: itemData.name,
resistance: 100, resistance: 100,
equipe: true, equipe: true,
dommagesReels: arme.data.dommages,
penetration: 0, penetration: 0,
force: 0, force: 0,
rapide: true rapide: true

View File

@ -50,7 +50,7 @@ const poesieHautReve = [
}, },
{ {
reference: 'Denis Gerfaud', reference: 'Denis Gerfaud',
extrait: `Ainsi se cuccèdent les Jours et les Ages. extrait: `Ainsi se succèdent les Jours et les Ages.
<br>Les jours des Dragons sont les Ages des Hommes.` <br>Les jours des Dragons sont les Ages des Hommes.`
}, },
{ {

View File

@ -1179,7 +1179,7 @@ export class RdDCombat {
_computeImpactRecul(attaque) { _computeImpactRecul(attaque) {
const taille = this.defender.getTaille(); const taille = this.defender.getTaille();
const force = this.attacker.getForce(); const force = this.attacker.getForce();
const dommages = attaque.arme.data.dommagesReels; const dommages = attaque.arme.data.dommagesReels ?? attaque.arme.data.dommages;
return taille - (force + dommages); return taille - (force + dommages);
} }

View File

@ -108,6 +108,8 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html',
//Items //Items
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html',

File diff suppressed because one or more lines are too long

View File

@ -645,6 +645,24 @@ ul, li {
padding: 0.125rem; padding: 0.125rem;
flex: 1 1 5rem; flex: 1 1 5rem;
} }
.table-row {
margin: 0.125rem;
border-radius: 0;
padding: 0.125rem;
flex: 1 1 5rem;
}
.alterne-row > .row-item:hover {
background: rgba(100, 100, 50, 0.25);
}
.alterne-row > .row-item:nth-child(even) {
background: rgba(80, 60, 0, 0.10);
}
.alterne-row > .row-item:nth-child(odd) {
background: rgb(160, 130, 100, 0.05);
}
.item-display-show { .item-display-show {
display: block; display: block;
} }

View File

@ -0,0 +1,24 @@
<tr class="table-row alterne-row item" data-blessure-type="{{gravite}}" data-attribute={{key}} data-blessure-index="{{key}}" >
<td class="flex-row first" >
{{title}}
</td>
<td class="item-control blessure-control" title="Blessure {{title}}" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</td>
<td class="competence-header ">
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</td>
<td class="competence-header ">
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</td>
<td class="competence-header ">
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</td>
<td class="competence-header ">
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</td>
</tr>

View File

@ -136,101 +136,47 @@
{{!-- blessures Tab --}} {{!-- blessures Tab --}}
<div class="tab blessures" data-group="primary" data-tab="blessures" style="height:200px"> <div class="tab blessures" data-group="primary" data-tab="blessures" style="height:200px">
<span class="blessures-title">Blessures Légeres :</span> {{!-- Liste de blessures --}}
<div class="blessure-data alterne-list"> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}}
{{#each data.blessures.legeres.liste as |bless key|}} </div>
<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}}" /> -
Jours <input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{this.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name='localisation' data-dtype="String"
value="{{this.loc}}" />
</li>
{{/each}}
</div>
<span class="blessures-title">Blessures Graves :</span>
<div class="blessure-data alterne-list">
{{#each data.blessures.graves.liste as |bless key|}}
<li class="item flexrow list-item" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}">
<a class="item-control blessure-control" title="Blessure Grave"
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="{{bless.premiers_soins}}" /> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number"
value="{{bless.soins_complets}}" /> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String"
value="{{bless.loc}}" />
</li>
{{/each}}
</div>
<span class="blessures-title">Blessure Critique :</span>
<div class="blessure-data alterne-list">
{{#each data.blessures.critiques.liste as |bless key|}}
<li class="item flexrow list-item" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}">
<a class="item-control blessure-control" title="Blessure Critique"
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="{{bless.premiers_soins}}" /> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number"
value="{{bless.soins_complets}}" /> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String"
value="{{bless.loc}}" />
</li>
</li>
{{/each}}
</div>
</div>
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}
<div class="tab items" data-group="primary" data-tab="items"> <div class="tab items" data-group="primary" data-tab="items">
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> - <span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
<span class="item-name"><a class="creer-un-objet">Créer un objet</a></span> <span class="item-name"><a class="creer-un-objet">Créer un objet</a></span>
{{#if options.isGM}} {{#if options.isGM}}
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span> <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
{{/if}} {{/if}}
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
<li class="competence-header flexrow"> <li class="competence-header flexrow">
<span class="competence-title competence-label">Nom</span> <span class="competence-title competence-label">Nom</span>
<span class="competence-title competence-label">Q.</span> <span class="competence-title competence-label">Q.</span>
<span class="competence-title competence-value">Enc.</span> <span class="competence-title competence-value">Enc.</span>
<span class="competence-title competence-value">Equiper</span> <span class="competence-title competence-value">Equiper</span>
<span class="competence-title competence-value">Editer/Suppr.</span> <span class="competence-title competence-value">Editer/Suppr.</span>
</li>
{{#each data.objets as |item id|}}
{{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}}
<li class="item flexrow list-item" data-item-id="{{item._id}}">
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
<span class="item-name">{{item.name}}</span>
<span class="item-quantite">{{item.data.quantite}}</span>
<span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li> </li>
{{#each data.objets as |item id|}} {{/if}}
{{#unless item.estContenu}} {{/unless}}
{{#if (ne item.type 'conteneur')}} {{/each}}
<li class="item flexrow list-item" data-item-id="{{item._id}}"> {{#each data.conteneurs as |conteneur id|}}
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/> {{buildConteneur this}}
<span class="item-name">{{item.name}}</span>
<span class="item-quantite">{{item.data.quantite}}</span>
<span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if}}
{{/unless}}
{{/each}} {{/each}}
{{#each data.conteneurs as |conteneur id|}} </ul>
{{buildConteneur this}} </div>
{{/each}}
</ul>
</div>
{{!-- Biography Tab --}} {{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description"> <div class="tab description" data-group="primary" data-tab="description">

View File

@ -0,0 +1,23 @@
<h3>Blessures:</h3>
<table class="table-container" role="table">
<thead>
<tr class="competence-header competence-title competence-label" >
<th class="first" colspan="2">Gravité</th>
<th>Localisation</th>
<th>Premiers soins</th>
<th>Soins complets</th>
<th>Age (jours)</th>
</tr>
</thead>
<tbody>
{{#each data.blessures.legeres.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Légère"}}
{{/each}}
{{#each data.blessures.graves.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="grave" title="Grave"}}
{{/each}}
{{#each data.blessures.critiques.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Critique"}}
{{/each}}
</tbody>
</table>

View File

@ -363,108 +363,9 @@
</li> </li>
</ul> </ul>
<hr> <hr>
{{!-- Liste de blessures --}} {{!-- Liste de blessures --}}
<h3 class="blessures-title">Blessures:</h3> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}}
<div class="flex-group-left flexcol competence-column"> </div>
<h4 class="blessures-title">Légères:</h4>
<ul class="blessure-data flexrow alterne-list blessures-list">
{{#each data.blessures.legeres.liste as |bless key|}}
<li class="item flexrow blessure-data list-item" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}">
<ul>
<li 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}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h4 class="blessures-title">Graves :</h4>
<ul class="flexrow alterne-list blessures-list">
{{#each data.blessures.graves.liste as |bless key|}}
<li class="item flexrow list-item" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}" >
<ul>
<li class="item-control blessure-control" title="Blessure Grave" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h4 class="blessures-title">Critique :</h4>
<ul class="flexrow alterne-list blessures-list">
{{#each data.blessures.critiques.liste as |bless key|}}
<li class="item list-item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}" >
<ul>
<li class="flex-group-center item-control blessure-control" title="Blessure Critique" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Connaissances Tab --}} {{!-- Connaissances Tab --}}
<div class="tab connaissances" data-group="primary" data-tab="connaissances"> <div class="tab connaissances" data-group="primary" data-tab="connaissances">