forked from public/foundryvtt-reve-de-dragon
		
	Draconic que pour les Haut rêvant #174
This commit is contained in:
		| @@ -180,6 +180,7 @@ export class RdDCombatManager extends Combat { | |||||||
|       ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) |       ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) | ||||||
|       return []; |       return []; | ||||||
|     } |     } | ||||||
|  |     const actorData = Misc.data(combatant.actor); | ||||||
|     let items = combatant.actor.data.items; |     let items = combatant.actor.data.items; | ||||||
|     let actions = [] |     let actions = [] | ||||||
|     if (combatant.actor.isCreature()) { |     if (combatant.actor.isCreature()) { | ||||||
| @@ -192,9 +193,11 @@ export class RdDCombatManager extends Combat { | |||||||
|         .concat(RdDItemArme.mainsNues()); |         .concat(RdDItemArme.mainsNues()); | ||||||
|  |  | ||||||
|       let competences = items.filter(it => it.type == 'competence'); |       let competences = items.filter(it => it.type == 'competence'); | ||||||
|       actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, Misc.data(combatant.actor).data.carac)); |       actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, actorData.data.carac)); | ||||||
|        |        | ||||||
|       actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } }); |       if (actorData.data.attributs.hautrevant.value){ | ||||||
|  |         actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } }); | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     actions.push({ name: "Autre action", data: { initOnly: true, competence: "Autre action" } }); |     actions.push({ name: "Autre action", data: { initOnly: true, competence: "Autre action" } }); | ||||||
|   | |||||||
| @@ -61,7 +61,7 @@ | |||||||
|               <span class="gm-only remise-a-neuf"><a title="Remise à neuf"><img class="button-img" src="icons/svg/regen.svg" alt="Remise à neuf"/></a></span> |               <span class="gm-only remise-a-neuf"><a title="Remise à neuf"><img class="button-img" src="icons/svg/regen.svg" alt="Remise à neuf"/></a></span> | ||||||
|               <span id="dormir-une-heure"><a title="Dormir une heure"><img class="button-img" src="icons/svg/sleep.svg" alt="Dormir une heure"/></a></span> |               <span id="dormir-une-heure"><a title="Dormir une heure"><img class="button-img" src="icons/svg/sleep.svg" alt="Dormir une heure"/></a></span> | ||||||
|               <span id="dormir-chateau-dormant"><a title="Chateau Dormant"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd12.svg" alt="Chateau Dormant"/></a></span> |               <span id="dormir-chateau-dormant"><a title="Chateau Dormant"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd12.svg" alt="Chateau Dormant"/></a></span> | ||||||
|               {{#if (eq data.attributs.hautrevant.value 'Haut rêvant')}} |               {{#if data.attributs.hautrevant.value}} | ||||||
|               <span id="monte-tmr"><a title="Montée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/></a></span> |               <span id="monte-tmr"><a title="Montée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/></a></span> | ||||||
|               <span id="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/></a></span> |               <span id="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Médianes !"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/></a></span> | ||||||
|               <span id="visu-tmr"><a title="Regarder les Terres Médianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres Médianes"/></a></span> |               <span id="visu-tmr"><a title="Regarder les Terres Médianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres Médianes"/></a></span> | ||||||
| @@ -164,15 +164,17 @@ | |||||||
|                   </span> |                   </span> | ||||||
|                 </li> |                 </li> | ||||||
|                 {{#each data.attributs as |attr key|}} |                 {{#each data.attributs as |attr key|}} | ||||||
|  |                 {{#unless (eq key 'hautrevant')}} | ||||||
|                 <li class="competence flexrow  list-item" data-attribute="{{key}}"> |                 <li class="competence flexrow  list-item" data-attribute="{{key}}"> | ||||||
|                   <span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : |                   <span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : | ||||||
|                   {{#if (eq key 'protection')}} |                     {{#if (eq key 'protection')}} | ||||||
|                     <input id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/><span/> |                     <input id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/><span/> | ||||||
|                   {{else}} |                     {{else}} | ||||||
|                     {{attr.value}} |                     {{attr.value}} | ||||||
|                   {{/if}} |                     {{/if}} | ||||||
|                   </span> |                   </span> | ||||||
|                 </li> |                 </li> | ||||||
|  |                 {{/unless}} | ||||||
|                 {{/each}} |                 {{/each}} | ||||||
|               </ul> |               </ul> | ||||||
|               <ul class="carac-list alterne-list"> |               <ul class="carac-list alterne-list"> | ||||||
| @@ -299,7 +301,7 @@ | |||||||
|                 {{/each}} |                 {{/each}} | ||||||
|               </ul> |               </ul> | ||||||
|  |  | ||||||
|               {{#if (eq data.attributs.hautrevant.value 'Haut rêvant')}} |               {{#if data.attributs.hautrevant.value}} | ||||||
|               <header class="competence-header flexrow"> |               <header class="competence-header flexrow"> | ||||||
|                 <span class="competence-title">Draconic</span> |                 <span class="competence-title">Draconic</span> | ||||||
|               </header> |               </header> | ||||||
| @@ -553,9 +555,11 @@ | |||||||
|       {{!-- hautreve Tab --}} |       {{!-- hautreve Tab --}} | ||||||
|       <div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px"> |       <div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px"> | ||||||
|         <div> |         <div> | ||||||
|           <h3>Haut rêve:</h3> |           {{#if data.attributs.hautrevant.value}} | ||||||
|  |           <h3>Haut rêvant</h3> | ||||||
|  |           {{/if}} | ||||||
|           <ul class="item-list"> |           <ul class="item-list"> | ||||||
|             {{#if (eq data.attributs.hautrevant.value 'Haut rêvant')}} |             {{#if data.attributs.hautrevant.value}} | ||||||
|             <li class="item flexrow"> |             <li class="item flexrow"> | ||||||
|               <span class="competence-label">Position en TMR :</span>  |               <span class="competence-label">Position en TMR :</span>  | ||||||
|               <span> |               <span> | ||||||
| @@ -590,7 +594,7 @@ | |||||||
|           </ul> |           </ul> | ||||||
|         </div> |         </div> | ||||||
|         <hr> |         <hr> | ||||||
|         {{#if (eq data.attributs.hautrevant.value 'Haut rêvant')}} |         {{#if data.attributs.hautrevant.value}} | ||||||
|         <div> |         <div> | ||||||
|           <h3>Sorts:</h3> |           <h3>Sorts:</h3> | ||||||
|           <ul class="item-list"> |           <ul class="item-list"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user